wrench::RandomServerlessPlanSelectionPolicy

class RandomServerlessPlanSelectionPolicy : public wrench::ServerlessPlanSelectionPolicy

A policy that selects the plan randomly.

Public Functions

explicit RandomServerlessPlanSelectionPolicy(unsigned int seed)

Constructor.

Parameters:

seed – The seed of the RNG

virtual std::shared_ptr<ServerlessComputeNode> pickBestInvocationPlan(const std::map<std::shared_ptr<ServerlessComputeNode>, std::shared_ptr<ServerlessSchedulingDecisions>> &plans) override

Select the node that has the best invocation plan.

Parameters:

plans – a map of plans

Returns:

a compute node

virtual std::shared_ptr<ServerlessComputeNode> pickBestLayerCopyPlan(const std::map<std::shared_ptr<ServerlessComputeNode>, std::shared_ptr<ServerlessSchedulingDecisions>> &plans) override

Select the node that has the best layer-copy plan.

Parameters:

plans – a map of plans

Returns:

a compute node

virtual std::shared_ptr<ServerlessComputeNode> pickBestLayerLoadPlan(const std::map<std::shared_ptr<ServerlessComputeNode>, std::shared_ptr<ServerlessSchedulingDecisions>> &plans) override

Select the node that has the best layer-load plan.

Parameters:

plans – a map of plans

Returns:

a compute node