FirstFitStrategy.place#

FirstFitStrategy.place(infrastructure, application, _, placement_view)[source]

Performs the placement according to a first-fit logic.

Places the services of an application on the infrastructure nodes based on the first node that satisfies 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]