State variable

class CStateVariable

Description of time-dependent state variables of the unit.

Used either to track internal time-dependent variables of the unit or to output it to the user.

Public Functions

std::string GetName() const

Returns name of the state variable.

Returns

Name of the state variable.

double GetValue() const

Returns current value of the state variable.

Returns

Current value of the state variable.

bool HasHistory() const

Checks whether the state variable contains a stored history of time-dependent changes.

Returns

Whether the state variable stores history.

std::vector<STDValue> GetHistory() const

Returns the stored history of time-dependent changes.

Returns

History of time-dependent changes.

double GetHistoryValue(double _time) const

Returns a value for a given time point from the stored history.

Interpolates the value if it is required.

Parameters

_time – Time point.

Returns

Value at the given time point.