vt::vrt::collection::balance::SelectSubphases class

A load model to direct consideration to load data relating to a specific set of subphases, rather than the entire set.

This may be useful, for example, to select only subphases that are substantially imbalanced, or to exclude subphases in which loads are unpredictable.

Base classes

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

Constructors, destructors, conversion operators

SelectSubphases(std::shared_ptr<LoadModel> base, std::vector<unsigned int> subphases)
Constructor taking an enumeration of the relevant subphases.

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 getNumSubphases() const -> int override

Public variables

std::vector<unsigned int> subphases_

Function documentation

vt::vrt::collection::balance::SelectSubphases::SelectSubphases(std::shared_ptr<LoadModel> base, std::vector<unsigned int> subphases)

Constructor taking an enumeration of the relevant subphases.

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

LoadType vt::vrt::collection::balance::SelectSubphases::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.

int vt::vrt::collection::balance::SelectSubphases::getNumSubphases() const override

Returns the number of subphases recorded in the most recent completed phase

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