Antares Simulator
Power System Simulator
Antares::Optimisation::EvaluationContext Class Reference

Represents the context for evaluating expressions. More...

#include <EvaluationContext.h>

Classes

struct  CouldNotEvaluateConstantParameter
 

Public Member Functions

 EvaluationContext (const ModelerStudy::SystemModel::Component *component, const Optimisation::LinearProblemApi::ILinearProblemData *data, const Optimisation::LinearProblemApi::IScenario *scenario)
 Constructs an evaluation context with the specified parameter and variable values. More...
 
double getSystemParameterValueAsDouble (const std::string &key) const
 Retrieves the value of a parameter. More...
 
std::string getSystemParameterValue (const std::string &key) const
 
double getParameterValue (const std::string &key, unsigned int year, unsigned int hour) const
 
std::span< const double > getParameterValue (const std::string &key, unsigned int year, unsigned int firstHour, unsigned int lastHour) const
 
Optimisation::VariabilityType getParameterType (const std::string &key) const
 
ModelerStudy::SystemModel::ParameterTypeAndValue getParameter (const std::string &key) const
 
const Optimisation::LinearProblemApi::ILinearProblemDatadata () const
 
const Optimisation::LinearProblemApi::IScenarioscenario () const
 

Detailed Description

Represents the context for evaluating expressions.

Stores and provides access to parameter and variable values.

Constructor & Destructor Documentation

◆ EvaluationContext()

Antares::Optimisation::EvaluationContext::EvaluationContext ( const ModelerStudy::SystemModel::Component component,
const Optimisation::LinearProblemApi::ILinearProblemData data,
const Optimisation::LinearProblemApi::IScenario scenario 
)
explicit

Constructs an evaluation context with the specified parameter and variable values.

Parameters
component
system_parameters
constant_parametersparameter values.
variablesvariable values.

Member Function Documentation

◆ getSystemParameterValueAsDouble()

double Antares::Optimisation::EvaluationContext::getSystemParameterValueAsDouble ( const std::string &  key) const

Retrieves the value of a parameter.

Parameters
nameThe name of the parameter.
Returns
The value of the parameter.
Exceptions
std::out_of_rangeIf the parameter is not found.

The documentation for this class was generated from the following files: