AutoAllocator

class pypdevs.allocators.autoAllocator.AutoAllocator[source]

Allocate all models in a static manner, simply trying to divide the number of models equally. Our ‘heuristic’ is to allocate in chunks as defined in the root coupled model.

allocate(models, edges, nr_nodes, total_activities)[source]

Calculate allocations for the nodes, using the information provided.

Parameters
  • models – the models to allocte

  • edges – the edges between the models

  • nr_nodes – the number of nodes to allocate over. Simply an upper bound!

  • total_activities – activity tracking information from each model

Returns

allocation that was found

getTerminationTime()[source]

Returns the time it takes for the allocator to make an ‘educated guess’ of the advised allocation. This time will not be used exactly, but as soon as the GVT passes over it. While this is not exactly necessary, it avoids the overhead of putting such a test in frequently used code.

Returns

float – the time at which to perform the allocations (and save them)