BestFitStrategy#

class eclypse.placement.strategies.best_fit.BestFitStrategy[source]#

Bases: PlacementStrategy

BestFitStrategy class.

A placement strategy that places services onto the node that best fits the requirements.

Methods

place(infrastructure, application, _, ...)

Performs the placement according to a best-fit logic.

place(infrastructure, application, _, placement_view)[source]#

Performs the placement according to a best-fit logic.

Places the services of an application on the infrastructure nodes based on the node that best fits the requirements of the service.

Parameters:
  • infrastructure (Infrastructure) – The infrastructure to place the application on.

  • application (Application) – The application to place on the infrastructure.

  • _ (dict[str, Placement]) – The placement of all the applications in the simulations.

  • placement_view (PlacementView) – The snapshot of the current state of the infrastructure.

Returns:

A mapping of services to infrastructure nodes.

Return type:

dict[str, str]