4 #include "rr-libstruct/lsMatrix.h"
5 #include "rrVariableType.h"
6 #include "rrParameterType.h"
7 #include "rrSelectionRecord.h"
8 #include "rrRoadRunnerData.h"
9 #include "rrConstants.h"
10 #include "rrRoadRunnerOptions.h"
11 #include "Configurable.h"
26 class SBMLModelSimulation;
27 class ExecutableModel;
53 RoadRunner(
const std::string& compiler =
"",
const std::string& tempDir =
"",
54 const std::string& supportCodeDir =
"");
69 int getInstanceCount();
75 static std::string getParamPromotedSBML(
const std::string& sArg);
80 std::string getInfo();
91 bool setCompiler(
const std::string& compiler);
97 Integrator* getIntegrator();
104 std::string getModelName();
116 bool setTempFileFolder(
const std::string& folder);
125 std::string getTempFolder();
132 double oneStep(
double currentTime,
double stepSize,
bool reset =
true);
152 RoadRunnerData *getSimulationResult();
165 std::string getSBML();
181 void changeInitialConditions(
const std::vector<double>& ic);
202 bool load(
const std::string& uriOrSBML,
209 std::vector<double> getReactionRates();
215 std::vector<double> getRatesOfChange();
223 std::vector<std::string> getReactionIds();
231 virtual _xmlNode *createConfigNode();
238 virtual void loadConfig(
const _xmlDoc* doc);
247 std::string getConfigurationXML();
254 void setConfigurationXML(
const std::string& xml);
261 void correctMaxStep();
276 std::vector<rr::SelectionRecord>& getSelections();
282 double getValue(
const std::string& sel);
287 void setSelections(
const std::vector<std::string>& selections);
289 void setSelections(
const std::vector<rr::SelectionRecord>& selections);
295 std::vector<double> getSelectedValues();
300 void getIds(
int types, std::list<std::string> &ids);
305 int getSupportedIdTypes();
311 bool setValue(
const std::string&
id,
double value);
320 ls::DoubleMatrix getFullJacobian();
322 ls::DoubleMatrix getFullReorderedJacobian();
327 ls::DoubleMatrix getReducedJacobian();
332 ls::DoubleMatrix getEigenvalues();
334 std::vector<Complex> getEigenvaluesCpx();
336 ls::DoubleMatrix* getLinkMatrix();
337 ls::DoubleMatrix* getNrMatrix();
338 ls::DoubleMatrix* getL0Matrix();
341 ls::DoubleMatrix getConservationMatrix();
342 ls::DoubleMatrix getUnscaledConcentrationControlCoefficientMatrix();
343 ls::DoubleMatrix getScaledConcentrationControlCoefficientMatrix();
344 ls::DoubleMatrix getUnscaledFluxControlCoefficientMatrix();
345 ls::DoubleMatrix getScaledFluxControlCoefficientMatrix();
346 int getNumberOfDependentSpecies();
347 int getNumberOfIndependentSpecies();
354 std::vector<std::string> getEigenvalueIds();
360 double getUnscaledParameterElasticity(
const string& reactionName,
361 const string& parameterName);
364 Matrix<double> getFrequencyResponse(
double startFrequency,
365 int numberOfDecades,
int numberOfPoints,
366 const string& parameterName,
const string& variableName,
367 bool useDB,
bool useHz);
372 void setConservedMoietyAnalysis(
bool value);
377 bool getConservedMoietyAnalysis();
382 std::string getCurrentSBML();
388 int getNumberOfReactions();
394 double getReactionRate(
const int& index);
404 double getRateOfChange(
const int& index);
409 std::vector<std::string> getRateOfChangeIds();
412 std::vector<std::string> getConservedMoietyIds();
414 std::vector<double> getConservedMoietyValues();
416 int getNumberOfCompartments();
423 void setCompartmentByIndex(
const int& index,
const double& value);
430 double getCompartmentByIndex(
const int& index);
436 std::vector<std::string> getCompartmentIds();
443 int getNumberOfBoundarySpecies();
449 void setBoundarySpeciesByIndex(
const int& index,
const double& value);
455 double getBoundarySpeciesByIndex(
const int& index);
461 std::vector<double> getBoundarySpeciesConcentrations();
467 void setBoundarySpeciesConcentrations(
const std::vector<double>& values);
473 std::vector<std::string> getBoundarySpeciesIds();
479 int getNumberOfFloatingSpecies();
486 double getFloatingSpeciesByIndex(
int index);
492 void setFloatingSpeciesByIndex(
int index,
double value);
498 std::vector<double> getFloatingSpeciesConcentrations();
504 std::vector<double> getFloatingSpeciesInitialConcentrations();
510 void setFloatingSpeciesConcentrations(
const std::vector<double>& values);
516 void setFloatingSpeciesInitialConcentrationByIndex(
const int& index,
517 const double& value);
523 void setFloatingSpeciesInitialConcentrations(
const std::vector<double>& values);
529 std::vector<std::string> getFloatingSpeciesIds();
535 std::vector<std::string> getFloatingSpeciesInitialConditionIds();
541 int getNumberOfGlobalParameters();
547 void setGlobalParameterByIndex(
const int index,
const double value);
553 double getGlobalParameterByIndex(
const int& index);
559 std::vector<double> getGlobalParameterValues();
565 std::vector<std::string> getGlobalParameterIds();
578 static std::string getExtendedVersionInfo();
589 double getuCC(
const std::string& variableName,
const std::string& parameterName);
599 double getCC(
const std::string& variableName,
const std::string& parameterName);
604 double getuEE(
const std::string& reactionName,
const std::string& parameterName);
610 double getuEE(
const std::string& reactionName,
const std::string& parameterName,
611 bool computeSteadystate);
616 double getEE(
const std::string& reactionName,
const std::string& parameterName);
622 double getEE(
const std::string& reactionName,
const std::string& parameterName,
623 bool computeSteadyState);
628 ls::DoubleMatrix getUnscaledElasticityMatrix();
633 ls::DoubleMatrix getScaledElasticityMatrix();
638 double getScaledFloatingSpeciesElasticity(
const std::string& reactionName,
639 const std::string& speciesName);
646 double getUnscaledSpeciesElasticity(
int reactionId,
int speciesIndex);
657 double steadyState();
662 std::vector<rr::SelectionRecord>& getSteadyStateSelections();
668 void setSteadyStateSelections(
const std::vector<std::string>&
669 steadyStateSelections);
675 void setSteadyStateSelections(
const std::vector<rr::SelectionRecord>&
676 steadyStateSelections);
683 std::vector<double> getSteadyStateValues();
690 static int mInstanceCount;
693 const double mDiffStepSize;
695 const double mSteadyStateThreshold;
696 ls::DoubleMatrix mRawRoadRunnerData;
697 RoadRunnerData mRoadRunnerData;
699 std::string mCurrentSBMLFileName;
705 class CvodeInterface *mCVode;
706 std::vector<SelectionRecord> mSelectionList;
716 bool mComputeAndAssignConservationLaws;
718 std::vector<SelectionRecord> mSteadyStateSelection;
722 std::string mCurrentSBML;
732 int createDefaultSteadyStateSelectionList();
733 int createDefaultTimeCourseSelectionList();
735 void addNthOutputToResult(ls::DoubleMatrix& results,
int nRow,
736 double dCurrentTime);
737 bool populateResult();
740 double getNthSelectedOutput(
const int& index,
const double& dCurrentTime);
742 double getVariableValue(
const VariableType::VariableType variableType,
743 const int variableIndex);
747 std::string createModelName(
const std::string& mCurrentSBMLFileName);
752 LibStructural* getLibStruct();
754 bool initializeModel();
756 bool createDefaultSelectionLists();
762 int createTimeCourseSelectionList();
769 void setParameterValue(
const ParameterType::ParameterType parameterType,
770 const int parameterIndex,
const double value);
772 double getParameterValue(
const ParameterType::ParameterType parameterType,
773 const int parameterIndex);
778 void changeParameter(ParameterType::ParameterType parameterType,
779 int reactionIndex,
int parameterIndex,
double originalValue,
783 std::vector<SelectionRecord> getSelectionList();
790 std::string configurationXML;
793 friend class aFinalizer;
Definition: rrModelGenerator.h:18
Definition: rrCompiler.h:25
Definition: rrRoadRunnerOptions.h:30
Definition: rrExecutableModel.h:26
Definition: rrRoadRunner.h:38
Definition: rrSelectionRecord.h:15
Definition: Configurable.h:65
Definition: rrRoadRunnerOptions.h:154