19 #include "rrOSSpecifics.h"
20 #include "Dictionary.h"
21 #include "rrException.h"
22 #include "Registrable.h"
24 #include "tr1proxy/rr_memory.h"
25 #include "tr1proxy/rr_unordered_map.h"
32 class ExecutableModel;
50 ~
Solver()
override =
default;
57 void updateSettings(
Dictionary * inputSettings);
63 std::vector<std::string> getSettings()
const;
71 std::unordered_map<std::string, Setting>& getSettingsMap();
76 virtual void resetSettings();
90 virtual Setting hasValue(
const std::string& key)
const;
96 virtual size_t getNumParams()
const;
102 virtual std::string getParamName(
size_t n)
const;
108 virtual std::string getParamDisplayName(
int n)
const;
114 virtual std::string getParamHint(
int n)
const;
120 virtual std::string getParamDesc(
int n)
const;
126 virtual std::string getValueAsString(
const std::string& key);
134 virtual std::string getSettingsRepr()
const;
140 virtual std::string settingsPyDictRepr()
const;
146 virtual std::string toString()
const;
152 virtual std::string toRepr()
const;
158 const std::string& getDisplayName(
const std::string& key)
const;
164 const std::string& getHint(
const std::string& key)
const;
170 const std::string& getDescription(
const std::string& key)
const;
192 using SettingsList = std::vector<std::string> ;
193 using SettingsMap = std::unordered_map<std::string, Setting> ;
194 using DisplayNameMap = std::unordered_map<std::string, std::string> ;
195 using HintMap = std::unordered_map<std::string, std::string> ;
196 using DescriptionMap = std::unordered_map<std::string, std::string> ;
198 SettingsList sorted_settings;
199 SettingsMap settings;
200 DisplayNameMap display_names_;
202 DescriptionMap descriptions;
210 void addSetting(
const std::string& name,
const Setting& val,
const std::string& display_name,
const std::string& hint,
const std::string& description);
This class is frozen, no new features A dictionary interface that objects can implement.
Definition: Dictionary.h:30
Base class for all code generation systems; allows compiling and evaluating the model.
Definition: rrExecutableModel.h:118
Handles constructing a solver and contains meta information about it.
Definition: Registrable.h:23
virtual std::string getHint() const =0
Gets the hint associated with this Solver type.
virtual std::string getName() const =0
Gets the name associated with this Solver type.
virtual std::string getDescription() const =0
Gets the description associated with this Solver type.
Store a roadrunner option (or setting) as a Variant type.
Definition: Setting.h:78
TypeId
types that correspond to the index of the position of the type in the variant template.
Definition: Setting.h:132
Base class for all integrators and steady state solvers.
Definition: Solver.h:39
virtual void syncWithModel(ExecutableModel *m)=0
Called whenever a new model is loaded to allow integrator to reset internal state.
C_DECL_SPEC bool rrcCallConv getValue(RRHandle handle, const char *symbolId, double *value)
Get the value for a given symbol, use getAvailableTimeCourseSymbols(void) for a list of symbols.
C_DECL_SPEC bool rrcCallConv setValue(RRHandle handle, const char *symbolId, const double value)
Set the value for a given symbol, use getAvailableTimeCourseSymbols(void) for a list of symbols.