Class SciantixVariable
Defined in File SciantixVariable.h
Inheritance Relationships
Base Type
public Variable(Class Variable)
Class Documentation
-
class SciantixVariable : public virtual Variable
A specialized variable class that extends the Variable class with physical attributes and functionalities.
SciantixVariable includes features such as unit of measure (UOM), final and initial values, and mechanisms for adjusting these values through specific operations.
- Author
G. Zullo
- Author
F. Bastien
Public Functions
-
inline SciantixVariable(std::string name, std::string uom, double initial_value, double final_value, bool output)
-
void rescaleInitialValue(const double factor)
Rescales the initial value by a specified factor.
- Parameters:
factor – The multiplier to apply to the initial value.
-
void rescaleFinalValue(const double factor)
Rescales the final value by a specified factor.
- Parameters:
factor – The multiplier to apply to the final value.
-
void addValue(const double v)
Adds a specified value to the final value.
- Parameters:
v – The value to add to the final value.
-
void setUOM(std::string s)
Sets the unit of measure for this variable.
- Parameters:
s – The string representing the unit of measure.
-
std::string getUOM()
Retrieves the unit of measure.
- Returns:
The unit of measure as a string.
-
void setConstant()
Sets the final value equal to the initial value, making the variable constant over time.
-
void resetValue()
Resets the initial value to match the final value, synchronizing them.
-
void setFinalValue(double FinalValue)
Sets the final value to a specified value.
- Parameters:
FinalValue – The value to set as the final value.
-
void setInitialValue(double InitialValue)
Sets the initial value to a specified value.
- Parameters:
InitialValue – The value to set as the initial value.
-
double getFinalValue()
Retrieves the final value of the variable.
- Returns:
The final value.
-
double getInitialValue()
Retrieves the initial value of the variable.
- Returns:
The initial value.
-
double getIncrement()
Calculates and returns the increment between the final and initial values.
- Returns:
The calculated increment.
-
void setOutput(bool io)
Sets whether the variable should be included in output.
- Parameters:
io – A boolean value indicating output inclusion.
-
bool getOutput()
Checks if the variable is marked for output.
- Returns:
True if the variable is to be included in output, false otherwise.
-
inline SciantixVariable()
Constructor.
-
inline ~SciantixVariable()
Destructor.