25#include <antares/expressions/visitors/EvaluationContext.h>
29namespace Antares::Study::SystemModel
40 const Model* model =
nullptr;
41 std::map<std::string, Expressions::Visitors::ParameterTypeAndValue> parameter_values;
42 std::string scenario_group_id;
48 parameter_values.clear();
49 scenario_group_id.clear();
62 const std::string& Id()
const
67 const Model* getModel()
const
72 const std::map<std::string, Expressions::Visitors::ParameterTypeAndValue>& getParameterValues()
75 return data_.parameter_values;
78 std::string getParameterValue(
const std::string& parameter_id)
const
80 if (!data_.parameter_values.contains(parameter_id))
82 throw std::invalid_argument(
"Parameter '" + parameter_id +
"' not found in component '"
85 return data_.parameter_values.at(parameter_id).value;
88 std::string getScenarioGroupId()
const
90 return data_.scenario_group_id;
106 std::map<std::string, Expressions::Visitors::ParameterTypeAndValue> parameter_values);
Definition component.h:101
ComponentBuilder & withId(std::string_view id)
Sets the ID of the component.
Definition component.cpp:73
ComponentBuilder & withModel(const Model *model)
Sets the model of the component.
Definition component.cpp:85
ComponentBuilder & withParameterValues(std::map< std::string, Expressions::Visitors::ParameterTypeAndValue > parameter_values)
Sets the parameter values of the component. The parameters included should be all of the model's para...
Definition component.cpp:98
ComponentBuilder & withScenarioGroupId(const std::string &scenario_group_id)
Sets the ID of the scenario group to which the component belongs.
Definition component.cpp:111
Component build()
Builds and returns the Component object.
Definition component.cpp:122
Definition component.h:37
Definition component.h:57