Manual Relocator

Relocator for user-provided relocation directives

class pypdevs.relocators.manualRelocator.ManualRelocator[source]

Main class

__init__()[source]

Initialize the relocator

addDirective(time, model, destination)[source]

Add a relocation directive, this relocation will be scheduled and will be executed as soon as the GVT passes over the provided time.

Parameters
  • time – the time at which this should happen

  • model – the model that has to be moved (its model_id)

  • destination – the destination kernel to move it to

getRelocations(gvt, activities, horizon)[source]

Fetch the relocations that are pending for the current GVT

Parameters
  • gvt – current GVT

  • activities – the activities being passed on the GVT ring

  • horizon – the activity horizon that was used

Returns

dictionary containing all relocations

setController(controller)[source]

Sets the controller

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