# Boundary Relocator

Base class for a relocator that supports boundary construction and maintenance

class pypdevs.relocators.boundaryRelocator.BoundaryRelocator

  Main class

  __init__()

    Constructor

  constructBoundaries(models)

    Construct the boundaries for the specified models

    Parameters

      models – the models to be added to the boundary

  fetchModelActivity(model)

    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)

    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)

    Remove the boundaries provided by the specified models

    Parameters

      models – the models to be removed from the boundaries list

  scheduleMove(model_id, destination)

    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)

    Set the controller of this relocator

    Parameters

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

  useLastStateOnly()

    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