roadrunner  2.6.0
Fast simulator for SBML models
rrNLEQ2Interface.h
1 #ifndef rrNLEQInterfaceH
2 #define rrNLEQInterfaceH
3 #include <vector>
4 #include "rrExporter.h"
5 #include "rrExecutableModel.h"
6 #include "Dictionary.h"
7 
8 using std::vector;
9 
10 namespace rr
11 {
12 
16 class RR_DECLSPEC NLEQ2Interface : public Dictionary
17 {
18 
19 public:
23  NLEQ2Interface(ExecutableModel *_model = NULL);
24 
25  ~NLEQ2Interface();
26 
32  double solve();
33 
34 
38 public:
39 
43  virtual void setItem(const std::string& key, const rr::Setting& value);
44 
48  virtual Setting getItem(const std::string& key) const;
49 
53  virtual bool hasKey(const std::string& key) const;
54 
58  virtual size_t deleteItem(const std::string& key);
59 
63  virtual std::vector<std::string> getKeys() const;
64 
68  static const Dictionary* getSteadyStateOptions();
69 
70 
71 public:
72  int nOpts;
73  long *IWK;
74  long LIWK;
75  long LRWK;
76  double *RWK;
77  double *XScal;
78  long ierr;
79  long *iopt;
80  ExecutableModel *model; // Model generated from the SBML. Static so we can access it from standalone function
81  long n;
82  void setup();
83 
84  bool isAvailable();
85 
86  bool allowPreSim;
87  double preSimTolerance;
88  int preSimMaximumSteps;
89  double preSimTime;
90  bool allowApprox;
91  double approxTolerance;
92  int approxMaximumSteps;
93  double approxTime;
94  double relativeTolerance;
95  int maxIterations;
96  double minDamping;
97  int broyden;
98  int linearity;
99 
100 
105  void setScalingFactors(const std::vector<double>& sx);
106 
111  int getNumberOfNewtonIterations();
112 
117  int getNumberOfCorrectorSteps();
118 
123  int getNumberOfModelEvaluations();
124 
129  int getNumberOfJacobianEvaluations();
130 
135  int getNumberOfModelEvaluationsForJacobian();
136 
137 
138  double computeSumsOfSquares();
139 
140  friend class NLEQ2Solver;
141 
142 };
144 }
145 
146 #endif
Store a roadrunner option (or setting) as a Variant type.
Definition: Setting.h:78
Base class for all code generators in RoadRunner.