class LoadSBMLOptions : public rr::BasicDictionary

Options for loading SBML into RoadRunner.

Future version may add additional fields to the end of this struct, this way we can maintain binary compatibility with older RoadRunner versions.

Public Types



enumerator MCJIT
enumerator LLJIT


enumerator NONE
enumerator LESS
enumerator DEFAULT
enumerator AGGRESSIVE
enum ModelGeneratorOpt



perform conservation analysis.

This causes a re-ordering of the species, so results generated with this flag enabled can not be compared index wise to results generated otherwise.

currently only implemented with the C code generating model

enumerator RECOMPILE

Should the model be recompiled? The LLVM ModelGenerator maintins a hash table of currently running models.

If this flag is NOT set, then the generator will look to see if there is already a running instance of the given model and use the generated code from that one.

If only a single instance of a model is run, there is no need to cache the models, and this can safetly be enabled, realizing some performance gains.

enumerator READ_ONLY

If this is set, then a read-only model is generated.

A read-only model can be simulated, but no code is generated to set model values, i.e. parameters, amounts, values, etc…

It takes a finite amount of time to generate the model value setting functions, and if they are not needed, one may see some performance gains, especially in very large models.


Generate accessor functions to allow changing of initial conditions.

enumerator OPTIMIZE_GVN

GVN - This pass performs global value numbering and redundant load elimination cotemporaneously.


CFGSimplification - Merge basic blocks, eliminate unreachable blocks, simplify terminator instructions, etc…


InstructionCombining - Combine instructions to form fewer, simple instructions.

This pass does not modify the CFG, and has a tendency to make instructions dead, so a subsequent DCE pass is useful.


DeadInstElimination - This pass quickly removes trivially dead instructions without modifying the CFG of the function.

It is a BasicBlockPass, so it runs efficiently when queued next to other BasicBlockPass’s.


DeadCodeElimination - This pass is more powerful than DeadInstElimination, because it is worklist driven that can potentially revisit instructions when their other instructions become dead, to eliminate chains of dead computations.


InstructionSimplifier - Remove redundant instructions.

enumerator OPTIMIZE

all optimizations, use to check if bit mask has any optimizations.

enumerator USE_MCJIT

Use the LLVM MCJIT JIT engine.

Defaults to false.

The MCJIT is the new LLVM JIT engine, it is not as well tested as the original JIT engine. Does NOT work on LLVM 3.1


Turn on SBML validation.

enum LoadOpt



Do not create a default selection list when the model is loaded.

Public Functions


initializes the struct with the default options.

LoadSBMLOptions(const Dictionary *dict)

creates an object from an existing dictionary.

virtual void setItem(const std::string &key, const rr::Setting &value) override

sets an item in the internal unordered std::map.

virtual Setting getItem(const std::string &key) const override

gets an item from the internal unordered std::map.

virtual bool hasKey(const std::string &key) const override

is there a key matching this name.


true if this key exists, false otherwise.

virtual size_t deleteItem(const std::string &key) override

remove a value

virtual std::vector<std::string> getKeys() const override

list of keys in this object.

inline bool getConservedMoietyConversion() const
inline void setConservedMoietyConversion(bool val)
inline void setValidation(bool val)
void setLLVMBackend(LoadSBMLOptions::LLVM_BACKEND_VALUES val)
~LoadSBMLOptions() override
void setLLJitOptimizationLevel(LLJIT_OPTIMIZATION_LEVELS levels)

Public Members

std::uint16_t version

the version this struct

std::uint16_t size

sizeof this struct

std::uint32_t modelGeneratorOpt
std::uint32_t loadFlags

Public Static Functions

static inline std::vector<LLVM_BACKEND_VALUES> getAllLLVMBackendValues()
static inline std::vector<LLJIT_OPTIMIZATION_LEVELS> getAllLLJitOptimizationValues()

Private Functions

void defaultInit()

Since we need an integer and modelGeneratorOptions is a bitfield system for toggling individual bits on or off, we cannot store this value in modelGeneratorOptions.

Therefore we fall back on the global Config system for this value. In short, to set the number of threads used by LLJit do: Config::setValue(Config::LLJIT_NUM_THREADS, 7);