vt::vrt::collection::balance::NaivePersistence struct

Predicts future object loads as exactly matching their load in the last phase.

Base classes

class ComposedModel
Utility class to support implementation of composable load modeling components.

Constructors, destructors, conversion operators

NaivePersistence(std::shared_ptr<balance::LoadModel> base) explicit
Constructor.

Public functions

auto getModeledLoad(ElementIDStruct object, PhaseOffset when) const -> LoadType override
Provide an estimate of the given object's load during a specified interval.
auto getRawLoad(ElementIDStruct object, PhaseOffset offset) const -> LoadType override
auto getUserData(ElementIDStruct object, PhaseOffset when) const -> ElmUserDataType override
auto getNumPastPhasesNeeded(unsigned int look_back) const -> unsigned int override
Compute how many phases of past load statistics need to be kept available for the model to use.

Function documentation

vt::vrt::collection::balance::NaivePersistence::NaivePersistence(std::shared_ptr<balance::LoadModel> base) explicit

Constructor.

Parameters
base in The source of underlying load numbers to return; must not be null

LoadType vt::vrt::collection::balance::NaivePersistence::getModeledLoad(ElementIDStruct object, PhaseOffset when) const override

Provide an estimate of the given object's load during a specified interval.

Parameters
object in The object whose load is desired
when in The interval in which the estimated load is desired
Returns How much computation time the object is estimated to require

The updateLoads method must have been called before any call to this.

unsigned int vt::vrt::collection::balance::NaivePersistence::getNumPastPhasesNeeded(unsigned int look_back) const override

Compute how many phases of past load statistics need to be kept available for the model to use.

Parameters
look_back in How many phases into the past the caller intends to query
Returns How many phases of past load statistics will be needed to satisfy the requested history