roadrunner  2.6.0
Fast simulator for SBML models
rrConfig.h
1 /*
2  * rrConfig.h
3  *
4  * Created on: Mar 24, 2014
5  * Author: andy
6  */
7 
8 #ifndef RRCONFIG_H_
9 #define RRCONFIG_H_
10 
11 #include <string>
12 #include "rrExporter.h"
13 #include "Setting.h"
14 #include <vector>
15 
16 namespace rr {
17 
62  class RR_DECLSPEC Config {
63  public:
64 
65  enum Keys {
75  LOADSBMLOPTIONS_CONSERVED_MOIETIES = 0,
76 
89 
100 
106 
112 
118 
125 
132 
140 
145 
155 
156 
167 
172 
177 
182 
187 
195 
213 
219 
220 
226 
232 
244 
251 
258 
266 
279 
288 
289 
312 
317 
343 
352 
361 
366 
371 
376 
381 
386 
391 
396 
401 
406 
411 
416 
421 
426 
436 
447 
458 
459 
472 
473 
478 
479 
484 
485 
497 
498 
508 
509 
520 
521 
522  /*
523  * Turn on SBML file validation during model regeneration after model editing
524  *
525  */
526  VALIDATION_IN_REGENERATION,
527 
528  /*
529  * If outputting to a file in simulate(), write to the output every k rows of data
530  * is generated. Increase this for better speed and decrease to save memory.
531  */
532  K_ROWS_PER_WRITE,
533 
539 
545 
552 
557 
562 
567 
573  CONFIG_END
574  };
575 
576  enum LLVM_BACKEND_VALUES {
577  MCJIT = 0,
578  LLJIT,
579 // LAZYJIT = (0x1 << 0),
580  };
581 
582  // maps to
583  enum LLJIT_OPTIMIZATION_LEVELS {
584  NONE = 0,
585  LESS,
586  DEFAULT,
587  AGGRESSIVE
588  };
589 
590  enum ROADRUNNER_DISABLE_WARNINGS_VALUES {
591  ROADRUNNER_DISABLE_WARNINGS_STEADYSTATE = (0x1 << 0), // => 0x00000001
592  ROADRUNNER_DISABLE_WARNINGS_CONSERVED_MOIETY = (0x1 << 1) // => 0x00000010
593  };
594 
595 
596  enum ROADRUNNER_JACOBIAN_MODE_VALUES {
597  ROADRUNNER_JACOBIAN_MODE_AMOUNTS = 0,
598  ROADRUNNER_JACOBIAN_MODE_CONCENTRATIONS
599  };
600 
604  static std::string getString(Keys);
605 
609  static int getInt(Keys);
610 
611  static bool getBool(Keys);
612 
616  static double getDouble(Keys);
617 
622  static std::string getConfigFilePath();
623 
629  static void setValue(Keys, Setting value);
630 
631  //static void setValues(const std::vector<Keys> keys, const std::vector<Setting> values);
632 
633  static Setting getValue(Keys);
634 
639  static void readConfigFile(const std::string &path);
640 
645  static void writeConfigFile(const std::string &path);
646 
647  static Keys stringToKey(const std::string &key);
648 
649  static std::vector<std::string> getKeyList();
650 
651  };
652 
653 } /* namespace rr */
654 
655 #endif /* RRCONFIG_H_ */
read or store default values.
Definition: rrConfig.h:62
Keys
Definition: rrConfig.h:65
@ SBML_APPLICABLEVALIDATORS
a hex value consisting of a combination of the following values:
Definition: rrConfig.h:311
@ SIMULATEOPTIONS_RELATIVE
see SimulateOptions::relative
Definition: rrConfig.h:181
@ RANDOM_SEED
Seed for random numbers, should be a integer.
Definition: rrConfig.h:466
@ CVODE_MIN_ABSOLUTE
The minumum absolute error that the CVODE integrator supports in order to to pass the sbml test suite...
Definition: rrConfig.h:351
@ SIMULATEOPTIONS_INITIAL_TIMESTEP
A user specified initial time step.
Definition: rrConfig.h:243
@ LLVM_SYMBOL_CACHE
cache llvm symbols durring sbml compilation.
Definition: rrConfig.h:477
@ STEADYSTATE_APPROX_TOL
Tolerance for steady state approximation routine.
Definition: rrConfig.h:390
@ MAX_OUTPUT_ROWS
Set the maximum number of rows in the output matrix.
Definition: rrConfig.h:507
@ LLJIT_NUM_THREADS
How many threads to use when building models with LLJit.
Definition: rrConfig.h:551
@ SIMULATEOPTIONS_MAXIMUM_NUM_STEPS
Specify The Maximum Number Of Steps The Internal Integrator Will Use Before Reaching The User Specifi...
Definition: rrConfig.h:265
@ LOADSBMLOPTIONS_OPTIMIZE_INSTRUCTION_COMBINING
InstructionCombining - Combine instructions to form fewer, simple instructions.
Definition: rrConfig.h:124
@ STEADYSTATE_PRESIMULATION_TIME
End time for presimulation steady state analysis.
Definition: rrConfig.h:380
@ SIMULATEOPTIONS_COPY_RESULT
make a copy of the simulation result in Python.
Definition: rrConfig.h:365
@ PYTHON_ENABLE_NAMED_MATRIX
use new numpy arrays with row/column names experimental
Definition: rrConfig.h:471
@ SIMULATEOPTIONS_STIFF
Is the model a stiff system? setting this to stiff causes RoadRunner to load a stiff solver which cou...
Definition: rrConfig.h:194
@ ROADRUNNER_DISABLE_WARNINGS
Disable SBML conserved moiety warnings.
Definition: rrConfig.h:278
@ STEADYSTATE_MAXIMUM_NUM_STEPS
Maximum number of steps for steady state solvers.
Definition: rrConfig.h:410
@ METABOLIC_CONTROL_ANALYSIS_DIFFERENTIAL_STEP_SIZE
The differential step size when calculating the scaled control coefficients of fluxes.
Definition: rrConfig.h:561
@ SIMULATEOPTIONS_STRUCTURED_RESULT
see SimulateOptions::STRUCTURED_RESULT
Definition: rrConfig.h:186
@ ROADRUNNER_JACOBIAN_MODE
Determines the mode that the RoadRunner Jacobian calculations will be be performed in.
Definition: rrConfig.h:435
@ LLJIT_OPTIMIZATION_LEVEL
Optimization level when using LLJit.
Definition: rrConfig.h:544
@ LOADSBMLOPTIONS_OPTIMIZE_GVN
GVN - This pass performs global value numbering and redundant load elimination cotemporaneously.
Definition: rrConfig.h:111
@ LOADSBMLOPTIONS_OPTIMIZE_DEAD_INST_ELIMINATION
DeadInstElimination - This pass quickly removes trivially dead instructions without modifying the CFG...
Definition: rrConfig.h:131
@ LOADSBMLOPTIONS_PERMISSIVE
Relax SBML restrictions.
Definition: rrConfig.h:496
@ STEADYSTATE_PRESIMULATION
Flag for starting steady state analysis with simulation.
Definition: rrConfig.h:370
@ CVODE_MIN_RELATIVE
The minumum relative error that the CVODE integrator supports in order to to pass the sbml test suite...
Definition: rrConfig.h:360
@ LOADSBMLOPTIONS_READ_ONLY
If this is set, then a read-only model is generated.
Definition: rrConfig.h:99
@ SIMULATEOPTIONS_STOCHASTIC_VARIABLE_STEP
Do variable time step integration when using stochastic integrators.
Definition: rrConfig.h:225
@ STEADYSTATE_BROYDEN
Switches on Broyden method.
Definition: rrConfig.h:420
@ SIMULATEOPTIONS_MAXIMUM_TIMESTEP
Specify The Maximum Time Step Size That The Internal Integrator Will Use.
Definition: rrConfig.h:257
@ LOADSBMLOPTIONS_OPTIMIZE_DEAD_CODE_ELIMINATION
DeadCodeElimination - This pass is more powerful than DeadInstElimination, because it is worklist dri...
Definition: rrConfig.h:139
@ OPTIMIZE_REACTION_RATE_SELECTION
optimize reaction rate selection durring integration.
Definition: rrConfig.h:483
@ LLVM_BACKEND
An enum value that indicates which llvm JIT compiler is being used.
Definition: rrConfig.h:538
@ SIMULATEOPTIONS_MULTI_STEP
The MULTI_STEP option tells the solver to take a series of internal steps and then return the solutio...
Definition: rrConfig.h:212
@ SIMULATEOPTIONS_DETERMINISTIC_VARIABLE_STEP
Do variable time step integration when using a deterministic integrator.
Definition: rrConfig.h:218
@ LOADSBMLOPTIONS_OPTIMIZE_CFG_SIMPLIFICATION
CFGSimplification - Merge basic blocks, eliminate unreachable blocks, simplify terminator instruction...
Definition: rrConfig.h:117
@ SIMULATEOPTIONS_ABSOLUTE
see SimulateOptions::absolute
Definition: rrConfig.h:176
@ STEADYSTATE_APPROX_MAX_STEPS
Maximum number of steps that can be taken for steady state approximation routine.
Definition: rrConfig.h:395
@ LOADSBMLOPTIONS_MUTABLE_INITIAL_CONDITIONS
Generate accessor functions to allow changing of initial conditions.
Definition: rrConfig.h:105
@ METABOLIC_CONTROL_ANALYSIS_STEADY_STATE_THRESHOLD
The differential step size when calculating the scaled control coefficients of fluxes.
Definition: rrConfig.h:566
@ STEADYSTATE_APPROX_TIME
End time for steady state approximation routine.
Definition: rrConfig.h:400
@ METABOLIC_CONTROL_ANALYSIS_FLUX_THRESHOLD
The flux threshold when calculating the scaled control coefficients of fluxes.
Definition: rrConfig.h:556
@ SIMULATEOPTIONS_MINIMUM_TIMESTEP
Specfify The Minimum Time Step That The Internal Integrator Will Use.
Definition: rrConfig.h:250
@ SIMULATEOPTIONS_DURATION
see SimulateOptions::duration
Definition: rrConfig.h:171
@ MODEL_RESET
A bitfield (unsigned integer) consisting of the values in SelectionRecord::SelectionType.
Definition: rrConfig.h:342
@ STEADYSTATE_RELATIVE
Specifies the relative tolerance.
Definition: rrConfig.h:405
@ STEADYSTATE_LINEARITY
Specifies linearity of the problem.
Definition: rrConfig.h:425
@ LOADSBMLOPTIONS_OPTIMIZE_INSTRUCTION_SIMPLIFIER
InstructionSimplifier - Remove redundant instructions.
Definition: rrConfig.h:144
@ STEADYSTATE_APPROX
Flag for using steady state approximation routine when steady state solver fails.
Definition: rrConfig.h:385
@ STEADYSTATE_PRESIMULATION_MAX_STEPS
Maximum number of steps that can be taken for presimulation before steady state analysis.
Definition: rrConfig.h:375
@ ALLOW_EVENTS_IN_STEADY_STATE_CALCULATIONS
Enable or disable steady state calculations when a model contains events.
Definition: rrConfig.h:519
@ ROADRUNNER_DISABLE_PYTHON_DYNAMIC_PROPERTIES
RoadRunner by default dynamically generates accessor properties for all sbml symbol names on the mode...
Definition: rrConfig.h:287
@ SIMULATEOPTIONS_STEPS
The number of steps at which the output is sampled.
Definition: rrConfig.h:166
@ ROADRUNNER_JACOBIAN_STEP_SIZE
default step size for Jabobian finite differece calculations
Definition: rrConfig.h:316
@ STEADYSTATE_MINIMUM_DAMPING
Minimum damping factor for steady state solvers.
Definition: rrConfig.h:415
@ LOGGER_LOG_FILE_PATH
Path to where the logger should write a roadrunner log file.
Definition: rrConfig.h:457
@ TEMP_DIR_PATH
Directory path where roadrunner should store temp files.
Definition: rrConfig.h:446
@ SIMULATEOPTIONS_INTEGRATOR
Default integrator to use, currently supports a std::string of "CVODE" or "Gillespie",...
Definition: rrConfig.h:231
@ LOADSBMLOPTIONS_USE_MCJIT
Use the LLVM MCJIT JIT engine.
Definition: rrConfig.h:154
@ LOADSBMLOPTIONS_RECOMPILE
Should the model be recompiled? The LLVM ModelGenerator maintins a hash table of currently running mo...
Definition: rrConfig.h:88
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.