C API Documentation
rrNLEQ2Interface.h
1 #ifndef rrNLEQInterfaceH
2 #define rrNLEQInterfaceH
3 #include <vector>
4 #include "rrExporter.h"
5 #include "rrExecutableModel.h"
6 #include "rrSteadyStateSolver.h"
7 using std::vector;
8 
9 namespace rr
10 {
11 
15 class RR_DECLSPEC NLEQ2Interface : public rrSteadyStateSolver
16 {
17 
18 public:
23 
24  ~NLEQ2Interface();
25 
31  double solve();
32 
33 
37 public:
38 
42  virtual void setItem(const std::string& key, const rr::Variant& value);
43 
47  virtual Variant getItem(const std::string& key) const;
48 
52  virtual bool hasKey(const std::string& key) const;
53 
57  virtual size_t deleteItem(const std::string& key);
58 
62  virtual std::vector<std::string> getKeys() const;
63 
68 
69 
70 private:
71  int nOpts;
72  long *IWK;
73  long LIWK;
74  long LRWK;
75  double *RWK;
76  double *XScal;
77  long ierr;
78  long *iopt;
79  ExecutableModel *model; // Model generated from the SBML. Static so we can access it from standalone function
80  long n;
81  void setup();
82 
83  bool isAvailable();
84 
85  bool allowPreSim;
86  double preSimTolerance;
87  int preSimMaximumSteps;
88  double preSimTime;
89  bool allowApprox;
90  double approxTolerance;
91  int approxMaximumSteps;
92  double approxTime;
93  double relativeTolerance;
94  int maxIterations;
95  double minDamping;
96  int broyden;
97  int linearity;
98 
99 
104  void setScalingFactors(const vector<double>& sx);
105 
110  int getNumberOfNewtonIterations();
111 
116  int getNumberOfCorrectorSteps();
117 
122  int getNumberOfModelEvaluations();
123 
128  int getNumberOfJacobianEvaluations();
129 
134  int getNumberOfModelEvaluationsForJacobian();
135 
136 
137  double computeSumsOfSquares();
138 
139  friend class NLEQ2Solver;
140 
141 };
142 }
143 
144 #endif
This class is frozen, no new features A dictionary interface that objects can implement....
Definition: Dictionary.h:31
Base class for all code generation systems; allows compiling and evaluating the model.
Definition: rrExecutableModel.h:118
Definition: rrNLEQ2Interface.h:16
virtual std::vector< std::string > getKeys() const
virtual void setItem(const std::string &key, const rr::Variant &value)
static const Dictionary * getSteadyStateOptions()
virtual size_t deleteItem(const std::string &key)
NLEQ2Interface(ExecutableModel *_model=NULL)
virtual bool hasKey(const std::string &key) const
virtual Variant getItem(const std::string &key) const
Definition: NLEQ2Solver.h:28
Definition: Variant.h:75
Definition: rrSteadyStateSolver.h:25
Base class for all code generators in RoadRunner.