24 #include <unordered_map>
27 #include <antares/expressions/expression.h>
29 #include "connection.h"
30 #include "constraint.h"
31 #include "extraOutput.h"
32 #include "objective.h"
33 #include "parameter.h"
35 #include "portFieldDefinition.h"
38 namespace Antares::ModelerStudy::SystemModel
53 using PortFieldMap = std::unordered_map<PortFieldKey, PortFieldDefinition, PortFieldKeyHash>;
71 const std::string& Id()
const
76 const std::vector<Objective>& Objectives()
const
81 const std::vector<Constraint>& Constraints()
const
86 const std::map<std::string, Parameter>& Parameters()
const
91 const std::vector<Variable>& Variables()
const
96 const std::map<std::string, Port>& Ports()
const
101 const PortFieldMap& PortFieldDefinitions()
const
103 return portFieldDefinitions_;
106 const std::map<std::string, ExtraOutput>& ExtraOutputs()
const
108 return extraOutputs_;
115 std::map<std::string, Parameter> parameters_;
116 std::vector<Variable> variables_;
117 std::vector<Constraint> constraints_;
118 std::map<std::string, Port> ports_;
119 std::map<std::string, ExtraOutput> extraOutputs_;
120 std::vector<Objective> objectives_;
122 PortFieldMap portFieldDefinitions_;
129 void add(
const std::string&
id);
130 void check(
const std::string& modelId)
const;
134 std::unordered_map<std::string, int> attribute_ids_;
ModelBuilder & withParameters(std::vector< Parameter > &¶meters)
Sets the parameters of the model.
Definition: model.cpp:152
ModelBuilder & withObjectives(std::vector< Objective > &&objectives)
Sets the objectives of the model.
Definition: model.cpp:134
ModelBuilder & withExtraOutputs(std::vector< ExtraOutput > &&extraOutputs)
Sets the extra outputs of the model.
Definition: model.cpp:241
ModelBuilder & withConstraints(std::vector< Constraint > &&constraints)
Sets the constraints of the model.
Definition: model.cpp:199
Model build()
Builds and returns the Model object.
Definition: model.cpp:94
ModelBuilder & withId(std::string_view id)
Sets the ID of the model.
Definition: model.cpp:122
ModelBuilder & withPorts(std::vector< Port > &&ports)
Sets the ports of the model.
Definition: model.cpp:185
ModelBuilder & withVariables(std::vector< Variable > &&variables)
Sets the variables of the model.
Definition: model.cpp:166
ModelBuilder & withPortFieldDefinitions(std::vector< PortFieldDefinition > &&portFieldDefinitions)
Sets the port-field definitions of the model.
Definition: model.cpp:217