amici.ode_export.ODEExporter¶
-
class
amici.ode_export.
ODEExporter
(ode_model, outdir=None, verbose=False, assume_pow_positivity=False, compiler=None, allow_reinit_fixpar_initcond=True)[source]¶ The ODEExporter class generates AMICI C++ files for ODE model as defined in symbolic expressions.
- Variables
model – ODE definition
outdir – see
amici.ode_export.ODEExporter.set_paths()
verbose – more verbose output if True
assume_pow_positivity –
if set to true, a special pow function is used to avoid problems with state variables that may become negative due to numerical errors
compiler: distutils/setuptools compiler selection to build the python extension
functions – carries C++ function signatures and other specifications
model_name – name of the model that will be used for compilation
model_path – path to the generated model specific files
model_swig_path – path to the generated swig files
allow_reinit_fixpar_initcond – indicates whether reinitialization of initial states depending on fixedParameters is allowed for this model
_build_hints – If the given model uses special functions, this set contains hints for model building.
-
__init__
(ode_model, outdir=None, verbose=False, assume_pow_positivity=False, compiler=None, allow_reinit_fixpar_initcond=True)[source] Generate AMICI C++ files for the ODE provided to the constructor.
- Parameters
ode_model (
amici.ode_export.ODEModel
) – ODE definitionoutdir (
typing.Optional
[str
]) – seeamici.ode_export.ODEExporter.set_paths()
verbose (
typing.Union
[bool
,int
,None
]) – verbosity level for logging, True/False default to logging.Error/logging.DEBUGassume_pow_positivity (
typing.Optional
[bool
]) – if set to true, a special pow function is used to avoid problems with state variables that may become negative due to numerical errorscompiler (
typing.Optional
[str
]) – distutils/setuptools compiler selection to build the python extensionallow_reinit_fixpar_initcond (
typing.Optional
[bool
]) – seeamici.ode_export.ODEExporter
Methods Summary
__init__
(ode_model[, outdir, verbose, …])Generate AMICI C++ files for the ODE provided to the constructor.
Compiles the generated code it into a simulatable module
Generates the native C++ code for the loaded model and a Matlab script that can be run to compile a mex file from the C++ code
set_name
(model_name)Sets the model name
set_paths
(output_dir)Set output paths for the model and create if necessary
Methods
-
__init__
(ode_model, outdir=None, verbose=False, assume_pow_positivity=False, compiler=None, allow_reinit_fixpar_initcond=True)[source]¶ Generate AMICI C++ files for the ODE provided to the constructor.
- Parameters
ode_model (
amici.ode_export.ODEModel
) – ODE definitionoutdir (
typing.Optional
[str
]) – seeamici.ode_export.ODEExporter.set_paths()
verbose (
typing.Union
[bool
,int
,None
]) – verbosity level for logging, True/False default to logging.Error/logging.DEBUGassume_pow_positivity (
typing.Optional
[bool
]) – if set to true, a special pow function is used to avoid problems with state variables that may become negative due to numerical errorscompiler (
typing.Optional
[str
]) – distutils/setuptools compiler selection to build the python extensionallow_reinit_fixpar_initcond (
typing.Optional
[bool
]) – seeamici.ode_export.ODEExporter
-
generate_model_code
()[source]¶ Generates the native C++ code for the loaded model and a Matlab script that can be run to compile a mex file from the C++ code
- Return type