C API Documentation
rrNLEQ1Interface.h
1 #ifndef rrNLEQ1InterfaceH
2 #define rrNLEQ1InterfaceH
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 NLEQ1Interface : public rrSteadyStateSolver
16 {
17 
18 public:
23 
24  ~NLEQ1Interface();
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 
103  void setScalingFactors(const vector<double>& sx);
104 
109  int getNumberOfNewtonIterations();
110 
115  int getNumberOfCorrectorSteps();
116 
121  int getNumberOfModelEvaluations();
122 
127  int getNumberOfJacobianEvaluations();
128 
133  int getNumberOfModelEvaluationsForJacobian();
134 
135 
136  double computeSumsOfSquares();
137 
138  friend class NLEQ1Solver;
139 
140 };
141 }
142 
143 #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: rrNLEQ1Interface.h:16
static const Dictionary * getSteadyStateOptions()
virtual size_t deleteItem(const std::string &key)
virtual Variant getItem(const std::string &key) const
virtual std::vector< std::string > getKeys() const
virtual bool hasKey(const std::string &key) const
NLEQ1Interface(ExecutableModel *_model=NULL)
virtual void setItem(const std::string &key, const rr::Variant &value)
Definition: NLEQ1Solver.h:28
Definition: Variant.h:75
Definition: rrSteadyStateSolver.h:25
Base class for all code generators in RoadRunner.