Boundary Relocator

Base class for a relocator that supports boundary construction and maintenance

class pypdevs.relocators.boundaryRelocator.BoundaryRelocator[source]

Main class

__init__()[source]

Constructor

constructBoundaries(models)[source]

Construct the boundaries for the specified models

Parameters

models – the models to be added to the boundary

fetchModelActivity(model)[source]

Get the activity of a specific model.

It will also cache the activity of all models at the same node to make subsequent calls much faster.

Parameters

model – the model to fetch the activity of, can be remote

Returns

the activity of the model

getRelocations(gvt, activities, horizon)[source]

Return all pending relocations

Parameters
  • gvt – current GVT

  • activities – activities being passed on the GVT ring

  • horizon – the activity horizon

Returns

all relocations that should be executed

removeBoundaries(models)[source]

Remove the boundaries provided by the specified models

Parameters

models – the models to be removed from the boundaries list

scheduleMove(model_id, destination)[source]

Schedule the move of a model to another destination; this operation is reversible

Parameters
  • model_id – the model_id of the model to move

  • destination – the destination of the model

setController(controller)[source]

Set the controller of this relocator

Parameters

controller – the controller object which can be used to fetch all required information about the model

useLastStateOnly()[source]

Determines whether or not the activities of all steps should be accumulated, or only a single state should be used.

Returns

boolean – True if the relocator works with a single state