From 7816454d0b86fb9477c03767d4a261eebff6637d Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 7 Oct 2025 09:33:55 +0200 Subject: [PATCH] snake_case --- .../test_benchmark_collection_models.yml | 4 +- .github/workflows/test_python_cplusplus.yml | 6 +- CHANGELOG.md | 3 + doc/cpp_interface.rst | 10 +- doc/examples/example_errors.ipynb | 206 ++-- doc/examples/example_jax/ExampleJax.ipynb | 4 +- .../example_jax_petab/ExampleJaxPEtab.ipynb | 26 +- doc/examples/example_petab/petab.ipynb | 72 +- .../ExampleExperimentalConditions.ipynb | 172 +--- .../example_splines/ExampleSplines.ipynb | 20 +- .../ExampleSplinesSwameye2003.ipynb | 21 +- .../ExampleEquilibrationLogic.ipynb | 504 +++++----- .../getting_started/GettingStarted.ipynb | 40 +- .../GettingStartedExtended.ipynb | 915 +++-------------- doc/python_interface.rst | 10 +- include/amici/abstract_model.h | 10 +- include/amici/amici.h | 6 +- include/amici/backwardproblem.h | 43 +- include/amici/edata.h | 110 +- include/amici/forwardproblem.h | 134 +-- include/amici/hdf5.h | 62 +- include/amici/misc.h | 39 +- include/amici/model.h | 352 ++++--- include/amici/model_dae.h | 4 +- include/amici/model_ode.h | 11 +- include/amici/model_state.h | 14 +- include/amici/newton_solver.h | 12 +- include/amici/rdata.h | 93 +- include/amici/serialization.h | 64 +- include/amici/simulation_parameters.h | 33 +- include/amici/solver.h | 468 ++++----- include/amici/solver_cvodes.h | 157 +-- include/amici/solver_idas.h | 151 +-- include/amici/steadystateproblem.h | 4 +- include/amici/sundials_linsol_wrapper.h | 102 +- include/amici/sundials_matrix_wrapper.h | 6 +- include/amici/symbolic_functions.h | 2 +- include/amici/vector.h | 40 +- models/model_calvetti_py/main.cpp | 24 +- .../model_calvetti_py/model_calvetti_py.cpp | 24 +- models/model_calvetti_py/model_calvetti_py.h | 112 +-- .../swig/model_calvetti_py.i | 2 +- models/model_calvetti_py/wrapfunctions.cpp | 2 +- models/model_calvetti_py/wrapfunctions.h | 2 +- models/model_dirac_py/main.cpp | 24 +- models/model_dirac_py/model_dirac_py.cpp | 24 +- models/model_dirac_py/model_dirac_py.h | 112 +-- .../model_dirac_py/model_dirac_py.py | 4 +- models/model_dirac_py/swig/model_dirac_py.i | 2 +- models/model_dirac_py/wrapfunctions.cpp | 2 +- models/model_dirac_py/wrapfunctions.h | 2 +- models/model_events_py/main.cpp | 24 +- models/model_events_py/model_events_py.cpp | 24 +- models/model_events_py/model_events_py.h | 112 +-- models/model_events_py/swig/model_events_py.i | 2 +- models/model_events_py/wrapfunctions.cpp | 2 +- models/model_events_py/wrapfunctions.h | 2 +- models/model_jakstat_adjoint_py/main.cpp | 24 +- .../model_jakstat_adjoint_py.cpp | 24 +- .../model_jakstat_adjoint_py.h | 112 +-- .../swig/model_jakstat_adjoint_py.i | 2 +- .../wrapfunctions.cpp | 2 +- .../model_jakstat_adjoint_py/wrapfunctions.h | 2 +- models/model_nested_events_py/main.cpp | 24 +- .../model_nested_events_py.cpp | 24 +- .../model_nested_events_py.h | 112 +-- .../swig/model_nested_events_py.i | 2 +- .../model_nested_events_py/wrapfunctions.cpp | 2 +- models/model_nested_events_py/wrapfunctions.h | 2 +- models/model_neuron_py/main.cpp | 24 +- models/model_neuron_py/model_neuron_py.cpp | 24 +- models/model_neuron_py/model_neuron_py.h | 112 +-- models/model_neuron_py/swig/model_neuron_py.i | 2 +- models/model_neuron_py/wrapfunctions.cpp | 2 +- models/model_neuron_py/wrapfunctions.h | 2 +- models/model_robertson_py/main.cpp | 24 +- .../model_robertson_py/model_robertson_py.cpp | 24 +- .../model_robertson_py/model_robertson_py.h | 112 +-- .../swig/model_robertson_py.i | 2 +- models/model_robertson_py/wrapfunctions.cpp | 2 +- models/model_robertson_py/wrapfunctions.h | 2 +- models/model_steadystate_py/main.cpp | 24 +- .../model_steadystate_py.cpp | 24 +- .../model_steadystate_py.h | 112 +-- .../model_steadystate_py/__init__.py | 1 - .../swig/model_steadystate_py.i | 2 +- models/model_steadystate_py/wrapfunctions.cpp | 2 +- models/model_steadystate_py/wrapfunctions.h | 2 +- python/benchmark/benchmark_pysb.py | 14 +- python/sdist/amici/__init__.py | 4 - python/sdist/amici/__init__.template.py | 1 - python/sdist/amici/__main__.py | 4 +- python/sdist/amici/debugging/__init__.py | 16 +- python/sdist/amici/gradient_check.py | 58 +- python/sdist/amici/numpy.py | 100 +- python/sdist/amici/pandas.py | 207 ++-- python/sdist/amici/petab/conditions.py | 26 +- python/sdist/amici/petab/import_helpers.py | 6 +- python/sdist/amici/petab/parameter_mapping.py | 4 +- python/sdist/amici/petab/petab_import.py | 2 +- python/sdist/amici/petab/sbml_import.py | 2 +- python/sdist/amici/petab/simulations.py | 10 +- python/sdist/amici/petab/simulator.py | 6 +- python/sdist/amici/plotting.py | 26 +- python/sdist/amici/swig_wrappers.py | 125 +-- python/sdist/amici/testing/models.py | 4 +- python/tests/petab_/test_petab_problem.py | 6 +- python/tests/splines_utils.py | 26 +- python/tests/test_antimony_import.py | 8 +- python/tests/test_bngl.py | 14 +- .../test_compare_conservation_laws_sbml.py | 53 +- python/tests/test_edata.py | 18 +- python/tests/test_events.py | 120 +-- python/tests/test_hdf5.py | 18 +- python/tests/test_heavisides.py | 4 +- python/tests/test_jax.py | 44 +- python/tests/test_misc.py | 2 +- python/tests/test_pandas.py | 30 +- python/tests/test_petab_objective.py | 6 +- python/tests/test_petab_simulate.py | 6 +- python/tests/test_preequilibration.py | 346 +++---- python/tests/test_pregenerated_models.py | 66 +- python/tests/test_pysb.py | 115 ++- python/tests/test_rdata.py | 36 +- python/tests/test_sbml_import.py | 346 +++---- .../test_sbml_import_special_functions.py | 65 +- python/tests/test_swig_interface.py | 284 +++--- python/tests/util.py | 72 +- src/abstract_model.cpp | 6 +- src/amici.cpp | 39 +- src/backwardproblem.cpp | 167 +-- src/edata.cpp | 244 ++--- src/exception.cpp | 2 +- src/forwardproblem.cpp | 373 +++---- src/hdf5.cpp | 815 ++++++++------- src/logging.cpp | 2 +- src/main.template.cpp | 24 +- src/misc.cpp | 22 +- src/model.cpp | 949 +++++++++--------- src/model.template.cpp | 24 +- src/model_dae.cpp | 62 +- src/model_header.template.h | 110 +- src/model_ode.cpp | 52 +- src/newton_solver.cpp | 34 +- src/rdata.cpp | 412 ++++---- src/simulation_parameters.cpp | 36 +- src/solver.cpp | 638 ++++++------ src/solver_cvodes.cpp | 304 +++--- src/solver_idas.cpp | 311 +++--- src/steadystateproblem.cpp | 28 +- src/sundials_linsol_wrapper.cpp | 119 +-- src/sundials_matrix_wrapper.cpp | 4 +- src/symbolic_functions.cpp | 2 +- src/vector.cpp | 28 +- src/wrapfunctions.template.cpp | 2 +- src/wrapfunctions.template.h | 2 +- swig/abstract_model.i | 10 + swig/amici.i | 35 +- swig/edata.i | 22 +- swig/hdf5.i | 12 +- swig/misc.i | 10 +- swig/model.i | 81 +- swig/modelname.template.i | 2 +- swig/rdata.i | 2 +- swig/solver.i | 143 +-- swig/solver_cvodes.i | 17 + swig/solver_idas.i | 17 + .../benchmark_models/test_petab_benchmark.py | 36 +- .../test_petab_benchmark_jax.py | 16 +- tests/cpp/jakstat_adjoint/tests1.cpp | 60 +- tests/cpp/steadystate/tests1.cpp | 86 +- tests/cpp/testfunctions.cpp | 130 +-- tests/cpp/testfunctions.h | 18 +- tests/cpp/unittests/testExpData.cpp | 175 ++-- tests/cpp/unittests/testMisc.cpp | 257 ++--- tests/cpp/unittests/testSerialization.cpp | 68 +- tests/petab_test_suite/test_petab_suite.py | 18 +- tests/sbml/testSBMLSuite.py | 31 +- tests/sbml/utils.py | 33 +- 179 files changed, 6612 insertions(+), 7041 deletions(-) diff --git a/.github/workflows/test_benchmark_collection_models.yml b/.github/workflows/test_benchmark_collection_models.yml index 3860c6d783..71ed9a6364 100644 --- a/.github/workflows/test_benchmark_collection_models.yml +++ b/.github/workflows/test_benchmark_collection_models.yml @@ -53,7 +53,7 @@ jobs: run: | python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \ && python3 -m pip install -U sympy \ - && python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git + && python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@amici100 - name: Download benchmark collection run: | @@ -129,7 +129,7 @@ jobs: run: | python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \ && python3 -m pip install -U sympy \ - && python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git + && python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@amici100 - run: pip uninstall -y diffrax && pip install git+https://github.com/patrick-kidger/diffrax@dev # TODO FIXME https://github.com/patrick-kidger/diffrax/issues/654 + event dirs diff --git a/.github/workflows/test_python_cplusplus.yml b/.github/workflows/test_python_cplusplus.yml index 40351f1adf..b58ac46574 100644 --- a/.github/workflows/test_python_cplusplus.yml +++ b/.github/workflows/test_python_cplusplus.yml @@ -53,7 +53,7 @@ jobs: run: scripts/installAmiciSource.sh - name: Check OpenMP support - run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())" + run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())" - name: Python tests (part 1) run: | @@ -273,7 +273,7 @@ jobs: run: scripts/installAmiciSource.sh - name: Check OpenMP support - run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())" + run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())" - name: cppcheck run: scripts/run-cppcheck.sh @@ -333,7 +333,7 @@ jobs: scripts/installAmiciSource.sh - name: Check OpenMP support - run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())" + run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())" - name: Get BioNetGen run: scripts/buildBNGL.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index d7fbdcc40d..83a419fd06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,9 @@ See also our [versioning policy](https://amici.readthedocs.io/en/latest/versioni * `amici.petab.petab_import.import_model` has been removed. Use `amici.petab.petab_import.import_model_sbml` instead. (The former was just an alias for the latter.) +* For a more consistent API, all function names are now snake_case instead of + camelCase. +* `Model.getSolver` has been renamed to `Model.create_solver`. * The following deprecated functionality has been removed: * The complete MATLAB interface has been removed. * `NonlinearSolverIteration::functional` has been removed, diff --git a/doc/cpp_interface.rst b/doc/cpp_interface.rst index 9c01b00dd9..af1e730ea8 100644 --- a/doc/cpp_interface.rst +++ b/doc/cpp_interface.rst @@ -56,7 +56,7 @@ The former provides some functions for reading and writing All model-specific functions are defined in the namespace ``model_$modelname``. The main function for running an AMICI simulation is -:cpp:func:`amici::runAmiciSimulation`. This function requires +:cpp:func:`amici::run_simulation`. This function requires * an instance of a :cpp:class:`amici::Model` subclass as generated during model import. For the example `model_steadystate` the respective class is provided @@ -65,7 +65,7 @@ The main function for running an AMICI simulation is * a :cpp:class:`amici::Solver` instance. This solver instance needs to match the requirements of the model and can be obtained from - :cpp:func:`amici::AbstractModel::getSolver`. + :cpp:func:`amici::AbstractModel::create_solver`. * optionally an :cpp:class:`amici::ExpData` instance, which contains any experimental data (e.g. measurements, noise model parameters or model inputs) @@ -76,7 +76,7 @@ all simulation results. For running simulations for multiple experimental conditions (multiple :cpp:class:`amici::ExpData` instances), -:cpp:func:`amici::runAmiciSimulations` +:cpp:func:`amici::run_simulations` provides an alternative entry point. If AMICI (and your application) have been compiled with OpenMP support (see installation guide), this allows for running those simulations in parallel. @@ -97,7 +97,7 @@ model, which can be inconvenient in some cases. When working with a single model, the ``wrapfunctions.h`` file generated during model import can be used to avoid specifying model names explicitly. It defines -a function ``amici::generic_model::getModel()``, that returns an instance of +a function ``amici::generic_model::get_model()``, that returns an instance of the model class by a generic name. .. note:: @@ -121,7 +121,7 @@ and link the following libraries: * optionally HDF5 (C, HL, and CXX components) set CMake option ``ENABLE_HDF5`` to ``OFF`` to build without HDF5-support * optionally OpenMP (for parallel simulation of multiple conditions, see - :cpp:func:`amici::runAmiciSimulations`) + :cpp:func:`amici::run_simulations`) * optionally boost (only when using serialization of AMICI object) The simplest and recommended way is using the provide CMake files which take diff --git a/doc/examples/example_errors.ipynb b/doc/examples/example_errors.ipynb index dbc00e9be6..1ca6a64b14 100644 --- a/doc/examples/example_errors.ipynb +++ b/doc/examples/example_errors.ipynb @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87383e84", + "id": "1863901917703506", "metadata": {}, "outputs": [], "source": [ @@ -31,7 +31,7 @@ " SteadyStateSensitivityMode,\n", " SensitivityMethod,\n", " SensitivityOrder,\n", - " runAmiciSimulation,\n", + " run_simulation,\n", ")\n", "from amici.petab.petab_import import import_petab_problem\n", "from amici.petab.simulations import simulate_petab, RDATAS, EDATAS\n", @@ -80,7 +80,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae3cb45e", + "id": "c3728b4b341c5bea", "metadata": {}, "outputs": [], "source": [ @@ -116,7 +116,7 @@ }, { "cell_type": "markdown", - "id": "e75a6dcc", + "id": "e639d7a9a10ce803", "metadata": {}, "source": [ "**What happened?**\n", @@ -127,9 +127,9 @@ "\n", "The number of steps the solver has to take is closely related to the chosen error tolerance. More accurate results, more steps. Therefore, this problem can be solved in two ways:\n", "\n", - "1. Increasing the maximum number of steps via [amici.Solver.setMaxSteps](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.setMaxSteps). Note that this will increase the time required for simulation, and that simulation may still fail eventually. Sometimes it may be preferable to not increase this limit but rather fail fast. Also note that increasing the number of allowed steps increase RAM requirements (even if fewer steps are actually taken), so don't set this to ridiculously large values in order to avoid this error.\n", + "1. Increasing the maximum number of steps via [amici.Solver.set_max_steps](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.set_max_steps). Note that this will increase the time required for simulation, and that simulation may still fail eventually. Sometimes it may be preferable to not increase this limit but rather fail fast. Also note that increasing the number of allowed steps increase RAM requirements (even if fewer steps are actually taken), so don't set this to ridiculously large values in order to avoid this error.\n", "\n", - "2. Reducing the number of steps CVODES has to take. This is determined by the required error tolerance. There are various solver error tolerances than can be adjusted. The most relevant ones are those controlled via [amici.Solver.setRelativeTolerance()](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.setRelativeTolerance) and [amici.Solver.setAbsoluteTolerance()](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.setAbsoluteTolerance).\n", + "2. Reducing the number of steps CVODES has to take. This is determined by the required error tolerance. There are various solver error tolerances than can be adjusted. The most relevant ones are those controlled via [amici.Solver.set_relative_tolerance()](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.set_relative_tolerance) and [amici.Solver.set_absolute_tolerance()](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.set_absolute_tolerance).\n", "\n", "So, let's fix that:" ] @@ -137,14 +137,14 @@ { "cell_type": "code", "execution_count": null, - "id": "e9667f55", + "id": "ebaf7f58344265f3", "metadata": {}, "outputs": [], "source": [ "# let's increase the allowed number of steps by 10x:\n", "print(\"Increasing allowed number of steps ...\")\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setMaxSteps(10 * amici_solver.getMaxSteps())\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_max_steps(10 * amici_solver.get_max_steps())\n", "\n", "res = simulate_petab(\n", " petab_problem=petab_problem,\n", @@ -165,8 +165,8 @@ "\n", "# let's relax the relative error tolerance by a factor of 50\n", "print(\"Relaxing relative error tolerance ...\")\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setRelativeTolerance(50 * amici_solver.getRelativeTolerance())\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_relative_tolerance(50 * amici_solver.get_relative_tolerance())\n", "\n", "res = simulate_petab(\n", " petab_problem=petab_problem,\n", @@ -185,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "18fd3fa6", + "id": "1a81ddbafe00ce91", "metadata": {}, "source": [ "## `Internal t = [...] and h = [...] are such that t + h = t on the next step`\n", @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f78179dc", + "id": "df84872e83561ec6", "metadata": {}, "outputs": [], "source": [ @@ -227,7 +227,7 @@ }, { "cell_type": "markdown", - "id": "53e4b822", + "id": "4f5c7d3e5e03d2e8", "metadata": {}, "source": [ "**What happened?**\n", @@ -244,15 +244,15 @@ { "cell_type": "code", "execution_count": null, - "id": "6a6794d3", + "id": "42b79264344ba95f", "metadata": {}, "outputs": [], "source": [ "# Create a copy of this simulation condition\n", "edata = amici.ExpData(res[EDATAS][0])\n", - "edata.setTimepoints(np.linspace(0, 0.33011, 5000))\n", - "amici_solver = amici_model.getSolver()\n", - "rdata = runAmiciSimulation(amici_model, amici_solver, edata)\n", + "edata.set_timepoints(np.linspace(0, 0.33011, 5000))\n", + "amici_solver = amici_model.create_solver()\n", + "rdata = run_simulation(amici_model, amici_solver, edata)\n", "\n", "# Visualize state trajectories\n", "plot_state_trajectories(rdata, model=amici_model)\n", @@ -261,16 +261,14 @@ }, { "cell_type": "markdown", - "id": "a7fe6d08", + "id": "3e27f8d381fe201a", "metadata": {}, - "source": [ - "We can see a steep increase for `Pathogen` just before the error occurs. Let's zoom in:" - ] + "source": "We can see a steep increase for `Pathogen` just before the error occurs. Let's zoom in:" }, { "cell_type": "code", "execution_count": null, - "id": "6a645efb", + "id": "89df6db557293333", "metadata": {}, "outputs": [], "source": [ @@ -281,15 +279,13 @@ }, { "cell_type": "markdown", - "id": "b85cd813", + "id": "b39e3eac6ed683a", "metadata": {}, - "source": [ - "The solver is unable to handle such a steep increase. There is not much we can do. Increasing the tolerances will let the solver proceed a bit further, but this is usually not enough. Most likely there is a problem in the model or in the choice of parameter values." - ] + "source": "The solver is unable to handle such a steep increase. There is not much we can do. Increasing the tolerances will let the solver proceed a bit further, but this is usually not enough. Most likely there is a problem in the model or in the choice of parameter values." }, { "cell_type": "markdown", - "id": "5afbd242", + "id": "65944570b112685d", "metadata": {}, "source": [ "## `the error test failed repeatedly or with |h| = hmin`\n", @@ -300,7 +296,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb8910f2", + "id": "1291d4abb1e196d", "metadata": {}, "outputs": [], "source": [ @@ -337,7 +333,7 @@ }, { "cell_type": "markdown", - "id": "0b3a9904", + "id": "d527db861a3c6bc", "metadata": {}, "source": [ "**What happened?**\n", @@ -348,7 +344,7 @@ }, { "cell_type": "markdown", - "id": "c16ac6c8", + "id": "3613f833d0c0244d", "metadata": {}, "source": [ "**How to address?**\n", @@ -359,7 +355,7 @@ { "cell_type": "code", "execution_count": null, - "id": "467c3d36", + "id": "34ca26e6dfa9e43", "metadata": {}, "outputs": [], "source": [ @@ -373,7 +369,7 @@ }, { "cell_type": "markdown", - "id": "1f6ec0e3", + "id": "b2d9c69a64ae650f", "metadata": {}, "source": [ "In this case, the default relative error tolerance may be too high and lead too large absolute errors.\n", @@ -384,13 +380,13 @@ { "cell_type": "code", "execution_count": null, - "id": "600ae826", + "id": "2d4380fc24ad3cf5", "metadata": {}, "outputs": [], "source": [ "# set stricter relative error tolerance\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setRelativeTolerance(amici_solver.getRelativeTolerance() / 10)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_relative_tolerance(amici_solver.get_relative_tolerance() / 10)\n", "\n", "res = simulate_petab(\n", " petab_problem=petab_problem,\n", @@ -409,7 +405,7 @@ }, { "cell_type": "markdown", - "id": "616710b6", + "id": "6bf4eb24e9bb5476", "metadata": {}, "source": [ "## `Cvode routine CVode returned a root after reinitialization`\n", @@ -420,7 +416,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d91e78142032ba01", + "id": "df1c7cec4d735e98", "metadata": {}, "outputs": [], "source": [] @@ -428,7 +424,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cec31332", + "id": "5e0dabe8bd9ae76f", "metadata": {}, "outputs": [], "source": [ @@ -447,18 +443,18 @@ ").get_model()\n", "\n", "# run the simulation\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "amici_solver.setSensitivityOrder(SensitivityOrder.first)\n", - "amici_model.setTimepoints(np.linspace(0, 6, 51))\n", - "rdata = runAmiciSimulation(amici_model, amici_solver)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "amici_solver.set_sensitivity_order(SensitivityOrder.first)\n", + "amici_model.set_timepoints(np.linspace(0, 6, 51))\n", + "rdata = run_simulation(amici_model, amici_solver)\n", "print(\"Status:\", simulation_status_to_str(rdata.status))\n", "assert simulation_status_to_str(rdata.status) == \"AMICI_ERROR\"" ] }, { "cell_type": "markdown", - "id": "d4386603", + "id": "f95ebe7bc0b4b0b5", "metadata": {}, "source": [ "**What happened?**\n", @@ -468,7 +464,7 @@ }, { "cell_type": "markdown", - "id": "02f2dd5d", + "id": "beb79744af911bef", "metadata": {}, "source": [ "**How to address?**\n", @@ -479,29 +475,29 @@ { "cell_type": "code", "execution_count": null, - "id": "3d1552e3", + "id": "3f2e04a3401bdc44", "metadata": {}, "outputs": [], "source": [ - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "amici_solver.setSensitivityOrder(SensitivityOrder.first)\n", - "amici_solver.setRelativeTolerance(1e-15)\n", - "amici_model.setTimepoints(np.linspace(0, 6, 51))\n", - "rdata = runAmiciSimulation(amici_model, amici_solver)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "amici_solver.set_sensitivity_order(SensitivityOrder.first)\n", + "amici_solver.set_relative_tolerance(1e-15)\n", + "amici_model.set_timepoints(np.linspace(0, 6, 51))\n", + "rdata = run_simulation(amici_model, amici_solver)\n", "print(\"Status:\", simulation_status_to_str(rdata.status))\n", "assert simulation_status_to_str(rdata.status) == \"AMICI_SUCCESS\"" ] }, { "cell_type": "markdown", - "id": "4f8557aa8e05f6cc", + "id": "357dade9f81dac0c", "metadata": {}, "source": "Sometimes this problem can also be solved be *in*creasing tolerances or by slightly changing the output timepoints." }, { "cell_type": "markdown", - "id": "86f4db29", + "id": "335a263b24b3dd4f", "metadata": {}, "source": [ "## `AMICI encountered a NaN / Inf value for [...]`\n", @@ -512,7 +508,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d97349ff", + "id": "8a2e07390c7b5ed8", "metadata": {}, "outputs": [], "source": [ @@ -543,7 +539,7 @@ }, { "cell_type": "markdown", - "id": "63641cff", + "id": "75233f35d76a9b9d", "metadata": {}, "source": [ "**What happened?**\n", @@ -568,7 +564,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fca95143", + "id": "b18f314bbc9e277a", "metadata": {}, "outputs": [], "source": [ @@ -581,7 +577,7 @@ }, { "cell_type": "markdown", - "id": "9f49a00a", + "id": "8d222752d764c24e", "metadata": {}, "source": [ "What could go wrong? We can obtain `NaN` from any of these symbols being `NaN`, or through division by zero.\n", @@ -597,20 +593,20 @@ { "cell_type": "code", "execution_count": null, - "id": "0eec6fe8", + "id": "fe5fa5078b034f1b", "metadata": {}, "outputs": [], "source": [ "rdata = res[RDATAS][0]\n", "edata = res[EDATAS][0]\n", "# check initial states\n", - "x0 = dict(zip(amici_model.getStateIds(), rdata.x0))\n", + "x0 = dict(zip(amici_model.get_state_ids(), rdata.x0))\n", "print(f\"{x0=}\")" ] }, { "cell_type": "markdown", - "id": "050c4c38", + "id": "6e9d333649a894b5", "metadata": {}, "source": [ "The initial states are fine - the first multiplicand is non-zero, as $x_0$ was non-zero.\n", @@ -621,7 +617,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec724ce9", + "id": "d4862c37216da030", "metadata": {}, "outputs": [], "source": [ @@ -630,10 +626,8 @@ "\n", "unscaled_parameter = dict(\n", " zip(\n", - " amici_model.getParameterIds(),\n", - " starmap(\n", - " amici.getUnscaledParameter, zip(edata.parameters, edata.pscale)\n", - " ),\n", + " amici_model.get_parameter_ids(),\n", + " starmap(amici.unscale_parameter, zip(edata.parameters, edata.pscale)),\n", " )\n", ")\n", "print(dict((p, unscaled_parameter[p]) for p in (\"Kd\", \"Kp\", \"n_par\")))" @@ -641,7 +635,7 @@ }, { "cell_type": "markdown", - "id": "62d82971", + "id": "58c5cbba47f4e6bd", "metadata": {}, "source": [ "Considering that `n_par` occurs as exponent, it's magnitude looks pretty high.\n", @@ -651,7 +645,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f3f8bdb", + "id": "340ff9c3cbaa35ea", "metadata": {}, "outputs": [], "source": [ @@ -662,7 +656,7 @@ }, { "cell_type": "markdown", - "id": "6616c2ff", + "id": "d67a911044eeab3a", "metadata": {}, "source": [ "Indeed, no way we can fix this for the given model.\n", @@ -673,7 +667,7 @@ }, { "cell_type": "markdown", - "id": "22cfbbbf", + "id": "65d644e4a49b8139", "metadata": {}, "source": [ "\n", @@ -686,7 +680,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b41a5017", + "id": "18d26b7a39cc1e1b", "metadata": {}, "outputs": [], "source": [ @@ -700,10 +694,10 @@ " model_name=\"Blasi_CellSystems2016_1\",\n", ")\n", "\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "amici_solver.setSensitivityOrder(SensitivityOrder.first)\n", - "amici_model.setSteadyStateSensitivityMode(\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "amici_solver.set_sensitivity_order(SensitivityOrder.first)\n", + "amici_model.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.newtonOnly\n", ")\n", "\n", @@ -735,7 +729,7 @@ }, { "cell_type": "markdown", - "id": "82267e47", + "id": "500fe0be3668325a", "metadata": {}, "source": [ "**What happened?**\n", @@ -750,7 +744,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8cd349b7", + "id": "bf69b064b5f1a386", "metadata": {}, "outputs": [], "source": [ @@ -760,7 +754,7 @@ }, { "cell_type": "markdown", - "id": "da131d3e", + "id": "220e1cc6decac6db", "metadata": {}, "source": [ "Indeed, the condition number shows that the Jacobian is numerically singular. If this happens consistently, it is usually due to conserved quantities in the model.\n", @@ -776,12 +770,12 @@ { "cell_type": "code", "execution_count": null, - "id": "f82078e7", + "id": "c2acb0cbcdc33439", "metadata": {}, "outputs": [], "source": [ "# use numerical integration\n", - "amici_model.setSteadyStateSensitivityMode(\n", + "amici_model.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.integrationOnly\n", ")\n", "\n", @@ -802,7 +796,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8d7be541", + "id": "5af81ccf6cb3d175", "metadata": {}, "outputs": [], "source": [ @@ -820,9 +814,9 @@ ")\n", "del os.environ[\"AMICI_EXPERIMENTAL_SBML_NONCONST_CLS\"]\n", "\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "amici_solver.setSensitivityOrder(SensitivityOrder.first)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "amici_solver.set_sensitivity_order(SensitivityOrder.first)\n", "\n", "res = simulate_petab(\n", " petab_problem=petab_problem,\n", @@ -840,7 +834,7 @@ }, { "cell_type": "markdown", - "id": "4b977c0b", + "id": "332dd72cf1aa9e7f", "metadata": {}, "source": [ "## `Steady state computation failed`\n", @@ -851,7 +845,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97f797dd", + "id": "3aa76291410b802c", "metadata": {}, "outputs": [], "source": [ @@ -861,7 +855,7 @@ " verbose=False,\n", ")\n", "\n", - "amici_solver = amici_model.getSolver()\n", + "amici_solver = amici_model.create_solver()\n", "\n", "\n", "np.random.seed(1851)\n", @@ -902,7 +896,7 @@ }, { "cell_type": "markdown", - "id": "0713b830", + "id": "99e03c9f028b3571", "metadata": {}, "source": [ "**What happened?**\n", @@ -915,7 +909,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ffdc8e82", + "id": "ebaae23140165f6d", "metadata": {}, "outputs": [], "source": [ @@ -925,7 +919,7 @@ }, { "cell_type": "markdown", - "id": "189dd964", + "id": "5cb18344e4305b13", "metadata": {}, "source": [ "**How to address?**\n", @@ -944,14 +938,14 @@ { "cell_type": "code", "execution_count": null, - "id": "28fada9f", + "id": "e5eadecdc0f1602a", "metadata": {}, "outputs": [], "source": [ "# Reduce relative tolerance for integration\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setRelativeTolerance(\n", - " 1 / 100 * amici_solver.getRelativeTolerance()\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_relative_tolerance(\n", + " 1 / 100 * amici_solver.get_relative_tolerance(),\n", ")\n", "\n", "res = simulate_petab(\n", @@ -978,16 +972,16 @@ { "cell_type": "code", "execution_count": null, - "id": "a6d34467", + "id": "88e993bd7801eee4", "metadata": {}, "outputs": [], "source": [ "# Increase relative steady state tolerance\n", "for log10_relaxation_factor in range(1, 10):\n", " print(f\"Relaxing tolerances by factor {10**log10_relaxation_factor}\")\n", - " amici_solver = amici_model.getSolver()\n", - " amici_solver.setRelativeToleranceSteadyState(\n", - " amici_solver.getRelativeToleranceSteadyState()\n", + " amici_solver = amici_model.create_solver()\n", + " amici_solver.set_relative_tolerance_steady_state(\n", + " amici_solver.get_relative_tolerance_steady_state()\n", " * 10**log10_relaxation_factor\n", " )\n", "\n", @@ -1000,7 +994,7 @@ " )\n", " if all(rdata.status == amici.AMICI_SUCCESS for rdata in res[RDATAS]):\n", " print(\n", - " f\"-> Succeeded with relative steady state tolerance {amici_solver.getRelativeToleranceSteadyState()}\\n\"\n", + " f\"-> Succeeded with relative steady state tolerance {amici_solver.get_relative_tolerance_steady_state()}\\n\"\n", " )\n", " break\n", " else:\n", @@ -1019,24 +1013,22 @@ }, { "cell_type": "markdown", - "id": "6d1b1835", + "id": "d517afd2eceb88da", "metadata": {}, - "source": [ - "That fixed the error, and took only a quarter of the number steps as the previous run, but at the cost of much lower accuracy." - ] + "source": "That fixed the error, and took only a quarter of the number steps as the previous run, but at the cost of much lower accuracy." }, { "cell_type": "code", "execution_count": null, - "id": "df1ee3fc", + "id": "9c6891741af74d45", "metadata": {}, "outputs": [], "source": [ "# Let's try increasing the number of Newton steps\n", "# (this is 0 by default, so the Newton solver wasn't used before,\n", "# as can be seen from the 0 in `rdata.preeq_numsteps[0]`)\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setNewtonMaxSteps(10**4)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_newton_max_steps(10**4)\n", "\n", "res = simulate_petab(\n", " petab_problem=petab_problem,\n", diff --git a/doc/examples/example_jax/ExampleJax.ipynb b/doc/examples/example_jax/ExampleJax.ipynb index 1d7d0967e1..1c7d71c563 100644 --- a/doc/examples/example_jax/ExampleJax.ipynb +++ b/doc/examples/example_jax/ExampleJax.ipynb @@ -320,8 +320,8 @@ "from amici.petab.simulations import simulate_petab\n", "import amici\n", "\n", - "amici_solver = amici_model.getSolver()\n", - "amici_solver.setSensitivityOrder(amici.SensitivityOrder.first)\n", + "amici_solver = amici_model.create_solver()\n", + "amici_solver.set_sensitivity_order(amici.SensitivityOrder.first)\n", "\n", "\n", "def amici_callback_base(parameters: jnp.array):\n", diff --git a/doc/examples/example_jax_petab/ExampleJaxPEtab.ipynb b/doc/examples/example_jax_petab/ExampleJaxPEtab.ipynb index ed061a40b0..4898977c39 100644 --- a/doc/examples/example_jax_petab/ExampleJaxPEtab.ipynb +++ b/doc/examples/example_jax_petab/ExampleJaxPEtab.ipynb @@ -9,7 +9,7 @@ "\n", "## Overview\n", "\n", - "This guide demonstrates how to use AMICI to export models in a format compatible with the [JAX](https://jax.readthedocs.io/en/latest/) ecosystem, enabling simulations with the [diffrax](https://docs.kidger.site/diffrax/) library. " + "This guide demonstrates how to use AMICI to export models in a format compatible with the [JAX](https://jax.readthedocs.io/en/latest/) ecosystem, enabling simulations with the [diffrax](https://docs.kidger.site/diffrax/) library." ] }, { @@ -538,7 +538,7 @@ "id": "5b8d3a6162a3ae55", "metadata": {}, "source": [ - "%%timeit \n", + "%%timeit\n", "gradfun(\n", " jax_problem,\n", " controller=diffrax.PIDController(\n", @@ -569,9 +569,9 @@ ")\n", "\n", "# Configure the solver with appropriate tolerances\n", - "solver = amici_model.getSolver()\n", - "solver.setAbsoluteTolerance(1e-8)\n", - "solver.setRelativeTolerance(1e-16)\n", + "solver = amici_model.create_solver()\n", + "solver.set_absolute_tolerance(1e-8)\n", + "solver.set_relative_tolerance(1e-16)\n", "\n", "# Prepare the parameters for the simulation\n", "problem_parameters = dict(\n", @@ -587,7 +587,7 @@ "metadata": {}, "source": [ "# Profile simulation only\n", - "solver.setSensitivityOrder(amici.SensitivityOrder.none)" + "solver.set_sensitivity_order(amici.SensitivityOrder.none)" ], "outputs": [], "execution_count": null @@ -597,7 +597,7 @@ "id": "768fa60e439ca8b4", "metadata": {}, "source": [ - "%%timeit \n", + "%%timeit\n", "simulate_petab(\n", " petab_problem,\n", " amici_model,\n", @@ -616,8 +616,8 @@ "metadata": {}, "source": [ "# Profile gradient computation using forward sensitivity analysis\n", - "solver.setSensitivityOrder(amici.SensitivityOrder.first)\n", - "solver.setSensitivityMethod(amici.SensitivityMethod.forward)" + "solver.set_sensitivity_order(amici.SensitivityOrder.first)\n", + "solver.set_sensitivity_method(amici.SensitivityMethod.forward)" ], "outputs": [], "execution_count": null @@ -627,7 +627,7 @@ "id": "3bae1fab8c416122", "metadata": {}, "source": [ - "%%timeit \n", + "%%timeit\n", "simulate_petab(\n", " petab_problem,\n", " amici_model,\n", @@ -646,8 +646,8 @@ "metadata": {}, "source": [ "# Profile gradient computation using adjoint sensitivity analysis\n", - "solver.setSensitivityOrder(amici.SensitivityOrder.first)\n", - "solver.setSensitivityMethod(amici.SensitivityMethod.adjoint)" + "solver.set_sensitivity_order(amici.SensitivityOrder.first)\n", + "solver.set_sensitivity_method(amici.SensitivityMethod.adjoint)" ], "outputs": [], "execution_count": null @@ -657,7 +657,7 @@ "id": "e3cc7971002b6d06", "metadata": {}, "source": [ - "%%timeit \n", + "%%timeit\n", "simulate_petab(\n", " petab_problem,\n", " amici_model,\n", diff --git a/doc/examples/example_petab/petab.ipynb b/doc/examples/example_petab/petab.ipynb index b5e55967d9..f7130ed8a6 100644 --- a/doc/examples/example_petab/petab.ipynb +++ b/doc/examples/example_petab/petab.ipynb @@ -13,18 +13,18 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "import petab\n", "\n", - "from amici import runAmiciSimulation\n", + "from amici import run_simulation\n", "from amici.petab.petab_import import import_petab_problem\n", "from amici.petab.petab_problem import PetabProblem\n", "from amici.petab.simulations import simulate_petab\n", "from amici.plotting import plot_state_trajectories" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -44,16 +44,16 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "model_name = \"Boehm_JProteomeRes2014\"\n", "# local path or URL to the yaml file for the PEtab problem\n", "petab_yaml = f\"https://benchmarking-initiative.github.io/Benchmark-Models-PEtab/tree/Benchmark-Models/{model_name}/{model_name}.yaml\"\n", "# load the problem using the PEtab library\n", "petab_problem = petab.Problem.from_yaml(petab_yaml)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -64,17 +64,15 @@ ] }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, + "cell_type": "code", + "source": "amici_model = import_petab_problem(petab_problem, verbose=False, compile_=True)", "outputs": [], - "source": [ - "amici_model = import_petab_problem(petab_problem, verbose=False)" - ] + "execution_count": null }, { - "cell_type": "markdown", "metadata": {}, + "cell_type": "markdown", "source": [ "That's it. Now, we can use the model to perform simulations.\n", "\n", @@ -86,13 +84,11 @@ ] }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, + "cell_type": "code", + "source": "simulate_petab(petab_problem, amici_model)", "outputs": [], - "source": [ - "simulate_petab(petab_problem, amici_model)" - ] + "execution_count": null }, { "cell_type": "markdown", @@ -103,16 +99,14 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "parameters = {\n", " x_id: x_val\n", " for x_id, x_val in zip(petab_problem.x_ids, petab_problem.x_nominal_scaled)\n", " # Fixed parameters cannot be changed in `simulate_petab`, unless we explicitly pass\n", " # a `parameter_mapping` that was generated with `fill_fixed_parameters=False`\n", - " if x_id not in amici_model.getFixedParameterIds()\n", + " if x_id not in amici_model.get_fixed_parameter_ids()\n", "}\n", "simulate_petab(\n", " petab_problem,\n", @@ -120,7 +114,9 @@ " problem_parameters=parameters,\n", " scaled_parameters=True,\n", ")" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -133,46 +129,42 @@ ] }, { + "metadata": {}, "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], "source": [ - "app = PetabProblem(petab_problem)\n", + "app = PetabProblem(petab_problem, amici_model)\n", "\n", "# ExpData for all conditions:\n", "app.get_edatas()\n", "\n", "# ExpData for a single condition:\n", "edata = app.get_edata(\"model1_data1\")" - ] + ], + "outputs": [], + "execution_count": null }, { + "metadata": {}, "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], "source": [ - "rdata = runAmiciSimulation(\n", - " amici_model, solver=amici_model.getSolver(), edata=edata\n", + "rdata = run_simulation(\n", + " amici_model, solver=amici_model.create_solver(), edata=edata\n", ")\n", "rdata" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "metadata": { "collapsed": false }, - "outputs": [], "source": [ "plot_state_trajectories(rdata)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", diff --git a/doc/examples/example_presimulation/ExampleExperimentalConditions.ipynb b/doc/examples/example_presimulation/ExampleExperimentalConditions.ipynb index 572c07085d..7f6d1a42fe 100644 --- a/doc/examples/example_presimulation/ExampleExperimentalConditions.ipynb +++ b/doc/examples/example_presimulation/ExampleExperimentalConditions.ipynb @@ -178,13 +178,11 @@ ] }, { - "cell_type": "code", - "execution_count": 5, "metadata": {}, + "cell_type": "code", "outputs": [], - "source": [ - "fixedParameters = [\"DRUG_0\", \"KIN_0\"]" - ] + "execution_count": null, + "source": "fixed_parameters = [\"DRUG_0\", \"KIN_0\"]" }, { "cell_type": "markdown", @@ -225,17 +223,17 @@ ] }, { - "cell_type": "code", - "execution_count": 7, "metadata": {}, + "cell_type": "code", "outputs": [], + "execution_count": null, "source": [ "sbml_importer.sbml2amici(\n", " model_name,\n", " model_output_dir,\n", " verbose=False,\n", " observation_model=observables,\n", - " constant_parameters=fixedParameters,\n", + " constant_parameters=fixed_parameters,\n", ")\n", "# load the generated module\n", "model_module = amici.import_model_module(model_name, model_output_dir)" @@ -249,47 +247,32 @@ ] }, { - "cell_type": "code", - "execution_count": 8, "metadata": {}, + "cell_type": "code", "outputs": [], + "execution_count": null, "source": [ "# Create Model instance\n", - "model = model_module.getModel()\n", + "model = model_module.get_model()\n", "\n", "# Create solver instance\n", - "solver = model.getSolver()" + "solver = model.create_solver()" ] }, { - "cell_type": "markdown", "metadata": {}, - "source": [ - "The only thing we need to simulate the model is a timepoint vector, which can be specified using the [setTimepoints](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.setTimepoints) method. If we do not specify any additional options, the default values for `fixedParameters` and `parameters` that were specified in the SBML file will be used." - ] + "cell_type": "markdown", + "source": "The only thing we need to simulate the model is a timepoint vector, which can be specified using the [setTimepoints](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.setTimepoints) method. If we do not specify any additional options, the default values for `fixedParameters` and `parameters` that were specified in the SBML file will be used." }, { - "cell_type": "code", - "execution_count": 9, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAAOXRFWHRTb2Z0d2FyZQ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bsPJ/rv4n/c/fMkWTsAzKybmfU49Rq4GthAEn6/3L0CKDWzsUHRlcAmOqotiR5USeBgzrXAO0T7gb+d6HhaGftvgb1AiOgviS8S7QdeBmwD/hvom+g4W9COS4me+q4D1gSPa5O0LROB1UFbNgD3BeUjgbeB7cAzQG6iY21Fmy4HXkzWdgQxrw0eG0/9O0/G71cQ92SgJPiOPQ/06ai2aEoMERFpIF27kkREpBlKDCIi0oASg4iINKDEICIiDSgxiIhIA0oMIiLSgBKDiIg0oMQg0kZmVmRmn21mXxcz+1MwxXtT+3PM7PWYaSZEOg0lBpG2u5LofDVNmQcscvdwUzvdvY7oHatNJhaRRFJiEGkDM7sU+AlwY7A62MhGVT5PMG9NMGfPS8HqbhtizjKeD+qJdCo6jRVpA3f/i5mtAL7h7hti9wUTM450911B0Uxgj7tfF+zvFZRvAKbGKWSRFtMZg0jbjQW2NFHeDzgcs70emGFmD5rZx9z9CETXbwDqTs0AKtJZKDGItIGZ9QOO+AermsWqBvJObbj7O0THItYD3zez+2Lq5gI1HRmrSGupK0mkbYYDe5ra4e6HgmU+89y9xswGAVXu/oSZHQZuBzCzfOCAu4fiFbRIS+iMQaRttgD9gsHkS5rY/yrR9SYAJgBvB+tBfxf4flA+HXipowMVaS2txyDSAczsQuCr7n7zaeosAu4JuppEOg2dMYh0AHdfBbx2uhvcgOeVFKQz0hmDiIg0oDMGERFpQIlBREQaUGIQEZEGlBhERKQBJQYREWlAiUFERBr4/9Iby3HKlUbPAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ "# Run simulation using default model parameters and solver options\n", - "model.setTimepoints(np.linspace(0, 60, 60))\n", - "rdata = amici.runAmiciSimulation(model, solver)\n", + "model.set_timepoints(np.linspace(0, 60, 60))\n", + "rdata = amici.run_simulation(model, solver)\n", "amici.plotting.plot_observable_trajectories(rdata)" ] }, @@ -301,27 +284,14 @@ ] }, { - "cell_type": "code", - "execution_count": 10, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAsvElEQVR4nO3deZxU1Z3//9end3bobtZmaRAUEASkRaMmkbgEjUvCJBMw+jVRw0xGnZjvxImOicYkv/maSb5ZvjNZBsc9UQzGhbihMSZGDWizyCqKzdZNszbQ0E2v9fn9Ube1aLuhGrrqdnW9n49HPerec++t+7lY9qfuOeeeY+6OiIjIsWSEHYCIiKQGJQwREYmLEoaIiMRFCUNEROKihCEiInFRwhARkbgoYYgAZvZdM/tN2HEczbFiNLPNZnZBMmOS9KKEIWnDzL5sZqvNrNbMdpjZr8ysf9hxiaQKJQxJC2b2L8APgVuAfsBZwCjgJTPLSVIMWck4j0iiKGFIt2dmfYG7gJvc/QV3b3T3zcDfA8XAVcGueWb2mJkdNLPlZjYl5jO+ZWYVwbYNZnZ+UJ5hZrea2ftmttfMfmdm+cG2YjNzM7vOzLYCfzKz583sxlbxvW1ms4Pln5vZNjOrNrNlZvbxVpfTboytPvNoceWZ2W+C8v1m9paZDT6xf2VJB0oYkg7OBvKAJ2IL3f0Q8BxwYVB0BbAQyAceAZ4ys2wzOwW4ETjD3fsAnwY2B8fcBHwW+CQwDNgH/KLV+T8JTAiOexSY27LBzCYSvdN5Nih6C5gaE8NCM8uL+aw2Y2zjmo8W1zVE77JGAAXAPwKH2/gMkSMoYUg6KAT2uHtTG9sqg+0Ay9z9cXdvBH5CNMmcBTQDucBEM8t2983u/n5wzD8Ct7t7ubvXA98FPt+q+um77l7j7oeBJ4GpZjYq2PYl4IngWNz9N+6+192b3P3/Buc9Jeaz2ouxtaPF1Ug0UYx192Z3X+bu1cf+Z5R0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ajnH3zUHRLGC7u38m2N4vKF8DnJGkkEXipjsMkc53CvBOG+WFwP6Y9dXAhWb2QzP7uLsfgOj8GUBDy2iqIl2FEoZIJzKzQuCAfzgDXazDQF7Liru/S7StYzXwAzO7I2bfXKAukbGKdJSqpEQ6VzGwva0N7r4vmK41z93rzGwYUOXuvzGz/cD1AGZWAOxx98ZkBS0SD91hiHSud4DCoBH77Da2v0h0rg+AycCbwXzfdwI/CMpnAs8mOlCRjtJ8GCJJZGanA99w96uPss8TwK1BlZVIl6E7DJEkcvflwCtHe3APeErJQroi3WGIiEhcdIchIiJxUcIQEZG4KGGIiEhclDBERCQuShgiIhIXJQwREYnL/w+spMjVWaHeRAAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ "edata = amici.ExpData(rdata, 0.1, 0.0)\n", - "edata.fixedParameters = [0, 2]\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "edata.fixed_parameters = [0, 2]\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "amici.plotting.plot_observable_trajectories(rdata)" ] }, @@ -334,26 +304,13 @@ ] }, { - "cell_type": "code", - "execution_count": 11, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAZfUlEQVR4nO3dfbRddX3n8fdHAsQqEhIeBBK8KBlsXIygF9AWpyCEh6mKMowlCk0HGVZnCUtsnQplyVN1LbGt6EytM4xao1YBETWVSkCETusS5AZw8SyIONzwnATwKQjynT/ODhyuJ8m9yb73npO8X2uddc/+7d855/sLh/u5+/c7Z+9UFZIkbaoXTXcBkqTNg4E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X6cT9IP4/hoFRqvq+mb7UjoB0/pYDJSJuQGY33xqZRvgOGDpNNe0qZYCi5v7i+msRfS9JAE+C9xRVR/v2jVw40myU5JZzf0X01kLuoNOsBzbdOv7sVTVGVU1t6qG6Py/8d2qejcDNg6AJC9Jst3a+8DhwK0M4Purqh4C7k+yd9N0KHA7kzAWvyk/QUn+I5154q2Az1XVR6a3ovFL8hXgYDqnrn4YOBv4BnAJsAedU/m/s6pWTVOJ45bkIOBfgVt4fr7+L+msowzUeJL8e2AJnffUi4BLquq8JK+k85f+bOAm4Piqemr6Kh2/JAcDH6iqtwziOJqav95szgC+XFUfSTKHAXt/ASTZF/gMsA1wL/BfaN5rtDgWA0WS1AqnvCRJrTBQJEmtMFAkSa0wUCRJrTBQJEmtMFAkSa0wUCRJrTBQpCmWZG6SP1rHvhcn+ZfmUgm99m+T5P92ncpE6hsGijT1DqVzLqVeTgQuq6rf9NpZVb+mc3r4noEkTScDRZpCzSljPg4c21wJ8JVjuryb5pxKzfmkLm+u5Hhr11HNN5p+Ul/xsFmaQlX1b0luoHOeq1u79zUnHH1lVd3XNB0JPFBVf9js375pvxXYf4pKlsbNIxRp6u0N3NmjfUfg8a7tW4CFSc5P8qaqegI6104Bfr32bLhSvzBQpCmUZEfgia4rGHb7FTBz7UZV/YjOWsstwIeTnNXVd1tgzWTWKk2UU17S1BoCHui1o6pWN5cCnllVa5LsBqyqqi8leRw4CaA5hfpjVfX0VBUtjYdHKNLUuhPYsVlk/70e+68EDmru7wP8oLnW/NnAh5v2Q4DLJ7tQaaK8HorUR5K8Dnh/VZ2wnj6XAac3U2JS3/AIReojVXUjcM36vtgIfMMwUT/yCEWS1AqPUCRJrTBQJEmtMFAkSa0wUCRJrTBQJEmtMFAkSa34/zyf2G+oqWpeAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ - "edata.fixedParametersPreequilibration = [3, 0]\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "edata.fixed_parameters_pre_equilibration = [3, 0]\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "amici.plotting.plot_observable_trajectories(rdata)" ] }, @@ -365,13 +322,11 @@ ] }, { - "cell_type": "code", - "execution_count": 12, "metadata": {}, + "cell_type": "code", "outputs": [], - "source": [ - "edata.reinitializeFixedParameterInitialStates = True" - ] + "execution_count": null, + "source": "edata.reinitialize_fixed_parameter_initial_states = True" }, { "cell_type": "markdown", @@ -381,72 +336,33 @@ ] }, { + "metadata": {}, "cell_type": "code", - "execution_count": 13, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAsKklEQVR4nO3deZxcVZn/8c/TeyfpLN2dfesEAkkgJCQNBEQFIRghEkGHRUQUmYyMMGZ+44wwOCCgM+KMqDOCyjgIiJKwE9nCDioG0tn3PSTdWbrTnXS23uv5/VE3UGm6k+qka+v6vl+vetW9595b9ZxOpZ6659x7jrk7IiIiR5OR6ABERCQ1KGGIiEhUlDBERCQqShgiIhIVJQwREYmKEoaIiERFCUMEMLPvm9mjiY7jSI4Wo5ltNrML4xmTpBclDEkbZvY1M1tmZgfNbIeZ/dLMeic6LpFUoYQhacHM/gm4B/hnoBcwGRgOvGpmOXGKISse7yMSK0oY0uWZWU/gTuBmd3/Z3ZvcfTNwBVACfCXYNc/MZpvZPjNbaGbjI17ju2ZWEWxbY2YXBOUZZnaLmW0ws2oze9zMCoNtJWbmZvYNM9sCvGFmL5nZTa3iW2JmlwfLPzezrWa218wWmNknW1Wn3RhbveaR4sozs0eD8j1mNt/M+h/fX1nSgRKGpINzgDzg6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OQ2stUu1xCM6ROMZ/RCMBvf8oizkmeD/USSik57RTqRu//ZzOYD33H35ZHbggEtR7r75qBoKrDN3S8JtvcKypcDZ8QpZJGo6QxDpPOdDKxuo7wY2BOxvgyYYmb3mNkn3b0WwvNnAI2HRlMVSRZKGCKdyMyKgVr/aAa6SHVA3qEVd19LuK9jGfADM7s9Yt9coD6WsYp0lJqkRDpXCbCtrQ3uvjuYrjXP3evNbBBQ4+6Pmtke4AYAMysCdrl7U7yCFomGzjBEOtdqoDjoxD6nje2vEJ7rA2Ac8H4w3/cdwA+C8vOBF2IdqEhHaT4MkTgys4nAP7r7tUfY52nglqDJSiRp6AxDJI7cfSHw5pFu3AOeVbKQZKQzDBERiYrOMEREJCpKGCIiEhUlDBERiYoShoiIREUJQ0REoqKEISIiUfn/APp0jQS9iEMAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "outputs": [], + "execution_count": null, "source": [ - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "amici.plotting.plot_observable_trajectories(rdata)" ] }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "On top of preequilibration, we can also specify presimulation. This option can be used to specify pretreatments where the system is not assumed to reach steadystate. Presimulation can be activated by specifying `t_presim` and `edata.fixedParametersPresimulation`. If both `fixedParametersPresimulation` and `fixedParametersPreequilibration` are specified, preequilibration will be performed first, followed by presimulation, followed by regular simulation. For this example we specify `DRUG_0=10` and `KIN_0=0` for the presimulation and `DRUG_0=10` and `KIN_0=2` for the regular simulation. We do not overwrite the `DRUG_0=3` and `KIN_0=0` that was previously specified for preequilibration." - ] + "source": "On top of preequilibration, we can also specify presimulation. This option can be used to specify pretreatments where the system is not assumed to reach steadystate. Presimulation can be activated by specifying `t_presim` and `edata.fixed_parameters_presimulation`. If both `fixed_parameters_presimulation` and `fixed_parameters_pre_equilibration` are specified, pre-equilibration will be performed first, followed by presimulation, followed by regular simulation. For this example we specify `DRUG_0=10` and `KIN_0=0` for the presimulation and `DRUG_0=10` and `KIN_0=2` for the regular simulation. We do not overwrite the `DRUG_0=3` and `KIN_0=0` that was previously specified for pre-equilibration." }, { - "cell_type": "code", - "execution_count": 14, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(3.0, 0.0)\n", - "(10.0, 0.0)\n", - "(10.0, 2.0)\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAApiUlEQVR4nO3deXyU5bn/8c+VnUAgJOwEDMiiqLghuFYRqVi36ukiWo8VLd3U2mMXlxaXY3+ttkdrq+2p3fRYrStVqlRUxFqtCyAiO4RFSNhCgLBlmSTX7495aJOYQBIy88wk3/frNa+ZZ5mZ6wnDfOd+lvs2d0dERGS/lLALEBGRxKJgEBGRBhQMIiLSgIJBREQaUDCIiEgDCgYREWlAwSCdipndYWZ/CruOAzlYjWa2zszOiWdN0rkoGKTDMbMvm9kiM9tnZpvN7Ndmlht2XSLJQsEgHYqZ3QTcA3wX6AGcDBwGvGpmGXGqIS0e7yMSKwoG6TDMrDtwJ3C9u7/s7hF3Xwd8ASgEvhSsmmVmT5nZbjP7wMyOrfca3zezkmDZCjObEMxPMbObzWy1mZWZ2dNmlhcsKzQzN7NrzGw98LqZ/c3MrmtU30IzuzR4/ICZbTCzXWY238zOaLQ5zdbY6DUPVFeWmf0pmL/TzOaaWd9D+ytLZ6BgkI7kVCALmF5/prvvAWYCE4NZFwPPAHnAE8DzZpZuZiOB64CT3D0HOBdYFzzneuCzwJnAAGAH8FCj9z8TODJ43p+ByfsXmNkooi2Xl4JZc4Hj6tXwjJll1XutJmtsYpsPVNdVRFtN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NjKzAjP7YjPLupjZ34Mu3ptanmFmb9brZkIkYSgYRNpuAtH+apoyBZju7rVNLXT3aqJXrDYZLCJhUjCItIGZnQ7cB3wuGB1saKNVriDotybos+elYHS3xfVaGc8H64kkFDVjRdrA3d8ys7nAd9x9cf1lQceMQ919XTBrErDR3c8PlvcI5i8GTopTySItphaDSNuNBJY3Mb8XsLPe9CJgopndY2ZnuHs5RMdvAKr39wAqkigUDCJtYGa9gHL/96hm9VUAWfsn3H0l0WMRi4C7zWxavXUzgcpY1irSWtqVJNI2hcDGpha4+45gmM8sd680swHAdnf/k5ntBK4FMLN8YJu7R+JVtEhLqMUg0jbLgV7BweRTm1j+CtHxJgCOAd4PxoO+Hbg7mD8eeCnWhYq0lsZjEIkBMzsB+La7X3mAdaYDNwe7mkQShloMIjHg7h8Acw50gRvwvEJBEpFaDCIi0oBaDCIi0oCCQUREGlAwiIhIAwoGERFpQMEgIiINKBhERKSB/w9sALbuh+nNvgAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ "edata.t_presim = 10\n", - "edata.fixedParametersPresimulation = [10.0, 0.0]\n", - "edata.fixedParameters = [10.0, 2.0]\n", - "print(edata.fixedParametersPreequilibration)\n", - "print(edata.fixedParametersPresimulation)\n", - "print(edata.fixedParameters)\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "edata.fixed_parameters_presimulation = [10.0, 0.0]\n", + "edata.fixed_parameters = [10.0, 2.0]\n", + "print(edata.fixed_parameters_pre_equilibration)\n", + "print(edata.fixed_parameters_presimulation)\n", + "print(edata.fixed_parameters)\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "amici.plotting.plot_observable_trajectories(rdata)" ] } diff --git a/doc/examples/example_splines/ExampleSplines.ipynb b/doc/examples/example_splines/ExampleSplines.ipynb index 7958d63274..e121c3096b 100644 --- a/doc/examples/example_splines/ExampleSplines.ipynb +++ b/doc/examples/example_splines/ExampleSplines.ipynb @@ -89,17 +89,17 @@ " # Import the model module\n", " model_module = amici.import_model_module(model_name, build_dir)\n", " # Setup simulation timepoints and parameters\n", - " model = model_module.getModel()\n", + " model = model_module.get_model()\n", " for name, value in parameters.items():\n", - " model.setParameterByName(name, value)\n", + " model.set_parameter_by_name(name, value)\n", " if isinstance(T, int | float):\n", " T = np.linspace(0, T, 100)\n", - " model.setTimepoints([float(t) for t in T])\n", - " solver = model.getSolver()\n", - " solver.setSensitivityOrder(amici.SensitivityOrder.first)\n", - " solver.setSensitivityMethod(amici.SensitivityMethod.forward)\n", + " model.set_timepoints([float(t) for t in T])\n", + " solver = model.create_solver()\n", + " solver.set_sensitivity_order(amici.SensitivityOrder.first)\n", + " solver.set_sensitivity_method(amici.SensitivityMethod.forward)\n", " # Simulate\n", - " rdata = amici.runAmiciSimulation(model, solver)\n", + " rdata = amici.run_simulation(model, solver)\n", " # Plot results\n", " if plot:\n", " fig, ax = plt.subplots()\n", @@ -587,9 +587,9 @@ "source": [ "# Sensitivities with respect to the spline values can be computed\n", "fig, ax = plt.subplots()\n", - "ax.plot(rdata[\"t\"], rdata.sx[:, 0], label=model.getParameterNames()[0])\n", - "ax.plot(rdata[\"t\"], rdata.sx[:, 1], label=model.getParameterNames()[1])\n", - "ax.plot(rdata[\"t\"], rdata.sx[:, 2], label=model.getParameterNames()[2])\n", + "ax.plot(rdata[\"t\"], rdata.sx[:, 0], label=model.get_parameter_names()[0])\n", + "ax.plot(rdata[\"t\"], rdata.sx[:, 1], label=model.get_parameter_names()[1])\n", + "ax.plot(rdata[\"t\"], rdata.sx[:, 2], label=model.get_parameter_names()[2])\n", "ax.set_xlabel(\"time\")\n", "ax.set_ylabel(\"sensitivity\")\n", "ax.legend();" diff --git a/doc/examples/example_splines_swameye/ExampleSplinesSwameye2003.ipynb b/doc/examples/example_splines_swameye/ExampleSplinesSwameye2003.ipynb index 1f0cf5569f..bd43664797 100644 --- a/doc/examples/example_splines_swameye/ExampleSplinesSwameye2003.ipynb +++ b/doc/examples/example_splines_swameye/ExampleSplinesSwameye2003.ipynb @@ -25,7 +25,8 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install pypesto" + "# %pip install pypesto\n", + "%pip install pypesto git+https://github.com/dweindl/pyPESTO.git@amici100" ] }, { @@ -361,13 +362,10 @@ ] }, { + "metadata": {}, "cell_type": "code", - "execution_count": 15, - "id": "1beb3a3e-6966-4d3e-acc5-546c1932df9f", - "metadata": { - "tags": [] - }, "outputs": [], + "execution_count": null, "source": [ "# Import PEtab problem into pyPESTO\n", "pypesto_problem = pypesto.petab.PetabImporter(\n", @@ -378,8 +376,9 @@ ")\n", "\n", "# Increase maximum number of steps for AMICI\n", - "pypesto_problem.objective.amici_solver.setMaxSteps(10**5)" - ] + "pypesto_problem.objective.amici_solver.set_max_steps(10**5)" + ], + "id": "c6741bce012b6ffa" }, { "cell_type": "markdown", @@ -534,7 +533,7 @@ "\n", "def simulate_pEpoR(x=None, **kwargs):\n", " problem, rdata = _simulate(x, **kwargs)\n", - " assert problem.objective.amici_model.getObservableIds()[0].startswith(\n", + " assert problem.objective.amici_model.get_observable_ids()[0].startswith(\n", " \"pEpoR\"\n", " )\n", " return rdata[\"t\"], rdata[\"y\"][:, 0]\n", @@ -542,7 +541,7 @@ "\n", "def simulate_pSTAT5(x=None, **kwargs):\n", " problem, rdata = _simulate(x, **kwargs)\n", - " assert problem.objective.amici_model.getObservableIds()[1].startswith(\n", + " assert problem.objective.amici_model.get_observable_ids()[1].startswith(\n", " \"pSTAT5\"\n", " )\n", " return rdata[\"t\"], rdata[\"y\"][:, 1]\n", @@ -550,7 +549,7 @@ "\n", "def simulate_tSTAT5(x=None, **kwargs):\n", " problem, rdata = _simulate(x, **kwargs)\n", - " assert problem.objective.amici_model.getObservableIds()[-1].startswith(\n", + " assert problem.objective.amici_model.get_observable_ids()[-1].startswith(\n", " \"tSTAT5\"\n", " )\n", " return rdata[\"t\"], rdata[\"y\"][:, -1]\n", diff --git a/doc/examples/example_steady_states/ExampleEquilibrationLogic.ipynb b/doc/examples/example_steady_states/ExampleEquilibrationLogic.ipynb index a7840e1127..c7875a6bce 100644 --- a/doc/examples/example_steady_states/ExampleEquilibrationLogic.ipynb +++ b/doc/examples/example_steady_states/ExampleEquilibrationLogic.ipynb @@ -80,9 +80,7 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Import necessary libraries and define the model\n", "import amici\n", @@ -105,7 +103,7 @@ " SensitivityOrder,\n", " SensitivityMethod,\n", " import_model_module,\n", - " runAmiciSimulation,\n", + " run_simulation,\n", " AMICI_SUCCESS,\n", " AMICI_ERROR,\n", " ExpData,\n", @@ -159,13 +157,13 @@ "temp_dir = Path(tempfile.mkdtemp())\n", "model_output_dir = temp_dir / model_name\n", "model_reduced_output_dir = temp_dir / model_reduced_name" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Import the model\n", "sbml_importer = amici.SbmlImporter(antimony2sbml(ant_model), from_file=False)\n", @@ -197,33 +195,33 @@ " observation_model=observation_model,\n", " constant_parameters=constant_parameters,\n", ")" - ] + ], + "outputs": [], + "execution_count": null }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], + "cell_type": "code", "source": [ "# import the models and run some test simulations\n", "model_reduced_module = import_model_module(\n", " model_reduced_name, model_reduced_output_dir\n", ")\n", - "model_reduced = model_reduced_module.getModel()\n", + "model_reduced = model_reduced_module.get_model()\n", "\n", "model_module = import_model_module(model_name, model_output_dir)\n", - "model = model_module.getModel()\n", + "model = model_module.get_model()\n", "\n", "# simulate model with conservation laws\n", - "model.setTimepoints(np.linspace(0, 2, 100))\n", - "solver = model.getSolver()\n", - "rdata = runAmiciSimulation(model, solver)\n", + "model.set_timepoints(np.linspace(0, 2, 100))\n", + "solver = model.create_solver()\n", + "rdata = run_simulation(model, solver)\n", "assert rdata.status == AMICI_SUCCESS\n", "\n", "# simulate model without conservation laws\n", - "model_reduced.setTimepoints(np.linspace(0, 2, 100))\n", - "solver_reduced = model_reduced.getSolver()\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced)\n", + "model_reduced.set_timepoints(np.linspace(0, 2, 100))\n", + "solver_reduced = model_reduced.create_solver()\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "\n", "# plot trajectories\n", @@ -233,20 +231,22 @@ "plot_state_trajectories(rdata_reduced, model=model_reduced, ax=axes[0, 1])\n", "plot_observable_trajectories(rdata_reduced, model=model_reduced, ax=axes[1, 1])\n", "fig.tight_layout()" - ] + ], + "outputs": [], + "execution_count": null }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], + "cell_type": "code", "source": [ "# the enzyme state was removed from the ODEs of the reduced model\n", - "print(model.getStateIdsSolver())\n", - "print(model_reduced.getStateIdsSolver())\n", - "print(model.getStateIds())\n", - "print(model_reduced.getStateIds())" - ] + "print(model.get_state_ids_solver())\n", + "print(model_reduced.get_state_ids_solver())\n", + "print(model.get_state_ids())\n", + "print(model_reduced.get_state_ids())" + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -290,24 +290,20 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], + "metadata": {}, "source": [ "# Call post-equilibration by setting an infinity timepoint\n", - "model.setTimepoints([np.inf])\n", + "model.set_timepoints([np.inf])\n", "\n", "# Set the solver\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", "# maximum number of solver steps for numerical integration\n", - "solver.setMaxSteps(1000)\n", - "model.setSteadyStateComputationMode(\n", + "solver.set_max_steps(1000)\n", + "model.set_steady_state_computation_mode(\n", " SteadyStateComputationMode.integrateIfNewtonFails\n", ")\n", - "rdata = runAmiciSimulation(model, solver)\n", + "rdata = run_simulation(model, solver)\n", "assert rdata.status == AMICI_SUCCESS\n", "# print out a subset of data returned by model simulation\n", "for key in [\n", @@ -317,13 +313,15 @@ " \"posteq_wrms\",\n", " \"posteq_t\",\n", " \"posteq_numsteps\",\n", - " \"posteq_numstepsB\",\n", + " \"posteq_numsteps_b\",\n", " \"posteq_status\",\n", " \"posteq_cpu_time\",\n", - " \"posteq_cpu_timeB\",\n", + " \"posteq_cpu_time_b\",\n", "]:\n", " print(f\"{key:>16}: {rdata[key]}\")" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -350,12 +348,12 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "list(SteadyStateStatus)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -373,46 +371,44 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# steady state value found by pre-equilibration\n", "steady_state = rdata[\"x\"][0]\n", "\n", "timepoints = np.linspace(0, 14, 200)\n", - "model.setTimepoints(timepoints)\n", - "rdata = runAmiciSimulation(model, solver)\n", + "model.set_timepoints(timepoints)\n", + "rdata = run_simulation(model, solver)\n", "plot_state_trajectories(rdata, model=model)\n", "\n", "for stst_value in steady_state:\n", " plt.axhline(y=stst_value, color=\"gray\", linestyle=\"--\", linewidth=1)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "We want to demonstrate a complete failure during the steady-state computation by reducing the number of integration steps to a lower value:" - ] + "source": "We want to demonstrate a complete failure during the steady-state computation by reducing the number of integration steps to a lower value:" }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# reduce maxsteps for integration\n", - "model.setTimepoints([np.inf])\n", - "solver.setMaxSteps(100)\n", - "rdata = runAmiciSimulation(model, solver)\n", + "model.set_timepoints([np.inf])\n", + "solver.set_max_steps(100)\n", + "rdata = run_simulation(model, solver)\n", "assert rdata.status == AMICI_ERROR\n", "print(\"Simulation status:\", simulation_status_to_str(rdata[\"status\"]))\n", "print(\"Status of post-equilibration:\", rdata[\"posteq_status\"])\n", "print(\n", " \"Number of steps employed in post-equilibration:\", rdata[\"posteq_numsteps\"]\n", ")" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -424,22 +420,18 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], + "metadata": {}, "source": [ - "model_reduced.setTimepoints([np.inf])\n", - "model_reduced.setSteadyStateComputationMode(\n", + "model_reduced.set_timepoints([np.inf])\n", + "model_reduced.set_steady_state_computation_mode(\n", " SteadyStateComputationMode.integrateIfNewtonFails\n", ")\n", "\n", "# set the solver\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setMaxSteps(100)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_max_steps(100)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "assert rdata_reduced.posteq_status[0] == SteadyStateStatus.success\n", "print(\n", @@ -452,7 +444,9 @@ " \"Number of steps employed in post-equilibration:\",\n", " rdata_reduced[\"posteq_numsteps\"],\n", ")" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -465,31 +459,27 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# create edata, with 3 timepoints and 2 observables:\n", "edata = ExpData(2, 0, 0, np.array([0.0, 0.1, 1.0]))\n", - "edata.setObservedData([1.8] * 6)\n", - "edata.fixedParameters = np.array([3.0, 5.0])\n", + "edata.set_observed_data([1.8] * 6)\n", + "edata.fixed_parameters = np.array([3.0, 5.0])\n", "# set parameters for pre-equilibration\n", - "edata.fixedParametersPreequilibration = np.array([0.0, 2.0])\n", - "edata.reinitializeFixedParameterInitialStates = True" - ] + "edata.fixed_parameters_pre_equilibration = np.array([0.0, 2.0])\n", + "edata.reinitialize_fixed_parameter_initial_states = True" + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": true - }, - "outputs": [], + "metadata": {}, "source": [ "# create the solver object and run the simulation\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "print(\n", " \"Simulation status:\",\n", @@ -506,7 +496,9 @@ "\n", "plot_state_trajectories(rdata_reduced, model=model_reduced)\n", "plot_observable_trajectories(rdata_reduced, model=model_reduced)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -520,17 +512,17 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Change the last timepoint to an infinity timepoint.\n", - "edata.setTimepoints(np.array([0.0, 0.1, float(\"inf\")]))\n", + "edata.set_timepoints(np.array([0.0, 0.1, float(\"inf\")]))\n", "\n", "# run the simulation\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "assert rdata_reduced.status == AMICI_SUCCESS" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -582,23 +574,19 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], + "metadata": {}, "source": [ "# Call simulation with singular Jacobian and `integrateIfNewtonFails` mode\n", - "model.setTimepoints([np.inf])\n", - "model.setSteadyStateSensitivityMode(\n", + "model.set_timepoints([np.inf])\n", + "model.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.integrateIfNewtonFails\n", ")\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "solver.setMaxSteps(10000)\n", - "rdata = runAmiciSimulation(model, solver)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "solver.set_max_steps(10000)\n", + "rdata = run_simulation(model, solver)\n", "\n", "np.set_printoptions(threshold=20)\n", "print(\"Simulation status:\", simulation_status_to_str(rdata[\"status\"]))\n", @@ -608,7 +596,9 @@ ")\n", "print(\"Computed state sensitivities:\")\n", "print(rdata[\"sx\"][0, :, :])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -620,19 +610,17 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Call simulation with singular Jacobian and newtonOnly mode (will fail)\n", - "model.setTimepoints([np.inf])\n", - "model.setSteadyStateSensitivityMode(SteadyStateSensitivityMode.newtonOnly)\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "solver.setMaxSteps(10000)\n", - "rdata = runAmiciSimulation(model, solver)\n", + "model.set_timepoints([np.inf])\n", + "model.set_steady_state_sensitivity_mode(SteadyStateSensitivityMode.newtonOnly)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "solver.set_max_steps(10000)\n", + "rdata = run_simulation(model, solver)\n", "assert rdata.status == AMICI_ERROR\n", "\n", "print(\"Simulation status:\", simulation_status_to_str(rdata[\"status\"]))\n", @@ -643,7 +631,9 @@ ")\n", "print(\"Computed state sensitivities:\")\n", "print(rdata[\"sx\"][0, :, :])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -656,23 +646,19 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": true - }, - "outputs": [], + "metadata": {}, "source": [ "# Try `newtonOnly` option with reduced model\n", - "model_reduced.setTimepoints([np.inf])\n", - "model_reduced.setSteadyStateSensitivityMode(\n", + "model_reduced.set_timepoints([np.inf])\n", + "model_reduced.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.newtonOnly\n", ")\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "solver_reduced.setMaxSteps(1000)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "solver_reduced.set_max_steps(1000)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "assert rdata_reduced.posteq_status == [\n", " SteadyStateStatus.success,\n", @@ -692,14 +678,14 @@ ")\n", "print(\"Computed state sensitivities:\")\n", "print(rdata_reduced[\"sx\"][0, :, :])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "In this case, both steady state and the corresponding sensitivities could be computed by solving the linear systems $\\mathbf{s}^x = - \\frac{\\partial \\mathbf{f}}{\\partial \\theta}$ for state sensitivities ($\\mathbf{s}^x$)." - ] + "source": "In this case, both steady state and the corresponding sensitivities could be computed by solving the linear systems $\\mathbf{s}^x = - \\frac{\\partial \\mathbf{f}}{\\partial \\theta}$ for state sensitivities ($\\mathbf{s}^x$)." }, { "cell_type": "markdown", @@ -766,26 +752,24 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Call post-equilibration and sensitivities computation using adjoint sensitivity analysis\n", "# by setting an infinity timepoint\n", "# and creatíng an edata object, which is needed for adjoint computation\n", "edata = ExpData(2, 0, 0, np.array([float(\"inf\")]))\n", - "edata.setObservedData([1.8] * 2)\n", - "edata.fixedParameters = np.array([3.0, 5.0])\n", + "edata.set_observed_data([1.8] * 2)\n", + "edata.fixed_parameters = np.array([3.0, 5.0])\n", "\n", - "model_reduced.setSteadyStateSensitivityMode(\n", + "model_reduced.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.newtonOnly\n", ")\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "solver_reduced.setMaxSteps(1000)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "solver_reduced.set_max_steps(1000)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "\n", "print(\n", " \"Simulation status:\",\n", @@ -798,33 +782,33 @@ ")\n", "print(\n", " \"Number of backward steps employed in post-equilibration:\",\n", - " rdata_reduced[\"posteq_numstepsB\"],\n", + " rdata_reduced[\"posteq_numsteps_b\"],\n", ")\n", "print(\"Computed gradient:\", rdata_reduced[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", "metadata": {}, "source": [ - "If we carry out the same computation with a system that has a singular Jacobian, then `posteq_numstepsB` will not be `0` anymore (which indicates that the linear system solve was used to compute backward post-equilibration).\n", - "Now, integration is carried out and hence `posteq_numstepsB > 0`:" + "If we carry out the same computation with a system that has a singular Jacobian, then `posteq_numsteps_b` will not be `0` anymore (which indicates that the linear system solve was used to compute backward post-equilibration).\n", + "Now, integration is carried out and hence `posteq_numsteps_b > 0`:" ] }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Call adjoint post-equilibration with model with singular Jacobian\n", - "model.setSteadyStateSensitivityMode(SteadyStateSensitivityMode.newtonOnly)\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setMaxStepsBackwardProblem(10000)\n", - "solver.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata = runAmiciSimulation(model, solver, edata)\n", + "model.set_steady_state_sensitivity_mode(SteadyStateSensitivityMode.newtonOnly)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_max_steps_backward_problem(10000)\n", + "solver.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata = run_simulation(model, solver, edata)\n", "\n", "print(\"Simulation status:\", simulation_status_to_str(rdata[\"status\"]))\n", "print(\"Status of post-equilibration:\", rdata[\"posteq_status\"])\n", @@ -833,10 +817,12 @@ ")\n", "print(\n", " \"Number of backward steps employed in post-equilibration:\",\n", - " rdata[\"posteq_numstepsB\"],\n", + " rdata[\"posteq_numsteps_b\"],\n", ")\n", "print(\"Computed gradient:\", rdata[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -851,58 +837,50 @@ { "cell_type": "markdown", "metadata": {}, - "source": [ - "#### Pre-equilibration with forward sensitivities" - ] + "source": "#### Pre-equilibration with forward sensitivities" }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], + "metadata": {}, "source": [ "# No post-equilibration this time.\n", "# create edata, with 3 timepoints and 2 observables:\n", "edata = ExpData(2, 0, 0, np.array([0.0, 0.1, 1.0]))\n", - "edata.setObservedData([1.8] * 6)\n", - "edata.fixedParameters = np.array([3.0, 5.0])\n", + "edata.set_observed_data([1.8] * 6)\n", + "edata.fixed_parameters = np.array([3.0, 5.0])\n", "# set parameters for pre-equilibration\n", - "edata.fixedParametersPreequilibration = np.array([0.0, 2.0])\n", - "edata.reinitializeFixedParameterInitialStates = True\n", + "edata.fixed_parameters_pre_equilibration = np.array([0.0, 2.0])\n", + "edata.reinitialize_fixed_parameter_initial_states = True\n", "\n", "# create the solver object and run the simulation, singular Jacobian, enforce Newton solver for sensitivities\n", - "model.setSteadyStateSensitivityMode(SteadyStateSensitivityMode.newtonOnly)\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata = runAmiciSimulation(model, solver, edata)\n", + "model.set_steady_state_sensitivity_mode(SteadyStateSensitivityMode.newtonOnly)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata = run_simulation(model, solver, edata)\n", "\n", "assert rdata.status == AMICI_ERROR\n", "for key, value in rdata.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], + "metadata": {}, "source": [ "# Singular Jacobian, use simulation\n", - "model.setSteadyStateSensitivityMode(\n", + "model.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.integrateIfNewtonFails\n", ")\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata = runAmiciSimulation(model, solver, edata)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata = run_simulation(model, solver, edata)\n", "assert rdata.status == AMICI_SUCCESS\n", "assert rdata.preeq_status == [\n", " SteadyStateStatus.failed_factorization,\n", @@ -913,25 +891,27 @@ "for key, value in rdata.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Non-singular Jacobian, use Newton solver\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "for key, value in rdata_reduced.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -959,16 +939,14 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], "source": [ "# Non-singular Jacobian, use Newton solver and adjoints with initial state sensitivities\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "assert rdata_reduced.preeq_status == [\n", @@ -980,20 +958,20 @@ " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)\n", "print(\"Gradient:\", rdata_reduced[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], + "cell_type": "code", "source": [ "# Non-singular Jacobian, use simulation solver and adjoints with initial state sensitivities\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(0)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(0)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "assert rdata_reduced.preeq_status == [\n", @@ -1001,59 +979,61 @@ " SteadyStateStatus.success,\n", " SteadyStateStatus.not_run,\n", "]\n", - "assert rdata_reduced.preeq_numstepsB == 0\n", + "assert rdata_reduced.preeq_numsteps_b == 0\n", "\n", "for key, value in rdata_reduced.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)\n", "print(\"Gradient:\", rdata_reduced[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], + "cell_type": "code", "source": [ "# Non-singular Jacobian, use Newton solver and adjoints with fully adjoint pre-equilibration\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(10)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver_reduced.setSensitivityMethodPreequilibration(SensitivityMethod.adjoint)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata_reduced = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(10)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver_reduced.set_sensitivity_method_pre_equilibration(\n", + " SensitivityMethod.adjoint\n", + ")\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata_reduced = run_simulation(model_reduced, solver_reduced, edata)\n", "assert rdata_reduced.status == AMICI_SUCCESS\n", "assert rdata_reduced.preeq_status == [\n", " SteadyStateStatus.success,\n", " SteadyStateStatus.not_run,\n", " SteadyStateStatus.not_run,\n", "]\n", - "assert rdata_reduced.preeq_numstepsB == 0\n", + "assert rdata_reduced.preeq_numsteps_b == 0\n", "\n", "for key, value in rdata_reduced.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)\n", "print(\"Gradient:\", rdata_reduced[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { - "cell_type": "markdown", "metadata": {}, - "source": "As for post-equilibration, adjoint pre-equilibration has an analytic solution (via the linear system), which will be preferred. If used for models with singular Jacobian, numerical integration will be carried out, which is indicated by `preeq_numstepsB`." + "cell_type": "markdown", + "source": "As for post-equilibration, adjoint pre-equilibration has an analytic solution (via the linear system), which will be preferred. If used for models with singular Jacobian, numerical integration will be carried out, which is indicated by `preeq_numsteps_b`." }, { - "cell_type": "code", - "execution_count": null, "metadata": {}, - "outputs": [], + "cell_type": "code", "source": [ "# Singular Jacobian, use try Newton solver and adjoints with fully adjoint pre-equilibration\n", - "solver = model.getSolver()\n", - "solver.setNewtonMaxSteps(10)\n", - "solver.setSensitivityMethod(SensitivityMethod.adjoint)\n", - "solver.setSensitivityMethodPreequilibration(SensitivityMethod.adjoint)\n", - "solver.setSensitivityOrder(SensitivityOrder.first)\n", - "rdata = runAmiciSimulation(model, solver, edata)\n", + "solver = model.create_solver()\n", + "solver.set_newton_max_steps(10)\n", + "solver.set_sensitivity_method(SensitivityMethod.adjoint)\n", + "solver.set_sensitivity_method_pre_equilibration(SensitivityMethod.adjoint)\n", + "solver.set_sensitivity_order(SensitivityOrder.first)\n", + "rdata = run_simulation(model, solver, edata)\n", "assert rdata.status == AMICI_SUCCESS\n", "assert rdata.preeq_status == [\n", " SteadyStateStatus.failed_factorization,\n", @@ -1061,12 +1041,14 @@ " SteadyStateStatus.not_run,\n", "]\n", "\n", - "assert rdata.preeq_numstepsB > 0\n", + "assert rdata.preeq_numsteps_b > 0\n", "for key, value in rdata.items():\n", " if key[0:6] == \"preeq_\":\n", " print(f\"{key:20s}:\", value)\n", "print(\"Gradient:\", rdata[\"sllh\"])" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -1088,36 +1070,30 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], + "metadata": {}, "source": [ "# Non-singular Jacobian, use simulation\n", - "model_reduced.setSteadyStateSensitivityMode(\n", + "model_reduced.set_steady_state_sensitivity_mode(\n", " SteadyStateSensitivityMode.integrateIfNewtonFails\n", ")\n", - "solver_reduced = model_reduced.getSolver()\n", - "solver_reduced.setNewtonMaxSteps(0)\n", - "solver_reduced.setSensitivityMethod(SensitivityMethod.forward)\n", - "solver_reduced.setSensitivityOrder(SensitivityOrder.first)\n", + "solver_reduced = model_reduced.create_solver()\n", + "solver_reduced.set_newton_max_steps(0)\n", + "solver_reduced.set_sensitivity_method(SensitivityMethod.forward)\n", + "solver_reduced.set_sensitivity_order(SensitivityOrder.first)\n", "\n", "# run with lax tolerances\n", - "solver_reduced.setRelativeToleranceSteadyState(1e-2)\n", - "solver_reduced.setAbsoluteToleranceSteadyState(1e-3)\n", - "solver_reduced.setRelativeToleranceSteadyStateSensi(1e-2)\n", - "solver_reduced.setAbsoluteToleranceSteadyStateSensi(1e-3)\n", - "rdata_reduced_lax = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced.set_relative_tolerance_steady_state(1e-2)\n", + "solver_reduced.set_absolute_tolerance_steady_state(1e-3)\n", + "solver_reduced.set_relative_tolerance_steady_state_sensi(1e-2)\n", + "solver_reduced.set_absolute_tolerance_steady_state_sensi(1e-3)\n", + "rdata_reduced_lax = run_simulation(model_reduced, solver_reduced, edata)\n", "\n", "# run with strict tolerances\n", - "solver_reduced.setRelativeToleranceSteadyState(1e-12)\n", - "solver_reduced.setAbsoluteToleranceSteadyState(1e-16)\n", - "solver_reduced.setRelativeToleranceSteadyStateSensi(1e-12)\n", - "solver_reduced.setAbsoluteToleranceSteadyStateSensi(1e-16)\n", - "rdata_reduced_strict = runAmiciSimulation(model_reduced, solver_reduced, edata)\n", + "solver_reduced.set_relative_tolerance_steady_state(1e-12)\n", + "solver_reduced.set_absolute_tolerance_steady_state(1e-16)\n", + "solver_reduced.set_relative_tolerance_steady_state_sensi(1e-12)\n", + "solver_reduced.set_absolute_tolerance_steady_state_sensi(1e-16)\n", + "rdata_reduced_strict = run_simulation(model_reduced, solver_reduced, edata)\n", "\n", "# compare ODE outputs\n", "print(\"Number of ODE solver steps, until steady state:\")\n", @@ -1131,7 +1107,9 @@ "print(\"\\nCPU time to reach steady state (ms):\")\n", "print(\" lax tolerances: \", rdata_reduced_lax[\"preeq_cpu_time\"])\n", "print(\" strict tolerances:\", rdata_reduced_strict[\"preeq_cpu_time\"])" - ] + ], + "outputs": [], + "execution_count": null } ], "metadata": { diff --git a/doc/examples/getting_started/GettingStarted.ipynb b/doc/examples/getting_started/GettingStarted.ipynb index 1bacf00bef..c58e7f2ddc 100644 --- a/doc/examples/getting_started/GettingStarted.ipynb +++ b/doc/examples/getting_started/GettingStarted.ipynb @@ -14,7 +14,7 @@ "metadata": {}, "source": [ "## Model Compilation\n", - "Before simulations can be run, the model must be imported and compiled. In this process, AMICI performs all symbolic manipulations that later enable scalable simulations and efficient sensitivity computation. The first step towards model compilation is the creation of an [SbmlImporter](https://amici.readthedocs.io/en/latest/generated/amici.sbml_import.SbmlImporter.html) instance, which requires an SBML Document that specifies the model using the [Systems Biology Markup Language (SBML)](https://sbml.org/). \n", + "Before simulations can be run, the model must be imported and compiled. In this process, AMICI performs all symbolic manipulations that later enable scalable simulations and efficient sensitivity computation. The first step towards model compilation is the creation of an [SbmlImporter](https://amici.readthedocs.io/en/latest/generated/amici.sbml_import.SbmlImporter.html) instance, which requires an SBML Document that specifies the model using the [Systems Biology Markup Language (SBML)](https://sbml.org/).\n", "\n", "For the purpose of this tutorial, we will use `model_steadystate_scaled.xml`, which is contained in the same directory as this notebook." ] @@ -53,7 +53,7 @@ "metadata": {}, "source": [ "## Loading the model module\n", - "To run simulations, we need to instantiate [amici.Model](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html) and [amici.Solver](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html) instances. As simulations require instances matching the imported model, they have to be imported from the generated model module. " + "To run simulations, we need to instantiate [amici.Model](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html) and [amici.Solver](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html) instances. As simulations require instances matching the imported model, they have to be imported from the generated model module." ] }, { @@ -65,42 +65,34 @@ "# load the model module\n", "model_module = amici.import_model_module(model_name, model_dir)\n", "# instantiate model\n", - "model = model_module.getModel()\n", + "model = model_module.get_model()\n", "# instantiate solver\n", - "solver = model.getSolver()" + "solver = model.create_solver()" ] }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "The model allows the user to manipulate model related properties of simulations. This includes the values of model parameters that can be set by using [amici.Model.setParameterByName](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.setParameterByName). Here, we set the model parameter `p1` to a value of `1e-3`." - ] + "source": "The model allows the user to manipulate model related properties of simulations. This includes the values of model parameters that can be set by using [amici.Model.set_parameter_by_name](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.set_parameter_by_name). Here, we set the model parameter `p1` to a value of `1e-3`." }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], - "source": [ - "model.setParameterByName(\"p1\", 1e-3)" - ] + "source": "model.set_parameter_by_name(\"p1\", 1e-3)" }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "In contrast, the solver instance allows the specification of simulation related properties. This includes setting options for the SUNDIALS solver such as absolute tolerances via [amici.Solver.setAbsoluteTolerance](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.setAbsoluteTolerance). Here we set the absolute integration tolerances to `1e-10`." - ] + "source": "In contrast, the solver instance allows the specification of simulation related properties. This includes setting options for the SUNDIALS solver such as absolute tolerances via [amici.Solver.set_absolute_tolerance](https://amici.readthedocs.io/en/latest/generated/amici.amici.Solver.html#amici.amici.Solver.set_absolute_tolerance). Here we set the absolute integration tolerances to `1e-10`." }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], - "source": [ - "solver.setAbsoluteTolerance(1e-10)" - ] + "source": "solver.set_absolute_tolerance(1e-10)" }, { "cell_type": "markdown", @@ -112,9 +104,7 @@ { "cell_type": "markdown", "metadata": {}, - "source": [ - "Model simulations can be executed using the [amici.runAmiciSimulations](https://amici.readthedocs.io/en/latest/generated/amici.html#amici.runAmiciSimulation) routine. By default, the model does not contain any timepoints for which the model is to be simulated. Here we define a simulation timecourse with two timepoints at `0` and `1` and then run the simulation." - ] + "source": "Model simulations can be executed using the [amici.run_simulation](https://amici.readthedocs.io/en/latest/generated/amici.html#amici.run_simulation) routine. By default, the model does not contain any timepoints for which the model is to be simulated. Here we define a simulation timecourse with two timepoints at `0` and `1` and then run the simulation." }, { "cell_type": "code", @@ -123,8 +113,8 @@ "outputs": [], "source": [ "# set timepoints\n", - "model.setTimepoints([0, 1])\n", - "rdata = amici.runAmiciSimulation(model, solver)" + "model.set_timepoints([0, 1])\n", + "rdata = amici.run_simulation(model, solver)" ] }, { @@ -158,9 +148,7 @@ { "cell_type": "markdown", "metadata": {}, - "source": [ - "All results attributes are always ordered according to the model. For species, this means that the columns of `rdata.x` match the ordering of species in the model, which can be accessed as [amici.Model.getStateNames](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.getStateNames)" - ] + "source": "All results attributes are always ordered according to the model. For species, this means that the columns of `rdata.x` match the ordering of species in the model, which can be accessed as [amici.Model.get_state_names](https://amici.readthedocs.io/en/latest/generated/amici.amici.Model.html#amici.amici.Model.get_state_names)" }, { "cell_type": "code", @@ -178,9 +166,7 @@ "output_type": "execute_result" } ], - "source": [ - "model.getStateNames()" - ] + "source": "model.get_state_names()" }, { "cell_type": "markdown", diff --git a/doc/examples/getting_started_extended/GettingStartedExtended.ipynb b/doc/examples/getting_started_extended/GettingStartedExtended.ipynb index 2f0dd61857..5a1c814590 100644 --- a/doc/examples/getting_started_extended/GettingStartedExtended.ipynb +++ b/doc/examples/getting_started_extended/GettingStartedExtended.ipynb @@ -365,28 +365,17 @@ ] }, { - "cell_type": "code", - "execution_count": 9, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model name: model_steadystate_scaled\n", - "Model parameters: ('p1', 'p2', 'p3', 'p4', 'p5', 'scaling_x1', 'offset_x2', 'observable_x1withsigma_sigma')\n", - "Model outputs: ('observable_x1', 'observable_x2', 'observable_x3', 'observable_x1_scaled', 'observable_x2_offsetted', 'observable_x1withsigma')\n", - "Model states: ('x1', 'x2', 'x3')\n" - ] - } - ], + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ - "model = model_module.getModel()\n", + "model = model_module.get_model()\n", "\n", - "print(\"Model name: \", model.getName())\n", - "print(\"Model parameters: \", model.getParameterIds())\n", - "print(\"Model outputs: \", model.getObservableIds())\n", - "print(\"Model state variables: \", model.getStateIds())" + "print(\"Model name: \", model.get_name())\n", + "print(\"Model parameters: \", model.get_parameter_ids())\n", + "print(\"Model outputs: \", model.get_observable_ids())\n", + "print(\"Model state variables: \", model.get_state_ids())" ] }, { @@ -397,49 +386,38 @@ "source": [ "## Running simulations and analyzing results\n", "\n", - "After importing the model, we can run simulations using `amici.runAmiciSimulation`. This requires a `Model` instance and a `Solver` instance. Optionally you can provide measurements inside an `ExpData` instance, as shown later in this notebook." + "After importing the model, we can run simulations using `amici.run_simulation`. This requires a `Model` instance and a `Solver` instance. Optionally you can provide measurements inside an `ExpData` instance, as shown later in this notebook." ] }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "scrolled": true - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "# Create Model instance\n", - "model = model_module.getModel()\n", + "model = model_module.get_model()\n", "\n", "# set timepoints for which we want to simulate the model\n", - "model.setTimepoints(np.linspace(0, 60, 60))\n", + "model.set_timepoints(np.linspace(0, 60, 60))\n", "\n", "# Create solver instance\n", - "solver = model.getSolver()\n", + "solver = model.create_solver()\n", "\n", "# Run simulation using default model parameters and solver options\n", - "rdata = amici.runAmiciSimulation(model, solver)" + "rdata = amici.run_simulation(model, solver)" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Simulation was run using model default parameters as specified in the SBML model:\n", - "(1.0, 0.5, 0.4, 2.0, 0.1, 2.0, 3.0, 0.2)\n" - ] - } - ], + "outputs": [], "source": [ "print(\n", " \"Simulation was run using model default parameters as specified in the SBML model:\"\n", ")\n", - "print(dict(zip(model.getParameterIds(), model.getParameters())))" + "print(dict(zip(model.get_parameter_ids(), model.get_parameters())))" ] }, { @@ -871,23 +849,27 @@ ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Alternatively, those data can be accessed through `ReturnData.xr.*` as [xarray.DataArray](https://docs.xarray.dev/en/stable/index.html) objects, that contain additional metadata such as timepoints and identifiers. This allows for more convenient indexing and plotting of the results." }, { - "metadata": {}, "cell_type": "code", - "source": "rdata.xr.x", + "execution_count": null, + "metadata": {}, "outputs": [], - "execution_count": null + "source": [ + "rdata.xr.x" + ] }, { - "metadata": {}, "cell_type": "code", - "source": "rdata.xr.x.to_pandas()", + "execution_count": null, + "metadata": {}, "outputs": [], - "execution_count": null + "source": [ + "rdata.xr.x.to_pandas()" + ] }, { "cell_type": "markdown", @@ -964,33 +946,25 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Log-likelihood -97.118555\n" - ] - } - ], + "outputs": [], "source": [ "# Create model instance and set time points for simulation\n", - "model = model_module.getModel()\n", - "model.setTimepoints(np.linspace(0, 10, 11))\n", + "model = model_module.get_model()\n", + "model.set_timepoints(np.linspace(0, 10, 11))\n", "\n", "# Create solver instance, keep default options\n", - "solver = model.getSolver()\n", + "solver = model.create_solver()\n", "\n", "# Run simulation without experimental data\n", - "rdata = amici.runAmiciSimulation(model, solver)\n", + "rdata = amici.run_simulation(model, solver)\n", "\n", "# Create ExpData instance from simulation results\n", "edata = amici.ExpData(rdata, 1.0, 0.0)\n", "\n", "# Re-run simulation, this time passing \"experimental data\"\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "\n", "print(f\"Log-likelihood {rdata['llh']:f}\")" ] @@ -1015,42 +989,31 @@ "metadata": {}, "source": [ "### Simulation tolerances\n", - "Numerical error tolerances are often critical to get accurate results. For the state variables, integration errors can be controlled using `setRelativeTolerance` and `setAbsoluteTolerance`. Similar functions exist for sensitivities, steadystates and quadratures. We initially compute a reference solution using extremely low tolerances and then assess the influence on integration error for different levels of absolute and relative tolerance." + "Numerical error tolerances are often critical to get accurate results. For the state variables, integration errors can be controlled using `set_relative_tolerance` and `set_absolute_tolerance`. Similar functions exist for sensitivities, steady states and quadratures. We initially compute a reference solution using extremely low tolerances and then assess the influence on integration error for different levels of absolute and relative tolerance." ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAA4UAAAFBCAYAAADANgorAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAACXHUlEQVR4nO3dd5hT1RYF8LXp0pWuqCAKgp2m2BAUBMGCoiDYC6Ji7+WJvWJHRUQELCCgAmKjSbHSBQQp0lF678zMeX+sXJNJm8xMMsnMrN/35cvkJrk5k+fjzL5nn73NOQcREREREREpnIokewAiIiIiIiKSPAoKRURERERECjEFhSIiIiIiIoWYgkIREREREZFCTEGhiIiIiIhIIaagUEREREREpBArluwB5IXKlSu7WrVqJXsYIiKSB2bMmLHROVcl2ePILzRHiogUDtHmx0IRFNaqVQvTp09P9jBERCQPmNmKZI8hP9EcKSJSOESbH5U+KiIiIiIiUogpKBQRERERESnEFBSKiIiIiIgUYoViT2E4Bw4cwOrVq7F3795kDyXbSpUqhZo1a6J48eLJHoqIiBRAmiNFRAqXQhsUrl69GuXKlUOtWrVgZskeTsycc9i0aRNWr16N2rVrJ3s4IiJSAGmOFBEpXApt+ujevXtRqVKlfDXZAYCZoVKlSvny6q2IiOQPmiNFRAqXQhsUAsh3k50nv45bRETyj/w61+TXcYuIJFOhDgpFREREREQKOwWFIiIiIiIihZiCwiSaNm0aTjzxROzduxe7du3Ccccdh3nz5iV7WCIi2bJ9O7BzZ7JHIQWJ5kcRKUycA1auTO5cWmirj6aCJk2a4KKLLsLjjz+OPXv24KqrrsLxxx+f7GGJiGRL27ZA+fLAd98leyRSUGh+FJGCbudO4LHHgB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MqvqOH2JmR8ZwLhERSW0/ALjBzMoCgJkd5v1bH6ACgPW+IKoFAO/f/+D5K9jnAB4EUME552W7/ADgDvOlnZjZKWHeF25e9ObluuAKYHBQGct5o/0uYTnndgBYbWaX+M5b0sxKI7bvTSTuFBSKZO17AMXMbAG4Sf23gOd2AWjq2wDfEsDT4H65T8xsLpj+8ZZzbiuAJwE0MrM5vvNcG+azPgDQ3Mz+ANAM/quQcwCk+zaj3wOgH1jwZabvs99H0Iqcc24TgJ+NhWVeAfCV7zx/AJgA4EHn3Nqgz8/yvDF8J5HcBaCF73uZAaCBc24+gMcBjPF9L2PBPSIiIpKPOefGAPgMwK++f/eHIzTQ+xRAY9/z1wD4y/fe4Pkr2HAAncFUUs8z4IXUOWb2p+9xsOC59F0ARXyf/zmA65xz+4LeE8t5I/4uWbga3IoxB8AvAKrH+L2JxJ35s7xERERERESksNFKoYiIiIiISCGmoFBERERERKQQU1AoIiIiIiJSiCkoFBERERERKcQUFIqIiIiIiBRiCgpFREREREQKMQWFIiIiIiIihZiCQhERERERkULs/+gWIJUEvhh6AAAAAElFTkSuQmCC\n", - "text/plain": "
" - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ - "solver.setRelativeTolerance(1e-16)\n", - "solver.setAbsoluteTolerance(1e-16)\n", - "solver.setSensitivityOrder(amici.SensitivityOrder.none)\n", - "rdata_ref = amici.runAmiciSimulation(model, solver, edata)\n", + "solver.set_relative_tolerance(1e-16)\n", + "solver.set_absolute_tolerance(1e-16)\n", + "solver.set_sensitivity_order(amici.SensitivityOrder.none)\n", + "rdata_ref = amici.run_simulation(model, solver, edata)\n", "\n", "\n", "def get_simulation_error(solver):\n", - " rdata = amici.runAmiciSimulation(model, solver, edata)\n", + " rdata = amici.run_simulation(model, solver, edata)\n", " return np.mean(np.abs(rdata[\"x\"] - rdata_ref[\"x\"])), np.mean(\n", " np.abs(rdata[\"llh\"] - rdata_ref[\"llh\"])\n", " )\n", "\n", "\n", "def get_errors(tolfun, tols):\n", - " solver.setRelativeTolerance(1e-16)\n", - " solver.setAbsoluteTolerance(1e-16)\n", + " solver.set_relative_tolerance(1e-16)\n", + " solver.set_absolute_tolerance(1e-16)\n", " x_errs = []\n", " llh_errs = []\n", " for tol in tols:\n", @@ -1062,10 +1025,10 @@ "\n", "\n", "atols = np.logspace(-5, -15, 100)\n", - "atol_x_errs, atol_llh_errs = get_errors(\"setAbsoluteTolerance\", atols)\n", + "atol_x_errs, atol_llh_errs = get_errors(\"set_absolute_tolerance\", atols)\n", "\n", "rtols = np.logspace(-5, -15, 100)\n", - "rtol_x_errs, rtol_llh_errs = get_errors(\"setRelativeTolerance\", rtols)\n", + "rtol_x_errs, rtol_llh_errs = get_errors(\"set_relative_tolerance\", rtols)\n", "\n", "fig, axes = plt.subplots(1, 2, figsize=(15, 5))\n", "\n", @@ -1084,8 +1047,8 @@ "plot_error(rtols, rtol_x_errs, rtol_llh_errs, \"relative\", axes[1])\n", "\n", "# reset relative tolerance to default value\n", - "solver.setRelativeTolerance(1e-8)\n", - "solver.setRelativeTolerance(1e-16)" + "solver.set_relative_tolerance(1e-8)\n", + "solver.set_absolute_tolerance(1e-16)" ] }, { @@ -1106,519 +1069,28 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " sx: [[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.00747250e-01 1.19873139e-01 -9.44167985e-03]\n", - " [-1.02561396e-01 -1.88820454e-01 1.01855972e-01]\n", - " [ 4.66193077e-01 -2.86365372e-01 2.39662449e-02]\n", - " [ 4.52560294e-02 1.14631370e-01 -3.34067919e-02]\n", - " [ 4.00672911e-01 1.92564093e-01 4.98877759e-02]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.23007240e-01 1.53979022e-01 -1.26885280e-02]\n", - " [-1.33426939e-01 -3.15955239e-01 9.49575030e-02]\n", - " [ 5.03470377e-01 -3.52731535e-01 2.81567412e-02]\n", - " [ 3.93630714e-02 1.10770683e-01 -1.05673869e-02]\n", - " [ 5.09580304e-01 4.65255489e-01 9.24843702e-02]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.14278104e-01 1.63465064e-01 -1.03268418e-02]\n", - " [-1.60981967e-01 -4.00490452e-01 7.54810648e-02]\n", - " [ 4.87746419e-01 -3.76014315e-01 2.30919334e-02]\n", - " [ 4.28733680e-02 1.15473583e-01 -6.63571687e-03]\n", - " [ 6.05168647e-01 7.07226039e-01 1.23870914e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.05888038e-01 1.69308689e-01 -7.93085660e-03]\n", - " [-1.84663809e-01 -4.65451966e-01 5.95026117e-02]\n", - " [ 4.66407064e-01 -3.87612079e-01 1.76410128e-02]\n", - " [ 4.52451104e-02 1.19865712e-01 -4.73313094e-03]\n", - " [ 6.90798449e-01 9.20396633e-01 1.49475827e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.98803165e-01 1.73327268e-01 -6.03008179e-03]\n", - " [-2.04303740e-01 -5.16111388e-01 4.68785776e-02]\n", - " [ 4.47070326e-01 -3.94304029e-01 1.32107437e-02]\n", - " [ 4.69732048e-02 1.22961727e-01 -3.35899442e-03]\n", - " [ 7.68998995e-01 1.10844286e+00 1.70889328e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.92789113e-01 1.75978657e-01 -4.54517629e-03]\n", - " [-2.20500138e-01 -5.55540705e-01 3.68776526e-02]\n", - " [ 4.30424855e-01 -3.97907706e-01 9.75257113e-03]\n", - " [ 4.82793652e-02 1.24952071e-01 -2.30991637e-03]\n", - " [ 8.40805131e-01 1.27504628e+00 1.89020151e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.87672774e-01 1.77588334e-01 -3.38318222e-03]\n", - " [-2.33807210e-01 -5.86081383e-01 2.89236334e-02]\n", - " [ 4.16201399e-01 -3.99295277e-01 7.06598588e-03]\n", - " [ 4.92546648e-02 1.26089711e-01 -1.50412006e-03]\n", - " [ 9.06806543e-01 1.42334018e+00 2.04522708e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.83320440e-01 1.78410042e-01 -2.47240692e-03]\n", - " [-2.44690164e-01 -6.09568485e-01 2.25774266e-02]\n", - " [ 4.04061655e-01 -3.99063012e-01 4.97908386e-03]\n", - " [ 4.99612484e-02 1.26581014e-01 -8.85891342e-04]\n", - " [ 9.67473970e-01 1.55589415e+00 2.17895305e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.79620591e-01 1.78640114e-01 -1.75822439e-03]\n", - " [-2.53540123e-01 -6.27448857e-01 1.75019839e-02]\n", - " [ 3.93704970e-01 -3.97656641e-01 3.35895484e-03]\n", - " [ 5.04492282e-02 1.26586733e-01 -4.13401240e-04]\n", - " [ 1.02322336e+00 1.67481439e+00 2.29524046e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.76478441e-01 1.78430281e-01 -1.19867662e-03]\n", - " [-2.60686971e-01 -6.40868686e-01 1.34365068e-02]\n", - " [ 3.84873835e-01 -3.95414931e-01 2.10369522e-03]\n", - " [ 5.07601805e-02 1.26231631e-01 -5.46465317e-05]\n", - " [ 1.07443160e+00 1.78183962e+00 2.39710937e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]]\n", - " sx0: [[0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]\n", - " [0. 0. 0.]]\n", - " sx_ss: [[nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]\n", - " [nan nan nan]]\n", - " sigmay: [[1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]\n", - " [1. 1. 1. 1. 1. 0.2]]\n", - " sy: [[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.00747250e-01 1.19873139e-01 -9.44167985e-03 -4.01494500e-01\n", - " 1.19873139e-01 -2.00747250e-01]\n", - " [-1.02561396e-01 -1.88820454e-01 1.01855972e-01 -2.05122791e-01\n", - " -1.88820454e-01 -1.02561396e-01]\n", - " [ 4.66193077e-01 -2.86365372e-01 2.39662449e-02 9.32386154e-01\n", - " -2.86365372e-01 4.66193077e-01]\n", - " [ 4.52560294e-02 1.14631370e-01 -3.34067919e-02 9.05120589e-02\n", - " 1.14631370e-01 4.52560294e-02]\n", - " [ 4.00672911e-01 1.92564093e-01 4.98877759e-02 8.01345822e-01\n", - " 1.92564093e-01 4.00672911e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.80072436e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.23007240e-01 1.53979022e-01 -1.26885280e-02 -4.46014480e-01\n", - " 1.53979022e-01 -2.23007240e-01]\n", - " [-1.33426939e-01 -3.15955239e-01 9.49575030e-02 -2.66853878e-01\n", - " -3.15955239e-01 -1.33426939e-01]\n", - " [ 5.03470377e-01 -3.52731535e-01 2.81567412e-02 1.00694075e+00\n", - " -3.52731535e-01 5.03470377e-01]\n", - " [ 3.93630714e-02 1.10770683e-01 -1.05673869e-02 7.87261427e-02\n", - " 1.10770683e-01 3.93630714e-02]\n", - " [ 5.09580304e-01 4.65255489e-01 9.24843702e-02 1.01916061e+00\n", - " 4.65255489e-01 5.09580304e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.60534516e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.14278104e-01 1.63465064e-01 -1.03268418e-02 -4.28556209e-01\n", - " 1.63465064e-01 -2.14278104e-01]\n", - " [-1.60981967e-01 -4.00490452e-01 7.54810648e-02 -3.21963935e-01\n", - " -4.00490452e-01 -1.60981967e-01]\n", - " [ 4.87746419e-01 -3.76014315e-01 2.30919334e-02 9.75492839e-01\n", - " -3.76014315e-01 4.87746419e-01]\n", - " [ 4.28733680e-02 1.15473583e-01 -6.63571687e-03 8.57467361e-02\n", - " 1.15473583e-01 4.28733680e-02]\n", - " [ 6.05168647e-01 7.07226039e-01 1.23870914e-01 1.21033729e+00\n", - " 7.07226039e-01 6.05168647e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.46870655e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-2.05888038e-01 1.69308689e-01 -7.93085660e-03 -4.11776077e-01\n", - " 1.69308689e-01 -2.05888038e-01]\n", - " [-1.84663809e-01 -4.65451966e-01 5.95026117e-02 -3.69327617e-01\n", - " -4.65451966e-01 -1.84663809e-01]\n", - " [ 4.66407064e-01 -3.87612079e-01 1.76410128e-02 9.32814128e-01\n", - " -3.87612079e-01 4.66407064e-01]\n", - " [ 4.52451104e-02 1.19865712e-01 -4.73313094e-03 9.04902208e-02\n", - " 1.19865712e-01 4.52451104e-02]\n", - " [ 6.90798449e-01 9.20396633e-01 1.49475827e-01 1.38159690e+00\n", - " 9.20396633e-01 6.90798449e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.36280366e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.98803165e-01 1.73327268e-01 -6.03008179e-03 -3.97606330e-01\n", - " 1.73327268e-01 -1.98803165e-01]\n", - " [-2.04303740e-01 -5.16111388e-01 4.68785776e-02 -4.08607480e-01\n", - " -5.16111388e-01 -2.04303740e-01]\n", - " [ 4.47070326e-01 -3.94304029e-01 1.32107437e-02 8.94140651e-01\n", - " -3.94304029e-01 4.47070326e-01]\n", - " [ 4.69732048e-02 1.22961727e-01 -3.35899442e-03 9.39464097e-02\n", - " 1.22961727e-01 4.69732048e-02]\n", - " [ 7.68998995e-01 1.10844286e+00 1.70889328e-01 1.53799799e+00\n", - " 1.10844286e+00 7.68998995e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.27091252e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.92789113e-01 1.75978657e-01 -4.54517629e-03 -3.85578227e-01\n", - " 1.75978657e-01 -1.92789113e-01]\n", - " [-2.20500138e-01 -5.55540705e-01 3.68776526e-02 -4.41000277e-01\n", - " -5.55540705e-01 -2.20500138e-01]\n", - " [ 4.30424855e-01 -3.97907706e-01 9.75257113e-03 8.60849709e-01\n", - " -3.97907706e-01 4.30424855e-01]\n", - " [ 4.82793652e-02 1.24952071e-01 -2.30991637e-03 9.65587304e-02\n", - " 1.24952071e-01 4.82793652e-02]\n", - " [ 8.40805131e-01 1.27504628e+00 1.89020151e-01 1.68161026e+00\n", - " 1.27504628e+00 8.40805131e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.18989205e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.87672774e-01 1.77588334e-01 -3.38318222e-03 -3.75345548e-01\n", - " 1.77588334e-01 -1.87672774e-01]\n", - " [-2.33807210e-01 -5.86081383e-01 2.89236334e-02 -4.67614420e-01\n", - " -5.86081383e-01 -2.33807210e-01]\n", - " [ 4.16201399e-01 -3.99295277e-01 7.06598588e-03 8.32402797e-01\n", - " -3.99295277e-01 4.16201399e-01]\n", - " [ 4.92546648e-02 1.26089711e-01 -1.50412006e-03 9.85093296e-02\n", - " 1.26089711e-01 4.92546648e-02]\n", - " [ 9.06806543e-01 1.42334018e+00 2.04522708e-01 1.81361309e+00\n", - " 1.42334018e+00 9.06806543e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.11829985e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.83320440e-01 1.78410042e-01 -2.47240692e-03 -3.66640879e-01\n", - " 1.78410042e-01 -1.83320440e-01]\n", - " [-2.44690164e-01 -6.09568485e-01 2.25774266e-02 -4.89380329e-01\n", - " -6.09568485e-01 -2.44690164e-01]\n", - " [ 4.04061655e-01 -3.99063012e-01 4.97908386e-03 8.08123310e-01\n", - " -3.99063012e-01 4.04061655e-01]\n", - " [ 4.99612484e-02 1.26581014e-01 -8.85891342e-04 9.99224969e-02\n", - " 1.26581014e-01 4.99612484e-02]\n", - " [ 9.67473970e-01 1.55589415e+00 2.17895305e-01 1.93494794e+00\n", - " 1.55589415e+00 9.67473970e-01]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.05500234e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.79620591e-01 1.78640114e-01 -1.75822439e-03 -3.59241183e-01\n", - " 1.78640114e-01 -1.79620591e-01]\n", - " [-2.53540123e-01 -6.27448857e-01 1.75019839e-02 -5.07080247e-01\n", - " -6.27448857e-01 -2.53540123e-01]\n", - " [ 3.93704970e-01 -3.97656641e-01 3.35895484e-03 7.87409940e-01\n", - " -3.97656641e-01 3.93704970e-01]\n", - " [ 5.04492282e-02 1.26586733e-01 -4.13401240e-04 1.00898456e-01\n", - " 1.26586733e-01 5.04492282e-02]\n", - " [ 1.02322336e+00 1.67481439e+00 2.29524046e-01 2.04644672e+00\n", - " 1.67481439e+00 1.02322336e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 4.99901907e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]\n", - "\n", - " [[-1.76478441e-01 1.78430281e-01 -1.19867662e-03 -3.52956882e-01\n", - " 1.78430281e-01 -1.76478441e-01]\n", - " [-2.60686971e-01 -6.40868686e-01 1.34365068e-02 -5.21373942e-01\n", - " -6.40868686e-01 -2.60686971e-01]\n", - " [ 3.84873835e-01 -3.95414931e-01 2.10369522e-03 7.69747670e-01\n", - " -3.95414931e-01 3.84873835e-01]\n", - " [ 5.07601805e-02 1.26231631e-01 -5.46465317e-05 1.01520361e-01\n", - " 1.26231631e-01 5.07601805e-02]\n", - " [ 1.07443160e+00 1.78183962e+00 2.39710937e-01 2.14886320e+00\n", - " 1.78183962e+00 1.07443160e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 4.94949118e-01\n", - " 0.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 1.00000000e+00 0.00000000e+00]\n", - " [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\n", - " 0.00000000e+00 0.00000000e+00]]]\n", - " ssigmay: [[[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]\n", - "\n", - " [[0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 1.]]]\n", - " sigmaz: None\n", - " sz: None\n", - " srz: None\n", - " ssigmaz: None\n", - " sllh: [nan nan nan nan nan nan nan nan]\n", - " s2llh: None\n", - " status: 0.0\n", - " sres: [[0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]\n", - " [0. 0. 0. 0. 0. 0. 0. 0.]]\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "model = model_module.getModel()\n", - "model.setTimepoints(np.linspace(0, 10, 11))\n", - "model.requireSensitivitiesForAllParameters() # sensitivities w.r.t. all parameters\n", - "# model.setParameterList([1, 2]) # sensitivities\n", + "model = model_module.get_model()\n", + "model.set_timepoints(np.linspace(0, 10, 11))\n", + "model.require_sensitivities_for_all_parameters() # sensitivities w.r.t. all parameters\n", + "# model.set_parameter_list([1, 2]) # sensitivities\n", "# w.r.t. the specified parameters\n", - "model.setParameterScale(\n", + "model.set_parameter_scale(\n", " amici.ParameterScaling.none\n", ") # parameters are used as-is (not log-transformed)\n", "\n", - "solver = model.getSolver()\n", - "solver.setSensitivityMethod(\n", + "solver = model.create_solver()\n", + "solver.set_sensitivity_method(\n", " amici.SensitivityMethod.forward\n", ") # forward sensitivity analysis\n", - "solver.setSensitivityOrder(\n", + "solver.set_sensitivity_order(\n", " amici.SensitivityOrder.first\n", ") # first-order sensitivities\n", "\n", - "rdata = amici.runAmiciSimulation(model, solver)\n", + "rdata = amici.run_simulation(model, solver)\n", "\n", "# print sensitivity-related results\n", "for key, value in rdata.items():\n", @@ -1635,55 +1107,43 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Log-likelihood: -1190.452734\n", - "Gradient: [-8.18063367e+01 -7.40378749e+01 1.87640047e+02 2.07890554e+01\n", - " 2.62573207e+02 1.77402064e-01 1.15646253e+01 2.11221869e+04]\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "# Set model options\n", - "model = model_module.getModel()\n", - "p_orig = np.array(model.getParameters())\n", - "p_orig[list(model.getParameterIds()).index(\"observable_x1withsigma_sigma\")] = (\n", - " 0.1 # Change default parameter\n", - ")\n", - "model.setParameters(p_orig)\n", - "model.setParameterScale(amici.ParameterScaling.none)\n", - "model.setTimepoints(np.linspace(0, 10, 21))\n", - "\n", - "solver = model.getSolver()\n", - "solver.setMaxSteps(10**4) # Set maximum number of steps for the solver\n", + "model = model_module.get_model()\n", + "p_orig = np.array(model.get_parameters())\n", + "p_orig[\n", + " list(model.get_parameter_ids()).index(\"observable_x1withsigma_sigma\")\n", + "] = 0.1 # Change default parameter\n", + "model.set_parameters(p_orig)\n", + "model.set_parameter_scale(amici.ParameterScaling.none)\n", + "model.set_timepoints(np.linspace(0, 10, 21))\n", + "\n", + "solver = model.create_solver()\n", + "solver.set_max_steps(10**4) # Set maximum number of steps for the solver\n", "\n", "# simulate time-course to get artificial data\n", - "rdata = amici.runAmiciSimulation(model, solver)\n", + "rdata = amici.run_simulation(model, solver)\n", "edata = amici.ExpData(rdata, 1.0, 0)\n", - "edata.fixedParameters = model.getFixedParameters()\n", + "edata.fixed_parameters = model.get_fixed_parameters()\n", "# set sigma to 1.0 except for observable 5, so that p[7] is used instead\n", "# (if we have sigma parameterized, the corresponding ExpData entries must NaN, otherwise they will override the parameter)\n", - "edata.setObservedDataStdDev(\n", + "edata.set_observed_data_std_dev(\n", " rdata[\"t\"] * 0 + np.nan,\n", - " list(model.getObservableIds()).index(\"observable_x1withsigma\"),\n", + " list(model.get_observable_ids()).index(\"observable_x1withsigma\"),\n", ")\n", "\n", "# enable sensitivities\n", - "solver.setSensitivityOrder(amici.SensitivityOrder.first) # First-order ...\n", - "solver.setSensitivityMethod(\n", + "solver.set_sensitivity_order(amici.SensitivityOrder.first) # First-order ...\n", + "solver.set_sensitivity_method(\n", " amici.SensitivityMethod.adjoint\n", ") # ... adjoint sensitivities\n", - "model.requireSensitivitiesForAllParameters() # ... w.r.t. all parameters\n", + "model.require_sensitivities_for_all_parameters() # ... w.r.t. all parameters\n", "\n", "# compute adjoint sensitivities\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "# print(rdata['sigmay'])\n", "print(f\"Log-likelihood: {rdata['llh']}\")\n", "print(f\"Gradient: {rdata['sllh']}\")" @@ -1700,53 +1160,9 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "sllh: |error|_2: 31.850873\n", - "\n", - "sllh: p[0]: |error|_2: 0.006287\n", - "sllh: p[1]: |error|_2: 0.016510\n", - "sllh: p[2]: |error|_2: 0.017028\n", - "sllh: p[3]: |error|_2: 0.009608\n", - "sllh: p[4]: |error|_2: 0.083404\n", - "sllh: p[5]: |error|_2: 0.000280\n", - "sllh: p[6]: |error|_2: 0.001050\n", - "sllh: p[7]: |error|_2: 31.850739\n", - "\n", - "sy: p[0]: |error|_2: 0.002974\n", - "sy: p[1]: |error|_2: 0.002717\n", - "sy: p[2]: |error|_2: 0.001308\n", - "sy: p[3]: |error|_2: 0.000939\n", - "sy: p[4]: |error|_2: 0.006106\n", - "sy: p[5]: |error|_2: 0.000000\n", - "sy: p[6]: |error|_2: 0.000000\n", - "sy: p[7]: |error|_2: 0.000000\n", - "\n", - "sx: p[0]: |error|_2: 0.001033\n", - "sx: p[1]: |error|_2: 0.001076\n", - "sx: p[2]: |error|_2: 0.000121\n", - "sx: p[3]: |error|_2: 0.000439\n", - "sx: p[4]: |error|_2: 0.001569\n", - "sx: p[5]: |error|_2: 0.000000\n", - "sx: p[6]: |error|_2: 0.000000\n", - "sx: p[7]: |error|_2: 0.000000\n", - "\n", - "ssigmay: p[0]: |error|_2: 0.000000\n", - "ssigmay: p[1]: |error|_2: 0.000000\n", - "ssigmay: p[2]: |error|_2: 0.000000\n", - "ssigmay: p[3]: |error|_2: 0.000000\n", - "ssigmay: p[4]: |error|_2: 0.000000\n", - "ssigmay: p[5]: |error|_2: 0.000000\n", - "ssigmay: p[6]: |error|_2: 0.000000\n", - "ssigmay: p[7]: |error|_2: 0.000000\n" - ] - } - ], + "outputs": [], "source": [ "from scipy.optimize import check_grad\n", "\n", @@ -1758,12 +1174,12 @@ " p[plist] = x0\n", " verbose and print(f\"f: p={p}\")\n", "\n", - " old_parameters = model.getParameters()\n", - " solver.setSensitivityOrder(amici.SensitivityOrder.none)\n", - " model.setParameters(p)\n", - " rdata = amici.runAmiciSimulation(model, solver, edata)\n", + " old_parameters = model.get_parameters()\n", + " solver.set_sensitivity_order(amici.SensitivityOrder.none)\n", + " model.set_parameters(p)\n", + " rdata = amici.run_simulation(model, solver, edata)\n", "\n", - " model.setParameters(old_parameters)\n", + " model.set_parameters(old_parameters)\n", "\n", " res = np.sum(rdata[symbol])\n", " verbose and print(res)\n", @@ -1773,20 +1189,20 @@ "def grad(x0, symbol=\"llh\", x0full=None, plist=[], verbose=False):\n", " p = x0[:]\n", " if len(plist):\n", - " model.setParameterList(plist)\n", + " model.set_parameter_list(plist)\n", " p = x0full[:]\n", " p[plist] = x0\n", " else:\n", - " model.requireSensitivitiesForAllParameters()\n", + " model.require_sensitivities_for_all_parameters()\n", " verbose and print(f\"g: p={p}\")\n", "\n", - " old_parameters = model.getParameters()\n", - " solver.setSensitivityMethod(amici.SensitivityMethod.forward)\n", - " solver.setSensitivityOrder(amici.SensitivityOrder.first)\n", - " model.setParameters(p)\n", - " rdata = amici.runAmiciSimulation(model, solver, edata)\n", + " old_parameters = model.get_parameters()\n", + " solver.set_sensitivity_method(amici.SensitivityMethod.forward)\n", + " solver.set_sensitivity_order(amici.SensitivityOrder.first)\n", + " model.set_parameters(p)\n", + " rdata = amici.run_simulation(model, solver, edata)\n", "\n", - " model.setParameters(old_parameters)\n", + " model.set_parameters(old_parameters)\n", "\n", " res = rdata[f\"s{symbol}\"]\n", " if not isinstance(res, float):\n", @@ -1836,56 +1252,54 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": { - "scrolled": false - }, + "execution_count": null, + "metadata": {}, "outputs": [], "source": [ "eps = 1e-4\n", - "op = model.getParameters()\n", + "op = model.get_parameters()\n", "\n", "\n", - "solver.setSensitivityMethod(\n", + "solver.set_sensitivity_method(\n", " amici.SensitivityMethod.forward\n", ") # forward sensitivity analysis\n", - "solver.setSensitivityOrder(\n", + "solver.set_sensitivity_order(\n", " amici.SensitivityOrder.first\n", ") # first-order sensitivities\n", - "model.requireSensitivitiesForAllParameters()\n", - "solver.setRelativeTolerance(1e-12)\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)\n", + "model.require_sensitivities_for_all_parameters()\n", + "solver.set_relative_tolerance(1e-12)\n", + "rdata = amici.run_simulation(model, solver, edata)\n", "\n", "\n", "def fd(x0, ip, eps, symbol=\"llh\"):\n", " p = list(x0[:])\n", - " old_parameters = model.getParameters()\n", - " solver.setSensitivityOrder(amici.SensitivityOrder.none)\n", + " old_parameters = model.get_parameters()\n", + " solver.set_sensitivity_order(amici.SensitivityOrder.none)\n", " p[ip] += eps\n", - " model.setParameters(p)\n", - " rdata_f = amici.runAmiciSimulation(model, solver, edata)\n", + " model.set_parameters(p)\n", + " rdata_f = amici.run_simulation(model, solver, edata)\n", " p[ip] -= 2 * eps\n", - " model.setParameters(p)\n", - " rdata_b = amici.runAmiciSimulation(model, solver, edata)\n", + " model.set_parameters(p)\n", + " rdata_b = amici.run_simulation(model, solver, edata)\n", "\n", - " model.setParameters(old_parameters)\n", + " model.set_parameters(old_parameters)\n", " return (rdata_f[symbol] - rdata_b[symbol]) / (2 * eps)\n", "\n", "\n", "def plot_sensitivities(symbol, eps):\n", " fig, axes = plt.subplots(4, 2, figsize=(15, 10))\n", " for ip in range(4):\n", - " fd_approx = fd(model.getParameters(), ip, eps, symbol=symbol)\n", + " fd_approx = fd(model.get_parameters(), ip, eps, symbol=symbol)\n", "\n", " axes[ip, 0].plot(\n", - " edata.getTimepoints(), rdata[f\"s{symbol}\"][:, ip, :], \"r-\"\n", + " edata.get_timepoints(), rdata[f\"s{symbol}\"][:, ip, :], \"r-\"\n", " )\n", - " axes[ip, 0].plot(edata.getTimepoints(), fd_approx, \"k--\")\n", + " axes[ip, 0].plot(edata.get_timepoints(), fd_approx, \"k--\")\n", " axes[ip, 0].set_ylabel(f\"sensitivity {symbol}\")\n", " axes[ip, 0].set_xlabel(\"time\")\n", "\n", " axes[ip, 1].plot(\n", - " edata.getTimepoints(),\n", + " edata.get_timepoints(),\n", " np.abs(rdata[f\"s{symbol}\"][:, ip, :] - fd_approx),\n", " \"k-\",\n", " )\n", @@ -1899,20 +1313,9 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABDAAAALICAYAAACJhQBYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOzdeZzM9R/A8ddnzr3X7lq3dVPu+4iUKFJCoUSoRKRTSRdKKFG/kuSoHEmHm5KU3LmPHOW+WbvW2vuamffvjxmTxbL37PJ5Ph6fx8x8P9/v5/ue2V2+3/d8DiUiaJqmaZqmaZqmaZqmFWQGTwegaZqmaZqmaZqmaZp2IzqBoWmapmmapmmapmlagacTGJqmaZqmaZqmaZqmFXg6gaFpmqZpmqZpmqZpWoGnExiapmmapmmapmmaphV4Jk8HkJ+KFi0q5cuX93QYmqZpmnbT2b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1pu2oVBAUxIU8efBo1ovOkSbg+Zm1hTdO0552YzSRERWFvNkNsLDcvXyYyNJTY8HBiIiKIjYzE3WikYoECEBPDyp07CQsLIzYmhtjoaOLi4vDz9KRFsWIQF8fwf/4hPCaGuPh4YuPiiI2Pp4GPD+/nz4/ExFB//35iTabEzWwmzmxmXfHilDz9YNok/dKYwDgCNLg3AbhSygfYKiIVLB6YFel2RdosWbKE9u3bA1ClShWbfrOXncXExNCqVSs2btzInDlzUjW/REZr0KABN27c4OzZs2keqvH666+zf/9+Ll++bNFJWevWrUtISAjHjh2zWJmallUFBweTL18+evbsybRp02wSg8USGEqpKSIySCm1msQV/u4jIi2ePUzr0g0NK4iMRBYsoM7gwfwXFYUn0KNyZfp+/TUlGjWydXSapmlaBkljAqMrMILEziSKxI4l40RknhVDtDjdrki99evX88YbbyAimM1mLl26ROHChW0dVrYVHR1NixYt+Pfff/ntt9/o0qWLrUNKdvHiRYoXL84XX3zBp59+mubzd+3axUsvvcQ333zDkCFDLBLT9evXKViwoFXn19C0rKZLly789ddf+Pv74+zsnOH1P65d8SyTF9xrXHwDTHrEpj1PXF1RvXuzIzyc7T/8wOuFCjHt0CFKvvoq08qWhTVr4BErGGiapmnPLxH5DXgTuAUEAG2yUvJCKfWGUurn0NBQW4eSJezcuZM2bdrg5eWFyWTirbfe0skLK3N2dubPP/+kfv36dOvWjcWLF9s6pGS//vorSim6du36TOfXqlWLRo0aMXHiRKKioiwS07JlibMdvfXWWxYpT9Oyg169ehEaGsoff/xh61Duk54hJANFZOrT9mUm+puSjOF/+DAzBw+m3fHjlAkMZG++fGyrXJl3pk7Fp3hxW4enaZqmWUFaVyFRShmB3EDyDI4ictUasVmLblc83ZEjR6hfvz7e3t5cvXoVo9HInTt3rLYMpna/yMhIXn/9df777z82btxIw4YNbRqP2WymaNGilC5dmg0bNjxzOdu3b6devXppXq3lcWrVqkVMTAyHDh1Kd1mall2ICCVLlqRAgQJs3rw5w+u3ZA+Mex41oK57OsrTsom8L7zA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fAPHz4MHXr1uX1119n/PjxVz02OzubO+64g6NHj7Jr164bvnVkWloaX3/9NVOmTOHEiRPUqFGD4cOH8+STT+Ll5XXDsZc2aWlpJCUlUblyZUeHIoqZ1pr169czceJE4uPjGTp0KA8++CAuLi6ODk2UIVfqV9z4XwZRpH565RWirFZGvviio0MRQgghistTwBdKqZNKqZPAF7nbSgWt9RKt9WBfX19Hh1Kqaa1ZtWoVbdu2pWfPnsTExDB79my+/vrrQiUvACZNmoSLiwvDhg275rEuLi788MMPWCwWHn30USwWy3W3Ex0dTVhYGC+99BIVK1bkl19+4fDhwwwbNuyWSF4APPXUU1SpUoX27dsze/ZsUlJSHB2SKCZKKdq1a8fixYvZsGEDAwYMkOSFKDaSwHAgbbMx6euvqePiQq+333Z0OEIIIYRdKaVeyn3qrrVuAjQBmmitm2qttzswNFHM1q1bR8eOHenSpQuRkZFMnz6dw4cP89RTT+Hk5FSoOs+dO8fcuXN54oknKF++/HWdExYWxpdffsn69euvOWLjQlOnTiUmJoZ//vmH9evXc9999xU67tIoOjqaRYsW0aFDB2JjY3n66aepUKECAwYMYMWKFVitVkeHKIQooySB4UBZK1YQnpnJqw8/jMFodHQ4QgghhL09mfs4FUBrnay1TnZgPKKYbd68mW7dutG+fXsOHTrEZ599xtGjR3nqqaf44Ycf6NatGzt27ChU3VOnTiU7O5uRI0fe0HmPPvooAwcOZNy4caxdu/aax6enp/Pll19y7733cueddxYq1tJuzpw5WK1WZs6cyf79+9m0aRNPPPEEf/zxB926daNatWq8/vrrHDp0yNGhCiHKGFkDw5H69IHNmyEyEtzdHR2NEEIIUWjXswaGUuoHIByoCBy7cBegtdaN7RhikStx/YoSbPv27bz99tv88ccfBAUF8eqrrzJ06FBsNhszZ85k8uTJnD59GoCePXvy559/3lD9qamphIaG0rlzZ37++ecbji81NZVmzZqRlZXFrl27CAgIuOKxX3zxBc8//zzr16/njjvuuOG2SjubzUZYWBhVq1bln3/+uWhfVlYWS5Ys4ZtvvmH58uVYrVZat27N448/Tv/+/fH393dQ1EKI0qbI18BQSg265LWTUmpMYeu71ZxYuZKNS5fC889L8kIIIcQtQWv9MNAOOAr0uaD0zn0UZczu3bu59957ad68Of/99x8ffPABJ06cYODAgXz44YeEhoYyYsQIatasyZ9//sm4ceP466+/2LVr1w21M2vWLJKSkhg1alSh4vT29mbBggWcP3+eQYMGcaUv+Gw2G5988gktW7bk9ttvL1Rbpd3q1as5ceIEgwcPvmyfm5sbDzzwAH/88QenT5/m448/Ji0tjaFDhxISEkL//v3566+/bmi9ESGEuNDNTCHprJT6UykVopRqAGwCvIsorjLvg2HD6AQkPvKIo0MRQgghio3W+pzWuonWOvLS4ujYRNE5cOAA/fv3p0mTJqxevZp3332XkydP8tBDD/Haa69RtWpVxo0bR4cOHdi4cSNr1qyhZ8+ePP/883h5eTFhwoTrbstsNjN58mQ6dOhAq1atCh1z8+bN+fDDD/ntt9/48ssvCzxm6dKlHD16lJEjR6KUKnRbpdmMGTMICAjg3nvvvepxFSpUYOTIkezevZtt27YxePBgVq1axV133UWVKlUYNWoUe/fuLaaohRBlRkH3Vr3eAvQH4oBI4I6bqas4Skm5X/v5vXu1K+hn69VzdChCCCFEkeAK92svy6Wk9CtKksOHD+sBAwZog8Ggvby89BtvvKETEhL0rl279KOPPqqdnJy0s7OzfvLJJ/X+/fsLrGPkyJHaYDDo48ePX1eb3377rQb0H3/8cdPxW61W3aNHD+3q6qp379592f727dvr0NBQbTabb7qt0igmJkY7Ozvr4cOHF+p8k8mkf/31V923b19tNBo1oJs3b66nTp2q4+LiijhaIURpdqV+xc1MIakFvAT8kpvAeEwp5XGT+ZRbwufPPYcJ+N+kSY4ORQghhBDipp04cYKnnnqKevXq8csvvzBy5EiOHz9Ot27dGDBgAE2aNOG3337jpZde4vjx43z99dfUq1evwLr+97//4eTkxKTr6CdprZkwYQINGzakZ8+eN/0+DAYD33zzDX5+fjz88MNkZGTk74uIiGDt2rW89NJLGG/Rxdfnzp2L2WzmmWeeKdT5Li4u3HPPPfz222+c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CCFGWRSmlbge0UspZKfUycKCI2zgDXLgCY+XcbTdNKdVHKTUjOTm5KKorkT744AOysrIICQkhOzubkSNHOiSOEydOsHDhQoYMGZK/FkOdOnW49957mTZtGqmpqUXW1saNG9myZQvDhw/Hycnpus5xcnJi1KhRbN++nVWrVhVZLI40c+ZMXF1deeyxxxwdCkB+MklGYQgh4OZuo7pBKfW3UmqQUsq/yCIq5c7t3s3wOXM4+8ADEChrgAkhhBAFGAI8T86UjjNA09zXRWkrUEspVV0p5QI8BCwuioq11ku01oMdubihPZ0+fZrp06fzyCOPsGDBAu677z5q167tkFgmT56Mk5PTZdNXRo8eTVJSEjNnziyytiZNmoS/vz9PPPHEDZ332GOPERISwkcffVRksThKRkYG33//Pf369SOwhPRjq1WrRsOGDSWBIYQAbiKBobWuDbwJNAC25a7iPeAap5V5nz//PJ/ZbGSUkKy1EEIIUdJoreNyp2qU11qX01oP0FrHF7Y+pdQPwEagjlLqtFJqkNbaArwALCdndMdCrfW+ooi/rI/AGDduHDabjdDQUJKTkxk9erRD4oiLi2P27NkMGDCASpUuXr6kZcuWdOzYkcmTJ5OdnX3TbR07doxff/2VIUOG4Onpee0TLuDq6srw4cNZuXIl27Ztu+lYHOnnn38mKSmJZ555xtGhXKR3796sW7eOpKQkR4ciRL7ExERWrVpFfHyh/3yJQriZERhorbdorUeQs9J3AlD27iN1A9JjY/liwwb6hoQQ1qWLo8MRQgghSiSl1FyllN8Fr/2VUl8Xtj6t9cNa6xCttbPWurLWenbu9j+11rW11jW11u8VQeh57ZXZERhHjx5l9uzZPPPMM3zzzTd07NiRFi1aOCSWzz//nMzMTF5++eUC948ePZozZ84wb968m27rs88+w2g08sILLxTq/GeffRYfHx8mTJhw07E40syZM6lVqxYdOnRwdCgX6d27NxaLhb///tvRoYhbmMlk4p9//uGNN96gVatWBAUF0aVLFypUqMBdd93Ft99+S0pKiqPDLPMKncBQSvkopR5XSv0F/AdEk5PIuGXNHTaMBK0Z+eabjg5FCCGEKMkaa62T8l5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ueeee6hSpYqboit4nnrqKcLDw3nmmWeuuTdXcnIyjz/+OJUrV+aJJ55wT4DqhpSTVUgSRGSmiOxKf31MRBbnQkwjgSUiUglYkv76YglAPxGpAXQAPjLGBOdC3Z5TpAj7P/iAyQkJ9GzenORYnd9MKaXUdefcAOiLh4/oEJJ8YMqUKVgsFvr27evpUG5Izz77LEeOHOGxxx6jTp069O6d9v3cDz/8wD///MOdd96piYss6NKlCytXruTMmTNZPuedd94hKSmJF1980Y2RFTwBAQG8/PLLLF++/JqTQh988AG7d+/m448/1vl0VK7Kj78F7wAmpz+fTNoKJxcQkZ3nJU6OAieBsLwK0F1q9uzJ1088waq4OBqFh/PHBx94OiSllFIq14jIy+mPFw8f0SEkHuZyuZgyZQpt27alePHing7nhtS2bVvq1q3L559/jsPhYNq0afzzzz/06tVLExfXoEuXLrhcLhYuXJil448fP864ceO49957qVy5spujK3gGDx5M5cqVGTlyZMakwFdz6NAhXn/9dXr06EG7du3cHKG60eTH34bhInIs/flxIPxKBxtjGpE2eeiey5QPMcasM8asi4yMzN1I3aDXhx/y04gRxKSm0vqpp3i3Zk3Yu9fTYSmllFI5Zox58kqbp+O7kS1dupSDBw/Sr18/T4dywzLGMG3aNGbNmsWWLVu4++67sVqtng6rwGnYsCFFixbNco+Bd955h5SUFO19cRl2u50333yTbdu2MXny5KufQNrKOi6Xiw/0y1jlBh5JYBhjfjPGbMlku+P84yRtsNVlB1wZY4oB3wD3i4grs2NEZIKINBCRBmFhBaOTRo933mH7yZO8ftttdN+7F6pV49gjj3A2fS13pZRSqoAqlL41AB4GSqRvDwE6a6QHTZkyhUKFCtGtWzdPh3JDq1KlCt26ddPERQ5YLBY6d+7MggULSE1NveKxx44d47PPPqNv375UqlQpjyIseHr06EGTJk146aWXSEhIuOKxv//+Oz/++COjRo2iTJkyeRShupF4JIEhIreJSM1Mtp+BE+mJiXMJipOZXcMYEwj8AjwvItmbGjcf8y1cmOd//ZWKu3fD3Xfz4KefUrlUKb4eOBCXw+Hp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fL/369RNjjAQHB8vo0aMlISHhmq5RpkwZ6d27d7ZjyK/efvttAWTNmjUeqf9y7QojBaAbUm5p0KCBrFu3ztNhXKCunx+BXl4sjY72dChKKaVUthlj1otIA0/HkZfyY7tCKZV/rFixgj59+nDy5Ek++OADhg4dmqNlRFNTU+nWrRsLFy7kxx9/pGfPnrkYbc7s37+fhg0bEhISwurVq686NOZqEhMT+e2335g9ezZz5szh1KlTeHl50bZtW7p160bXrl0JDw/Ppejhn3/+YdSoUfzyyy+UKFGC//u//2PAgAHYbLarntuzZ0/++ecfdu3alWvxeFpCQgLlypWjbt26LFy40CMxXK5dcd1P4pmfHV67lk2JiXS+5RZPh6KUUkoppa4zDoeD3377jVGjRnHo0KGrn6ByhcvlYvTo0bRq1Qpvb29WrVrFsGHDcpS8ALDb7UyfPp0mTZpwzz338Pvvv+dSxDlz9uxZunbtisPhYO7cuTlKXuzbt4+7776bsLAwbr/9dmbMmEG7du348ccfOXXqFPPmzWPw4MG5mrwAqF27NvPmzWPp0qWUKlWKBx54gFq1ajFr1qyrzjtSv359du/ezfU0sfPEiRM5efIkzz//vKdDuYQmMDzolzFjAOjy0EMejkQppZRSSl0PUlNTWbRoEQ888AARERG0bduWt956i169epGamurp8K57kZGRdO7cmeeee46ePXuyYcOGjHkScoOfnx9z586lUqVK3HHHHR6fe8HpdHLPPfewffv2HK044nK5+PTTT6lVqxbz58+nX79+LFq0iMjISL799lvuuusuChUqlMvRX+rcMqszZ84EoEePHtxyyy0sW7bssuec+/fduHGj2+PLC8nJyRlztjRv3tzT4VxCExgetG/1airabFTr0sXToSillFIqi3QZVZXfpKSkMH/+fAYOHEh4eDgdOnTghx9+oH379sycOZMpU6bw999/88ILL3g61OvasmXLuOmmm/jjjz/47LPP+P777wkMDMz1egoXLsyiRYsoUqQIHTt29OjQheeee4558+YxduxYbrvttmxdY+/evbRp04ZHHnmEZs2asXXrVsaNG0e7du3w8vLK5YivzhhD9+7d+ffff/niiy84ePAgLVu2pEuXLvz777+X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"text/plain": "
" - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "plot_sensitivities(\"x\", eps)" ] @@ -1948,107 +1351,63 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# run the simulation\n", - "rdata = amici.runAmiciSimulation(model, solver, edata)" + "rdata = amici.run_simulation(model, solver, edata)" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timedatatypet_presimk0k0_preeqk0_presimobservable_x1observable_x2observable_x3observable_x1_scaledobservable_x2_offsettedobservable_x1withsigmaobservable_x1_stdobservable_x2_stdobservable_x3_stdobservable_x1_scaled_stdobservable_x2_offsetted_stdobservable_x1withsigma_std
00.0data0.01.0NaNNaN-1.1910940.2814690.0333541.6451443.900680-0.5186421.01.01.01.01.0NaN
10.5data0.01.0NaNNaN-1.5994101.1401651.3689021.5354905.6781670.6948251.01.01.01.01.0NaN
21.0data0.01.0NaNNaN1.5220952.0208461.1092290.5942953.2303741.2754821.01.01.01.01.0NaN
31.5data0.01.0NaNNaN2.4558560.9617850.0529251.8395012.7837960.0854801.01.01.01.01.0NaN
42.0data0.01.0NaNNaN-0.6008640.0218450.220294-0.1109905.0033512.0207801.01.01.01.01.0NaN
52.5data0.01.0NaNNaN1.4223410.0450641.3610700.9458994.589646-0.5935351.01.01.01.01.0NaN
63.0data0.01.0NaNNaN-0.6725230.8736151.5606012.6779742.1876981.0548701.01.01.01.01.0NaN
73.5data0.01.0NaNNaN2.278515-0.0051050.7996891.2409164.2687260.4917551.01.01.01.01.0NaN
84.0data0.01.0NaNNaN0.0784110.9795311.7457950.8581344.6095290.6208441.01.01.01.01.0NaN
94.5data0.01.0NaNNaN0.0740170.2262670.604246-0.0913563.6523450.2618071.01.01.01.01.0NaN
105.0data0.01.0NaNNaN0.5378201.2337660.194859-0.3453514.4773223.3782271.01.01.01.01.0NaN
115.5data0.01.0NaNNaN0.4982043.2189450.1907300.4628385.9469701.3101001.01.01.01.01.0NaN
126.0data0.01.0NaNNaN2.3456160.956306-1.7705170.7617543.8948651.5460551.01.01.01.01.0NaN
136.5data0.01.0NaNNaN0.995109-0.1510910.8059372.9296454.3485570.2349151.01.01.01.01.0NaN
147.0data0.01.0NaNNaN1.3632761.6222250.030980-0.0823273.7617300.7246081.01.01.01.01.0NaN
157.5data0.01.0NaNNaN0.1901800.9622941.4259181.1065914.1759840.2457911.01.01.01.01.0NaN
168.0data0.01.0NaNNaN-0.362771-0.2515760.5408261.5076573.8716332.2605621.01.01.01.01.0NaN
178.5data0.01.0NaNNaN0.8844080.9300740.5106052.0123712.593086-0.6543551.01.01.01.01.0NaN
189.0data0.01.0NaNNaN-1.5542601.449906-1.4779850.8711245.4971230.2327721.01.01.01.01.0NaN
199.5data0.01.0NaNNaN0.4927810.7008730.2421160.2796484.236658-0.8892121.01.01.01.01.0NaN
2010.0data0.01.0NaNNaN-0.964663-0.4856642.0878152.3287074.7876170.3951061.01.01.01.01.0NaN
\n
", - "text/plain": " time datatype t_presim k0 k0_preeq k0_presim observable_x1 \\\n0 0.0 data 0.0 1.0 NaN NaN -1.191094 \n1 0.5 data 0.0 1.0 NaN NaN -1.599410 \n2 1.0 data 0.0 1.0 NaN NaN 1.522095 \n3 1.5 data 0.0 1.0 NaN NaN 2.455856 \n4 2.0 data 0.0 1.0 NaN NaN -0.600864 \n5 2.5 data 0.0 1.0 NaN NaN 1.422341 \n6 3.0 data 0.0 1.0 NaN NaN -0.672523 \n7 3.5 data 0.0 1.0 NaN NaN 2.278515 \n8 4.0 data 0.0 1.0 NaN NaN 0.078411 \n9 4.5 data 0.0 1.0 NaN NaN 0.074017 \n10 5.0 data 0.0 1.0 NaN NaN 0.537820 \n11 5.5 data 0.0 1.0 NaN NaN 0.498204 \n12 6.0 data 0.0 1.0 NaN NaN 2.345616 \n13 6.5 data 0.0 1.0 NaN NaN 0.995109 \n14 7.0 data 0.0 1.0 NaN NaN 1.363276 \n15 7.5 data 0.0 1.0 NaN NaN 0.190180 \n16 8.0 data 0.0 1.0 NaN NaN -0.362771 \n17 8.5 data 0.0 1.0 NaN NaN 0.884408 \n18 9.0 data 0.0 1.0 NaN NaN -1.554260 \n19 9.5 data 0.0 1.0 NaN NaN 0.492781 \n20 10.0 data 0.0 1.0 NaN NaN -0.964663 \n\n observable_x2 observable_x3 observable_x1_scaled \\\n0 0.281469 0.033354 1.645144 \n1 1.140165 1.368902 1.535490 \n2 2.020846 1.109229 0.594295 \n3 0.961785 0.052925 1.839501 \n4 0.021845 0.220294 -0.110990 \n5 0.045064 1.361070 0.945899 \n6 0.873615 1.560601 2.677974 \n7 -0.005105 0.799689 1.240916 \n8 0.979531 1.745795 0.858134 \n9 0.226267 0.604246 -0.091356 \n10 1.233766 0.194859 -0.345351 \n11 3.218945 0.190730 0.462838 \n12 0.956306 -1.770517 0.761754 \n13 -0.151091 0.805937 2.929645 \n14 1.622225 0.030980 -0.082327 \n15 0.962294 1.425918 1.106591 \n16 -0.251576 0.540826 1.507657 \n17 0.930074 0.510605 2.012371 \n18 1.449906 -1.477985 0.871124 \n19 0.700873 0.242116 0.279648 \n20 -0.485664 2.087815 2.328707 \n\n observable_x2_offsetted observable_x1withsigma observable_x1_std \\\n0 3.900680 -0.518642 1.0 \n1 5.678167 0.694825 1.0 \n2 3.230374 1.275482 1.0 \n3 2.783796 0.085480 1.0 \n4 5.003351 2.020780 1.0 \n5 4.589646 -0.593535 1.0 \n6 2.187698 1.054870 1.0 \n7 4.268726 0.491755 1.0 \n8 4.609529 0.620844 1.0 \n9 3.652345 0.261807 1.0 \n10 4.477322 3.378227 1.0 \n11 5.946970 1.310100 1.0 \n12 3.894865 1.546055 1.0 \n13 4.348557 0.234915 1.0 \n14 3.761730 0.724608 1.0 \n15 4.175984 0.245791 1.0 \n16 3.871633 2.260562 1.0 \n17 2.593086 -0.654355 1.0 \n18 5.497123 0.232772 1.0 \n19 4.236658 -0.889212 1.0 \n20 4.787617 0.395106 1.0 \n\n observable_x2_std observable_x3_std observable_x1_scaled_std \\\n0 1.0 1.0 1.0 \n1 1.0 1.0 1.0 \n2 1.0 1.0 1.0 \n3 1.0 1.0 1.0 \n4 1.0 1.0 1.0 \n5 1.0 1.0 1.0 \n6 1.0 1.0 1.0 \n7 1.0 1.0 1.0 \n8 1.0 1.0 1.0 \n9 1.0 1.0 1.0 \n10 1.0 1.0 1.0 \n11 1.0 1.0 1.0 \n12 1.0 1.0 1.0 \n13 1.0 1.0 1.0 \n14 1.0 1.0 1.0 \n15 1.0 1.0 1.0 \n16 1.0 1.0 1.0 \n17 1.0 1.0 1.0 \n18 1.0 1.0 1.0 \n19 1.0 1.0 1.0 \n20 1.0 1.0 1.0 \n\n observable_x2_offsetted_std observable_x1withsigma_std \n0 1.0 NaN \n1 1.0 NaN \n2 1.0 NaN \n3 1.0 NaN \n4 1.0 NaN \n5 1.0 NaN \n6 1.0 NaN \n7 1.0 NaN \n8 1.0 NaN \n9 1.0 NaN \n10 1.0 NaN \n11 1.0 NaN \n12 1.0 NaN \n13 1.0 NaN \n14 1.0 NaN \n15 1.0 NaN \n16 1.0 NaN \n17 1.0 NaN \n18 1.0 NaN \n19 1.0 NaN \n20 1.0 NaN " - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# look at the ExpData as DataFrame\n", - "df = amici.getDataObservablesAsDataFrame(model, [edata])\n", + "df = amici.get_data_observables_as_data_frame(model, [edata])\n", "df" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# from the exported dataframe, we can actually reconstruct a copy of the ExpData instance\n", - "reconstructed_edata = amici.getEdataFromDataFrame(model, df)" + "reconstructed_edata = amici.get_edata_from_data_frame(model, df)" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timet_presimk0k0_preeqk0_presimobservable_x1observable_x2observable_x3observable_x1_scaledobservable_x2_offsettedobservable_x1withsigma
00.00.01.0NaNNaN1.2910940.1185310.6666461.4451440.5006806.186425
10.50.01.0NaNNaN2.1387770.4554861.1774120.4567561.9934881.554579
21.00.01.0NaNNaN0.9420231.2875581.0128050.5658500.5029136.954092
31.50.01.0NaNNaN1.8854570.2311330.0231510.6987030.9468564.849190
42.00.01.0NaNNaN1.1613980.6939910.1506001.2320591.28751514.602456
52.50.01.0NaNNaN0.8692850.6536871.2947690.1602130.89089511.465911
63.00.01.0NaNNaN1.2193940.1916521.4968681.5842331.4942645.079991
73.50.01.0NaNNaN1.7371550.6712140.7381820.1581960.6026170.496051
84.00.01.0NaNNaN0.4578700.3282291.6863010.2144270.9582270.845638
94.50.01.0NaNNaN0.4575220.4112480.5465931.1544320.0148312.697316
105.00.01.0NaNNaN0.0107280.6090840.1388991.3995340.85264128.511357
115.50.01.0NaNNaN0.0247102.6062120.1363300.5829912.3342377.871853
126.00.01.0NaNNaN1.8266260.3547031.8234770.2762250.29326210.270655
136.50.01.0NaNNaN0.4798090.7423200.7543071.8990460.7573282.803840
147.00.01.0NaNNaN0.8514461.0406700.0194181.1059870.1801752.127777
157.50.01.0NaNNaN0.3183880.3897651.3766580.0894560.6034552.627767
168.00.01.0NaNNaN0.8682710.8156790.4926220.4966560.30752917.550614
178.50.01.0NaNNaN0.3817930.3738400.4633811.0071400.96314811.569706
189.00.01.0NaNNaN2.0541620.9010241.5243000.1286801.9482422.671303
199.50.01.0NaNNaN0.0045690.1588640.1966460.7150520.69464913.865618
2010.00.01.0NaNNaN1.4596121.0212462.0431291.3388091.2520360.998435
\n
", - "text/plain": " time t_presim k0 k0_preeq k0_presim observable_x1 observable_x2 \\\n0 0.0 0.0 1.0 NaN NaN 1.291094 0.118531 \n1 0.5 0.0 1.0 NaN NaN 2.138777 0.455486 \n2 1.0 0.0 1.0 NaN NaN 0.942023 1.287558 \n3 1.5 0.0 1.0 NaN NaN 1.885457 0.231133 \n4 2.0 0.0 1.0 NaN NaN 1.161398 0.693991 \n5 2.5 0.0 1.0 NaN NaN 0.869285 0.653687 \n6 3.0 0.0 1.0 NaN NaN 1.219394 0.191652 \n7 3.5 0.0 1.0 NaN NaN 1.737155 0.671214 \n8 4.0 0.0 1.0 NaN NaN 0.457870 0.328229 \n9 4.5 0.0 1.0 NaN NaN 0.457522 0.411248 \n10 5.0 0.0 1.0 NaN NaN 0.010728 0.609084 \n11 5.5 0.0 1.0 NaN NaN 0.024710 2.606212 \n12 6.0 0.0 1.0 NaN NaN 1.826626 0.354703 \n13 6.5 0.0 1.0 NaN NaN 0.479809 0.742320 \n14 7.0 0.0 1.0 NaN NaN 0.851446 1.040670 \n15 7.5 0.0 1.0 NaN NaN 0.318388 0.389765 \n16 8.0 0.0 1.0 NaN NaN 0.868271 0.815679 \n17 8.5 0.0 1.0 NaN NaN 0.381793 0.373840 \n18 9.0 0.0 1.0 NaN NaN 2.054162 0.901024 \n19 9.5 0.0 1.0 NaN NaN 0.004569 0.158864 \n20 10.0 0.0 1.0 NaN NaN 1.459612 1.021246 \n\n observable_x3 observable_x1_scaled observable_x2_offsetted \\\n0 0.666646 1.445144 0.500680 \n1 1.177412 0.456756 1.993488 \n2 1.012805 0.565850 0.502913 \n3 0.023151 0.698703 0.946856 \n4 0.150600 1.232059 1.287515 \n5 1.294769 0.160213 0.890895 \n6 1.496868 1.584233 1.494264 \n7 0.738182 0.158196 0.602617 \n8 1.686301 0.214427 0.958227 \n9 0.546593 1.154432 0.014831 \n10 0.138899 1.399534 0.852641 \n11 0.136330 0.582991 2.334237 \n12 1.823477 0.276225 0.293262 \n13 0.754307 1.899046 0.757328 \n14 0.019418 1.105987 0.180175 \n15 1.376658 0.089456 0.603455 \n16 0.492622 0.496656 0.307529 \n17 0.463381 1.007140 0.963148 \n18 1.524300 0.128680 1.948242 \n19 0.196646 0.715052 0.694649 \n20 2.043129 1.338809 1.252036 \n\n observable_x1withsigma \n0 6.186425 \n1 1.554579 \n2 6.954092 \n3 4.849190 \n4 14.602456 \n5 11.465911 \n6 5.079991 \n7 0.496051 \n8 0.845638 \n9 2.697316 \n10 28.511357 \n11 7.871853 \n12 10.270655 \n13 2.803840 \n14 2.127777 \n15 2.627767 \n16 17.550614 \n17 11.569706 \n18 2.671303 \n19 13.865618 \n20 0.998435 " - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# look at the States in rdata as DataFrame\n", - "amici.getResidualsAsDataFrame(model, [edata], [rdata])" + "amici.get_residuals_as_data_frame(model, [edata], [rdata])" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timedatatypet_presimk0k0_preeqk0_presimobservable_x1observable_x2observable_x3observable_x1_scaledobservable_x2_offsettedobservable_x1withsigmaobservable_x1_stdobservable_x2_stdobservable_x3_stdobservable_x1_scaled_stdobservable_x2_offsetted_stdobservable_x1withsigma_std
00.0simulation0.01.0NaNNaN0.1000000.4000000.7000000.2000003.4000000.1000001.01.01.01.01.00.1
10.5simulation0.01.0NaNNaN0.5393670.6846790.1914911.0787343.6846790.5393671.01.01.01.01.00.1
21.0simulation0.01.0NaNNaN0.5800720.7332870.0964241.1601453.7332870.5800721.01.01.01.01.00.1
31.5simulation0.01.0NaNNaN0.5703990.7306520.0760761.1407993.7306520.5703991.01.01.01.01.00.1
42.0simulation0.01.0NaNNaN0.5605350.7158360.0696941.1210693.7158360.5605351.01.01.01.01.00.1
52.5simulation0.01.0NaNNaN0.5530560.6987510.0663011.1061123.6987510.5530561.01.01.01.01.00.1
63.0simulation0.01.0NaNNaN0.5468710.6819630.0637331.0937413.6819630.5468711.01.01.01.01.00.1
73.5simulation0.01.0NaNNaN0.5413600.6661090.0615061.0827203.6661090.5413601.01.01.01.01.00.1
84.0simulation0.01.0NaNNaN0.5362800.6513020.0594951.0725613.6513020.5362801.01.01.01.01.00.1
94.5simulation0.01.0NaNNaN0.5315380.6375150.0576531.0630763.6375150.5315381.01.01.01.01.00.1
105.0simulation0.01.0NaNNaN0.5270910.6246810.0559601.0541833.6246810.5270911.01.01.01.01.00.1
115.5simulation0.01.0NaNNaN0.5229140.6127330.0544001.0458293.6127330.5229141.01.01.01.01.00.1
126.0simulation0.01.0NaNNaN0.5189890.6016030.0529601.0379783.6016030.5189891.01.01.01.01.00.1
136.5simulation0.01.0NaNNaN0.5152990.5912290.0516291.0305983.5912290.5152991.01.01.01.01.00.1
147.0simulation0.01.0NaNNaN0.5118300.5815550.0503991.0236603.5815550.5118301.01.01.01.01.00.1
157.5simulation0.01.0NaNNaN0.5085680.5725290.0492591.0171363.5725290.5085681.01.01.01.01.00.1
168.0simulation0.01.0NaNNaN0.5055000.5641030.0482031.0110003.5641030.5055001.01.01.01.01.00.1
178.5simulation0.01.0NaNNaN0.5026150.5562340.0472241.0052313.5562340.5026151.01.01.01.01.00.1
189.0simulation0.01.0NaNNaN0.4999020.5488810.0463150.9998043.5488810.4999021.01.01.01.01.00.1
199.5simulation0.01.0NaNNaN0.4973500.5420080.0454710.9947003.5420080.4973501.01.01.01.01.00.1
2010.0simulation0.01.0NaNNaN0.4949490.5355810.0446860.9898983.5355810.4949491.01.01.01.01.00.1
\n
", - "text/plain": " time datatype t_presim k0 k0_preeq k0_presim observable_x1 \\\n0 0.0 simulation 0.0 1.0 NaN NaN 0.100000 \n1 0.5 simulation 0.0 1.0 NaN NaN 0.539367 \n2 1.0 simulation 0.0 1.0 NaN NaN 0.580072 \n3 1.5 simulation 0.0 1.0 NaN NaN 0.570399 \n4 2.0 simulation 0.0 1.0 NaN NaN 0.560535 \n5 2.5 simulation 0.0 1.0 NaN NaN 0.553056 \n6 3.0 simulation 0.0 1.0 NaN NaN 0.546871 \n7 3.5 simulation 0.0 1.0 NaN NaN 0.541360 \n8 4.0 simulation 0.0 1.0 NaN NaN 0.536280 \n9 4.5 simulation 0.0 1.0 NaN NaN 0.531538 \n10 5.0 simulation 0.0 1.0 NaN NaN 0.527091 \n11 5.5 simulation 0.0 1.0 NaN NaN 0.522914 \n12 6.0 simulation 0.0 1.0 NaN NaN 0.518989 \n13 6.5 simulation 0.0 1.0 NaN NaN 0.515299 \n14 7.0 simulation 0.0 1.0 NaN NaN 0.511830 \n15 7.5 simulation 0.0 1.0 NaN NaN 0.508568 \n16 8.0 simulation 0.0 1.0 NaN NaN 0.505500 \n17 8.5 simulation 0.0 1.0 NaN NaN 0.502615 \n18 9.0 simulation 0.0 1.0 NaN NaN 0.499902 \n19 9.5 simulation 0.0 1.0 NaN NaN 0.497350 \n20 10.0 simulation 0.0 1.0 NaN NaN 0.494949 \n\n observable_x2 observable_x3 observable_x1_scaled \\\n0 0.400000 0.700000 0.200000 \n1 0.684679 0.191491 1.078734 \n2 0.733287 0.096424 1.160145 \n3 0.730652 0.076076 1.140799 \n4 0.715836 0.069694 1.121069 \n5 0.698751 0.066301 1.106112 \n6 0.681963 0.063733 1.093741 \n7 0.666109 0.061506 1.082720 \n8 0.651302 0.059495 1.072561 \n9 0.637515 0.057653 1.063076 \n10 0.624681 0.055960 1.054183 \n11 0.612733 0.054400 1.045829 \n12 0.601603 0.052960 1.037978 \n13 0.591229 0.051629 1.030598 \n14 0.581555 0.050399 1.023660 \n15 0.572529 0.049259 1.017136 \n16 0.564103 0.048203 1.011000 \n17 0.556234 0.047224 1.005231 \n18 0.548881 0.046315 0.999804 \n19 0.542008 0.045471 0.994700 \n20 0.535581 0.044686 0.989898 \n\n observable_x2_offsetted observable_x1withsigma observable_x1_std \\\n0 3.400000 0.100000 1.0 \n1 3.684679 0.539367 1.0 \n2 3.733287 0.580072 1.0 \n3 3.730652 0.570399 1.0 \n4 3.715836 0.560535 1.0 \n5 3.698751 0.553056 1.0 \n6 3.681963 0.546871 1.0 \n7 3.666109 0.541360 1.0 \n8 3.651302 0.536280 1.0 \n9 3.637515 0.531538 1.0 \n10 3.624681 0.527091 1.0 \n11 3.612733 0.522914 1.0 \n12 3.601603 0.518989 1.0 \n13 3.591229 0.515299 1.0 \n14 3.581555 0.511830 1.0 \n15 3.572529 0.508568 1.0 \n16 3.564103 0.505500 1.0 \n17 3.556234 0.502615 1.0 \n18 3.548881 0.499902 1.0 \n19 3.542008 0.497350 1.0 \n20 3.535581 0.494949 1.0 \n\n observable_x2_std observable_x3_std observable_x1_scaled_std \\\n0 1.0 1.0 1.0 \n1 1.0 1.0 1.0 \n2 1.0 1.0 1.0 \n3 1.0 1.0 1.0 \n4 1.0 1.0 1.0 \n5 1.0 1.0 1.0 \n6 1.0 1.0 1.0 \n7 1.0 1.0 1.0 \n8 1.0 1.0 1.0 \n9 1.0 1.0 1.0 \n10 1.0 1.0 1.0 \n11 1.0 1.0 1.0 \n12 1.0 1.0 1.0 \n13 1.0 1.0 1.0 \n14 1.0 1.0 1.0 \n15 1.0 1.0 1.0 \n16 1.0 1.0 1.0 \n17 1.0 1.0 1.0 \n18 1.0 1.0 1.0 \n19 1.0 1.0 1.0 \n20 1.0 1.0 1.0 \n\n observable_x2_offsetted_std observable_x1withsigma_std \n0 1.0 0.1 \n1 1.0 0.1 \n2 1.0 0.1 \n3 1.0 0.1 \n4 1.0 0.1 \n5 1.0 0.1 \n6 1.0 0.1 \n7 1.0 0.1 \n8 1.0 0.1 \n9 1.0 0.1 \n10 1.0 0.1 \n11 1.0 0.1 \n12 1.0 0.1 \n13 1.0 0.1 \n14 1.0 0.1 \n15 1.0 0.1 \n16 1.0 0.1 \n17 1.0 0.1 \n18 1.0 0.1 \n19 1.0 0.1 \n20 1.0 0.1 " - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# look at the Observables in rdata as DataFrame\n", - "amici.getSimulationObservablesAsDataFrame(model, [edata], [rdata])" + "amici.get_simulation_observables_as_data_frame(model, [edata], [rdata])" ] }, { "cell_type": "code", - "execution_count": 28, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timet_presimk0k0_preeqk0_presimx1x2x3
00.00.01.0NaNNaN0.1000000.4000000.700000
10.50.01.0NaNNaN0.5393670.6846790.191491
21.00.01.0NaNNaN0.5800720.7332870.096424
31.50.01.0NaNNaN0.5703990.7306520.076076
42.00.01.0NaNNaN0.5605350.7158360.069694
52.50.01.0NaNNaN0.5530560.6987510.066301
63.00.01.0NaNNaN0.5468710.6819630.063733
73.50.01.0NaNNaN0.5413600.6661090.061506
84.00.01.0NaNNaN0.5362800.6513020.059495
94.50.01.0NaNNaN0.5315380.6375150.057653
105.00.01.0NaNNaN0.5270910.6246810.055960
115.50.01.0NaNNaN0.5229140.6127330.054400
126.00.01.0NaNNaN0.5189890.6016030.052960
136.50.01.0NaNNaN0.5152990.5912290.051629
147.00.01.0NaNNaN0.5118300.5815550.050399
157.50.01.0NaNNaN0.5085680.5725290.049259
168.00.01.0NaNNaN0.5055000.5641030.048203
178.50.01.0NaNNaN0.5026150.5562340.047224
189.00.01.0NaNNaN0.4999020.5488810.046315
199.50.01.0NaNNaN0.4973500.5420080.045471
2010.00.01.0NaNNaN0.4949490.5355810.044686
\n
", - "text/plain": " time t_presim k0 k0_preeq k0_presim x1 x2 x3\n0 0.0 0.0 1.0 NaN NaN 0.100000 0.400000 0.700000\n1 0.5 0.0 1.0 NaN NaN 0.539367 0.684679 0.191491\n2 1.0 0.0 1.0 NaN NaN 0.580072 0.733287 0.096424\n3 1.5 0.0 1.0 NaN NaN 0.570399 0.730652 0.076076\n4 2.0 0.0 1.0 NaN NaN 0.560535 0.715836 0.069694\n5 2.5 0.0 1.0 NaN NaN 0.553056 0.698751 0.066301\n6 3.0 0.0 1.0 NaN NaN 0.546871 0.681963 0.063733\n7 3.5 0.0 1.0 NaN NaN 0.541360 0.666109 0.061506\n8 4.0 0.0 1.0 NaN NaN 0.536280 0.651302 0.059495\n9 4.5 0.0 1.0 NaN NaN 0.531538 0.637515 0.057653\n10 5.0 0.0 1.0 NaN NaN 0.527091 0.624681 0.055960\n11 5.5 0.0 1.0 NaN NaN 0.522914 0.612733 0.054400\n12 6.0 0.0 1.0 NaN NaN 0.518989 0.601603 0.052960\n13 6.5 0.0 1.0 NaN NaN 0.515299 0.591229 0.051629\n14 7.0 0.0 1.0 NaN NaN 0.511830 0.581555 0.050399\n15 7.5 0.0 1.0 NaN NaN 0.508568 0.572529 0.049259\n16 8.0 0.0 1.0 NaN NaN 0.505500 0.564103 0.048203\n17 8.5 0.0 1.0 NaN NaN 0.502615 0.556234 0.047224\n18 9.0 0.0 1.0 NaN NaN 0.499902 0.548881 0.046315\n19 9.5 0.0 1.0 NaN NaN 0.497350 0.542008 0.045471\n20 10.0 0.0 1.0 NaN NaN 0.494949 0.535581 0.044686" - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "# look at the States in rdata as DataFrame\n", - "amici.getSimulationStatesAsDataFrame(model, [edata], [rdata])" + "amici.get_simulation_states_as_data_frame(model, [edata], [rdata])" ] } ], diff --git a/doc/python_interface.rst b/doc/python_interface.rst index 4ddb83348c..011e2d618b 100644 --- a/doc/python_interface.rst +++ b/doc/python_interface.rst @@ -171,10 +171,10 @@ An example using Antimony to specify the Lotka-Volterra equations is shown below model_module = amici.import_model_module( module_name=module_name, module_path=outdir ) - amici_model = model_module.getModel() - amici_model.setTimepoints(np.linspace(0, 100, 200)) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model = model_module.get_model() + amici_model.set_timepoints(np.linspace(0, 100, 200)) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) from amici.plotting import plot_state_trajectories plot_state_trajectories(rdata, model=amici_model) @@ -238,7 +238,7 @@ On Linux and OSX this is enabled by default. This can be verified using: .. code-block:: python import amici - amici.compiledWithOpenMP() + amici.compiled_with_openmp() If not already enabled by default, you can enable OpenMP support by setting the environment variables ``AMICI_CXXFLAGS`` and ``AMICI_LDFLAGS`` to the diff --git a/include/amici/abstract_model.h b/include/amici/abstract_model.h index 56b54eaceb..35846ec0e3 100644 --- a/include/amici/abstract_model.h +++ b/include/amici/abstract_model.h @@ -27,10 +27,10 @@ class AbstractModel { virtual ~AbstractModel() = default; /** - * @brief Retrieves the solver object + * @brief Creates a solver instance to simulate this model. * @return The Solver instance */ - virtual std::unique_ptr getSolver() = 0; + virtual std::unique_ptr create_solver() = 0; /** * @brief Root function @@ -210,13 +210,13 @@ class AbstractModel { * @brief Returns the AMICI version that was used to generate the model * @return AMICI version string */ - [[nodiscard]] virtual std::string getAmiciVersion() const; + [[nodiscard]] virtual std::string get_amici_version() const; /** * @brief Returns the AMICI commit that was used to generate the model * @return AMICI commit string */ - [[nodiscard]] virtual std::string getAmiciCommit() const; + [[nodiscard]] virtual std::string get_amici_commit() const; /** * @brief Model-specific implementation of fx0 @@ -235,7 +235,7 @@ class AbstractModel { * fixed parameters is permissible */ [[nodiscard]] virtual bool - isFixedParameterStateReinitializationAllowed() const; + is_fixed_parameter_state_reinitialization_allowed() const; /** * @brief Model-specific implementation of fx0_fixedParameters diff --git a/include/amici/amici.h b/include/amici/amici.h index 93b8daed9b..fa6254d10a 100644 --- a/include/amici/amici.h +++ b/include/amici/amici.h @@ -18,12 +18,12 @@ namespace amici { * @param rethrow rethrow integration exceptions? * @return rdata pointer to return data object */ -std::unique_ptr runAmiciSimulation( +std::unique_ptr run_simulation( Solver& solver, ExpData const* edata, Model& model, bool rethrow = false ); /** - * @brief Same as runAmiciSimulation, but for multiple ExpData instances. When + * @brief Same as run_simulation, but for multiple ExpData instances. When * compiled with OpenMP support, this function runs multi-threaded. * * @param solver Solver instance @@ -33,7 +33,7 @@ std::unique_ptr runAmiciSimulation( * @param num_threads number of threads for parallel execution * @return vector of pointers to return data objects */ -std::vector> runAmiciSimulations( +std::vector> run_simulations( Solver const& solver, std::vector const& edatas, Model const& model, bool failfast, int num_threads ); diff --git a/include/amici/backwardproblem.h b/include/amici/backwardproblem.h index 98201b8910..427b179fcb 100644 --- a/include/amici/backwardproblem.h +++ b/include/amici/backwardproblem.h @@ -13,7 +13,7 @@ class ExpData; class Solver; class Model; class ForwardProblem; -class SteadystateProblem; +class SteadyStateProblem; /** * @brief The BwdSimWorkspace class is used to store temporary simulation @@ -100,8 +100,9 @@ class EventHandlingBwdSimulator { * @param disc The discontinuity to handle * @param dJzdx State-derivative of event likelihood */ - void - handleEventB(Discontinuity const& disc, std::vector const* dJzdx); + void handle_event_b( + Discontinuity const& disc, std::vector const* dJzdx + ); /** * @brief Execute everything necessary for the handling of data @@ -110,7 +111,7 @@ class EventHandlingBwdSimulator { * @param it index of data point * @param dJydx State-derivative of data likelihood */ - void handleDataPointB(int it, std::vector const* dJydx); + void handle_datapoint_b(int it, std::vector const* dJydx); /** * @brief Compute the next timepoint to integrate to. @@ -121,7 +122,7 @@ class EventHandlingBwdSimulator { * @param it index of next data point * @return tnext next timepoint */ - realtype getTnext(int it); + realtype get_next_t(int it); /** The model to simulate. */ Model* model_; @@ -173,14 +174,14 @@ class SteadyStateBackwardProblem { * @brief Get the CPU time taken to solve the backward problem. * @return The CPU time in milliseconds. */ - [[nodiscard]] double getCPUTimeB() const { return cpu_timeB_; } + [[nodiscard]] double get_cpu_time_b() const { return cpu_time_b_; } /** * @brief Get the number of steps taken to find the steady state in the * adjoint case. * @return Number of steps. */ - [[nodiscard]] int getNumStepsB() const { return numstepsB_; } + [[nodiscard]] int get_num_steps_b() const { return num_steps_b_; } /** * @brief Return the adjoint state @@ -190,7 +191,7 @@ class SteadyStateBackwardProblem { * * @return xB adjoint state */ - [[nodiscard]] AmiVector const& getAdjointState() const; + [[nodiscard]] AmiVector const& get_adjoint_state() const; /** * @brief Get the adjoint quadratures (xQB). @@ -200,13 +201,13 @@ class SteadyStateBackwardProblem { * @return xQB */ - [[nodiscard]] AmiVector const& getAdjointQuadrature() const; + [[nodiscard]] AmiVector const& get_adjoint_quadrature() const; /** * @brief Accessor for has_quadrature_ * @return has_quadrature_ */ - [[nodiscard]] bool hasQuadrature() const { return has_quadrature_; } + [[nodiscard]] bool has_quadrature() const { return has_quadrature_; } private: /** @@ -240,13 +241,13 @@ class SteadyStateBackwardProblem { void compute_quadrature_by_simulation(realtype t0); /** CPU time for solving the backward problem (milliseconds) */ - double cpu_timeB_{0.0}; + double cpu_time_b_{0.0}; /** flag indicating whether backward mode was run */ bool has_quadrature_{false}; /** The employed number of backward steps */ - int numstepsB_{0}; + int num_steps_b_{0}; /** integral over adjoint state vector */ AmiVector xQ_; @@ -295,7 +296,7 @@ class BackwardProblem { * @brief The adjoint state vector from before pre-equilibration. * @return xB */ - [[nodiscard]] AmiVector const& getAdjointStatePrePreeq() const { + [[nodiscard]] AmiVector const& get_adjoint_state_pre_preeq() const { return xB_pre_preeq_; } @@ -303,7 +304,7 @@ class BackwardProblem { * @brief The quadrature state vector from before pre-equilibration. * @return xQB */ - [[nodiscard]] AmiVector const& getAdjointQuadraturePrePreeq() const { + [[nodiscard]] AmiVector const& get_adjoint_quadrature_pre_preeq() const { return xQB_pre_preeq_; } @@ -311,13 +312,13 @@ class BackwardProblem { * @brief The final adjoint state vector * @return xB */ - [[nodiscard]] AmiVector const& getAdjointState() const { return ws_.xB_; } + [[nodiscard]] AmiVector const& get_adjoint_state() const { return ws_.xB_; } /** * @brief The final quadrature state vector. * @return xQB */ - [[nodiscard]] AmiVector const& getAdjointQuadrature() const { + [[nodiscard]] AmiVector const& get_adjoint_quadrature() const { return ws_.xQB_; } @@ -326,7 +327,7 @@ class BackwardProblem { * @return The postequilibration SteadyStateBackwardProblem, if any. */ [[nodiscard]] SteadyStateBackwardProblem const* - getPostequilibrationBwdProblem() const { + get_posteq_bwd_problem() const { if (posteq_problem_bwd_.has_value()) return &*posteq_problem_bwd_; return nullptr; @@ -337,14 +338,14 @@ class BackwardProblem { * @return The preequilibration SteadyStateBackwardProblem, if any. */ [[nodiscard]] SteadyStateBackwardProblem const* - getPreequilibrationBwdProblem() const { + get_preeq_bwd_problem() const { if (preeq_problem_bwd_.has_value()) return &*preeq_problem_bwd_; return nullptr; } private: - void handlePostequilibration(); + void handle_postequilibration(); Model* model_; Solver* solver_; @@ -368,10 +369,10 @@ class BackwardProblem { std::vector const dJzdx_; /** The preequilibration steadystate problem from the forward problem. */ - SteadystateProblem* preeq_problem_; + SteadyStateProblem* preeq_problem_; /** The postequilibration steadystate problem from the forward problem. */ - SteadystateProblem* posteq_problem_; + SteadyStateProblem* posteq_problem_; /** Presimulation results */ PeriodResult presim_result; diff --git a/include/amici/edata.h b/include/amici/edata.h index b0ee3a11a1..845bcbbfa0 100644 --- a/include/amici/edata.h +++ b/include/amici/edata.h @@ -58,11 +58,11 @@ class ExpData : public SimulationParameters { * @param nztrue Number of event outputs * @param nmaxevent Maximal number of events to track * @param ts Timepoints (dimension: nt) - * @param fixedParameters Model constants (dimension: nk) + * @param fixed_parameters Model constants (dimension: nk) */ ExpData( int nytrue, int nztrue, int nmaxevent, std::vector ts, - std::vector fixedParameters + std::vector fixed_parameters ); /** @@ -72,20 +72,20 @@ class ExpData : public SimulationParameters { * @param nztrue Number of event outputs * @param nmaxevent Maximal number of events to track * @param ts Timepoints (dimension: nt) - * @param observedData observed data (dimension: nt x nytrue, row-major) - * @param observedDataStdDev standard deviation of observed data + * @param observed_data observed data (dimension: nt x nytrue, row-major) + * @param observed_data_std_dev standard deviation of observed data * (dimension: nt x nytrue, row-major) - * @param observedEvents observed events - * (dimension: nmaxevents x nztrue, row-major) - * @param observedEventsStdDev standard deviation of observed events/roots + * @param observed_events observed events * (dimension: nmaxevents x nztrue, row-major) + * @param observed_events_std_dev standard deviation of observed + * events/roots (dimension: nmaxevents x nztrue, row-major) */ ExpData( int nytrue, int nztrue, int nmaxevent, std::vector ts, - std::vector const& observedData, - std::vector const& observedDataStdDev, - std::vector const& observedEvents, - std::vector const& observedEventsStdDev + std::vector const& observed_data, + std::vector const& observed_data_std_dev, + std::vector const& observed_events, + std::vector const& observed_events_std_dev ); /** @@ -160,28 +160,28 @@ class ExpData : public SimulationParameters { int nt() const; /** - * @brief Set output timepoints. + * @brief Set output ts. * * If the number of timepoint increases, this will grow the * observation/sigma matrices and fill new entries with NaN. - * If the number of timepoints decreases, this will shrink the + * If the number of ts decreases, this will shrink the * observation/sigma matrices. * - * Note that the mapping from timepoints to measurements will not be + * Note that the mapping from ts to measurements will not be * preserved. E.g., say there are measurements at t = 2, and this * function is called with [1, 2], then the old measurements will belong to * t = 1. * - * @param ts timepoints + * @param ts ts */ - void setTimepoints(std::vector const& ts); + void set_timepoints(std::vector const& ts); /** * @brief Get output timepoints. * * @return ExpData::ts */ - std::vector const& getTimepoints() const; + std::vector const& get_timepoints() const; /** * @brief Get timepoint for the given index @@ -190,22 +190,22 @@ class ExpData : public SimulationParameters { * * @return timepoint timepoint at index */ - realtype getTimepoint(int it) const; + realtype get_timepoint(int it) const; /** * @brief Set all measurements. * - * @param observedData observed data (dimension: nt x nytrue, row-major) + * @param observed_data observed data (dimension: nt x nytrue, row-major) */ - void setObservedData(std::vector const& observedData); + void set_observed_data(std::vector const& observed_data); /** * @brief Set measurements for a given observable index * - * @param observedData observed data (dimension: nt) + * @param observed_data observed data (dimension: nt) * @param iy observed data index */ - void setObservedData(std::vector const& observedData, int iy); + void set_observed_data(std::vector const& observed_data, int iy); /** * @brief Whether there is a measurement for the given time- and observable- @@ -216,14 +216,14 @@ class ExpData : public SimulationParameters { * * @return boolean specifying if data was set */ - bool isSetObservedData(int it, int iy) const; + bool is_set_observed_data(int it, int iy) const; /** * @brief Get all measurements. * * @return observed data (dimension: nt x nytrue, row-major) */ - std::vector const& getObservedData() const; + std::vector const& get_observed_data() const; /** * @brief Get measurements for a given timepoint index. @@ -232,22 +232,24 @@ class ExpData : public SimulationParameters { * * @return pointer to observed data at index (dimension: nytrue) */ - realtype const* getObservedDataPtr(int it) const; + realtype const* get_observed_data_ptr(int it) const; /** * @brief Set standard deviations for measurements. * - * @param observedDataStdDev standard deviation of observed data (dimension: - * nt x nytrue, row-major) + * @param observed_data_std_dev standard deviation of observed data + * (dimension: nt x nytrue, row-major) */ - void setObservedDataStdDev(std::vector const& observedDataStdDev); + void set_observed_data_std_dev( + std::vector const& observed_data_std_dev + ); /** * @brief Set identical standard deviation for all measurements. * * @param stdDev standard deviation (dimension: scalar) */ - void setObservedDataStdDev(realtype stdDev); + void set_observed_data_std_dev(realtype stdDev); /** * @brief Set standard deviations of observed data for a @@ -257,7 +259,7 @@ class ExpData : public SimulationParameters { * nt) * @param iy observed data index */ - void setObservedDataStdDev( + void set_observed_data_std_dev( std::vector const& observedDataStdDev, int iy ); @@ -268,7 +270,7 @@ class ExpData : public SimulationParameters { * @param stdDev standard deviation (dimension: scalar) * @param iy observed data index */ - void setObservedDataStdDev(realtype stdDev, int iy); + void set_observed_data_std_dev(realtype stdDev, int iy); /** * @brief Whether standard deviation for a measurement at @@ -278,14 +280,14 @@ class ExpData : public SimulationParameters { * @param iy observable index * @return boolean specifying if standard deviation of data was set */ - bool isSetObservedDataStdDev(int it, int iy) const; + bool is_set_observed_data_std_dev(int it, int iy) const; /** * @brief Get measurement standard deviations. * * @return standard deviation of observed data */ - std::vector const& getObservedDataStdDev() const; + std::vector const& get_observed_data_std_dev() const; /** * @brief Get pointer to measurement standard deviations. @@ -293,7 +295,7 @@ class ExpData : public SimulationParameters { * @param it timepoint index * @return pointer to standard deviation of observed data at index */ - realtype const* getObservedDataStdDevPtr(int it) const; + realtype const* get_observed_data_std_dev_ptr(int it) const; /** * @brief Set observed event data. @@ -301,7 +303,7 @@ class ExpData : public SimulationParameters { * @param observedEvents observed data (dimension: nmaxevent x nztrue, * row-major) */ - void setObservedEvents(std::vector const& observedEvents); + void set_observed_events(std::vector const& observedEvents); /** * @brief Set observed event data for specific event observable. @@ -309,7 +311,8 @@ class ExpData : public SimulationParameters { * @param observedEvents observed data (dimension: nmaxevent) * @param iz observed event data index */ - void setObservedEvents(std::vector const& observedEvents, int iz); + void + set_observed_events(std::vector const& observedEvents, int iz); /** * @brief Check whether event data at specified indices has been set. @@ -318,14 +321,14 @@ class ExpData : public SimulationParameters { * @param iz event observable index * @return boolean specifying if data was set */ - bool isSetObservedEvents(int ie, int iz) const; + bool is_set_observed_events(int ie, int iz) const; /** * @brief Get observed event data. * * @return observed event data */ - std::vector const& getObservedEvents() const; + std::vector const& get_observed_events() const; /** * @brief Get pointer to observed data at ie-th occurrence. @@ -334,22 +337,23 @@ class ExpData : public SimulationParameters { * * @return pointer to observed event data at ie-th occurrence */ - realtype const* getObservedEventsPtr(int ie) const; + realtype const* get_observed_events_ptr(int ie) const; /** * @brief Set standard deviation of observed event data. * * @param observedEventsStdDev standard deviation of observed event data */ - void - setObservedEventsStdDev(std::vector const& observedEventsStdDev); + void set_observed_events_std_dev( + std::vector const& observedEventsStdDev + ); /** * @brief Set standard deviation of observed event data. * * @param stdDev standard deviation (dimension: scalar) */ - void setObservedEventsStdDev(realtype stdDev); + void set_observed_events_std_dev(realtype stdDev); /** * @brief Set standard deviation of observed data for a specific observable. @@ -358,7 +362,7 @@ class ExpData : public SimulationParameters { * (dimension: nmaxevent) * @param iz observed data index */ - void setObservedEventsStdDev( + void set_observed_events_std_dev( std::vector const& observedEventsStdDev, int iz ); @@ -368,7 +372,7 @@ class ExpData : public SimulationParameters { * @param stdDev standard deviation (dimension: scalar) * @param iz observed data index */ - void setObservedEventsStdDev(realtype stdDev, int iz); + void set_observed_events_std_dev(realtype stdDev, int iz); /** * @brief Check whether standard deviation of event data @@ -378,14 +382,14 @@ class ExpData : public SimulationParameters { * @param iz event observable index * @return boolean specifying if standard deviation of event data was set */ - bool isSetObservedEventsStdDev(int ie, int iz) const; + bool is_set_observed_events_std_dev(int ie, int iz) const; /** * @brief Get standard deviation of observed event data. * * @return standard deviation of observed event data */ - std::vector const& getObservedEventsStdDev() const; + std::vector const& get_observed_events_std_dev() const; /** * @brief Get pointer to standard deviation of @@ -396,7 +400,7 @@ class ExpData : public SimulationParameters { * @return pointer to standard deviation of observed event data at ie-th * occurrence */ - realtype const* getObservedEventsStdDevPtr(int ie) const; + realtype const* get_observed_events_std_dev_ptr(int ie) const; /** * @brief Set all observations and their standard deviations to NaN. @@ -415,17 +419,17 @@ class ExpData : public SimulationParameters { * @brief resizes observedData, observedDataStdDev, observedEvents and * observedEventsStdDev */ - void applyDimensions(); + void apply_dimensions(); /** * @brief resizes observedData and observedDataStdDev */ - void applyDataDimension(); + void apply_data_dimension(); /** * @brief resizes observedEvents and observedEventsStdDev */ - void applyEventDimension(); + void apply_event_dimension(); /** * @brief checker for dimensions of input observedData or observedDataStdDev @@ -433,7 +437,7 @@ class ExpData : public SimulationParameters { * @param input vector input to be checked * @param fieldname name of the input */ - void checkDataDimension( + void check_data_dimension( std::vector const& input, char const* fieldname ) const; @@ -444,7 +448,7 @@ class ExpData : public SimulationParameters { * @param input vector input to be checked * @param fieldname name of the input */ - void checkEventsDimension( + void check_events_dimension( std::vector const& input, char const* fieldname ) const; @@ -546,7 +550,7 @@ class ConditionContext : public ContextManager { * @param edata * @param fpc flag indicating which fixedParameter from edata to apply */ - void applyCondition(ExpData const* edata, FixedParameterContext fpc); + void apply_condition(ExpData const* edata, FixedParameterContext fpc); /** * @brief Restore original settings on constructor-supplied amici::Model. diff --git a/include/amici/forwardproblem.h b/include/amici/forwardproblem.h index 61acb290f0..6774d36a04 100644 --- a/include/amici/forwardproblem.h +++ b/include/amici/forwardproblem.h @@ -14,7 +14,7 @@ namespace amici { class ExpData; class Solver; -class SteadystateProblem; +class SteadyStateProblem; class FinalStateStorer; /** @@ -113,11 +113,11 @@ struct FwdSimWorkspace { FwdSimWorkspace( gsl::not_null const& model, gsl::not_null solver ) - : sol(NAN, model->nx_solver, model->nplist(), solver->getSunContext()) - , x_old(model->nx_solver, solver->getSunContext()) - , xdot(model->nx_solver, solver->getSunContext()) - , xdot_old(model->nx_solver, solver->getSunContext()) - , sdx(model->nx_solver, model->nplist(), solver->getSunContext()) + : sol(NAN, model->nx_solver, model->nplist(), solver->get_sun_context()) + , x_old(model->nx_solver, solver->get_sun_context()) + , xdot(model->nx_solver, solver->get_sun_context()) + , xdot_old(model->nx_solver, solver->get_sun_context()) + , sdx(model->nx_solver, model->nplist(), solver->get_sun_context()) , stau(model->nplist()) , roots_found(model->ne, 0) , rval_tmp(gsl::narrow(model->ne), 0.0) @@ -369,10 +369,10 @@ class EventHandlingSimulator { }; /** - * @brief The SteadystateProblem class solves a steady-state problem using + * @brief The SteadyStateProblem class solves a steady-state problem using * Newton's method and falls back to integration on failure. */ -class SteadystateProblem { +class SteadyStateProblem { public: /** * @brief Constructor @@ -383,7 +383,7 @@ class SteadystateProblem { * @param is_preeq Whether this is a pre-equilibration (`true`) or * post-equilibration problem (`false`). */ - explicit SteadystateProblem( + explicit SteadyStateProblem( FwdSimWorkspace* ws, Solver const& solver, Model& model, bool is_preeq ); @@ -398,13 +398,13 @@ class SteadystateProblem { * @param it Index of the current output time point. * @param t0 Initial time for the steady state simulation. */ - void workSteadyStateProblem(Solver& solver, int it, realtype t0); + void run(Solver& solver, int it, realtype t0); /** * @brief Return the stored SimulationState. * @return stored SimulationState */ - [[nodiscard]] SimulationState const& getFinalSimulationState() const { + [[nodiscard]] SimulationState const& get_final_simulation_state() const { return period_result_.final_state_; } @@ -412,7 +412,7 @@ class SteadystateProblem { * @brief Return state at steady state * @return x */ - [[nodiscard]] AmiVector const& getState() const { + [[nodiscard]] AmiVector const& get_state() const { return period_result_.final_state_.sol.x; } @@ -420,7 +420,7 @@ class SteadystateProblem { * @brief Return state sensitivity at steady state * @return sx */ - [[nodiscard]] AmiVectorArray const& getStateSensitivity() const { + [[nodiscard]] AmiVectorArray const& get_state_sensitivity() const { return period_result_.final_state_.sol.sx; } @@ -428,7 +428,7 @@ class SteadystateProblem { * @brief Get the CPU time taken to solve the forward problem. * @return The CPU time in milliseconds. */ - [[nodiscard]] double getCPUTime() const { return cpu_time_; } + [[nodiscard]] double get_cpu_time() const { return cpu_time_; } /** * @brief Get the steady state computation status. @@ -436,7 +436,7 @@ class SteadystateProblem { * [newton, simulation, newton]. */ [[nodiscard]] std::vector const& - getSteadyStateStatus() const { + get_steady_state_status() const { return steady_state_status_; } @@ -444,7 +444,7 @@ class SteadystateProblem { * @brief Get model time at which steady state was found through simulation. * @return Time at which steady state was found (model time units). */ - [[nodiscard]] realtype getSteadyStateTime() const { + [[nodiscard]] realtype get_steady_state_time() const { return period_result_.final_state_.sol.t; } @@ -452,14 +452,14 @@ class SteadystateProblem { * @brief Get the weighted root mean square of the residuals. * @return The weighted root-mean-square of the residuals. */ - [[nodiscard]] realtype getResidualNorm() const { return wrms_; } + [[nodiscard]] realtype get_residual_norm() const { return wrms_; } /** * @brief Get the number of steps taken to find the steady state. * @return Number of steps taken to find the steady state as * [newton, simulation, newton]. */ - [[nodiscard]] std::vector const& getNumSteps() const { + [[nodiscard]] std::vector const& get_num_steps() const { return numsteps_; } @@ -468,7 +468,7 @@ class SteadystateProblem { * successful. * @return Whether any approach to find the steady state was successful. */ - [[nodiscard]] bool checkSteadyStateSuccess() const; + [[nodiscard]] bool check_steady_state_success() const; /** * @brief Get the pre-equilibration solver. @@ -493,14 +493,14 @@ class SteadystateProblem { * @param it Index of the current output time point. * @param t0 Initial time for the steady state simulation. */ - void findSteadyState(int it, realtype t0); + void find_steady_state(int it, realtype t0); /** * @brief Try to determine the steady state by using Newton's method. * @param newton_retry Flag indicating whether Newton's method is being * relaunched. */ - void findSteadyStateByNewtonsMethod(bool newton_retry); + void find_steady_state_by_newtons_method(bool newton_retry); /** * @brief Try to determine the steady state by using forward simulation. @@ -509,7 +509,7 @@ class SteadystateProblem { * @return SteadyStateStatus indicating whether the steady state was found * successfully, or if it failed. */ - SteadyStateStatus findSteadyStateBySimulation(int it, realtype t0); + SteadyStateStatus find_steady_state_by_simulation(int it, realtype t0); /** * @brief Store state and throw an exception if equilibration failed @@ -519,7 +519,7 @@ class SteadystateProblem { * @param tried_newton_2 Whether any Newton step was attempted after * simulation */ - [[noreturn]] void handleSteadyStateFailure( + [[noreturn]] void handle_steady_state_failure( bool tried_newton_1, bool tried_simulation, bool tried_newton_2 ) const; @@ -528,32 +528,32 @@ class SteadystateProblem { * @param wrms_computer_sx WRMSComputer instance for state sensitivities * @return weighted root mean squared residuals of the RHS */ - realtype getWrmsFSA(WRMSComputer& wrms_computer_sx); + realtype get_wrms_fsa(WRMSComputer& wrms_computer_sx); /** * @brief Launch simulation if Newton solver or linear system solve * fail or are disabled. * simulation. */ - void runSteadystateSimulationFwd(); + void run_steadystate_simulation_fwd(); /** * @brief Update member variables to indicate that state_.x has been * updated and xdot_, delta_, etc. need to be recomputed. */ - void flagUpdatedState(); + void flag_updated_state(); /** * @brief Retrieve simulation sensitivities from the provided solver and * set the corresponding flag to indicate they are up to date */ - void updateSensiSimulation(); + void update_sensi_simulation(); /** * @brief Compute the right-hand side for the current state_.x and set the * corresponding flag to indicate xdot_ is up to date. */ - void updateRightHandSide(); + void update_rhs(); /** Whether this is a pre- or post-equilibration problem */ bool is_preeq_; @@ -653,7 +653,7 @@ class ForwardProblem { * If forward sensitivities are enabled this will also compute * sensitivities. */ - void workForwardProblem(); + void run(); /** * @brief Computes adjoint updates dJydx according to the provided model @@ -662,13 +662,14 @@ class ForwardProblem { * @param edata experimental data * @return dJydx */ - std::vector getAdjointUpdates(Model& model, ExpData const& edata); + std::vector + get_adjoint_updates(Model& model, ExpData const& edata); /** * @brief Accessor for sx * @return sx */ - [[nodiscard]] AmiVectorArray const& getStateSensitivity() const { + [[nodiscard]] AmiVectorArray const& get_state_sensitivity() const { return ws_.sol.sx; } @@ -676,7 +677,8 @@ class ForwardProblem { * @brief Get information on the discontinuities encountered so far. * @return The vector of discontinuities. */ - [[nodiscard]] std::vector const& getDiscontinuities() const { + [[nodiscard]] std::vector const& + get_discontinuities() const { return main_simulator_.result.discs; } @@ -684,7 +686,7 @@ class ForwardProblem { * @brief Accessor for dJzdx * @return dJzdx */ - [[nodiscard]] std::vector const& getDJzdx() const { + [[nodiscard]] std::vector const& get_dJzdx() const { return dJzdx_; } @@ -692,13 +694,13 @@ class ForwardProblem { * @brief Accessor for it * @return it */ - [[nodiscard]] int getCurrentTimeIteration() const { return it_; } + [[nodiscard]] int get_current_time_iteration() const { return it_; } /** * @brief Returns final time point for which simulations are available * @return time point */ - [[nodiscard]] realtype getFinalTime() const { + [[nodiscard]] realtype get_final_time() const { return main_simulator_.result.final_state_.sol.t; } @@ -706,7 +708,7 @@ class ForwardProblem { * @brief Returns maximal event index for which simulations are available * @return index */ - [[nodiscard]] int getEventCounter() const { + [[nodiscard]] int get_event_counter() const { return main_simulator_.get_event_counter(); } @@ -717,12 +719,12 @@ class ForwardProblem { * @return state */ [[nodiscard]] SimulationState const& - getSimulationStateTimepoint(int const it) const { - if (model->getTimepoint(it) + get_simulation_state_timepoint(int const it) const { + if (model->get_timepoint(it) == main_simulator_.result.initial_state_.sol.t) - return getInitialSimulationState(); + return get_initial_simulation_state(); auto const map_iter = main_simulator_.result.timepoint_states_.find( - model->getTimepoint(it) + model->get_timepoint(it) ); Ensures(map_iter != main_simulator_.result.timepoint_states_.end()); return map_iter->second; @@ -735,7 +737,7 @@ class ForwardProblem { * @return SimulationState */ [[nodiscard]] SimulationState const& - getSimulationStateEvent(int const iroot) const { + get_simulation_state_event(int const iroot) const { return main_simulator_.result.event_states_.at(iroot); } @@ -744,7 +746,7 @@ class ForwardProblem { * initial timepoint * @return SimulationState */ - [[nodiscard]] SimulationState const& getInitialSimulationState() const { + [[nodiscard]] SimulationState const& get_initial_simulation_state() const { return main_simulator_.result.initial_state_; } @@ -753,46 +755,45 @@ class ForwardProblem { * final timepoint (or when the simulation failed) * @return SimulationState */ - [[nodiscard]] SimulationState const& getFinalSimulationState() const { + [[nodiscard]] SimulationState const& get_final_simulation_state() const { return main_simulator_.result.final_state_; } /** - * @brief Return the preequilibration SteadystateProblem. - * @return The preequilibration SteadystateProblem, if any. + * @brief Return the preequilibration SteadyStateProblem. + * @return The preequilibration SteadyStateProblem, if any. */ - [[nodiscard]] SteadystateProblem* getPreequilibrationProblem() { + [[nodiscard]] SteadyStateProblem* get_preeq_problem() { if (preeq_problem_.has_value()) return &*preeq_problem_; return nullptr; } /** - * @brief Return the preequilibration SteadystateProblem. - * @return The preequilibration SteadystateProblem, if any. + * @brief Return the preequilibration SteadyStateProblem. + * @return The preequilibration SteadyStateProblem, if any. */ - [[nodiscard]] SteadystateProblem const* getPreequilibrationProblem() const { + [[nodiscard]] SteadyStateProblem const* get_preeq_problem() const { if (preeq_problem_.has_value()) return &*preeq_problem_; return nullptr; } /** - * @brief Return the postequilibration SteadystateProblem. - * @return The postequilibration SteadystateProblem, if any. + * @brief Return the postequilibration SteadyStateProblem. + * @return The postequilibration SteadyStateProblem, if any. */ - [[nodiscard]] SteadystateProblem* getPostequilibrationProblem() { + [[nodiscard]] SteadyStateProblem* get_posteq_problem() { if (posteq_problem_.has_value()) return &*posteq_problem_; return nullptr; } /** - * @brief Return the postequilibration SteadystateProblem. - * @return The postequilibration SteadystateProblem, if any. + * @brief Return the postequilibration SteadyStateProblem. + * @return The postequilibration SteadyStateProblem, if any. */ - [[nodiscard]] SteadystateProblem const* - getPostequilibrationProblem() const { + [[nodiscard]] SteadyStateProblem const* get_posteq_problem() const { if (posteq_problem_.has_value()) return &*posteq_problem_; return nullptr; @@ -823,13 +824,13 @@ class ForwardProblem { private: /** - * @brief Handle preequilibration if necessary. + * @brief Handle pre-equilibration if necessary. * * Preequilibration starts at `Model::t0()`. * * So far, no event handling takes place during preequilibration. */ - void handlePreequilibration(); + void handle_preequilibration(); /** * @brief Handle pre-simulation if required. @@ -838,7 +839,7 @@ class ForwardProblem { * * So far, no event handling takes place during presimulation. */ - void handlePresimulation(); + void handle_presimulation(); /** * @brief Handle the main simulation. @@ -847,7 +848,7 @@ class ForwardProblem { * During this period, events are processed and data points are * handled. */ - void handleMainSimulation(); + void handle_main_simulation(); /** * @brief Handle postequilibration if necessary. @@ -858,13 +859,14 @@ class ForwardProblem { * So far, no event handling takes place during postequilibration. * This also includes the processing of event observables. */ - void handlePostequilibration(); + void handle_postequilibration(); /** state derivative of event likelihood * (dimension nJ x nx x nMaxEvent, ordering =?) */ std::vector dJzdx_; - /** flag to indicate whether solver was preeinitialized via preequilibration + /** flag to indicate whether solver was pre-initialized via + * pre-equilibration */ bool preequilibrated_{false}; @@ -875,10 +877,10 @@ class ForwardProblem { bool uses_presimulation_{false}; /** The preequilibration steady-state problem, if any. */ - std::optional preeq_problem_; + std::optional preeq_problem_; /** The postequilibration steady-state problem, if any. */ - std::optional posteq_problem_; + std::optional posteq_problem_; FwdSimWorkspace ws_; EventHandlingSimulator main_simulator_; @@ -915,8 +917,8 @@ class FinalStateStorer : public ContextManager { // timepoint_states if it's not present there. // this may happen if there is an error just at // (or indistinguishably before) an output timepoint - auto const final_time = fwd_->getFinalTime(); - auto const timepoints = fwd_->model->getTimepoints(); + auto const final_time = fwd_->get_final_time(); + auto const timepoints = fwd_->model->get_timepoints(); if (!fwd_->main_simulator_.result.timepoint_states_.contains( final_time ) diff --git a/include/amici/hdf5.h b/include/amici/hdf5.h index 8e1a462fe3..9861bdb81d 100644 --- a/include/amici/hdf5.h +++ b/include/amici/hdf5.h @@ -39,7 +39,7 @@ namespace hdf5 { * @param hdf5filename File to open * @return File object */ -H5::H5File createOrOpenForWriting(std::string const& hdf5filename); +H5::H5File create_or_open_for_writing(std::string const& hdf5filename); /** * @brief Read solver options from HDF5 file. @@ -47,7 +47,7 @@ H5::H5File createOrOpenForWriting(std::string const& hdf5filename); * @param solver Solver to set options on * @param datasetPath Path inside the HDF5 file */ -void readSolverSettingsFromHDF5( +void read_solver_settings_from_hdf5( const H5::H5File& file, Solver& solver, std::string const& datasetPath ); @@ -57,7 +57,7 @@ void readSolverSettingsFromHDF5( * @param solver Solver to write options from * @param hdf5Location Path inside the HDF5 file */ -void writeSolverSettingsToHDF5( +void write_solver_settings_to_hdf5( Solver const& solver, std::string const& hdf5Filename, std::string const& hdf5Location ); @@ -68,7 +68,7 @@ void writeSolverSettingsToHDF5( * @param solver Solver to write options from * @param hdf5Location Path inside the HDF5 file */ -void writeSolverSettingsToHDF5( +void write_solver_settings_to_hdf5( Solver const& solver, H5::H5File const& file, std::string const& hdf5Location ); @@ -79,7 +79,7 @@ void writeSolverSettingsToHDF5( * @param solver Solver to set options on * @param datasetPath Path inside the HDF5 file */ -void readSolverSettingsFromHDF5( +void read_solver_settings_from_hdf5( std::string const& hdffile, Solver& solver, std::string const& datasetPath ); @@ -89,7 +89,7 @@ void readSolverSettingsFromHDF5( * @param model Model to set data on * @param datasetPath Path inside the HDF5 file */ -void readModelDataFromHDF5( +void read_model_data_from_hdf5( std::string const& hdffile, Model& model, std::string const& datasetPath ); @@ -99,7 +99,7 @@ void readModelDataFromHDF5( * @param model Model to set data on * @param datasetPath Path inside the HDF5 file */ -void readModelDataFromHDF5( +void read_model_data_from_hdf5( H5::H5File const& file, Model& model, std::string const& datasetPath ); @@ -110,7 +110,7 @@ void readModelDataFromHDF5( * @param hdf5Location Full dataset path inside the HDF5 file (will be created) */ -void writeReturnData( +void write_return_data_to_hdf5( ReturnData const& rdata, H5::H5File const& file, std::string const& hdf5Location ); @@ -122,7 +122,7 @@ void writeReturnData( * @param hdf5Location Full dataset path inside the HDF5 file (will be created) */ -void writeReturnData( +void write_return_data_to_hdf5( ReturnData const& rdata, std::string const& hdf5Filename, std::string const& hdf5Location ); @@ -133,7 +133,7 @@ void writeReturnData( * @param file HDF5 file to write to * @param hdf5Location Full dataset path inside the HDF5 file (will be created) */ -void writeReturnDataDiagnosis( +void write_return_data_diagnosis( ReturnData const& rdata, H5::H5File const& file, std::string const& hdf5Location ); @@ -144,7 +144,7 @@ void writeReturnDataDiagnosis( * @param logItems Log items to write * @param hdf5Location Full dataset path inside the HDF5 file (will be created) */ -void writeLogItemsToHDF5( +void write_log_items_to_hdf5( H5::H5File const& file, std::vector const& logItems, std::string const& hdf5Location ); @@ -155,7 +155,7 @@ void writeLogItemsToHDF5( * @param groupPath Path to the group to be created * @param recursively Create intermediary groups */ -void createGroup( +void create_group( const H5::H5File& file, std::string const& groupPath, bool recursively = true ); @@ -168,7 +168,7 @@ void createGroup( * @return ExpData created from data in the given location */ -std::unique_ptr readSimulationExpData( +std::unique_ptr read_exp_data_from_hdf5( std::string const& hdf5Filename, std::string const& hdf5Root, Model const& model ); @@ -180,7 +180,7 @@ std::unique_ptr readSimulationExpData( * @param hdf5Location Path inside the HDF5 file */ -void writeSimulationExpData( +void write_exp_data_to_hdf5( ExpData const& edata, H5::H5File const& file, std::string const& hdf5Location ); @@ -191,7 +191,7 @@ void writeSimulationExpData( * @param filepath Name of HDF5 file * @param hdf5Location Path inside the HDF5 file */ -void writeSimulationExpData( +void write_exp_data_to_hdf5( ExpData const& edata, std::string const& filepath, std::string const& hdf5Location ); @@ -204,7 +204,7 @@ void writeSimulationExpData( * @param attributeName Name of the attribute of interest * @return `true` if attribute exists, `false` otherwise */ -bool attributeExists( +bool attribute_exists( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ); @@ -216,7 +216,7 @@ bool attributeExists( * @param attributeName Name of the attribute of interest * @return `true` if attribute exists, `false` otherwise */ -bool attributeExists( +bool attribute_exists( H5::H5Object const& object, std::string const& attributeName ); @@ -226,7 +226,7 @@ bool attributeExists( * @param datasetName Name of dataset to create * @param buffer Data to write to dataset */ -void createAndWriteInt1DDataset( +void create_and_write_int_1d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span buffer ); @@ -239,7 +239,7 @@ void createAndWriteInt1DDataset( * @param m Number of rows in buffer * @param n Number of columns buffer */ -void createAndWriteInt2DDataset( +void create_and_write_int_2d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span buffer, hsize_t m, hsize_t n ); @@ -250,7 +250,7 @@ void createAndWriteInt2DDataset( * @param datasetName Name of dataset to create * @param buffer Data to write to dataset */ -void createAndWriteDouble1DDataset( +void create_and_write_double_1d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span buffer ); @@ -264,7 +264,7 @@ void createAndWriteDouble1DDataset( * @param n Number of columns buffer */ -void createAndWriteDouble2DDataset( +void create_and_write_double_2d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span buffer, hsize_t m, hsize_t n ); @@ -279,7 +279,7 @@ void createAndWriteDouble2DDataset( * @param o Length of first dimension in buffer */ -void createAndWriteDouble3DDataset( +void create_and_write_double_3d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span buffer, hsize_t m, hsize_t n, hsize_t o ); @@ -291,7 +291,7 @@ void createAndWriteDouble3DDataset( * @param attributeName Name of attribute to read * @return Attribute value */ -std::string getStringAttribute( +std::string get_string_attribute( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ); @@ -303,7 +303,7 @@ std::string getStringAttribute( * @param attributeName Name of attribute to read * @return Attribute value */ -double getDoubleScalarAttribute( +double get_double_scalar_attribute( const H5::H5File& file, std::string const& optionsObject, std::string const& attributeName ); @@ -316,7 +316,7 @@ double getDoubleScalarAttribute( * @return Attribute value */ -int getIntScalarAttribute( +int get_int_scalar_attribute( const H5::H5File& file, std::string const& optionsObject, std::string const& attributeName ); @@ -328,7 +328,7 @@ int getIntScalarAttribute( * @return Data read */ std::vector -getIntDataset1D(const H5::H5File& file, std::string const& name); +get_int_1d_dataset(const H5::H5File& file, std::string const& name); /** * @brief Read 1-dimensional native double dataset from HDF5 file. @@ -338,7 +338,7 @@ getIntDataset1D(const H5::H5File& file, std::string const& name); */ std::vector -getDoubleDataset1D(const H5::H5File& file, std::string const& name); +get_double_1d_dataset(const H5::H5File& file, std::string const& name); /** * @brief Read 2-dimensional native double dataset from HDF5 file. @@ -349,7 +349,7 @@ getDoubleDataset1D(const H5::H5File& file, std::string const& name); * @return Flattened data (row-major) */ -std::vector getDoubleDataset2D( +std::vector get_double_2d_dataset( const H5::H5File& file, std::string const& name, hsize_t& m, hsize_t& n ); @@ -363,7 +363,7 @@ std::vector getDoubleDataset2D( * @return Flattened data (row-major) */ -std::vector getDoubleDataset3D( +std::vector get_double_3d_dataset( const H5::H5File& file, std::string const& name, hsize_t& m, hsize_t& n, hsize_t& o ); @@ -375,7 +375,7 @@ std::vector getDoubleDataset3D( * @param location Location to test for * @return `true` if exists, `false` otherwise */ -bool locationExists(std::string const& filename, std::string const& location); +bool location_exists(std::string const& filename, std::string const& location); /** * @brief Check if the given location (group, link or dataset) exists in the @@ -385,7 +385,7 @@ bool locationExists(std::string const& filename, std::string const& location); * @return `true` if exists, `false` otherwise */ -bool locationExists(H5::H5File const& file, std::string const& location); +bool location_exists(H5::H5File const& file, std::string const& location); } // namespace hdf5 } // namespace amici diff --git a/include/amici/misc.h b/include/amici/misc.h index 3f9caf8b0c..240f0403a1 100644 --- a/include/amici/misc.h +++ b/include/amici/misc.h @@ -64,7 +64,7 @@ gsl::span slice(std::vector const& data, int index, unsigned size) { * @param expected_size expected size of the buffer */ template -void checkBufferSize( +void check_buffer_size( gsl::span buffer, typename gsl::span::index_type expected_size ) { if (buffer.size() != expected_size) @@ -84,8 +84,8 @@ void checkBufferSize( * @param buffer buffer to which values are to be written */ template -void writeSlice(gsl::span const slice, gsl::span buffer) { - checkBufferSize(buffer, slice.size()); +void write_slice(gsl::span const slice, gsl::span buffer) { + check_buffer_size(buffer, slice.size()); std::copy(slice.begin(), slice.end(), buffer.data()); } @@ -96,8 +96,8 @@ void writeSlice(gsl::span const slice, gsl::span buffer) { * @param buffer buffer to which values are to be added */ template -void addSlice(gsl::span const slice, gsl::span buffer) { - checkBufferSize(buffer, slice.size()); +void add_slice(gsl::span const slice, gsl::span buffer) { + check_buffer_size(buffer, slice.size()); std::transform( slice.begin(), slice.end(), buffer.begin(), buffer.begin(), std::plus() @@ -110,8 +110,9 @@ void addSlice(gsl::span const slice, gsl::span buffer) { * @param s computed value * @param b buffer to which values are to be written */ -template void writeSlice(std::vector const& s, std::vector& b) { - writeSlice( +template +void write_slice(std::vector const& s, std::vector& b) { + write_slice( gsl::make_span(s.data(), s.size()), gsl::make_span(b.data(), b.size()) ); } @@ -122,8 +123,8 @@ template void writeSlice(std::vector const& s, std::vector& b) { * @param s computed value * @param b buffer to which values are to be written */ -template void writeSlice(std::vector const& s, gsl::span b) { - writeSlice(gsl::make_span(s.data(), s.size()), b); +template void write_slice(std::vector const& s, gsl::span b) { + write_slice(gsl::make_span(s.data(), s.size()), b); } /** @@ -132,8 +133,8 @@ template void writeSlice(std::vector const& s, gsl::span b) { * @param s computed value * @param b buffer to which values are to be written */ -template void addSlice(std::vector const& s, gsl::span b) { - addSlice(gsl::make_span(s.data(), s.size()), b); +template void add_slice(std::vector const& s, gsl::span b) { + add_slice(gsl::make_span(s.data(), s.size()), b); } /** @@ -142,7 +143,7 @@ template void addSlice(std::vector const& s, gsl::span b) { * @param s computed value * @param b buffer to which values are to be written */ -void writeSlice(AmiVector const& s, gsl::span b); +void write_slice(AmiVector const& s, gsl::span b); /** * @brief Remove parameter scaling according to the parameter scaling in pscale @@ -153,7 +154,7 @@ void writeSlice(AmiVector const& s, gsl::span b); * @param pscale parameter scaling * @param bufferUnscaled unscaled parameters are written to the array */ -void unscaleParameters( +void unscale_parameters( gsl::span bufferScaled, gsl::span pscale, gsl::span bufferUnscaled ); @@ -166,7 +167,7 @@ void unscaleParameters( * * @return Unscaled parameter */ -double getUnscaledParameter(double scaledParameter, ParameterScaling scaling); +double unscale_parameter(double scaledParameter, ParameterScaling scaling); /** * @brief Apply parameter scaling according to `scaling` @@ -174,7 +175,7 @@ double getUnscaledParameter(double scaledParameter, ParameterScaling scaling); * @param scaling parameter scaling * @return Scaled parameter */ -double getScaledParameter(double unscaledParameter, ParameterScaling scaling); +double scale_parameter(double unscaledParameter, ParameterScaling scaling); /** * @brief Apply parameter scaling according to `scaling` @@ -182,7 +183,7 @@ double getScaledParameter(double unscaledParameter, ParameterScaling scaling); * @param pscale parameter scaling * @param bufferScaled destination */ -void scaleParameters( +void scale_parameters( gsl::span bufferUnscaled, gsl::span pscale, gsl::span bufferScaled ); @@ -193,14 +194,14 @@ void scaleParameters( * @param first_frame Index of first frame to include * @return Backtrace */ -std::string backtraceString(int maxFrames, int first_frame = 0); +std::string get_backtrace_string(int maxFrames, int first_frame = 0); /** * @brief Convert std::regex_constants::error_type to string * @param err_type error type * @return Error type as string */ -std::string regexErrorToString(std::regex_constants::error_type err_type); +std::string regex_error_to_string(std::regex_constants::error_type err_type); /** * @brief Format printf-style arguments to std::string @@ -208,7 +209,7 @@ std::string regexErrorToString(std::regex_constants::error_type err_type); * @param ap Argument list pointer * @return Formatted String */ -std::string printfToString(char const* fmt, va_list ap); +std::string printf_to_string(char const* fmt, va_list ap); /** * @brief Generic implementation for a context manager, explicitly deletes copy diff --git a/include/amici/model.h b/include/amici/model.h index d2a229f1f5..1fc7bd1f78 100644 --- a/include/amici/model.h +++ b/include/amici/model.h @@ -251,7 +251,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param xQB Adjoint quadratures * @param posteq Flag indicating whether postequilibration was performed */ - void initializeB( + void initialize_b( AmiVector& xB, AmiVector& dxB, AmiVector& xQB, bool posteq ) const; @@ -260,7 +260,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Initial timepoint * @param x State vector to be initialized (size: nx_solver). */ - void initializeStates(realtype t, AmiVector& x); + void initialize_state(realtype t, AmiVector& x); /** * @brief Initialize initial state sensitivities. @@ -268,19 +268,19 @@ class Model : public AbstractModel, public ModelDimensions { * @param sx Reference to state variable sensitivities * @param x Reference to state variables */ - void initializeStateSensitivities( + void initialize_state_sensitivities( realtype t, AmiVectorArray& sx, AmiVector const& x ); /** * @brief Initialization of spline functions */ - void initializeSplines(); + void initialize_splines(); /** * @brief Initialization of spline sensitivity functions */ - void initializeSplineSensitivities(); + void initialize_spline_sensitivities(); /** * @brief Initialize the Heaviside variables `h` at the initial time `t0`. @@ -293,7 +293,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param roots_found boolean indicators indicating whether roots were found * at t0 by this fun */ - void initEvents( + void initialize_events( realtype t, AmiVector const& x, AmiVector const& dx, std::vector& roots_found ); @@ -362,13 +362,13 @@ class Model : public AbstractModel, public ModelDimensions { * @brief Get maximum number of events that may occur for each type. * @return Maximum number of events that may occur for each type */ - int nMaxEvent() const; + int n_max_event() const; /** * @brief Set maximum number of events that may occur for each type. * @param nmaxevent Maximum number of events that may occur for each type */ - void setNMaxEvent(int nmaxevent); + void set_n_max_event(int nmaxevent); /** * @brief Get number of timepoints. @@ -380,7 +380,7 @@ class Model : public AbstractModel, public ModelDimensions { * @brief Get parameter scale for each parameter. * @return Vector of parameter scales */ - std::vector const& getParameterScale() const; + std::vector const& get_parameter_scale() const; /** * @brief Set parameter scale for each parameter. @@ -389,7 +389,7 @@ class Model : public AbstractModel, public ModelDimensions { * * @param pscale Scalar parameter scale to be set for all parameters */ - void setParameterScale(ParameterScaling pscale); + void set_parameter_scale(ParameterScaling pscale); /** * @brief Set parameter scale for each parameter. @@ -398,40 +398,40 @@ class Model : public AbstractModel, public ModelDimensions { * * @param pscaleVec Vector of parameter scales */ - void setParameterScale(std::vector const& pscaleVec); + void set_parameter_scale(std::vector const& pscaleVec); /** * @brief Get parameters with transformation according to parameter scale * applied. * @return Unscaled parameters */ - std::vector const& getUnscaledParameters() const; + std::vector const& get_unscaled_parameters() const; /** * @brief Get parameter vector. * @return The user-set parameters (see also `Model::getUnscaledParameters`) */ - std::vector const& getParameters() const; + std::vector const& get_parameters() const; /** * @brief Get value of first model parameter with the specified ID. * @param par_id Parameter ID * @return Parameter value */ - realtype getParameterById(std::string const& par_id) const; + realtype get_parameter_by_id(std::string const& par_id) const; /** * @brief Get value of first model parameter with the specified name. * @param par_name Parameter name * @return Parameter value */ - realtype getParameterByName(std::string const& par_name) const; + realtype get_parameter_by_name(std::string const& par_name) const; /** * @brief Set the parameter vector. * @param p Vector of parameters */ - void setParameters(std::vector const& p); + void set_parameters(std::vector const& p); /** * @brief Set model parameters according to the parameter IDs and mapped @@ -440,7 +440,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param ignoreErrors Ignore errors such as parameter IDs in p which are * not model parameters */ - void setParameterById( + void set_parameter_by_id( std::map const& p, bool ignoreErrors = false ); @@ -449,7 +449,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param par_id Parameter ID * @param value Parameter value */ - void setParameterById(std::string const& par_id, realtype value); + void set_parameter_by_id(std::string const& par_id, realtype value); /** * @brief Set all values of model parameters with IDs matching the specified @@ -458,14 +458,15 @@ class Model : public AbstractModel, public ModelDimensions { * @param value Parameter value * @return Number of parameter IDs that matched the regex */ - int setParametersByIdRegex(std::string const& par_id_regex, realtype value); + int + set_parameters_by_id_regex(std::string const& par_id_regex, realtype value); /** * @brief Set value of first model parameter with the specified name. * @param par_name Parameter name * @param value Parameter value */ - void setParameterByName(std::string const& par_name, realtype value); + void set_parameter_by_name(std::string const& par_name, realtype value); /** * @brief Set model parameters according to the parameter name and mapped @@ -474,7 +475,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param ignoreErrors Ignore errors such as parameter names in p which are * not model parameters */ - void setParameterByName( + void set_parameter_by_name( std::map const& p, bool ignoreErrors = false ); @@ -485,22 +486,23 @@ class Model : public AbstractModel, public ModelDimensions { * @param value Parameter value * @return Number of fixed parameter names that matched the regex */ - int - setParametersByNameRegex(std::string const& par_name_regex, realtype value); + int set_parameters_by_name_regex( + std::string const& par_name_regex, realtype value + ); /** * @brief Get values of fixed parameters. * @return Vector of fixed parameters with same ordering as in * Model::getFixedParameterIds */ - std::vector const& getFixedParameters() const; + std::vector const& get_fixed_parameters() const; /** * @brief Get value of fixed parameter with the specified ID. * @param par_id Parameter ID * @return Parameter value */ - realtype getFixedParameterById(std::string const& par_id) const; + realtype get_fixed_parameter_by_id(std::string const& par_id) const; /** * @brief Get value of fixed parameter with the specified name. @@ -511,20 +513,20 @@ class Model : public AbstractModel, public ModelDimensions { * @param par_name Parameter name * @return Parameter value */ - realtype getFixedParameterByName(std::string const& par_name) const; + realtype get_fixed_parameter_by_name(std::string const& par_name) const; /** * @brief Set values for constants. * @param k Vector of fixed parameters */ - void setFixedParameters(std::vector const& k); + void set_fixed_parameters(std::vector const& k); /** * @brief Set value of first fixed parameter with the specified ID. * @param par_id Fixed parameter id * @param value Fixed parameter value */ - void setFixedParameterById(std::string const& par_id, realtype value); + void set_fixed_parameter_by_id(std::string const& par_id, realtype value); /** * @brief Set values of all fixed parameters with the ID matching the @@ -533,7 +535,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param value Fixed parameter value * @return Number of fixed parameter IDs that matched the regex */ - int setFixedParametersByIdRegex( + int set_fixed_parameters_by_id_regex( std::string const& par_id_regex, realtype value ); @@ -542,7 +544,8 @@ class Model : public AbstractModel, public ModelDimensions { * @param par_name Fixed parameter ID * @param value Fixed parameter value */ - void setFixedParameterByName(std::string const& par_name, realtype value); + void + set_fixed_parameter_by_name(std::string const& par_name, realtype value); /** * @brief Set value of all fixed parameters with name matching the specified @@ -551,7 +554,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param value Fixed parameter value * @return Number of fixed parameter names that matched the regex */ - int setFixedParametersByNameRegex( + int set_fixed_parameters_by_name_regex( std::string const& par_name_regex, realtype value ); @@ -559,7 +562,7 @@ class Model : public AbstractModel, public ModelDimensions { * @brief Get the model name. * @return Model name */ - virtual std::string getName() const; + virtual std::string get_name() const; /** * @brief Report whether the model has parameter names set. @@ -567,13 +570,13 @@ class Model : public AbstractModel, public ModelDimensions { * @return Boolean indicating whether parameter names were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasParameterNames() const; + virtual bool has_parameter_names() const; /** * @brief Get names of the model parameters. * @return The parameter names */ - virtual std::vector getParameterNames() const; + virtual std::vector get_parameter_names() const; /** * @brief Report whether the model has state names set. @@ -581,155 +584,155 @@ class Model : public AbstractModel, public ModelDimensions { * @return Boolean indicating whether state names were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasStateNames() const; + virtual bool has_state_names() const; /** * @brief Get names of the model states. * @return State names */ - virtual std::vector getStateNames() const; + virtual std::vector get_state_names() const; /** * @brief Get names of the solver states. * @return State names */ - virtual std::vector getStateNamesSolver() const; + virtual std::vector get_state_names_solver() const; /** * @brief Report whether the model has fixed parameter names set. * @return Boolean indicating whether fixed parameter names were set. Also * returns `true` if the number of corresponding variables is just zero. */ - virtual bool hasFixedParameterNames() const; + virtual bool has_fixed_parameter_names() const; /** * @brief Get names of the fixed model parameters. * @return Fixed parameter names */ - virtual std::vector getFixedParameterNames() const; + virtual std::vector get_fixed_parameter_names() const; /** * @brief Report whether the model has observable names set. * @return Boolean indicating whether observable names were set. Also * returns `true` if the number of corresponding variables is just zero. */ - virtual bool hasObservableNames() const; + virtual bool has_observable_names() const; /** * @brief Get names of the observables. * @return Observable names */ - virtual std::vector getObservableNames() const; + virtual std::vector get_observable_names() const; /** * @brief Report whether the model has expression names set. * @return Boolean indicating whether expression names were set. Also * returns `true` if the number of corresponding variables is just zero. */ - virtual bool hasExpressionNames() const; + virtual bool has_expression_names() const; /** * @brief Get names of the expressions. * @return Expression names */ - virtual std::vector getExpressionNames() const; + virtual std::vector get_expression_names() const; /** * @brief Report whether the model has parameter IDs set. * @return Boolean indicating whether parameter IDs were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasParameterIds() const; + virtual bool has_parameter_ids() const; /** * @brief Get IDs of the model parameters. * @return Parameter IDs */ - virtual std::vector getParameterIds() const; + virtual std::vector get_parameter_ids() const; /** * @brief Report whether the model has state IDs set. * @return Boolean indicating whether state IDs were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasStateIds() const; + virtual bool has_state_ids() const; /** * @brief Get IDs of the model states. * @return State IDs */ - virtual std::vector getStateIds() const; + virtual std::vector get_state_ids() const; /** * @brief Get IDs of the solver states. * @return State IDs */ - virtual std::vector getStateIdsSolver() const; + virtual std::vector get_state_ids_solver() const; /** * @brief Report whether the model has fixed parameter IDs set. * @return Boolean indicating whether fixed parameter IDs were set. Also * returns `true` if the number of corresponding variables is just zero. */ - virtual bool hasFixedParameterIds() const; + virtual bool has_fixed_parameter_ids() const; /** * @brief Get IDs of the fixed model parameters. * @return Fixed parameter IDs */ - virtual std::vector getFixedParameterIds() const; + virtual std::vector get_fixed_parameter_ids() const; /** * @brief Report whether the model has observable IDs set. * @return Boolean indicating whether observable ids were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasObservableIds() const; + virtual bool has_observable_ids() const; /** * @brief Get IDs of the observables. * @return Observable IDs */ - virtual std::vector getObservableIds() const; + virtual std::vector get_observable_ids() const; /** * @brief Report whether the model has expression IDs set. * @return Boolean indicating whether expression ids were set. Also returns * `true` if the number of corresponding variables is just zero. */ - virtual bool hasExpressionIds() const; + virtual bool has_expression_ids() const; /** * @brief Get IDs of the expression. * @return Expression IDs */ - virtual std::vector getExpressionIds() const; + virtual std::vector get_expression_ids() const; /** - * @brief Checks whether the defined noise model is gaussian, i.e., the nllh + * @brief Checks whether the defined noise model is Gaussian, i.e., the nllh * is quadratic * @return boolean flag */ - virtual bool hasQuadraticLLH() const; + virtual bool has_quadratic_llh() const; /** * @brief Get the timepoint vector. * @return Timepoint vector */ - std::vector const& getTimepoints() const; + std::vector const& get_timepoints() const; /** * @brief Get simulation timepoint for time index `it`. * @param it Time index * @return Timepoint */ - realtype getTimepoint(int it) const; + realtype get_timepoint(int it) const; /** * @brief Set the timepoint vector. * @param ts New timepoint vector */ - void setTimepoints(std::vector const& ts); + void set_timepoints(std::vector const& ts); /** * @brief Get simulation start time. @@ -747,13 +750,13 @@ class Model : public AbstractModel, public ModelDimensions { * @param t0 Simulation start time */ - void setT0(double t0); + void set_t0(double t0); /** * @brief Get the initial time to use for pre-equilibration. * @return Initial time, or NAN to use the model's t0. */ - double t0Preeq() const; + double t0_preeq() const; /** * @brief Set the initial time to use for pre-equilibration. @@ -761,42 +764,42 @@ class Model : public AbstractModel, public ModelDimensions { * @param t0_preeq The initial time for pre-equilibration or NAN to use the * model's t0. */ - void setT0Preeq(double t0_preeq); + void set_t0_preeq(double t0_preeq); /** * @brief Get flags indicating whether states should be treated as * non-negative. * @return Vector of flags */ - std::vector const& getStateIsNonNegative() const; + std::vector const& get_state_is_non_negative() const; /** * @brief Set flags indicating whether states should be treated as * non-negative. * @param stateIsNonNegative Vector of flags */ - void setStateIsNonNegative(std::vector const& stateIsNonNegative); + void set_state_is_non_negative(std::vector const& stateIsNonNegative); /** * @brief Set flags indicating that all states should be treated as * non-negative. */ - void setAllStatesNonNegative(); + void set_all_states_non_negative(); /** * @brief Get the current model state. * @return Current model state */ - ModelState const& getModelState() const { return state_; } + ModelState const& get_model_state() const { return state_; } /** * @brief Set the current model state. * @param state Model state */ - void setModelState(ModelState const& state) { - if (gsl::narrow(state.unscaledParameters.size()) != np()) + void set_model_state(ModelState const& state) { + if (gsl::narrow(state.unscaled_parameters.size()) != np()) throw AmiException("Mismatch in parameter size"); - if (gsl::narrow(state.fixedParameters.size()) != nk()) + if (gsl::narrow(state.fixed_parameters.size()) != nk()) throw AmiException("Mismatch in fixed parameter size"); if (gsl::narrow(state.h.size()) != ne) throw AmiException("Mismatch in Heaviside size"); @@ -813,7 +816,7 @@ class Model : public AbstractModel, public ModelDimensions { * ensure that log(sigma) + min_sigma > 0. * @param min_sigma lower boundary */ - void setMinimumSigmaResiduals(double const min_sigma) { + void set_minimum_sigma_residuals(double const min_sigma) { min_sigma_ = min_sigma; } @@ -821,7 +824,7 @@ class Model : public AbstractModel, public ModelDimensions { * @brief Gets the specified estimated lower boundary for sigma_y. * @return lower boundary */ - [[nodiscard]] realtype getMinimumSigmaResiduals() const { + [[nodiscard]] realtype get_minimum_sigma_residuals() const { return min_sigma_; } @@ -837,20 +840,22 @@ class Model : public AbstractModel, public ModelDimensions { * * @param sigma_res if true, additional residuals are added */ - void setAddSigmaResiduals(bool const sigma_res) { sigma_res_ = sigma_res; } + void set_add_sigma_residuals(bool const sigma_res) { + sigma_res_ = sigma_res; + } /** * @brief Checks whether residuals should be added to account for parameter * dependent sigma. * @return sigma_res */ - bool getAddSigmaResiduals() const { return sigma_res_; } + bool get_add_sigma_residuals() const { return sigma_res_; } /** * @brief Get the list of parameters for which sensitivities are computed. * @return List of parameter indices */ - std::vector const& getParameterList() const; + std::vector const& get_parameter_list() const; /** * @brief Get entry in parameter list by index. @@ -867,39 +872,41 @@ class Model : public AbstractModel, public ModelDimensions { * * @param plist List of parameter indices */ - void setParameterList(std::vector const& plist); + void set_parameter_list(std::vector const& plist); /** * @brief Get the initial state. * @param t0 Custom t0 for which to get initial states. * @return Initial state vector, before any events are executed. */ - std::vector getInitialStates(realtype t0); + std::vector get_initial_state(realtype t0); /** * @brief Get the initial state for Model::t0()`. * @return Initial state vector, before any events are executed. */ - std::vector getInitialStates() { return getInitialStates(t0()); } + std::vector get_initial_state() { + return get_initial_state(t0()); + } /** * @brief Set the pre-event initial state. * @param x0 Initial state vector */ - void setInitialStates(std::vector const& x0); + void set_initial_state(std::vector const& x0); /** * @brief Return whether custom initial state have been set. * @return `true` if has custom initial state, otherwise `false` */ - [[nodiscard]] bool hasCustomInitialStates() const; + [[nodiscard]] bool has_custom_initial_state() const; /** * @brief Get the initial state sensitivities. * @return vector of initial state sensitivities */ - std::vector getInitialStateSensitivities() { - return getInitialStateSensitivities(t0()); + std::vector get_initial_state_sensitivities() { + return get_initial_state_sensitivities(t0()); } /** @@ -907,71 +914,72 @@ class Model : public AbstractModel, public ModelDimensions { * @param t0 Custom t0 for which to get initial states. * @return vector of initial state sensitivities */ - std::vector getInitialStateSensitivities(realtype t0); + std::vector get_initial_state_sensitivities(realtype t0); /** * @brief Set the initial state sensitivities. - * @param sx0 vector of initial state sensitivities with chainrule applied. + * @param sx0 vector of initial state sensitivities with chain rule applied. * This could be a slice of ReturnData::sx or ReturnData::sx0 */ - void setInitialStateSensitivities(std::vector const& sx0); + void set_initial_state_sensitivities(std::vector const& sx0); /** * @brief Return whether custom initial state sensitivities have been set. * @return `true` if has custom initial state sensitivities, otherwise * `false`. */ - bool hasCustomInitialStateSensitivities() const; + bool has_custom_initial_state_sensitivities() const; /** * @brief Set the initial state sensitivities. - * @param sx0 Vector of initial state sensitivities without chainrule - * applied. This could be the readin from a `model.sx0data` saved to HDF5. + * @param sx0 Vector of initial state sensitivities without chain rule + * applied. This could be the read-in from a `model.sx0data` saved to HDF5. */ - void setUnscaledInitialStateSensitivities(std::vector const& sx0); + void + set_unscaled_initial_state_sensitivities(std::vector const& sx0); /** - * @brief Set the mode how steady state is computed in the steadystate + * @brief Set the mode how steady state is computed in the steady state * simulation. - * @param mode Steadystate computation mode + * @param mode Steady state computation mode */ - void setSteadyStateComputationMode(SteadyStateComputationMode mode); + void set_steady_state_computation_mode(SteadyStateComputationMode mode); /** * @brief Gets the mode how steady state is computed in the steadystate * simulation. * @return Mode */ - SteadyStateComputationMode getSteadyStateComputationMode() const; + SteadyStateComputationMode get_steady_state_computation_mode() const; /** - * @brief Set the mode how sensitivities are computed in the steadystate + * @brief Set the mode how sensitivities are computed in the steady-state * simulation. - * @param mode Steadystate sensitivity mode + * @param mode Steady-state sensitivity mode */ - void setSteadyStateSensitivityMode(SteadyStateSensitivityMode mode); + void set_steady_state_sensitivity_mode(SteadyStateSensitivityMode mode); /** - * @brief Gets the mode how sensitivities are computed in the steadystate + * @brief Gets the mode how sensitivities are computed in the steady-state * simulation. * @return Mode */ [[nodiscard]] SteadyStateSensitivityMode - getSteadyStateSensitivityMode() const; + get_steady_state_sensitivity_mode() const; /** * @brief Set whether initial states depending on fixed parameters are to be * reinitialized after preequilibration and presimulation. * @param flag Fixed parameters reinitialized? */ - void setReinitializeFixedParameterInitialStates(bool flag); + void set_reinitialize_fixed_parameter_initial_states(bool flag); /** * @brief Get whether initial states depending on fixedParameters are to be * reinitialized after preequilibration and presimulation. * @return flag `true` / `false` */ - [[nodiscard]] bool getReinitializeFixedParameterInitialStates() const; + [[nodiscard]] bool get_reinitialize_fixed_parameter_initial_states() const; /** * @brief Require computation of sensitivities for all parameters p [0..np[ @@ -979,7 +987,7 @@ class Model : public AbstractModel, public ModelDimensions { * * NOTE: Resets initial state sensitivities. */ - void requireSensitivitiesForAllParameters(); + void require_sensitivities_for_all_parameters(); /** * @brief Get time-resolved `w`. @@ -987,7 +995,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Current timepoint * @param x Current state */ - void getExpression(gsl::span w, realtype t, AmiVector const& x); + void get_expression(gsl::span w, realtype t, AmiVector const& x); /** * @brief Get time-resolved observables. @@ -995,14 +1003,15 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Current timepoint * @param x Current state */ - void getObservable(gsl::span y, realtype t, AmiVector const& x); + void get_observable(gsl::span y, realtype t, AmiVector const& x); /** * @brief Get scaling type for observable * @param iy observable index * @return scaling type */ - [[nodiscard]] virtual ObservableScaling getObservableScaling(int iy) const; + [[nodiscard]] virtual ObservableScaling + get_observable_scaling(int iy) const; /** * @brief Get sensitivity of time-resolved observables. @@ -1014,7 +1023,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param sx State sensitivities */ - void getObservableSensitivity( + void get_observable_sensitivity( gsl::span sy, realtype t, AmiVector const& x, AmiVectorArray const& sx ); @@ -1026,7 +1035,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param edata Pointer to experimental data instance (optional, pass * `nullptr` to ignore) */ - void getObservableSigma( + void get_observable_sigma( gsl::span sigmay, int it, ExpData const* edata ); @@ -1041,7 +1050,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param edata Pointer to experimental data instance (optional, pass * `nullptr` to ignore) */ - void getObservableSigmaSensitivity( + void get_observable_sigma_sensitivity( gsl::span ssigmay, gsl::span sy, int it, ExpData const* edata ); @@ -1053,7 +1062,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void addObservableObjective( + void add_observable_objective( realtype& Jy, int it, AmiVector const& x, ExpData const& edata ); @@ -1068,7 +1077,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param sx State sensitivities * @param edata Experimental data */ - void addObservableObjectiveSensitivity( + void add_observable_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int it, AmiVector const& x, AmiVectorArray const& sx, ExpData const& edata ); @@ -1086,13 +1095,13 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void addPartialObservableObjectiveSensitivity( + void add_partial_observable_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int it, AmiVector const& x, ExpData const& edata ); /** - * @brief Get state sensitivity of the negative loglikelihood \f$ Jy \f$, + * @brief Get state sensitivity of the negative log-likelihood \f$ Jy \f$, * partial derivative (to be used with adjoint sensitivities). * * @param dJydx Output buffer (shape `nJ` x `nx_solver`, row-major) @@ -1100,7 +1109,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data instance */ - void getAdjointStateObservableUpdate( + void get_adjoint_state_observable_update( gsl::span dJydx, int it, AmiVector const& x, ExpData const& edata ); @@ -1113,7 +1122,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables */ void - getEvent(gsl::span z, int ie, realtype t, AmiVector const& x); + get_event(gsl::span z, int ie, realtype t, AmiVector const& x); /** * @brief Get sensitivities of event-resolved observables. * @@ -1125,7 +1134,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param sx State sensitivities */ - void getEventSensitivity( + void get_event_sensitivity( gsl::span sz, int ie, realtype t, AmiVector const& x, AmiVectorArray const& sx ); @@ -1138,7 +1147,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param sz Output buffer (shape `nz x nplist`, row-major) * @param ie Event index */ - void getUnobservedEventSensitivity(gsl::span sz, int ie); + void get_unobserved_event_sensitivity(gsl::span sz, int ie); /** * @brief Get regularization for event-resolved observables. @@ -1147,7 +1156,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Timepoint * @param x State variables */ - void getEventRegularization( + void get_event_regularization( gsl::span rz, int ie, realtype t, AmiVector const& x ); @@ -1163,7 +1172,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param sx State sensitivities */ - void getEventRegularizationSensitivity( + void get_event_regularization_sensitivity( gsl::span srz, int ie, realtype t, AmiVector const& x, AmiVectorArray const& sx ); @@ -1176,7 +1185,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param edata Pointer to experimental data (optional, pass * `nullptr` to ignore) */ - void getEventSigma( + void get_event_sigma( gsl::span sigmaz, int ie, int nroots, realtype t, ExpData const* edata ); @@ -1194,7 +1203,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param edata Pointer to experimental data (optional, pass * `nullptr` to ignore) */ - void getEventSigmaSensitivity( + void get_event_sigma_sensitivity( gsl::span ssigmaz, int ie, int nroots, realtype t, ExpData const* edata ); @@ -1208,7 +1217,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void addEventObjective( + void add_event_objective( realtype& Jz, int ie, int nroots, realtype t, AmiVector const& x, ExpData const& edata ); @@ -1222,7 +1231,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void addEventObjectiveRegularization( + void add_event_objective_regularization( realtype& Jrz, int ie, int nroots, realtype t, AmiVector const& x, ExpData const& edata ); @@ -1243,7 +1252,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param sx State sensitivities * @param edata Experimental data */ - void addEventObjectiveSensitivity( + void add_event_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int ie, int nroots, realtype t, AmiVector const& x, AmiVectorArray const& sx, ExpData const& edata @@ -1264,13 +1273,13 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void addPartialEventObjectiveSensitivity( + void add_partial_event_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int ie, int nroots, realtype t, AmiVector const& x, ExpData const& edata ); /** - * @brief State sensitivity of the negative loglikelihood \f$ Jz \f$. + * @brief State sensitivity of the negative log-likelihood \f$ Jz \f$. * * Partial derivative (to be used with adjoint sensitivities). * @@ -1281,7 +1290,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x State variables * @param edata Experimental data */ - void getAdjointStateEventUpdate( + void get_adjoint_state_event_update( gsl::span dJzdx, int ie, int nroots, realtype t, AmiVector const& x, ExpData const& edata ); @@ -1298,7 +1307,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param sx State sensitivities * @param dx Current derivative of state (DAE only) */ - void getEventTimeSensitivity( + void get_event_time_sensitivity( std::vector& stau, realtype t, int ie, AmiVector const& x, AmiVectorArray const& sx, AmiVector const& dx ); @@ -1313,7 +1322,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x_old Current or old state from which to compute the state update * @param state The model state based on which to compute the update. */ - void addStateEventUpdate( + void add_state_event_update( AmiVector& x, int ie, realtype t, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, ModelState const& state @@ -1332,7 +1341,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param stau Timepoint sensitivity, to be computed with * `Model::getEventTimeSensitivity` */ - void addStateSensitivityEventUpdate( + void add_state_sensitivity_event_update( AmiVectorArray& sx, int ie, realtype t, AmiVector const& x, AmiVector const& x_old, AmiVector const& xdot, AmiVector const& xdot_old, AmiVectorArray const& sx_old, @@ -1350,7 +1359,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x_old Pre-event state * @param dx Current derivative of state (DAE only) */ - void addAdjointStateEventUpdate( + void add_adjoint_state_event_update( AmiVector& xB, int ie, realtype t, AmiVector const& x, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, AmiVector const& dx @@ -1368,7 +1377,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param x_old Pre-event state * @param dx Current derivative of state (DAE only) */ - void addAdjointQuadratureEventUpdate( + void add_adjoint_quadrature_event_update( AmiVector& xQB, int ie, realtype t, AmiVector const& x, AmiVector const& xB, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, AmiVector const& dx @@ -1381,7 +1390,7 @@ class Model : public AbstractModel, public ModelDimensions { * it will give the right update to the Heaviside variables (zero if no root * was found) */ - void updateHeaviside(std::vector const& rootsfound); + void update_heaviside(std::vector const& rootsfound); /** * @brief Check if the given array has only finite elements. @@ -1393,7 +1402,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Current timepoint * @return */ - int checkFinite( + int check_finite( gsl::span array, ModelQuantity model_quantity, realtype t ) const; @@ -1408,7 +1417,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param t Current timepoint * @return */ - int checkFinite( + int check_finite( gsl::span array, ModelQuantity model_quantity, size_t num_cols, realtype t ) const; @@ -1424,21 +1433,21 @@ class Model : public AbstractModel, public ModelDimensions { * @return */ int - checkFinite(SUNMatrix m, ModelQuantity model_quantity, realtype t) const; + check_finite(SUNMatrix m, ModelQuantity model_quantity, realtype t) const; /** * @brief Set whether the result of every call to `Model::f*` should be * checked for finiteness. * @param alwaysCheck */ - void setAlwaysCheckFinite(bool alwaysCheck); + void set_always_check_finite(bool alwaysCheck); /** * @brief Get setting of whether the result of every call to `Model::f*` * should be checked for finiteness. * @return that */ - [[nodiscard]] bool getAlwaysCheckFinite() const; + [[nodiscard]] bool get_always_check_finite() const; /** * @brief Compute/get pre-event initial state. @@ -1510,14 +1519,15 @@ class Model : public AbstractModel, public ModelDimensions { * constants / fixed parameters * @param idxs Array of state indices */ - void setReinitializationStateIdxs(std::vector const& idxs); + void set_reinitialization_state_idxs(std::vector const& idxs); /** * @brief Return indices of states to be reinitialized based on provided * constants / fixed parameters * @return Those indices. */ - [[nodiscard]] std::vector const& getReinitializationStateIdxs() const; + [[nodiscard]] std::vector const& + get_reinitialization_state_idxs() const; /** * @brief getter for dxdotdp @@ -1591,23 +1601,38 @@ class Model : public AbstractModel, public ModelDimensions { } /** - * Flag indicating whether for - * `amici::Solver::sensi_` == `amici::SensitivityOrder::second` + * @brief Get flag array for DAE equations + * @return Flag array for DAE equations + */ + std::vector const& get_id_list() const { return id_list_; } + + /** + * @brief Get second-order sensitivity mode. + * @return Flag indicating whether for `SensitivityOrder::second` * directional or full second order derivative will be computed */ - SecondOrderMode o2mode{SecondOrderMode::none}; + SecondOrderMode get_second_order_mode() const { return o2_mode_; } - /** Flag array for DAE equations */ - std::vector idlist; + /** + * @brief Get the logger. + * @return Logger pointer or nullptr. + */ + Logger* get_logger() const { return logger_; } - /** Logger */ - Logger* logger = nullptr; + /** + * @brief Set the logger. + * @param logger Logger pointer or nullptr. + */ + void set_logger(Logger* logger) { logger_ = logger; } /** - * @brief Map of trigger timepoints to event indices for events that don't - * require root-finding. + * @brief Get map of trigger timepoints to event indices for events that + * don't require root-finding. + * @return Map of trigger timepoints to event indices */ - std::map> explicit_roots_ = {}; + std::map> const& get_explicit_roots() const { + return explicit_roots_; + } protected: /** @@ -1617,7 +1642,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param buffer Output data slice * @param ie Event index */ - void writeSliceEvent( + void write_slice_event( gsl::span slice, gsl::span buffer, int ie ); @@ -1628,7 +1653,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param buffer output data slice * @param ie event index */ - void writeSensitivitySliceEvent( + void write_sensitivity_slice_event( gsl::span slice, gsl::span buffer, int ie ); @@ -1639,7 +1664,7 @@ class Model : public AbstractModel, public ModelDimensions { * @param sllh First order buffer * @param s2llh Second order buffer */ - void writeLLHSensitivitySlice( + void write_llh_sensitivity_slice( std::vector const& dLLhdp, std::vector& sllh, std::vector& s2llh ); @@ -1649,14 +1674,14 @@ class Model : public AbstractModel, public ModelDimensions { * @param sllh first order buffer * @param s2llh second order buffer */ - void checkLLHBufferSize( + void check_llh_buffer_size( std::vector const& sllh, std::vector const& s2llh ) const; /** * @brief Set the nplist-dependent vectors to their proper sizes. */ - void initializeVectors(); + void initialize_vectors(); /** * @brief Compute observables / measurements. @@ -2059,7 +2084,7 @@ class Model : public AbstractModel, public ModelDimensions { * @return State vector with negative values replaced by `0` according to * stateIsNonNegative */ - const_N_Vector computeX_pos(const_N_Vector x); + const_N_Vector compute_x_pos(const_N_Vector x); /** * @brief Compute non-negative state vector. @@ -2074,7 +2099,7 @@ class Model : public AbstractModel, public ModelDimensions { * @return State vector with negative values replaced by `0` according to * stateIsNonNegative */ - realtype const* computeX_pos(AmiVector const& x); + realtype const* compute_x_pos(AmiVector const& x); /** All variables necessary for function evaluation */ ModelState state_; @@ -2134,6 +2159,16 @@ class Model : public AbstractModel, public ModelDimensions { realtype min_sigma_{50.0}; private: + /** + * Flag indicating whether for + * `amici::Solver::sensi_` == `amici::SensitivityOrder::second` + * directional or full second order derivative will be computed + */ + SecondOrderMode o2_mode_{SecondOrderMode::none}; + + /** Flag array for DAE equations */ + std::vector id_list_; + /** Simulation parameters, initial state, etc. */ SimulationParameters simulation_parameters_; @@ -2148,6 +2183,15 @@ class Model : public AbstractModel, public ModelDimensions { /** The events encoded in this model. */ std::vector events_; + + /** Logger */ + Logger* logger_ = nullptr; + + /** + * @brief Map of trigger timepoints to event indices for events that don't + * require root-finding. + */ + std::map> explicit_roots_ = {}; }; bool operator==(Model const& a, Model const& b); diff --git a/include/amici/model_dae.h b/include/amici/model_dae.h index 91a5653396..b3407a0d95 100644 --- a/include/amici/model_dae.h +++ b/include/amici/model_dae.h @@ -299,7 +299,7 @@ class Model_DAE : public Model { void fdxdotdp( realtype const t, AmiVector const& x, AmiVector const& dx ) override { - fdxdotdp(t, x.getNVector(), dx.getNVector()); + fdxdotdp(t, x.get_nvector(), dx.get_nvector()); } void fsxdot( @@ -329,7 +329,7 @@ class Model_DAE : public Model { */ void fM(realtype t, const_N_Vector x); - std::unique_ptr getSolver() override; + std::unique_ptr create_solver() override; protected: /** diff --git a/include/amici/model_ode.h b/include/amici/model_ode.h index 45115aee1e..6866d68e8d 100644 --- a/include/amici/model_ode.h +++ b/include/amici/model_ode.h @@ -276,7 +276,7 @@ class Model_ODE : public Model { realtype t, const_N_Vector x, int ip, const_N_Vector sx, N_Vector sxdot ); - std::unique_ptr getSolver() override; + std::unique_ptr create_solver() override; protected: /** @@ -339,7 +339,8 @@ class Model_ODE : public Model { ) = 0; /** - * @brief Model specific implementation of fdxdotdp_explicit, no w chainrule + * @brief Model specific implementation of fdxdotdp_explicit, no w chain + * rule * @param dxdotdp_explicit partial derivative xdot wrt p * @param t timepoint * @param x Vector with the states @@ -367,14 +368,14 @@ class Model_ODE : public Model { virtual void fdxdotdp_explicit_rowvals(SUNMatrixWrapper& dxdotdp); /** - * @brief Model specific implementation of fdxdotdx_explicit, no w chainrule - * (Py) + * @brief Model specific implementation of fdxdotdx_explicit, no w chain + * rule * @param dxdotdx_explicit partial derivative xdot wrt x * @param t timepoint * @param x Vector with the states * @param p parameter vector * @param k constants vector - * @param h heavyside vector + * @param h heaviside vector * @param w vector with helper variables */ virtual void fdxdotdx_explicit( diff --git a/include/amici/model_state.h b/include/amici/model_state.h index ee566d862c..fd45149e46 100644 --- a/include/amici/model_state.h +++ b/include/amici/model_state.h @@ -27,8 +27,8 @@ struct ModelState { h.resize(dim.ne, 0.0); total_cl.resize(dim.nx_rdata - dim.nx_solver, 0.0); stotal_cl.resize((dim.nx_rdata - dim.nx_solver) * dim.np, 0.0); - unscaledParameters.resize(dim.np); - fixedParameters.resize(dim.nk); + unscaled_parameters.resize(dim.np); + fixed_parameters.resize(dim.nk); } /** @@ -46,10 +46,10 @@ struct ModelState { std::vector stotal_cl; /** Unscaled parameters (dimension: `np`) */ - std::vector unscaledParameters; + std::vector unscaled_parameters; /** Constants (dimension: `nk`) */ - std::vector fixedParameters; + std::vector fixed_parameters; /** * Indexes of parameters wrt to which sensitivities are computed @@ -61,8 +61,8 @@ struct ModelState { inline bool operator==(ModelState const& a, ModelState const& b) { return is_equal(a.h, b.h) && is_equal(a.total_cl, b.total_cl) && is_equal(a.stotal_cl, b.stotal_cl) - && is_equal(a.unscaledParameters, b.unscaledParameters) - && is_equal(a.fixedParameters, b.fixedParameters) + && is_equal(a.unscaled_parameters, b.unscaled_parameters) + && is_equal(a.fixed_parameters, b.fixed_parameters) && a.plist == b.plist; } @@ -82,7 +82,7 @@ struct ModelStateDerived { explicit ModelStateDerived(ModelDimensions const& dim); /** - * Copy constructor + * @brief Copy constructor * * @param other ModelStateDerived object to copy */ diff --git a/include/amici/newton_solver.h b/include/amici/newton_solver.h index a420fd23f9..1331ae90ae 100644 --- a/include/amici/newton_solver.h +++ b/include/amici/newton_solver.h @@ -17,7 +17,7 @@ class AmiVector; * of differential equation system. * * It's intended to passing around the current state of a system while - * avoiding repetetive argument passing in function signatures. + * avoiding repetitive argument passing in function signatures. */ struct DEStateView { /** @@ -90,7 +90,7 @@ class NewtonSolver { * @param model the model instance * @param state current simulation state */ - void getStep(AmiVector& delta, Model& model, DEStateView const& state); + void get_step(AmiVector& delta, Model& model, DEStateView const& state); /** * @brief Computes steady state sensitivities @@ -99,7 +99,7 @@ class NewtonSolver { * @param model the model instance * @param state current simulation state */ - void computeNewtonSensis( + void compute_newton_sensis( AmiVectorArray& sx, Model& model, DEStateView const& state ); @@ -110,7 +110,7 @@ class NewtonSolver { * @param model the model instance * @param state current simulation state */ - void prepareLinearSystem(Model& model, DEStateView const& state); + void prepare_linear_system(Model& model, DEStateView const& state); /** * Writes the Jacobian (JB) for the Newton iteration and passes it to the @@ -119,7 +119,7 @@ class NewtonSolver { * @param model the model instance * @param state current simulation state */ - void prepareLinearSystemB(Model& model, DEStateView const& state); + void prepare_linear_system_b(Model& model, DEStateView const& state); /** * @brief Solves the linear system for the Newton step @@ -127,7 +127,7 @@ class NewtonSolver { * @param rhs containing the RHS of the linear system, will be * overwritten by solution to the linear system */ - void solveLinearSystem(AmiVector& rhs); + void solve_linear_system(AmiVector& rhs); /** * @brief Reinitialize the linear solver diff --git a/include/amici/rdata.h b/include/amici/rdata.h index 145d9b378a..881e6fdf6e 100644 --- a/include/amici/rdata.h +++ b/include/amici/rdata.h @@ -16,7 +16,7 @@ class Solver; class ExpData; class ForwardProblem; class BackwardProblem; -class SteadystateProblem; +class SteadyStateProblem; class SteadyStateBackwardProblem; } // namespace amici @@ -85,7 +85,7 @@ class ReturnData : public ModelDimensions { * @param solver matching solver instance * @param edata matching experimental data */ - void processSimulationObjects( + void process_simulation_objects( ForwardProblem const* fwd, BackwardProblem const* bwd, Model& model, Solver const& solver, ExpData const* edata ); @@ -243,30 +243,30 @@ class ReturnData : public ModelDimensions { * Cumulative number of integration steps for the backward problem for each * output timepoint in `ReturnData::ts` (shape `nt`). */ - std::vector numstepsB; + std::vector numsteps_b; /** Number of right hand side evaluations forward problem (shape `nt`) */ - std::vector numrhsevals; + std::vector num_rhs_evals; /** Number of right hand side evaluations backward problem (shape `nt`) */ - std::vector numrhsevalsB; + std::vector num_rhs_evals_b; /** Number of error test failures forward problem (shape `nt`) */ - std::vector numerrtestfails; + std::vector num_err_test_fails; /** Number of error test failures backward problem (shape `nt`) */ - std::vector numerrtestfailsB; + std::vector num_err_test_fails_b; /** * Number of linear solver convergence failures forward problem (shape `nt`) */ - std::vector numnonlinsolvconvfails; + std::vector num_non_lin_solv_conv_fails; /** * Number of linear solver convergence failures backward problem (shape * `nt`) */ - std::vector numnonlinsolvconvfailsB; + std::vector num_non_lin_solv_conv_fails_b; /** Employed order forward problem (shape `nt`) */ std::vector order; @@ -291,7 +291,7 @@ class ReturnData : public ModelDimensions { * may be incorrect. * */ - double cpu_timeB = 0.0; + double cpu_time_b = 0.0; /** * @brief Total CPU time from entering runAmiciSimulation until exiting [ms] @@ -329,7 +329,7 @@ class ReturnData : public ModelDimensions { * may be incorrect. * */ - double preeq_cpu_timeB = 0.0; + double preeq_cpu_time_b = 0.0; /** Flags indicating success of steady-state solver (postequilibration) */ std::vector posteq_status; @@ -356,7 +356,7 @@ class ReturnData : public ModelDimensions { * may be incorrect. * */ - double posteq_cpu_timeB = 0.0; + double posteq_cpu_time_b = 0.0; /** * @brief Number of Newton steps for pre-equilibration. @@ -369,7 +369,7 @@ class ReturnData : public ModelDimensions { * Number of simulation steps for adjoint pre-equilibration problem * [== 0 if analytical solution worked, > 0 otherwise] */ - int preeq_numstepsB = 0; + int preeq_numsteps_b = 0; /** * Number of Newton steps for post-equilibration @@ -381,7 +381,7 @@ class ReturnData : public ModelDimensions { * Number of simulation steps for the post-equilibration backward simulation * [== 0 if analytical solution worked, > 0 otherwise] */ - int posteq_numstepsB = 0; + int posteq_numsteps_b = 0; /** * Model time at which the pre-equilibration steady state was reached via @@ -539,7 +539,7 @@ class ReturnData : public ModelDimensions { * @param quadratic_llh whether model defines a quadratic nllh and computing * res, sres and FIM makes sense. */ - void initializeLikelihoodReporting(bool quadratic_llh); + void initialize_likelihood_reporting(bool quadratic_llh); /** * @brief initializes storage for observables + likelihood reporting mode @@ -552,40 +552,40 @@ class ReturnData : public ModelDimensions { * @brief initializes storage for residual reporting mode * @param enable_res whether residuals are to be computed */ - void initializeResidualReporting(bool enable_res); + void initialize_residual_reporting(bool enable_res); /** * @brief initializes storage for full reporting mode * @param enable_fim whether FIM Hessian approximation is to be computed */ - void initializeFullReporting(bool enable_fim); + void initialize_full_reporting(bool enable_fim); /** * @brief initialize values for chi2 and llh and derivatives * @param enable_chi2 whether chi2 values are to be computed */ - void initializeObjectiveFunction(bool enable_chi2); + void initialize_objective_function(bool enable_chi2); /** - * @brief extracts data from a preequilibration SteadystateProblem - * @param preeq SteadystateProblem for preequilibration - * @param preeq_bwd SteadyStateBackwardProblem from preequilibration + * @brief extracts data from a pre-equilibration SteadystateProblem + * @param preeq SteadystateProblem for pre-equilibration + * @param preeq_bwd SteadyStateBackwardProblem from pre-equilibration * @param model Model instance to compute return values */ - void processPreEquilibration( - SteadystateProblem const& preeq, + void process_pre_equilibration( + SteadyStateProblem const& preeq, SteadyStateBackwardProblem const* preeq_bwd, Model& model ); /** - * @brief extracts data from a preequilibration SteadystateProblem - * @param posteq SteadystateProblem for postequilibration - * @param posteq_bwd SteadyStateBackwardProblem from postequilibration + * @brief extracts data from a post-equilibration SteadystateProblem + * @param posteq SteadystateProblem for post-equilibration + * @param posteq_bwd SteadyStateBackwardProblem from post-equilibration * @param model Model instance to compute return values * @param edata ExpData instance containing observable data */ - void processPostEquilibration( - SteadystateProblem const& posteq, + void process_post_equilibration( + SteadyStateProblem const& posteq, SteadyStateBackwardProblem const* posteq_bwd, Model& model, ExpData const* edata ); @@ -596,7 +596,7 @@ class ReturnData : public ModelDimensions { * @param model model that was used for forward simulation * @param edata ExpData instance containing observable data */ - void processForwardProblem( + void process_forward_problem( ForwardProblem const& fwd, Model& model, ExpData const* edata ); @@ -608,9 +608,9 @@ class ReturnData : public ModelDimensions { * @param preeq_bwd SteadyStateBackwardProblem for preequilibration * @param model model that was used for forward/backward simulation */ - void processBackwardProblem( + void process_backward_problem( ForwardProblem const& fwd, BackwardProblem const& bwd, - SteadystateProblem const* preeq, + SteadyStateProblem const* preeq, SteadyStateBackwardProblem const* preeq_bwd, Model& model ); @@ -618,7 +618,7 @@ class ReturnData : public ModelDimensions { * @brief extracts results from solver * @param solver solver that was used for forward/backward simulation */ - void processSolver(Solver const& solver); + void process_solver(Solver const& solver); /** * @brief Evaluates and stores the Jacobian and right hand side at final @@ -627,10 +627,9 @@ class ReturnData : public ModelDimensions { * @param model model that was used for forward/backward simulation */ template - void - storeJacobianAndDerivativeInReturnData(T const& problem, Model& model) { - auto const& simulation_state = problem.getFinalSimulationState(); - model.setModelState(simulation_state.mod); + void store_jacobian_and_derivative(T const& problem, Model& model) { + auto const& simulation_state = problem.get_final_simulation_state(); + model.set_model_state(simulation_state.mod); auto const& sol = simulation_state.sol; sundials::Context sunctx; AmiVector xdot(nx_solver, sunctx); @@ -638,7 +637,7 @@ class ReturnData : public ModelDimensions { model.fxdot(sol.t, sol.x, sol.dx, xdot); if (!this->xdot.empty()) - writeSlice(xdot, this->xdot); + write_slice(xdot, this->xdot); if (!this->J.empty()) { SUNMatrixWrapper J(nx_solver, nx_solver, sunctx); @@ -699,26 +698,26 @@ class ReturnData : public ModelDimensions { * @brief Set likelihood and chi2 to NaN * (typically after integration failure) */ - void invalidateLLH(); + void invalidate_llh(); /** * @brief Set likelihood sensitivities to NaN * (typically after integration failure) */ - void invalidateSLLH(); + void invalidate_sllh(); /** * @brief applies the chain rule to account for parameter transformation in * the sensitivities of simulation results * @param model Model from which the ReturnData was obtained */ - void applyChainRuleFactorToSimulationResults(Model const& model); + void apply_chain_rule_factor_to_simulation_results(Model const& model); /** * @brief Checks whether forward sensitivity analysis is performed * @return boolean indicator */ - [[nodiscard]] bool computingFSA() const { + [[nodiscard]] bool computing_fsa() const { return ( sensi_meth == SensitivityMethod::forward && sensi >= SensitivityOrder::first @@ -733,7 +732,7 @@ class ReturnData : public ModelDimensions { * @param sol solution state the timepoint `it` * @param edata ExpData instance carrying experimental data */ - void getDataOutput( + void get_data_output( int it, Model& model, SolutionState const& sol, ExpData const* edata ); @@ -745,7 +744,7 @@ class ReturnData : public ModelDimensions { * @param sol Solution state the timepoint `it` * @param edata ExpData instance carrying experimental data */ - void getDataSensisFSA( + void get_data_sensis_fsa( int it, Model& model, SolutionState const& sol, ExpData const* edata ); @@ -758,7 +757,7 @@ class ReturnData : public ModelDimensions { * @param sol Solution state the timepoint `it` * @param edata ExpData instance carrying experimental data */ - void getEventOutput( + void get_event_output( std::vector const& rootidx, Model& model, SolutionState const& sol, ExpData const* edata ); @@ -771,7 +770,7 @@ class ReturnData : public ModelDimensions { * @param sol Solution state the timepoint `it` * @param edata ExpData instance carrying experimental data */ - void getEventSensisFSA( + void get_event_sensis_fsa( int ie, Model& model, SolutionState const& sol, ExpData const* edata ); @@ -784,7 +783,7 @@ class ReturnData : public ModelDimensions { * @param llhS0 contribution to likelihood for initial state sensitivities * of preequilibration */ - void handleSx0Backward( + void handle_sx0_backward( Model const& model, AmiVectorArray const& sx0, AmiVector const& xB, std::vector& llhS0 ) const; @@ -799,7 +798,7 @@ class ReturnData : public ModelDimensions { * @param xB vector with final adjoint state * (excluding conservation laws) */ - void handleSx0Forward( + void handle_sx0_forward( Model const& model, SolutionState const& sol, std::vector& llhS0, AmiVector const& xB ) const; diff --git a/include/amici/serialization.h b/include/amici/serialization.h index 6b322c53fe..fd19d2107c 100644 --- a/include/amici/serialization.h +++ b/include/amici/serialization.h @@ -36,7 +36,7 @@ namespace serialization { * @param size Size of p */ template -void archiveVector(Archive& ar, T** p, int size) { +void archive_vector(Archive& ar, T** p, int size) { if (Archive::is_loading::value) { if (*p != nullptr) delete[] *p; @@ -86,7 +86,7 @@ void serialize(Archive& ar, amici::Solver& s, unsigned int const /*version*/) { ar & s.stldet_; ar & s.ordering_; ar & s.cpu_time_; - ar & s.cpu_timeB_; + ar & s.cpu_time_b_; ar & s.newton_step_steadystate_conv_; ar & s.check_sensi_steadystate_conv_; ar & s.rdata_mode_; @@ -138,12 +138,12 @@ template void serialize(Archive& ar, amici::Model& m, unsigned int const /*version*/) { ar& dynamic_cast(m); ar & m.simulation_parameters_; - ar & m.o2mode; + ar & m.o2_mode_; ar & m.z2event_; - ar & m.idlist; + ar & m.id_list_; ar & m.state_.h; - ar & m.state_.unscaledParameters; - ar & m.state_.fixedParameters; + ar & m.state_.unscaled_parameters; + ar & m.state_.fixed_parameters; ar & m.state_.plist; ar & m.x0data_; ar & m.sx0data_; @@ -166,34 +166,34 @@ template void serialize( Archive& ar, amici::SimulationParameters& s, unsigned int const /*version*/ ) { - ar & s.fixedParameters; - ar & s.fixedParametersPreequilibration; - ar & s.fixedParametersPresimulation; + ar & s.fixed_parameters; + ar & s.fixed_parameters_pre_equilibration; + ar & s.fixed_parameters_presimulation; ar & s.parameters; ar & s.x0; ar & s.sx0; ar & s.pscale; ar & s.plist; - ar & s.ts_; + ar & s.timepoints; // for some reason, serializing NAN fails if (Archive::is_loading::value) { bool tstart_preeq_is_nan; ar & tstart_preeq_is_nan; if (tstart_preeq_is_nan) { - s.tstart_preeq_ = std::numeric_limits::quiet_NaN(); + s.t_start_preeq = std::numeric_limits::quiet_NaN(); } else { - ar & s.tstart_preeq_; + ar & s.t_start_preeq; } } else { - bool tstart_preeq_is_nan = std::isnan(s.tstart_preeq_); + bool tstart_preeq_is_nan = std::isnan(s.t_start_preeq); ar & tstart_preeq_is_nan; if (!tstart_preeq_is_nan) { - ar & s.tstart_preeq_; + ar & s.t_start_preeq; } } - ar & s.tstart_; + ar & s.t_start; ar & s.t_presim; - ar & s.reinitializeFixedParameterInitialStates; + ar & s.reinitialize_fixed_parameter_initial_states; } /** @@ -234,25 +234,25 @@ void serialize( ar & r.sy & r.ssigmay; ar & r.numsteps; - ar & r.numstepsB; - ar & r.numrhsevals; - ar & r.numrhsevalsB; - ar & r.numerrtestfails; - ar & r.numerrtestfailsB; - ar & r.numnonlinsolvconvfails; - ar & r.numnonlinsolvconvfailsB; + ar & r.numsteps_b; + ar & r.num_rhs_evals; + ar & r.num_rhs_evals_b; + ar & r.num_err_test_fails; + ar & r.num_err_test_fails_b; + ar & r.num_non_lin_solv_conv_fails; + ar & r.num_non_lin_solv_conv_fails_b; ar & r.order; ar & r.cpu_time; - ar & r.cpu_timeB; + ar & r.cpu_time_b; ar & r.cpu_time_total; ar & r.preeq_cpu_time; - ar & r.preeq_cpu_timeB; + ar & r.preeq_cpu_time_b; ar & r.preeq_status; ar & r.preeq_numsteps; ar & r.preeq_wrms; ar & r.preeq_t; ar & r.posteq_cpu_time; - ar & r.posteq_cpu_timeB; + ar & r.posteq_cpu_time_b; ar & r.posteq_status; ar & r.posteq_numsteps; ar & r.posteq_wrms; @@ -322,7 +322,7 @@ void serialize( v = amici::AmiVector(tmp, sunctx); v.set_ctx(sunctx); } else { - auto tmp = v.getVector(); + auto tmp = v.get_vector(); ar & tmp; } } @@ -340,7 +340,7 @@ namespace amici { * * @return The object serialized as char */ -template char* serializeToChar(T const& data, int* size) { +template char* serialize_to_char(T const& data, int* size) { try { std::string serialized; @@ -376,7 +376,7 @@ template char* serializeToChar(T const& data, int* size) { */ template -T deserializeFromChar(char const* buffer, int const size) { +T deserialize_from_char(char const* buffer, int const size) { namespace ba = ::boost::archive; namespace bio = ::boost::iostreams; @@ -403,7 +403,7 @@ T deserializeFromChar(char const* buffer, int const size) { * @return The object serialized as string */ -template std::string serializeToString(T const& data) { +template std::string serialize_to_string(T const& data) { namespace ba = ::boost::archive; namespace bio = ::boost::iostreams; @@ -430,7 +430,7 @@ template std::string serializeToString(T const& data) { * @return The object serialized as std::vector */ -template std::vector serializeToStdVec(T const& data) { +template std::vector serialize_to_std_vec(T const& data) { namespace ba = ::boost::archive; namespace bio = ::boost::iostreams; @@ -456,7 +456,7 @@ template std::vector serializeToStdVec(T const& data) { * @return The deserialized object */ -template T deserializeFromString(std::string const& serialized) { +template T deserialize_from_string(std::string const& serialized) { namespace ba = ::boost::archive; namespace bio = ::boost::iostreams; diff --git a/include/amici/simulation_parameters.h b/include/amici/simulation_parameters.h index b964972bc3..f68670afc9 100644 --- a/include/amici/simulation_parameters.h +++ b/include/amici/simulation_parameters.h @@ -19,7 +19,7 @@ class SimulationParameters { * @param timepoints Timepoints for which simulation results are requested */ explicit SimulationParameters(std::vector timepoints) - : ts_(std::move(timepoints)) {} + : timepoints(std::move(timepoints)) {} /** * @brief Constructor @@ -29,7 +29,7 @@ class SimulationParameters { SimulationParameters( std::vector fixedParameters, std::vector parameters ) - : fixedParameters(std::move(fixedParameters)) + : fixed_parameters(std::move(fixedParameters)) , parameters(std::move(parameters)) , pscale(std::vector(this->parameters.size(), ParameterScaling::none)) { } @@ -58,7 +58,7 @@ class SimulationParameters { std::vector fixedParameters, std::vector parameters, std::vector plist ) - : fixedParameters(std::move(fixedParameters)) + : fixed_parameters(std::move(fixedParameters)) , parameters(std::move(parameters)) , pscale(std::vector(this->parameters.size(), ParameterScaling::none)) , plist(std::move(plist)) {} @@ -73,10 +73,10 @@ class SimulationParameters { std::vector timepoints, std::vector fixedParameters, std::vector parameters ) - : fixedParameters(std::move(fixedParameters)) + : fixed_parameters(std::move(fixedParameters)) , parameters(std::move(parameters)) , pscale(std::vector(this->parameters.size(), ParameterScaling::none)) - , ts_(std::move(timepoints)) {} + , timepoints(std::move(timepoints)) {} #endif /** @@ -89,7 +89,8 @@ class SimulationParameters { * * @param nx_rdata Number of states (Model::nx_rdata) */ - void reinitializeAllFixedParameterDependentInitialStatesForPresimulation( + void + reinitialize_all_fixed_parameter_dependent_initial_states_for_presimulation( int nx_rdata ); @@ -104,7 +105,8 @@ class SimulationParameters { * * @param nx_rdata Number of states (Model::nx_rdata) */ - void reinitializeAllFixedParameterDependentInitialStatesForSimulation( + void + reinitialize_all_fixed_parameter_dependent_initial_states_for_simulation( int nx_rdata ); @@ -118,28 +120,29 @@ class SimulationParameters { * * @param nx_rdata Number of states (Model::nx_rdata) */ - void reinitializeAllFixedParameterDependentInitialStates(int nx_rdata); + void + reinitialize_all_fixed_parameter_dependent_initial_states(int nx_rdata); /** * @brief Model constants * * Vector of size Model::nk() or empty */ - std::vector fixedParameters; + std::vector fixed_parameters; /** * @brief Model constants for pre-equilibration * * Vector of size Model::nk() or empty. */ - std::vector fixedParametersPreequilibration; + std::vector fixed_parameters_pre_equilibration; /** * @brief Model constants for pre-simulation * * Vector of size Model::nk() or empty. */ - std::vector fixedParametersPresimulation; + std::vector fixed_parameters_presimulation; /** * @brief Model parameters @@ -183,7 +186,7 @@ class SimulationParameters { * * NAN indicates that `tstart_` should be used. */ - realtype tstart_preeq_{NAN}; + realtype t_start_preeq{NAN}; /** * @brief Starting time of the simulation. @@ -193,7 +196,7 @@ class SimulationParameters { * For output timepoints \f$ t < t_{start} \f$, the initial state will be * returned. */ - realtype tstart_{0.0}; + realtype t_start{0.0}; /** * @brief Duration of pre-simulation. @@ -209,13 +212,13 @@ class SimulationParameters { * * Vector of timepoints. */ - std::vector ts_; + std::vector timepoints; /** * @brief Flag indicating whether reinitialization of states depending on * fixed parameters is activated */ - bool reinitializeFixedParameterInitialStates{false}; + bool reinitialize_fixed_parameter_initial_states{false}; /** * @brief Indices of states to be reinitialized based on provided diff --git a/include/amici/solver.h b/include/amici/solver.h index 1640ccd0af..b8181e4633 100644 --- a/include/amici/solver.h +++ b/include/amici/solver.h @@ -73,7 +73,7 @@ class Solver { * @brief Get SUNDIALS context * @return context */ - SUNContext getSunContext() const; + SUNContext get_sun_context() const; /** * @brief runs a forward simulation until the specified timepoint @@ -96,7 +96,7 @@ class Solver { * * @param tout next timepoint */ - void runB(realtype tout) const; + void run_b(realtype tout) const; /** * @brief Initializes the ami memory object and applies specified options @@ -123,7 +123,7 @@ class Solver { * @param xQB0 initial adjoint quadratures */ - void setupB( + void setup_b( int* which, realtype tf, Model* model, AmiVector const& xB0, AmiVector const& dxB0, AmiVector const& xQB0 ) const; @@ -139,7 +139,7 @@ class Solver { * @param xQ0 initial quadrature vector */ - void setupSteadystate( + void setup_steady_state( realtype t0, Model* model, AmiVector const& x0, AmiVector const& dx0, AmiVector const& xB0, AmiVector const& dxB0, AmiVector const& xQ0 ) const; @@ -150,15 +150,15 @@ class Solver { * * @param model pointer to the model instance */ - void updateAndReinitStatesAndSensitivities(Model* model) const; + void update_and_reinit_states_and_sensitivities(Model* model) const; /** - * getRootInfo extracts information which event occurred + * get_root_info extracts information which event occurred * * @param rootsfound array with flags indicating whether the respective * event occurred */ - virtual void getRootInfo(int* rootsfound) const = 0; + virtual void get_root_info(int* rootsfound) const = 0; /** * @brief Calculates consistent initial conditions, assumes initial @@ -166,7 +166,7 @@ class Solver { * * @param tout1 next timepoint to be computed (sets timescale) */ - virtual void calcIC(realtype tout1) const = 0; + virtual void calc_ic(realtype tout1) const = 0; /** * @brief Calculates consistent initial conditions for the backwards @@ -175,7 +175,7 @@ class Solver { * @param which identifier of the backwards problem * @param tout1 next timepoint to be computed (sets timescale) */ - virtual void calcICB(int which, realtype tout1) const = 0; + virtual void calc_ic_b(int which, realtype tout1) const = 0; /** * @brief Solves the backward problem until a predefined timepoint @@ -184,92 +184,94 @@ class Solver { * @param tBout timepoint until which simulation should be performed * @param itaskB task identifier, can be CV_NORMAL or CV_ONE_STEP */ - virtual void solveB(realtype tBout, int itaskB) const = 0; + virtual void solve_b(realtype tBout, int itaskB) const = 0; /** * @brief Disable rootfinding */ - virtual void turnOffRootFinding() const = 0; + virtual void turn_off_root_finding() const = 0; /** * @brief Return current sensitivity method * @return method enum */ - SensitivityMethod getSensitivityMethod() const; + SensitivityMethod get_sensitivity_method() const; /** * @brief Set sensitivity method * @param sensi_meth */ - void setSensitivityMethod(SensitivityMethod sensi_meth); + void set_sensitivity_method(SensitivityMethod sensi_meth); /** * @brief Return current sensitivity method during preequilibration * @return method enum */ - SensitivityMethod getSensitivityMethodPreequilibration() const; + SensitivityMethod get_sensitivity_method_pre_equilibration() const; /** * @brief Set sensitivity method for preequilibration * @param sensi_meth_preeq */ - void - setSensitivityMethodPreequilibration(SensitivityMethod sensi_meth_preeq); + void set_sensitivity_method_pre_equilibration( + SensitivityMethod sensi_meth_preeq + ); /** * @brief Disable forward sensitivity integration (used in steady state sim) */ - void switchForwardSensisOff() const; + void switch_forward_sensis_off() const; /** * @brief Get maximum number of allowed Newton steps for steady state * computation * @return */ - int getNewtonMaxSteps() const; + int get_newton_max_steps() const; /** * @brief Set maximum number of allowed Newton steps for steady state * computation * @param newton_maxsteps */ - void setNewtonMaxSteps(int newton_maxsteps); + void set_newton_max_steps(int newton_maxsteps); /** * @brief Get a state of the damping factor used in the Newton solver * @return */ - NewtonDampingFactorMode getNewtonDampingFactorMode() const; + NewtonDampingFactorMode get_newton_damping_factor_mode() const; /** * @brief Turn on/off a damping factor in the Newton method * @param dampingFactorMode */ - void setNewtonDampingFactorMode(NewtonDampingFactorMode dampingFactorMode); + void + set_newton_damping_factor_mode(NewtonDampingFactorMode dampingFactorMode); /** * @brief Get a lower bound of the damping factor used in the Newton solver * @return */ - double getNewtonDampingFactorLowerBound() const; + double get_newton_damping_factor_lower_bound() const; /** * @brief Set a lower bound of the damping factor in the Newton solver * @param dampingFactorLowerBound */ - void setNewtonDampingFactorLowerBound(double dampingFactorLowerBound); + void set_newton_damping_factor_lower_bound(double dampingFactorLowerBound); /** * @brief Get sensitivity order * @return sensitivity order */ - SensitivityOrder getSensitivityOrder() const; + SensitivityOrder get_sensitivity_order() const; /** * @brief Set the sensitivity order * @param sensi sensitivity order */ - void setSensitivityOrder(SensitivityOrder sensi); + void set_sensitivity_order(SensitivityOrder sensi); /** * @brief Get the relative tolerances for the forward problem @@ -279,7 +281,7 @@ class Solver { * * @return relative tolerances */ - double getRelativeTolerance() const; + double get_relative_tolerance() const; /** * @brief Sets the relative tolerances for the forward problem @@ -289,7 +291,7 @@ class Solver { * * @param rtol relative tolerance (non-negative number) */ - void setRelativeTolerance(double rtol); + void set_relative_tolerance(double rtol); /** * @brief Get the absolute tolerances for the forward problem @@ -299,7 +301,7 @@ class Solver { * * @return absolute tolerances */ - double getAbsoluteTolerance() const; + double get_absolute_tolerance() const; /** * @brief Sets the absolute tolerances for the forward problem @@ -309,84 +311,84 @@ class Solver { * * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteTolerance(double atol); + void set_absolute_tolerance(double atol); /** * @brief Returns the relative tolerances for the forward sensitivity * problem * @return relative tolerances */ - double getRelativeToleranceFSA() const; + double get_relative_tolerance_fsa() const; /** * @brief Sets the relative tolerances for the forward sensitivity problem * @param rtol relative tolerance (non-negative number) */ - void setRelativeToleranceFSA(double rtol); + void set_relative_tolerance_fsa(double rtol); /** * @brief Returns the absolute tolerances for the forward sensitivity * problem * @return absolute tolerances */ - double getAbsoluteToleranceFSA() const; + double get_absolute_tolerance_fsa() const; /** * @brief Sets the absolute tolerances for the forward sensitivity problem * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteToleranceFSA(double atol); + void set_absolute_tolerance_fsa(double atol); /** * @brief Returns the relative tolerances for the adjoint sensitivity * problem * @return relative tolerances */ - double getRelativeToleranceB() const; + double get_relative_tolerance_b() const; /** * @brief Sets the relative tolerances for the adjoint sensitivity problem * @param rtol relative tolerance (non-negative number) */ - void setRelativeToleranceB(double rtol); + void set_relative_tolerance_b(double rtol); /** * @brief Returns the absolute tolerances for the backward problem for * adjoint sensitivity analysis * @return absolute tolerances */ - double getAbsoluteToleranceB() const; + double get_absolute_tolerance_b() const; /** * @brief Sets the absolute tolerances for the backward problem for * adjoint sensitivity analysis * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteToleranceB(double atol); + void set_absolute_tolerance_b(double atol); /** * @brief Returns the relative tolerance for the quadrature problem * @return relative tolerance */ - double getRelativeToleranceQuadratures() const; + double get_relative_tolerance_quadratures() const; /** * @brief sets the relative tolerance for the quadrature problem * @param rtol relative tolerance (non-negative number) */ - void setRelativeToleranceQuadratures(double rtol); + void set_relative_tolerance_quadratures(double rtol); /** * @brief returns the absolute tolerance for the quadrature problem * @return absolute tolerance */ - double getAbsoluteToleranceQuadratures() const; + double get_absolute_tolerance_quadratures() const; /** * @brief sets the absolute tolerance for the quadrature problem * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteToleranceQuadratures(double atol); + void set_absolute_tolerance_quadratures(double atol); /** * @brief returns the steady state simulation tolerance factor. @@ -396,7 +398,7 @@ class Solver { * `set(Absolute/Relative)ToleranceSteadyState()`. * @return steady state simulation tolerance factor */ - double getSteadyStateToleranceFactor() const; + double get_steady_state_tolerance_factor() const; /** * @brief set the steady state simulation tolerance factor. @@ -406,31 +408,31 @@ class Solver { * `set(Absolute/Relative)ToleranceSteadyState()`. * @param factor tolerance factor (non-negative number) */ - void setSteadyStateToleranceFactor(double factor); + void set_steady_state_tolerance_factor(double factor); /** * @brief returns the relative tolerance for the steady state problem * @return relative tolerance */ - double getRelativeToleranceSteadyState() const; + double get_relative_tolerance_steady_state() const; /** * @brief sets the relative tolerance for the steady state problem * @param rtol relative tolerance (non-negative number) */ - void setRelativeToleranceSteadyState(double rtol); + void set_relative_tolerance_steady_state(double rtol); /** * @brief returns the absolute tolerance for the steady state problem * @return absolute tolerance */ - double getAbsoluteToleranceSteadyState() const; + double get_absolute_tolerance_steady_state() const; /** * @brief sets the absolute tolerance for the steady state problem * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteToleranceSteadyState(double atol); + void set_absolute_tolerance_steady_state(double atol); /** * @brief returns the steady state sensitivity simulation tolerance factor. @@ -440,7 +442,7 @@ class Solver { * with `set(Absolute/Relative)ToleranceSteadyStateSensi()`. * @return steady state simulation tolerance factor */ - double getSteadyStateSensiToleranceFactor() const; + double get_steady_state_sensi_tolerance_factor() const; /** * @brief set the steady state sensitivity simulation tolerance factor. @@ -450,65 +452,65 @@ class Solver { * with `set(Absolute/Relative)ToleranceSteadyStateSensi()`. * @param factor tolerance factor (non-negative number) */ - void setSteadyStateSensiToleranceFactor(double factor); + void set_steady_state_sensi_tolerance_factor(double factor); /** * @brief returns the relative tolerance for the sensitivities of the * steady state problem * @return relative tolerance */ - double getRelativeToleranceSteadyStateSensi() const; + double get_relative_tolerance_steady_state_sensi() const; /** * @brief sets the relative tolerance for the sensitivities of the * steady state problem * @param rtol relative tolerance (non-negative number) */ - void setRelativeToleranceSteadyStateSensi(double rtol); + void set_relative_tolerance_steady_state_sensi(double rtol); /** * @brief returns the absolute tolerance for the sensitivities of the * steady state problem * @return absolute tolerance */ - double getAbsoluteToleranceSteadyStateSensi() const; + double get_absolute_tolerance_steady_state_sensi() const; /** * @brief sets the absolute tolerance for the sensitivities of the * steady state problem * @param atol absolute tolerance (non-negative number) */ - void setAbsoluteToleranceSteadyStateSensi(double atol); + void set_absolute_tolerance_steady_state_sensi(double atol); /** * @brief returns the maximum number of solver steps for the forward * problem * @return maximum number of solver steps */ - long int getMaxSteps() const; + long int get_max_steps() const; /** * @brief sets the maximum number of solver steps for the forward problem * @param maxsteps maximum number of solver steps (positive number) */ - void setMaxSteps(long int maxsteps); + void set_max_steps(long int maxsteps); /** * @brief Returns the maximum time allowed for integration * @return Time in seconds */ - double getMaxTime() const; + double get_max_time() const; /** * @brief Set the maximum CPU time allowed for integration * @param maxtime Time in seconds. Zero means infinite time. */ - void setMaxTime(double maxtime); + void set_max_time(double maxtime); /** * @brief Start timer for tracking integration time */ - void startTimer() const; + void start_timer() const; /** * @brief Check whether maximum integration time was exceeded @@ -518,14 +520,14 @@ class Solver { * @return True if the maximum integration time was exceeded, * false otherwise. */ - bool timeExceeded(int interval = 1) const; + bool time_exceeded(int interval = 1) const; /** * @brief returns the maximum number of solver steps for the backward * problem * @return maximum number of solver steps */ - long int getMaxStepsBackwardProblem() const; + long int get_max_steps_backward_problem() const; /** * @brief sets the maximum number of solver steps for the backward problem @@ -535,44 +537,44 @@ class Solver { * @note default behaviour (100 times the value for the forward problem) can * be restored by passing maxsteps=0 */ - void setMaxStepsBackwardProblem(long int maxsteps); + void set_max_steps_backward_problem(long int maxsteps); /** * @brief returns the linear system multistep method * @return linear system multistep method */ - LinearMultistepMethod getLinearMultistepMethod() const; + LinearMultistepMethod get_linear_multistep_method() const; /** * @brief sets the linear system multistep method * @param lmm linear system multistep method */ - void setLinearMultistepMethod(LinearMultistepMethod lmm); + void set_linear_multistep_method(LinearMultistepMethod lmm); /** * @brief returns the nonlinear system solution method * @return */ - NonlinearSolverIteration getNonlinearSolverIteration() const; + NonlinearSolverIteration get_non_linear_solver_iteration() const; /** * @brief sets the nonlinear system solution method * @param iter nonlinear system solution method */ - void setNonlinearSolverIteration(NonlinearSolverIteration iter); + void set_non_linear_solver_iteration(NonlinearSolverIteration iter); /** - * @brief getInterpolationType + * @brief get_interpolation_type * @return */ - InterpolationType getInterpolationType() const; + InterpolationType get_interpolation_type() const; /** * @brief sets the interpolation of the forward solution that is used for * the backwards problem * @param interpType interpolation type */ - void setInterpolationType(InterpolationType interpType); + void set_interpolation_type(InterpolationType interpType); /** * @brief Gets KLU / SuperLUMT state ordering mode @@ -581,7 +583,7 @@ class Solver { * SUNLinSolKLU::StateOrdering or SUNLinSolSuperLUMT::StateOrdering (which * differ). */ - int getStateOrdering() const; + int get_state_ordering() const; /** * @brief Sets KLU / SuperLUMT state ordering mode @@ -591,55 +593,55 @@ class Solver { * SUNLinSolKLU::StateOrdering and SUNLinSolSuperLUMT::StateOrdering. * @param ordering state ordering */ - void setStateOrdering(int ordering); + void set_state_ordering(int ordering); /** * @brief returns stability limit detection mode * @return stldet can be false (deactivated) or true (activated) */ - bool getStabilityLimitFlag() const; + bool get_stability_limit_flag() const; /** * @brief set stability limit detection mode * @param stldet can be false (deactivated) or true (activated) */ - void setStabilityLimitFlag(bool stldet); + void set_stability_limit_flag(bool stldet); /** - * @brief getLinearSolver + * @brief get_linear_solver * @return */ - LinearSolver getLinearSolver() const; + LinearSolver get_linear_solver() const; /** - * @brief setLinearSolver + * @brief set_linear_solver * @param linsol */ - void setLinearSolver(LinearSolver linsol); + void set_linear_solver(LinearSolver linsol); /** * @brief returns the internal sensitivity method * @return internal sensitivity method */ - InternalSensitivityMethod getInternalSensitivityMethod() const; + InternalSensitivityMethod get_internal_sensitivity_method() const; /** * @brief sets the internal sensitivity method * @param ism internal sensitivity method */ - void setInternalSensitivityMethod(InternalSensitivityMethod ism); + void set_internal_sensitivity_method(InternalSensitivityMethod ism); /** * @brief returns the ReturnData reporting mode * @return ReturnData reporting mode */ - RDataReporting getReturnDataReportingMode() const; + RDataReporting get_return_data_reporting_mode() const; /** * @brief sets the ReturnData reporting mode * @param rdrm ReturnData reporting mode */ - void setReturnDataReportingMode(RDataReporting rdrm); + void set_return_data_reporting_mode(RDataReporting rdrm); /** * @brief write solution from forward simulation @@ -649,7 +651,7 @@ class Solver { * @param sx state sensitivity * @param xQ quadrature */ - void writeSolution( + void write_solution( realtype& t, AmiVector& x, AmiVector& dx, AmiVectorArray& sx, AmiVector& xQ ) const; @@ -661,7 +663,7 @@ class Solver { * @param dx derivative state * @param sx state sensitivity */ - void writeSolution( + void write_solution( realtype& t, AmiVector& x, AmiVector& dx, AmiVectorArray& sx ) const; @@ -669,7 +671,7 @@ class Solver { * @brief write solution from forward simulation * @param sol solution state */ - void writeSolution(SolutionState& sol) const; + void write_solution(SolutionState& sol) const; /** * @brief write solution from forward simulation @@ -678,7 +680,7 @@ class Solver { * the initial timepoint and less than or equal to the current timepoint. * @param sol solution state */ - void writeSolution(realtype t, SolutionState& sol) const; + void write_solution(realtype t, SolutionState& sol) const; /** * @brief write solution from backward simulation @@ -688,7 +690,7 @@ class Solver { * @param xQB adjoint quadrature * @param which index of adjoint problem */ - void writeSolutionB( + void write_solution_b( realtype& t, AmiVector& xB, AmiVector& dxB, AmiVector& xQB, int which ) const; @@ -697,21 +699,21 @@ class Solver { * @param t time * @return x or interpolated solution dky */ - AmiVector const& getState(realtype t) const; + AmiVector const& get_state(realtype t) const; /** * @brief Access derivative state solution at time t * @param t time * @return dx or interpolated solution dky */ - AmiVector const& getDerivativeState(realtype t) const; + AmiVector const& get_derivative_state(realtype t) const; /** * @brief Access state sensitivity solution at time t * @param t time * @return (interpolated) solution sx */ - AmiVectorArray const& getStateSensitivity(realtype t) const; + AmiVectorArray const& get_state_sensitivity(realtype t) const; /** * @brief Access adjoint solution at time t @@ -719,7 +721,7 @@ class Solver { * @param t time * @return (interpolated) solution xB */ - AmiVector const& getAdjointState(int which, realtype t) const; + AmiVector const& get_adjoint_state(int which, realtype t) const; /** * @brief Access adjoint derivative solution at time t @@ -727,7 +729,7 @@ class Solver { * @param t time * @return (interpolated) solution dxB */ - AmiVector const& getAdjointDerivativeState(int which, realtype t) const; + AmiVector const& get_adjoint_derivative_state(int which, realtype t) const; /** * @brief Access adjoint quadrature solution at time t @@ -735,14 +737,14 @@ class Solver { * @param t time * @return (interpolated) solution xQB */ - AmiVector const& getAdjointQuadrature(int which, realtype t) const; + AmiVector const& get_adjoint_quadrature(int which, realtype t) const; /** * @brief Access quadrature solution at time t * @param t time * @return (interpolated) solution xQ */ - AmiVector const& getQuadrature(realtype t) const; + AmiVector const& get_quadrature(realtype t) const; /** * @brief Reinitializes the states in the solver after an event occurrence @@ -752,7 +754,7 @@ class Solver { * @param yp0 initial derivative state variables (DAE only) */ virtual void - reInit(realtype t0, AmiVector const& yy0, AmiVector const& yp0) const + reinit(realtype t0, AmiVector const& yy0, AmiVector const& yp0) const = 0; /** @@ -763,14 +765,14 @@ class Solver { * @param ypS0 new derivative state sensitivities (DAE only) */ virtual void - sensReInit(AmiVectorArray const& yyS0, AmiVectorArray const& ypS0) const + sens_reinit(AmiVectorArray const& yyS0, AmiVectorArray const& ypS0) const = 0; /** * @brief Switches off computation of state sensitivities without * deallocating the memory for sensitivities */ - virtual void sensToggleOff() const = 0; + virtual void sens_toggle_off() const = 0; /** * @brief Reinitializes the adjoint states after an event occurrence @@ -780,7 +782,7 @@ class Solver { * @param yyB0 new adjoint state * @param ypB0 new adjoint derivative state */ - virtual void reInitB( + virtual void reinit_b( int which, realtype tB0, AmiVector const& yyB0, AmiVector const& ypB0 ) const = 0; @@ -791,25 +793,25 @@ class Solver { * @param which identifier of the backwards problem * @param yQB0 new adjoint quadrature state */ - virtual void quadReInitB(int which, AmiVector const& yQB0) const = 0; + virtual void reinit_quad_b(int which, AmiVector const& yQB0) const = 0; /** * @brief current solver timepoint * @return t */ - realtype gett() const; + realtype get_t() const; /** * @brief Reads out the CPU time needed for forward solve * @return cpu_time */ - realtype getCpuTime() const; + realtype get_cpu_time() const; /** * @brief Reads out the CPU time needed for backward solve * @return cpu_timeB */ - realtype getCpuTimeB() const; + realtype get_cpu_time_b() const; /** * @brief number of states with which the solver was initialized @@ -833,9 +835,9 @@ class Solver { * @brief check if FSA is being computed * @return flag */ - bool computingFSA() const { - return getSensitivityOrder() >= SensitivityOrder::first - && getSensitivityMethod() == SensitivityMethod::forward + bool computing_fsa() const { + return get_sensitivity_order() >= SensitivityOrder::first + && get_sensitivity_method() == SensitivityMethod::forward && nplist() > 0 && nx() > 0; } @@ -843,22 +845,22 @@ class Solver { * @brief check if ASA is being computed * @return flag */ - bool computingASA() const { - return getSensitivityOrder() >= SensitivityOrder::first - && getSensitivityMethod() == SensitivityMethod::adjoint + bool computing_asa() const { + return get_sensitivity_order() >= SensitivityOrder::first + && get_sensitivity_method() == SensitivityMethod::adjoint && nplist() > 0; } /** * @brief Resets vectors containing diagnosis information */ - void resetDiagnosis() const; + void reset_diagnosis() const; /** * @brief Stores diagnosis information from solver memory block for forward * problem */ - void storeDiagnosis() const; + void store_diagnosis() const; /** * @brief Stores diagnosis information from solver memory block for backward @@ -866,49 +868,49 @@ class Solver { * * @param which identifier of the backwards problem */ - void storeDiagnosisB(int which) const; + void store_diagnosis_b(int which) const; /** * @brief Accessor ns * @return ns */ - std::vector const& getNumSteps() const { return ns_; } + std::vector const& get_num_steps() const { return ns_; } /** * @brief Accessor nsB * @return nsB */ - std::vector const& getNumStepsB() const { return nsB_; } + std::vector const& get_num_steps_b() const { return nsB_; } /** * @brief Accessor nrhs * @return nrhs */ - std::vector const& getNumRhsEvals() const { return nrhs_; } + std::vector const& get_num_rhs_evals() const { return nrhs_; } /** * @brief Accessor nrhsB * @return nrhsB */ - std::vector const& getNumRhsEvalsB() const { return nrhsB_; } + std::vector const& get_num_rhs_evals_b() const { return nrhsB_; } /** * @brief Accessor netf * @return netf */ - std::vector const& getNumErrTestFails() const { return netf_; } + std::vector const& get_num_err_test_fails() const { return netf_; } /** * @brief Accessor netfB * @return netfB */ - std::vector const& getNumErrTestFailsB() const { return netfB_; } + std::vector const& get_num_err_test_fails_b() const { return netfB_; } /** * @brief Accessor nnlscf * @return nnlscf */ - std::vector const& getNumNonlinSolvConvFails() const { + std::vector const& get_num_non_lin_solv_conv_fails() const { return nnlscf_; } @@ -916,7 +918,7 @@ class Solver { * @brief Accessor nnlscfB * @return nnlscfB */ - std::vector const& getNumNonlinSolvConvFailsB() const { + std::vector const& get_num_non_lin_solv_conv_fails_b() const { return nnlscfB_; } @@ -924,7 +926,7 @@ class Solver { * @brief Accessor order * @return order */ - std::vector const& getLastOrder() const { return order_; } + std::vector const& get_last_order() const { return order_; } /** * @brief Returns how convergence checks for steadystate computation are @@ -933,7 +935,7 @@ class Solver { * @return boolean flag indicating newton step (true) or the right hand side * (false) */ - bool getNewtonStepSteadyStateCheck() const { + bool get_newton_step_steady_state_check() const { return newton_step_steadystate_conv_; } @@ -943,7 +945,7 @@ class Solver { * @return boolean flag indicating state and sensitivity equations (true) or * only state variables (false). */ - bool getSensiSteadyStateCheck() const { + bool get_sensi_steady_state_check() const { return check_sensi_steadystate_conv_; } @@ -953,7 +955,7 @@ class Solver { * @param flag boolean flag to pick newton step (true) or the right hand * side (false, default) */ - void setNewtonStepSteadyStateCheck(bool const flag) { + void set_newton_step_steady_state_check(bool const flag) { newton_step_steadystate_conv_ = flag; } @@ -963,7 +965,7 @@ class Solver { * @param flag boolean flag to pick state and sensitivity equations (true, * default) or only state variables (false). */ - void setSensiSteadyStateCheck(bool const flag) { + void set_sensi_steady_state_check(bool const flag) { check_sensi_steadystate_conv_ = flag; } @@ -972,28 +974,28 @@ class Solver { * per step. * @param max_nonlin_iters maximum number of nonlinear solver iterations */ - void setMaxNonlinIters(int max_nonlin_iters); + void set_max_nonlin_iters(int max_nonlin_iters); /** * @brief Get the maximum number of nonlinear solver iterations permitted * per step. * @return maximum number of nonlinear solver iterations */ - int getMaxNonlinIters() const; + int get_max_nonlin_iters() const; /** * @brief Set the maximum number of nonlinear solver convergence failures * permitted per step. * @param max_conv_fails maximum number of nonlinear solver convergence */ - void setMaxConvFails(int max_conv_fails); + void set_max_conv_fails(int max_conv_fails); /** * @brief Get the maximum number of nonlinear solver convergence failures * permitted per step. * @return maximum number of nonlinear solver convergence */ - int getMaxConvFails() const; + int get_max_conv_fails() const; /** * @brief Set constraints on the model state. @@ -1003,27 +1005,27 @@ class Solver { * * @param constraints */ - void setConstraints(std::vector const& constraints); + void set_constraints(std::vector const& constraints); /** * @brief Get constraints on the model state. * @return constraints */ - std::vector getConstraints() const { - return constraints_.getVector(); + std::vector get_constraints() const { + return constraints_.get_vector(); } /** * @brief Set the maximum step size * @param max_step_size maximum step size. `0.0` means no limit. */ - void setMaxStepSize(realtype max_step_size); + void set_max_step_size(realtype max_step_size); /** * @brief Get the maximum step size * @return maximum step size */ - realtype getMaxStepSize() const; + realtype get_max_step_size() const; /** * @brief Serialize Solver (see boost::serialization::serialize) @@ -1044,8 +1046,17 @@ class Solver { */ friend bool operator==(Solver const& a, Solver const& b); - /** logger */ - Logger* logger = nullptr; + /** + * @brief Get the logger. + * @return Logger pointer or nullptr. + */ + Logger* get_logger() const { return logger_; } + + /** + * @brief Set the logger. + * @param logger Logger pointer or nullptr. + */ + void set_logger(Logger* logger) { logger_ = logger; } protected: /** @@ -1053,7 +1064,7 @@ class Solver { * * @param tstop timepoint until which simulation should be performed */ - virtual void setStopTime(realtype tstop) const = 0; + virtual void set_stop_time(realtype tstop) const = 0; /** * @brief Solves the forward problem until a predefined timepoint @@ -1074,41 +1085,41 @@ class Solver { * checkpoints * @return status flag indicating success of execution */ - virtual int solveF(realtype tout, int itask, int* ncheckPtr) const = 0; + virtual int solve_f(realtype tout, int itask, int* ncheckPtr) const = 0; /** - * @brief reInitPostProcessF postprocessing of the solver memory after a + * @brief reinit_post_process_f postprocessing of the solver memory after a * discontinuity in the forward problem * @param tnext next timepoint (defines integration direction) */ - virtual void reInitPostProcessF(realtype tnext) const = 0; + virtual void reinit_post_process_f(realtype tnext) const = 0; /** - * @brief reInitPostProcessB postprocessing of the solver memory after a + * @brief reinit_post_process_b postprocessing of the solver memory after a * discontinuity in the backward problem * @param tnext next timepoint (defines integration direction) */ - virtual void reInitPostProcessB(realtype tnext) const = 0; + virtual void reinit_post_process_b(realtype tnext) const = 0; /** * @brief extracts the state sensitivity at the current timepoint from * solver memory and writes it to the sx member variable */ - virtual void getSens() const = 0; + virtual void get_sens() const = 0; /** * @brief extracts the adjoint state at the current timepoint from * solver memory and writes it to the xB member variable * @param which index of the backwards problem */ - virtual void getB(int which) const = 0; + virtual void get_b(int which) const = 0; /** * @brief extracts the adjoint quadrature state at the current timepoint * from solver memory and writes it to the xQB member variable * @param which index of the backwards problem */ - virtual void getQuadB(int which) const = 0; + virtual void get_quad_b(int which) const = 0; /** * @brief extracts the quadrature at the current timepoint from solver @@ -1116,7 +1127,7 @@ class Solver { * * @param t timepoint for quadrature extraction */ - virtual void getQuad(realtype& t) const = 0; + virtual void get_quad(realtype& t) const = 0; /** * @brief Initializes the states at the specified initial timepoint @@ -1136,7 +1147,7 @@ class Solver { * @param x0 initial states * @param dx0 initial derivative states */ - virtual void initSteadystate( + virtual void init_steady_state( realtype t0, AmiVector const& x0, AmiVector const& dx0 ) const = 0; @@ -1147,7 +1158,7 @@ class Solver { * @param sdx0 initial derivative states sensitivities */ virtual void - sensInit1(AmiVectorArray const& sx0, AmiVectorArray const& sdx0) const + sens_init_1(AmiVectorArray const& sx0, AmiVectorArray const& sdx0) const = 0; /** @@ -1158,7 +1169,7 @@ class Solver { * @param xB0 initial adjoint state * @param dxB0 initial adjoint derivative state */ - virtual void binit( + virtual void b_init( int which, realtype tf, AmiVector const& xB0, AmiVector const& dxB0 ) const = 0; @@ -1169,79 +1180,79 @@ class Solver { * @param which identifier of the backwards problem * @param xQB0 initial adjoint quadrature state */ - virtual void qbinit(int which, AmiVector const& xQB0) const = 0; + virtual void qb_init(int which, AmiVector const& xQB0) const = 0; /** - * @brief Initializes the rootfinding for events + * @brief Initializes the root-finding for events * * @param ne number of different events */ - virtual void rootInit(int ne) const = 0; + virtual void root_init(int ne) const = 0; /** * @brief Initialize non-linear solver for sensitivities * @param model Model instance */ - void initializeNonLinearSolverSens(Model const* model) const; + void initialize_non_linear_solver_sens(Model const* model) const; /** * @brief Set the dense Jacobian function */ - virtual void setDenseJacFn() const = 0; + virtual void set_dense_jac_fn() const = 0; /** * @brief sets the sparse Jacobian function */ - virtual void setSparseJacFn() const = 0; + virtual void set_sparse_jac_fn() const = 0; /** * @brief sets the banded Jacobian function */ - virtual void setBandJacFn() const = 0; + virtual void set_band_jac_fn() const = 0; /** * @brief sets the Jacobian vector multiplication function */ - virtual void setJacTimesVecFn() const = 0; + virtual void set_jac_times_vec_fn() const = 0; /** * @brief sets the dense Jacobian function * * @param which identifier of the backwards problem */ - virtual void setDenseJacFnB(int which) const = 0; + virtual void set_dense_jac_fn_b(int which) const = 0; /** * @brief sets the sparse Jacobian function * * @param which identifier of the backwards problem */ - virtual void setSparseJacFnB(int which) const = 0; + virtual void set_sparse_jac_fn_b(int which) const = 0; /** * @brief sets the banded Jacobian function * * @param which identifier of the backwards problem */ - virtual void setBandJacFnB(int which) const = 0; + virtual void set_band_jac_fn_b(int which) const = 0; /** * @brief sets the Jacobian vector multiplication function * * @param which identifier of the backwards problem */ - virtual void setJacTimesVecFnB(int which) const = 0; + virtual void set_jac_times_vec_fn_b(int which) const = 0; /** * @brief sets the sparse Jacobian function for backward steady state case */ - virtual void setSparseJacFn_ss() const = 0; + virtual void set_sparse_jac_fn_ss() const = 0; /** * @brief Create specifies solver method and initializes solver memory for * the forward problem */ - virtual void allocateSolver() const = 0; + virtual void allocate_solver() const = 0; /** * @brief sets scalar relative and absolute tolerances for the forward @@ -1250,7 +1261,7 @@ class Solver { * @param rtol relative tolerances * @param atol absolute tolerances */ - virtual void setSStolerances(double rtol, double atol) const = 0; + virtual void set_ss_tolerances(double rtol, double atol) const = 0; /** * @brief activates sets scalar relative and absolute tolerances for the @@ -1259,7 +1270,8 @@ class Solver { * @param rtol relative tolerances * @param atol array of absolute tolerances for every sensitivity variable */ - virtual void setSensSStolerances(double rtol, double const* atol) const = 0; + virtual void set_sens_ss_tolerances(double rtol, double const* atol) const + = 0; /** * SetSensErrCon specifies whether error control is also enforced for @@ -1267,7 +1279,7 @@ class Solver { * * @param error_corr activation flag */ - virtual void setSensErrCon(bool error_corr) const = 0; + virtual void set_sens_err_con(bool error_corr) const = 0; /** * @brief Specifies whether error control is also enforced for the @@ -1276,7 +1288,7 @@ class Solver { * @param which identifier of the backwards problem * @param flag activation flag */ - virtual void setQuadErrConB(int which, bool flag) const = 0; + virtual void set_quad_err_con_b(int which, bool flag) const = 0; /** * @brief Specifies whether error control is also enforced for the @@ -1284,24 +1296,24 @@ class Solver { * * @param flag activation flag */ - virtual void setQuadErrCon(bool flag) const = 0; + virtual void set_quad_err_con(bool flag) const = 0; /** * @brief Attaches the error handler function to the solver */ - virtual void setErrHandlerFn() const; + virtual void set_err_handler_fn() const; /** * @brief Attaches the user data to the forward problem */ - virtual void setUserData() const = 0; + virtual void set_user_data() const = 0; /** * @brief attaches the user data to the backward problem * * @param which identifier of the backwards problem */ - virtual void setUserDataB(int which) const = 0; + virtual void set_user_data_b(int which) const = 0; /** * @brief specifies the maximum number of steps for the forward @@ -1311,7 +1323,7 @@ class Solver { * @note in contrast to the SUNDIALS method, this sets the overall maximum, * not the maximum between output times. */ - virtual void setMaxNumSteps(long int mxsteps) const = 0; + virtual void set_max_num_steps(long int mxsteps) const = 0; /** * @brief specifies the maximum number of steps for the forward @@ -1322,7 +1334,7 @@ class Solver { * @note in contrast to the SUNDIALS method, this sets the overall maximum, * not the maximum between output times. */ - virtual void setMaxNumStepsB(int which, long int mxstepsB) const = 0; + virtual void set_max_num_steps_b(int which, long int mxstepsB) const = 0; /** * @brief activates stability limit detection for the forward @@ -1331,7 +1343,7 @@ class Solver { * @param stldet flag for stability limit detection (TRUE or FALSE) * */ - virtual void setStabLimDet(int stldet) const = 0; + virtual void set_stab_lim_det(int stldet) const = 0; /** * @brief activates stability limit detection for the backward @@ -1341,21 +1353,21 @@ class Solver { * @param stldet flag for stability limit detection (TRUE or FALSE) * */ - virtual void setStabLimDetB(int which, int stldet) const = 0; + virtual void set_stab_lim_det_b(int which, int stldet) const = 0; /** * @brief specify algebraic/differential components (DAE only) * * @param model model specification */ - virtual void setId(Model const* model) const = 0; + virtual void set_id(Model const* model) const = 0; /** * @brief deactivates error control for algebraic components (DAE only) * * @param flag deactivation flag */ - virtual void setSuppressAlg(bool flag) const = 0; + virtual void set_suppress_alg(bool flag) const = 0; /** * @brief specifies the scaling and indexes for sensitivity @@ -1365,7 +1377,7 @@ class Solver { * @param pbar parameter scaling constants * @param plist parameter index list */ - virtual void setSensParams( + virtual void set_sens_params( realtype const* p, realtype const* pbar, int const* plist ) const = 0; @@ -1377,7 +1389,7 @@ class Solver { * @param t timepoint * @param k derivative order */ - virtual void getDky(realtype t, int k) const = 0; + virtual void get_dky(realtype t, int k) const = 0; /** * @brief interpolates the (derivative of the) solution at the requested @@ -1387,7 +1399,7 @@ class Solver { * @param k derivative order * @param which index of backward problem */ - virtual void getDkyB(realtype t, int k, int which) const = 0; + virtual void get_dky_b(realtype t, int k, int which) const = 0; /** * @brief interpolates the (derivative of the) solution at the requested @@ -1396,7 +1408,7 @@ class Solver { * @param t timepoint * @param k derivative order */ - virtual void getSensDky(realtype t, int k) const = 0; + virtual void get_sens_dky(realtype t, int k) const = 0; /** * @brief interpolates the (derivative of the) solution at the requested @@ -1406,7 +1418,7 @@ class Solver { * @param k derivative order * @param which index of backward problem */ - virtual void getQuadDkyB(realtype t, int k, int which) const = 0; + virtual void get_quad_dky_b(realtype t, int k, int which) const = 0; /** * @brief interpolates the (derivative of the) solution at the requested @@ -1415,18 +1427,18 @@ class Solver { * @param t timepoint * @param k derivative order */ - virtual void getQuadDky(realtype t, int k) const = 0; + virtual void get_quad_dky(realtype t, int k) const = 0; /** * @brief initializes the adjoint problem */ - virtual void adjInit() const = 0; + virtual void adj_init() const = 0; /** * @brief initializes the quadratures * @param xQ0 vector with initial values for xQ */ - virtual void quadInit(AmiVector const& xQ0) const = 0; + virtual void quad_init(AmiVector const& xQ0) const = 0; /** * @brief Specifies solver method and initializes solver memory for the @@ -1434,7 +1446,7 @@ class Solver { * * @param which identifier of the backwards problem */ - virtual void allocateSolverB(int* which) const = 0; + virtual void allocate_solver_b(int* which) const = 0; /** * @brief sets relative and absolute tolerances for the backward @@ -1445,7 +1457,7 @@ class Solver { * @param absTolB absolute tolerances */ virtual void - setSStolerancesB(int which, realtype relTolB, realtype absTolB) const + set_ss_tolerances_b(int which, realtype relTolB, realtype absTolB) const = 0; /** @@ -1457,7 +1469,7 @@ class Solver { * @param abstolQB absolute tolerances */ virtual void - quadSStolerancesB(int which, realtype reltolQB, realtype abstolQB) const + quad_ss_tolerances_b(int which, realtype reltolQB, realtype abstolQB) const = 0; /** @@ -1466,7 +1478,7 @@ class Solver { * @param reltolQB relative tolerances * @param abstolQB absolute tolerances */ - virtual void quadSStolerances(realtype reltolQB, realtype abstolQB) const + virtual void quad_ss_tolerances(realtype reltolQB, realtype abstolQB) const = 0; /** @@ -1476,7 +1488,8 @@ class Solver { * forward or backward problem) * @param numsteps output array */ - virtual void getNumSteps(void const* ami_mem, long int* numsteps) const = 0; + virtual void get_num_steps(void const* ami_mem, long int* numsteps) const + = 0; /** * @brief reports the number of right hand evaluations @@ -1486,7 +1499,7 @@ class Solver { * @param numrhsevals output array */ virtual void - getNumRhsEvals(void const* ami_mem, long int* numrhsevals) const + get_num_rhs_evals(void const* ami_mem, long int* numrhsevals) const = 0; /** @@ -1497,7 +1510,7 @@ class Solver { * @param numerrtestfails output array */ virtual void - getNumErrTestFails(void const* ami_mem, long int* numerrtestfails) const + get_num_err_test_fails(void const* ami_mem, long int* numerrtestfails) const = 0; /** @@ -1507,7 +1520,7 @@ class Solver { * forward or backward problem) * @param numnonlinsolvconvfails output array */ - virtual void getNumNonlinSolvConvFails( + virtual void get_num_non_lin_solv_conv_fails( void const* ami_mem, long int* numnonlinsolvconvfails ) const = 0; @@ -1520,46 +1533,46 @@ class Solver { * forward or backward problem) * @param order output array */ - virtual void getLastOrder(void const* ami_mem, int* order) const = 0; + virtual void get_last_order(void const* ami_mem, int* order) const = 0; /** * @brief Initializes and sets the linear solver for the forward problem * * @param model pointer to the model object */ - void initializeLinearSolver(Model const* model) const; + void initialize_linear_solver(Model const* model) const; /** * @brief Sets the non-linear solver */ - void initializeNonLinearSolver() const; + void initialize_non_linear_solver() const; /** * @brief Sets the linear solver for the forward problem */ - virtual void setLinearSolver() const = 0; + virtual void set_linear_solver() const = 0; /** * @brief Sets the linear solver for the backward problem * @param which index of the backward problem */ - virtual void setLinearSolverB(int which) const = 0; + virtual void set_linear_solver_b(int which) const = 0; /** * @brief Set the non-linear solver for the forward problem */ - virtual void setNonLinearSolver() const = 0; + virtual void set_non_linear_solver() const = 0; /** * @brief Set the non-linear solver for the backward problem * @param which index of the backward problem */ - virtual void setNonLinearSolverB(int which) const = 0; + virtual void set_non_linear_solver_b(int which) const = 0; /** * @brief Set the non-linear solver for sensitivities */ - virtual void setNonLinearSolverSens() const = 0; + virtual void set_non_linear_solver_sens() const = 0; /** * @brief Initializes the linear solver for the backward problem @@ -1568,61 +1581,61 @@ class Solver { * @param which index of the backward problem */ - void initializeLinearSolverB(Model const* model, int which) const; + void initialize_linear_solver_b(Model const* model, int which) const; /** * @brief Initializes the non-linear solver for the backward problem * @param which index of the backward problem */ - void initializeNonLinearSolverB(int which) const; + void initialize_non_linear_solver_b(int which) const; /** * Accessor function to the model stored in the user data * * @return user data model */ - virtual Model const* getModel() const = 0; + virtual Model const* get_model() const = 0; /** * @brief checks whether memory for the forward problem has been allocated * * @return proxy for solverMemory->(cv|ida)_MallocDone */ - bool getInitDone() const; + bool get_init_done() const; /** * @brief checks whether memory for forward sensitivities has been allocated * * @return proxy for solverMemory->(cv|ida)_SensMallocDone */ - bool getSensInitDone() const; + bool get_sens_init_done() const; /** * @brief checks whether memory for forward interpolation has been allocated * * @return proxy for solverMemory->(cv|ida)_adjMallocDone */ - bool getAdjInitDone() const; + bool get_adj_init_done() const; /** * @brief checks whether memory for the backward problem has been allocated * @param which adjoint problem index * @return proxy for solverMemoryB->(cv|ida)_MallocDone */ - bool getInitDoneB(int which) const; + bool get_init_done_b(int which) const; /** * @brief checks whether memory for backward quadratures has been allocated * @param which adjoint problem index * @return proxy for solverMemoryB->(cv|ida)_QuadMallocDone */ - bool getQuadInitDoneB(int which) const; + bool get_quad_init_done_b(int which) const; /** * @brief checks whether memory for quadratures has been allocated * @return proxy for solverMemory->(cv|ida)_QuadMallocDone */ - bool getQuadInitDone() const; + bool get_quad_init_done() const; /** * @brief attaches a diagonal linear solver to the forward problem @@ -1634,7 +1647,7 @@ class Solver { * * @param which identifier of the backwards problem */ - virtual void diagB(int which) const = 0; + virtual void diag_b(int which) const = 0; /** * @brief resets solverMemory and solverMemoryB @@ -1643,7 +1656,7 @@ class Solver { * @param nquad new number of quadratures (only differs from nplist for * higher order sensitivity computation) */ - void resetMutableMemory(int nx, int nplist, int nquad) const; + void reset_mutable_memory(int nx, int nplist, int nquad) const; /** * @brief Retrieves the solver memory instance for the backward problem @@ -1653,19 +1666,19 @@ class Solver { * @return A (void *) pointer to the CVODES memory allocated for the * backward problem. */ - virtual void* getAdjBmem(void* ami_mem, int which) const = 0; + virtual void* get_adj_b_mem(void* ami_mem, int which) const = 0; /** * @brief updates solver tolerances according to the currently specified * member variables */ - void applyTolerances() const; + void apply_tolerances() const; /** * @brief updates FSA solver tolerances according to the currently * specified member variables */ - void applyTolerancesFSA() const; + void apply_tolerances_fsa() const; /** * @brief updates ASA solver tolerances according to the currently @@ -1673,7 +1686,7 @@ class Solver { * * @param which identifier of the backwards problem */ - void applyTolerancesASA(int which) const; + void apply_tolerances_asa(int which) const; /** * @brief updates ASA quadrature solver tolerances according to the @@ -1681,19 +1694,19 @@ class Solver { * * @param which identifier of the backwards problem */ - void applyQuadTolerancesASA(int which) const; + void apply_quad_tolerances_asa(int which) const; /** * @brief updates quadrature solver tolerances according to the * currently specified member variables */ - void applyQuadTolerances() const; + void apply_quad_tolerances() const; /** * @brief updates all sensitivity solver tolerances according to the * currently specified member variables */ - void applySensitivityTolerances() const; + void apply_sensitivity_tolerances() const; /** * @brief Apply the constraints to the solver. @@ -1710,8 +1723,8 @@ class Solver { mutable std::vector> solver_memory_B_; - /** Sundials user_data */ - mutable user_data_type user_data; + /** Sundials user_data_ */ + mutable user_data_type user_data_; /** internal sensitivity method flag used to select the sensitivity solution * method. Only applies for Forward Sensitivities. */ @@ -1764,41 +1777,41 @@ class Solver { /** * @brief sets that memory for the forward problem has been allocated */ - void setInitDone() const; + void set_init_done() const; /** * @brief sets that memory for forward sensitivities has been allocated */ - void setSensInitDone() const; + void set_sens_init_done() const; /** * @brief sets that memory for forward interpolation has been allocated */ - void setAdjInitDone() const; + void set_adj_init_done() const; /** * @brief sets that memory for the backward problem has been allocated * @param which adjoint problem index */ - void setInitDoneB(int which) const; + void set_init_done_b(int which) const; /** * @brief sets that memory for backward quadratures has been allocated * @param which adjoint problem index */ - void setQuadInitDoneB(int which) const; + void set_quad_init_done_b(int which) const; /** * @brief sets that memory for quadratures has been allocated */ - void setQuadInitDone() const; + void set_quad_init_done() const; /** * @brief Sets sensitivity method (for simulation or preequilibration) * @param sensi_meth new value for sensi_meth[_preeq] * @param preequilibration flag indicating preequilibration or simulation */ - void checkSensitivityMethod( + void check_sensitivity_method( SensitivityMethod sensi_meth, bool preequilibration ) const; @@ -1964,7 +1977,7 @@ class Solver { mutable realtype cpu_time_{0.0}; /** CPU time, backward solve */ - mutable realtype cpu_timeB_{0.0}; + mutable realtype cpu_time_b_{0.0}; /** maximum number of allowed integration steps for backward problem */ long int maxstepsB_{0L}; @@ -2023,6 +2036,9 @@ class Solver { /** employed order forward problem (dimension: nt) */ mutable std::vector order_; + + /** logger */ + Logger* logger_ = nullptr; }; bool operator==(Solver const& a, Solver const& b); diff --git a/include/amici/solver_cvodes.h b/include/amici/solver_cvodes.h index c10ec2ebb9..4f454e970e 100644 --- a/include/amici/solver_cvodes.h +++ b/include/amici/solver_cvodes.h @@ -38,165 +38,166 @@ class CVodeSolver : public Solver { */ Solver* clone() const override; - void reInit( + void reinit( realtype t0, AmiVector const& yy0, AmiVector const& yp0 ) const override; - void sensReInit( + void sens_reinit( AmiVectorArray const& yyS0, AmiVectorArray const& ypS0 ) const override; - void sensToggleOff() const override; + void sens_toggle_off() const override; - void reInitB( + void reinit_b( int which, realtype tB0, AmiVector const& yyB0, AmiVector const& ypB0 ) const override; - void quadReInitB(int which, AmiVector const& yQB0) const override; + void reinit_quad_b(int which, AmiVector const& yQB0) const override; int solve(realtype tout, int itask) const override; - int solveF(realtype tout, int itask, int* ncheckPtr) const override; + int solve_f(realtype tout, int itask, int* ncheckPtr) const override; - void solveB(realtype tBout, int itaskB) const override; + void solve_b(realtype tBout, int itaskB) const override; - void getDky(realtype t, int k) const override; + void get_dky(realtype t, int k) const override; - void getSensDky(realtype t, int k) const override; + void get_sens_dky(realtype t, int k) const override; - void getQuadDkyB(realtype t, int k, int which) const override; + void get_quad_dky_b(realtype t, int k, int which) const override; - void getDkyB(realtype t, int k, int which) const override; + void get_dky_b(realtype t, int k, int which) const override; - void getRootInfo(int* rootsfound) const override; + void get_root_info(int* rootsfound) const override; - void setStopTime(realtype tstop) const override; + void set_stop_time(realtype tstop) const override; - void turnOffRootFinding() const override; + void turn_off_root_finding() const override; - Model const* getModel() const override; + Model const* get_model() const override; #if !defined(EXHALE_DOXYGEN_SHOULD_SKIP_THIS) - using Solver::setLinearSolver; + using Solver::set_linear_solver; - using Solver::setLinearSolverB; + using Solver::set_linear_solver_b; #endif - void setLinearSolver() const override; + void set_linear_solver() const override; - void setLinearSolverB(int which) const override; + void set_linear_solver_b(int which) const override; - void setNonLinearSolver() const override; + void set_non_linear_solver() const override; - void setNonLinearSolverSens() const override; + void set_non_linear_solver_sens() const override; - void setNonLinearSolverB(int which) const override; + void set_non_linear_solver_b(int which) const override; protected: - void calcIC(realtype tout1) const override; + void calc_ic(realtype tout1) const override; - void calcICB(int which, realtype tout1) const override; + void calc_ic_b(int which, realtype tout1) const override; - void getB(int which) const override; + void get_b(int which) const override; - void getSens() const override; + void get_sens() const override; - void getQuadB(int which) const override; + void get_quad_b(int which) const override; - void getQuad(realtype& t) const override; + void get_quad(realtype& t) const override; - void getQuadDky(realtype t, int k) const override; + void get_quad_dky(realtype t, int k) const override; - void reInitPostProcessF(realtype tnext) const override; + void reinit_post_process_f(realtype tnext) const override; - void reInitPostProcessB(realtype tnext) const override; + void reinit_post_process_b(realtype tnext) const override; /** - * @brief Postprocessing of the solver memory after a discontinuity + * @brief Post-processing of the solver memory after a discontinuity * @param cv_mem pointer to CVODES solver memory object * @param t pointer to integration time * @param yout new state vector * @param tout anticipated next integration timepoint. */ - void reInitPostProcess( + void reInit_post_process( void* cv_mem, realtype* t, AmiVector* yout, realtype tout ) const; - void allocateSolver() const override; + void allocate_solver() const override; - void setSStolerances(double rtol, double atol) const override; + void set_ss_tolerances(double rtol, double atol) const override; - void setSensSStolerances(double rtol, double const* atol) const override; + void set_sens_ss_tolerances(double rtol, double const* atol) const override; - void setSensErrCon(bool error_corr) const override; + void set_sens_err_con(bool error_corr) const override; - void setQuadErrConB(int which, bool flag) const override; + void set_quad_err_con_b(int which, bool flag) const override; - void setQuadErrCon(bool flag) const override; + void set_quad_err_con(bool flag) const override; - void setUserData() const override; + void set_user_data() const override; - void setUserDataB(int which) const override; + void set_user_data_b(int which) const override; - void setMaxNumSteps(long int mxsteps) const override; + void set_max_num_steps(long int mxsteps) const override; - void setStabLimDet(int stldet) const override; + void set_stab_lim_det(int stldet) const override; - void setStabLimDetB(int which, int stldet) const override; + void set_stab_lim_det_b(int which, int stldet) const override; - void setId(Model const* model) const override; + void set_id(Model const* model) const override; - void setSuppressAlg(bool flag) const override; + void set_suppress_alg(bool flag) const override; /** - * @brief resetState reset the CVODES solver to restart integration after a + * @brief reset_state reset the CVODES solver to restart integration after a * rhs discontinuity. * @param cv_mem pointer to CVODES solver memory object * @param y0 new state vector */ - void resetState(void* cv_mem, const_N_Vector y0) const; + void reset_state(void* cv_mem, const_N_Vector y0) const; - void setSensParams( + void set_sens_params( realtype const* p, realtype const* pbar, int const* plist ) const override; - void adjInit() const override; + void adj_init() const override; - void quadInit(AmiVector const& xQ0) const override; + void quad_init(AmiVector const& xQ0) const override; - void allocateSolverB(int* which) const override; + void allocate_solver_b(int* which) const override; - void setSStolerancesB( + void set_ss_tolerances_b( int which, realtype relTolB, realtype absTolB ) const override; - void quadSStolerancesB( + void quad_ss_tolerances_b( int which, realtype reltolQB, realtype abstolQB ) const override; - void quadSStolerances(realtype reltolQ, realtype abstolQ) const override; + void quad_ss_tolerances(realtype reltolQ, realtype abstolQ) const override; - void setMaxNumStepsB(int which, long int mxstepsB) const override; + void set_max_num_steps_b(int which, long int mxstepsB) const override; void diag() const override; - void diagB(int which) const override; + void diag_b(int which) const override; - void getNumSteps(void const* ami_mem, long int* numsteps) const override; + void get_num_steps(void const* ami_mem, long int* numsteps) const override; - void - getNumRhsEvals(void const* ami_mem, long int* numrhsevals) const override; + void get_num_rhs_evals( + void const* ami_mem, long int* numrhsevals + ) const override; - void getNumErrTestFails( + void get_num_err_test_fails( void const* ami_mem, long int* numerrtestfails ) const override; - void getNumNonlinSolvConvFails( + void get_num_non_lin_solv_conv_fails( void const* ami_mem, long int* numnonlinsolvconvfails ) const override; - void getLastOrder(void const* ami_mem, int* order) const override; + void get_last_order(void const* ami_mem, int* order) const override; - void* getAdjBmem(void* ami_mem, int which) const override; + void* get_adj_b_mem(void* ami_mem, int which) const override; /** * @brief Serialize amici::CVodeSolver to boost archive @@ -218,39 +219,39 @@ class CVodeSolver : public Solver { void init(realtype t0, AmiVector const& x0, AmiVector const& dx0) const override; - void initSteadystate( + void init_steady_state( realtype t0, AmiVector const& x0, AmiVector const& dx0 ) const override; - void sensInit1( + void sens_init_1( AmiVectorArray const& sx0, AmiVectorArray const& sdx0 ) const override; - void binit( + void b_init( int which, realtype tf, AmiVector const& xB0, AmiVector const& dxB0 ) const override; - void qbinit(int which, AmiVector const& xQB0) const override; + void qb_init(int which, AmiVector const& xQB0) const override; - void rootInit(int ne) const override; + void root_init(int ne) const override; - void setDenseJacFn() const override; + void set_dense_jac_fn() const override; - void setSparseJacFn() const override; + void set_sparse_jac_fn() const override; - void setBandJacFn() const override; + void set_band_jac_fn() const override; - void setJacTimesVecFn() const override; + void set_jac_times_vec_fn() const override; - void setDenseJacFnB(int which) const override; + void set_dense_jac_fn_b(int which) const override; - void setSparseJacFnB(int which) const override; + void set_sparse_jac_fn_b(int which) const override; - void setBandJacFnB(int which) const override; + void set_band_jac_fn_b(int which) const override; - void setJacTimesVecFnB(int which) const override; + void set_jac_times_vec_fn_b(int which) const override; - void setSparseJacFn_ss() const override; + void set_sparse_jac_fn_ss() const override; void apply_max_nonlin_iters() const override; diff --git a/include/amici/solver_idas.h b/include/amici/solver_idas.h index dd043ebbb7..ed56e174cd 100644 --- a/include/amici/solver_idas.h +++ b/include/amici/solver_idas.h @@ -35,77 +35,77 @@ class IDASolver : public Solver { */ Solver* clone() const override; - void reInitPostProcessF(realtype tnext) const override; + void reinit_post_process_f(realtype tnext) const override; - void reInitPostProcessB(realtype tnext) const override; + void reinit_post_process_b(realtype tnext) const override; - void reInit( + void reinit( realtype t0, AmiVector const& yy0, AmiVector const& yp0 ) const override; - void sensReInit( + void sens_reinit( AmiVectorArray const& yyS0, AmiVectorArray const& ypS0 ) const override; - void sensToggleOff() const override; + void sens_toggle_off() const override; - void reInitB( + void reinit_b( int which, realtype tB0, AmiVector const& yyB0, AmiVector const& ypB0 ) const override; - void quadReInitB(int which, AmiVector const& yQB0) const override; + void reinit_quad_b(int which, AmiVector const& yQB0) const override; - void quadSStolerancesB( + void quad_ss_tolerances_b( int which, realtype reltolQB, realtype abstolQB ) const override; - void quadSStolerances(realtype reltolQ, realtype abstolQ) const override; + void quad_ss_tolerances(realtype reltolQ, realtype abstolQ) const override; int solve(realtype tout, int itask) const override; - int solveF(realtype tout, int itask, int* ncheckPtr) const override; + int solve_f(realtype tout, int itask, int* ncheckPtr) const override; - void solveB(realtype tBout, int itaskB) const override; + void solve_b(realtype tBout, int itaskB) const override; - void getRootInfo(int* rootsfound) const override; + void get_root_info(int* rootsfound) const override; - void getDky(realtype t, int k) const override; + void get_dky(realtype t, int k) const override; - void getSens() const override; + void get_sens() const override; - void getSensDky(realtype t, int k) const override; + void get_sens_dky(realtype t, int k) const override; - void getB(int which) const override; + void get_b(int which) const override; - void getDkyB(realtype t, int k, int which) const override; + void get_dky_b(realtype t, int k, int which) const override; - void getQuadB(int which) const override; + void get_quad_b(int which) const override; - void getQuadDkyB(realtype t, int k, int which) const override; + void get_quad_dky_b(realtype t, int k, int which) const override; - void getQuad(realtype& t) const override; + void get_quad(realtype& t) const override; - void getQuadDky(realtype t, int k) const override; + void get_quad_dky(realtype t, int k) const override; - void calcIC(realtype tout1) const override; + void calc_ic(realtype tout1) const override; - void calcICB(int which, realtype tout1) const override; + void calc_ic_b(int which, realtype tout1) const override; - void setStopTime(realtype tstop) const override; + void set_stop_time(realtype tstop) const override; - void turnOffRootFinding() const override; + void turn_off_root_finding() const override; - Model const* getModel() const override; + Model const* get_model() const override; - void setLinearSolver() const override; + void set_linear_solver() const override; - void setLinearSolverB(int which) const override; + void set_linear_solver_b(int which) const override; - void setNonLinearSolver() const override; + void set_non_linear_solver() const override; - void setNonLinearSolverSens() const override; + void set_non_linear_solver_sens() const override; - void setNonLinearSolverB(int which) const override; + void set_non_linear_solver_b(int which) const override; protected: /** @@ -116,121 +116,122 @@ class IDASolver : public Solver { * @param ypout new state derivative vector * @param tout anticipated next integration timepoint. */ - void reInitPostProcess( + void reinit_post_process( void* ida_mem, realtype* t, AmiVector* yout, AmiVector* ypout, realtype tout ) const; - void allocateSolver() const override; + void allocate_solver() const override; - void setSStolerances(realtype rtol, realtype atol) const override; + void set_ss_tolerances(realtype rtol, realtype atol) const override; void - setSensSStolerances(realtype rtol, realtype const* atol) const override; + set_sens_ss_tolerances(realtype rtol, realtype const* atol) const override; - void setSensErrCon(bool error_corr) const override; + void set_sens_err_con(bool error_corr) const override; - void setQuadErrConB(int which, bool flag) const override; + void set_quad_err_con_b(int which, bool flag) const override; - void setQuadErrCon(bool flag) const override; + void set_quad_err_con(bool flag) const override; - void setUserData() const override; + void set_user_data() const override; - void setUserDataB(int which) const override; + void set_user_data_b(int which) const override; - void setMaxNumSteps(long int mxsteps) const override; + void set_max_num_steps(long int mxsteps) const override; - void setStabLimDet(int stldet) const override; + void set_stab_lim_det(int stldet) const override; - void setStabLimDetB(int which, int stldet) const override; + void set_stab_lim_det_b(int which, int stldet) const override; - void setId(Model const* model) const override; + void set_id(Model const* model) const override; - void setSuppressAlg(bool flag) const override; + void set_suppress_alg(bool flag) const override; /** - * @brief resetState reset the IDAS solver to restart integration after a + * @brief reset_state reset the IDAS solver to restart integration after a * rhs discontinuity. * @param ida_mem pointer to IDAS solver memory object * @param yy0 new state vector * @param yp0 new state derivative vector */ void - resetState(void* ida_mem, const_N_Vector yy0, const_N_Vector yp0) const; + reset_state(void* ida_mem, const_N_Vector yy0, const_N_Vector yp0) const; - void setSensParams( + void set_sens_params( realtype const* p, realtype const* pbar, int const* plist ) const override; - void adjInit() const override; + void adj_init() const override; - void quadInit(AmiVector const& xQ0) const override; + void quad_init(AmiVector const& xQ0) const override; - void allocateSolverB(int* which) const override; + void allocate_solver_b(int* which) const override; - void setMaxNumStepsB(int which, long int mxstepsB) const override; + void set_max_num_steps_b(int which, long int mxstepsB) const override; - void setSStolerancesB( + void set_ss_tolerances_b( int which, realtype relTolB, realtype absTolB ) const override; void diag() const override; - void diagB(int which) const override; + void diag_b(int which) const override; - void getNumSteps(void const* ami_mem, long int* numsteps) const override; + void get_num_steps(void const* ami_mem, long int* numsteps) const override; - void - getNumRhsEvals(void const* ami_mem, long int* numrhsevals) const override; + void get_num_rhs_evals( + void const* ami_mem, long int* numrhsevals + ) const override; - void getNumErrTestFails( + void get_num_err_test_fails( void const* ami_mem, long int* numerrtestfails ) const override; - void getNumNonlinSolvConvFails( + void get_num_non_lin_solv_conv_fails( void const* ami_mem, long int* numnonlinsolvconvfails ) const override; - void getLastOrder(void const* ami_mem, int* order) const override; + void get_last_order(void const* ami_mem, int* order) const override; - void* getAdjBmem(void* ami_mem, int which) const override; + void* get_adj_b_mem(void* ami_mem, int which) const override; void init(realtype t0, AmiVector const& x0, AmiVector const& dx0) const override; - void initSteadystate( + void init_steady_state( realtype t0, AmiVector const& x0, AmiVector const& dx0 ) const override; - void sensInit1( + void sens_init_1( AmiVectorArray const& sx0, AmiVectorArray const& sdx0 ) const override; - void binit( + void b_init( int which, realtype tf, AmiVector const& xB0, AmiVector const& dxB0 ) const override; - void qbinit(int which, AmiVector const& xQB0) const override; + void qb_init(int which, AmiVector const& xQB0) const override; - void rootInit(int ne) const override; + void root_init(int ne) const override; - void setDenseJacFn() const override; + void set_dense_jac_fn() const override; - void setSparseJacFn() const override; + void set_sparse_jac_fn() const override; - void setBandJacFn() const override; + void set_band_jac_fn() const override; - void setJacTimesVecFn() const override; + void set_jac_times_vec_fn() const override; - void setDenseJacFnB(int which) const override; + void set_dense_jac_fn_b(int which) const override; - void setSparseJacFnB(int which) const override; + void set_sparse_jac_fn_b(int which) const override; - void setBandJacFnB(int which) const override; + void set_band_jac_fn_b(int which) const override; - void setJacTimesVecFnB(int which) const override; + void set_jac_times_vec_fn_b(int which) const override; - void setSparseJacFn_ss() const override; + void set_sparse_jac_fn_ss() const override; void apply_max_nonlin_iters() const override; diff --git a/include/amici/steadystateproblem.h b/include/amici/steadystateproblem.h index ed12fe0dc4..e0a194805a 100644 --- a/include/amici/steadystateproblem.h +++ b/include/amici/steadystateproblem.h @@ -119,7 +119,7 @@ class NewtonsMethod { * @brief Get the number of steps taken in the current iteration. * @return Number of steps taken. */ - [[nodiscard]] int get_num_steps() const { return i_step; } + [[nodiscard]] int get_num_steps() const { return i_step_; } /** * @brief Get the current WRMS norm. @@ -208,7 +208,7 @@ class NewtonsMethod { realtype wrms_ = INFINITY; /** The current number of Newton iterations. */ - int i_step = 0; + int i_step_ = 0; }; } // namespace amici diff --git a/include/amici/sundials_linsol_wrapper.h b/include/amici/sundials_linsol_wrapper.h index 8ab782464a..c67d4da47d 100644 --- a/include/amici/sundials_linsol_wrapper.h +++ b/include/amici/sundials_linsol_wrapper.h @@ -79,7 +79,7 @@ class SUNLinSolWrapper { * @brief Returns an identifier for the linear solver type. * @return */ - SUNLinearSolver_Type getType() const; + SUNLinearSolver_Type get_type() const; /** * @brief Performs any linear solver setup needed, based on an updated @@ -100,7 +100,7 @@ class SUNLinSolWrapper { * @brief Returns the last error flag encountered within the linear solver * @return error flag */ - long int getLastFlag() const; + long int get_last_flag() const; /** * @brief Returns the integer and real workspace sizes for the linear solver @@ -200,14 +200,14 @@ class SUNLinSolKLU : public SUNLinSolWrapper { * @param nnz Number of non-zeros * @param reinit_type SUNKLU_REINIT_FULL or SUNKLU_REINIT_PARTIAL */ - void reInit(int nnz, int reinit_type); + void reinit(int nnz, int reinit_type); /** * @brief Sets the ordering used by KLU for reducing fill in the linear * solve. * @param ordering */ - void setOrdering(StateOrdering ordering); + void set_ordering(StateOrdering ordering); /** * @brief Checks whether the linear system is singular @@ -273,7 +273,7 @@ class SUNLinSolSuperLUMT : public SUNLinSolWrapper { * linear solve. * @param ordering */ - void setOrdering(StateOrdering ordering); + void set_ordering(StateOrdering ordering); }; #endif @@ -300,7 +300,7 @@ class SUNLinSolPCG : public SUNLinSolWrapper { * @param ATimes * @return */ - int setATimes(void* A_data, SUNATimesFn ATimes); + int set_a_times(void* A_data, SUNATimesFn ATimes); /** * @brief Sets function pointers for PSetup and PSolve routines inside @@ -311,7 +311,7 @@ class SUNLinSolPCG : public SUNLinSolWrapper { * @param Psol * @return */ - int setPreconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); + int set_preconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); /** * @brief Sets pointers to left/right scaling vectors for the linear @@ -320,27 +320,27 @@ class SUNLinSolPCG : public SUNLinSolWrapper { * @param nul * @return */ - int setScalingVectors(N_Vector s, N_Vector nul); + int set_scaling_vectors(N_Vector s, N_Vector nul); /** * @brief Returns the number of linear iterations performed in the last * 'Solve' call * @return Number of iterations */ - int getNumIters() const; + int get_num_iters() const; /** * @brief Returns the final residual norm from the last 'Solve' call. * @return residual norm */ - realtype getResNorm() const; + realtype get_res_norm() const; /** * @brief Get preconditioned initial residual * (see sundials/sundials_linearsolver.h). * @return */ - N_Vector getResid() const; + N_Vector get_resid() const; }; /** @@ -380,7 +380,7 @@ class SUNLinSolSPBCGS : public SUNLinSolWrapper { * @param ATimes * @return */ - int setATimes(void* A_data, SUNATimesFn ATimes); + int set_a_times(void* A_data, SUNATimesFn ATimes); /** * @brief Sets function pointers for PSetup and PSolve routines inside @@ -391,7 +391,7 @@ class SUNLinSolSPBCGS : public SUNLinSolWrapper { * @param Psol * @return */ - int setPreconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); + int set_preconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); /** * @brief Sets pointers to left/right scaling vectors for the linear @@ -400,27 +400,27 @@ class SUNLinSolSPBCGS : public SUNLinSolWrapper { * @param nul * @return */ - int setScalingVectors(N_Vector s, N_Vector nul); + int set_scaling_vectors(N_Vector s, N_Vector nul); /** * @brief Returns the number of linear iterations performed in the last * 'Solve' call * @return Number of iterations */ - int getNumIters() const; + int get_num_iters() const; /** * @brief Returns the final residual norm from the last 'Solve' call. * @return residual norm */ - realtype getResNorm() const; + realtype get_res_norm() const; /** * @brief Get preconditioned initial residual * (see sundials/sundials_linearsolver.h). * @return */ - N_Vector getResid() const; + N_Vector get_resid() const; }; /** @@ -445,7 +445,7 @@ class SUNLinSolSPFGMR : public SUNLinSolWrapper { * @param ATimes * @return */ - int setATimes(void* A_data, SUNATimesFn ATimes); + int set_a_times(void* A_data, SUNATimesFn ATimes); /** * @brief Sets function pointers for PSetup and PSolve routines inside @@ -456,7 +456,7 @@ class SUNLinSolSPFGMR : public SUNLinSolWrapper { * @param Psol * @return */ - int setPreconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); + int set_preconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); /** * @brief Sets pointers to left/right scaling vectors for the linear @@ -465,27 +465,27 @@ class SUNLinSolSPFGMR : public SUNLinSolWrapper { * @param nul * @return */ - int setScalingVectors(N_Vector s, N_Vector nul); + int set_scaling_vectors(N_Vector s, N_Vector nul); /** * @brief Returns the number of linear iterations performed in the last * 'Solve' call * @return Number of iterations */ - int getNumIters() const; + int get_num_iters() const; /** * @brief Returns the final residual norm from the last 'Solve' call. * @return residual norm */ - realtype getResNorm() const; + realtype get_res_norm() const; /** * @brief Get preconditioned initial residual * (see sundials/sundials_linearsolver.h). * @return */ - N_Vector getResid() const; + N_Vector get_resid() const; }; /** @@ -513,7 +513,7 @@ class SUNLinSolSPGMR : public SUNLinSolWrapper { * @param ATimes * @return */ - int setATimes(void* A_data, SUNATimesFn ATimes); + int set_a_times(void* A_data, SUNATimesFn ATimes); /** * @brief Sets function pointers for PSetup and PSolve routines inside @@ -524,7 +524,7 @@ class SUNLinSolSPGMR : public SUNLinSolWrapper { * @param Psol * @return */ - int setPreconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); + int set_preconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); /** * @brief Sets pointers to left/right scaling vectors for the linear @@ -533,27 +533,27 @@ class SUNLinSolSPGMR : public SUNLinSolWrapper { * @param nul * @return */ - int setScalingVectors(N_Vector s, N_Vector nul); + int set_scaling_vectors(N_Vector s, N_Vector nul); /** * @brief Returns the number of linear iterations performed in the last * 'Solve' call * @return Number of iterations */ - int getNumIters() const; + int get_num_iters() const; /** * @brief Returns the final residual norm from the last 'Solve' call. * @return residual norm */ - realtype getResNorm() const; + realtype get_res_norm() const; /** * @brief Get preconditioned initial residual * (see sundials/sundials_linearsolver.h). * @return */ - N_Vector getResid() const; + N_Vector get_resid() const; }; /** @@ -593,7 +593,7 @@ class SUNLinSolSPTFQMR : public SUNLinSolWrapper { * @param ATimes * @return */ - int setATimes(void* A_data, SUNATimesFn ATimes); + int set_a_times(void* A_data, SUNATimesFn ATimes); /** * @brief Sets function pointers for PSetup and PSolve routines inside @@ -604,7 +604,7 @@ class SUNLinSolSPTFQMR : public SUNLinSolWrapper { * @param Psol * @return */ - int setPreconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); + int set_preconditioner(void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol); /** * @brief Sets pointers to left/right scaling vectors for the linear @@ -613,27 +613,27 @@ class SUNLinSolSPTFQMR : public SUNLinSolWrapper { * @param nul * @return */ - int setScalingVectors(N_Vector s, N_Vector nul); + int set_scaling_vectors(N_Vector s, N_Vector nul); /** * @brief Returns the number of linear iterations performed in the last * 'Solve' call * @return Number of iterations */ - int getNumIters() const; + int get_num_iters() const; /** * @brief Returns the final residual norm from the last 'Solve' call. * @return residual norm */ - realtype getResNorm() const; + realtype get_res_norm() const; /** * @brief Get preconditioned initial residual * (see sundials/sundials_linearsolver.h). * @return */ - N_Vector getResid() const; + N_Vector get_resid() const; }; /** @@ -686,7 +686,7 @@ class SUNNonLinSolWrapper { * @brief Get type ID of the solver * @return */ - SUNNonlinearSolver_Type getType() const; + SUNNonlinearSolver_Type get_type() const; /** * @brief Setup solver @@ -697,7 +697,7 @@ class SUNNonLinSolWrapper { int setup(N_Vector y, void* mem); /** - * @brief Solve the nonlinear system F (y) = 0 or G(y) = y. + * @brief solve the nonlinear system F (y) = 0 or G(y) = y. * @param y0 the initial iterate for the nonlinear solve. This must remain * unchanged throughout the solution process. * @param y the solution to the nonlinear system @@ -710,7 +710,7 @@ class SUNNonLinSolWrapper { * @param mem the sundials integrator memory structure. * @return */ - int Solve( + int solve( N_Vector y0, N_Vector y, N_Vector w, realtype tol, bool callLSetup, void* mem ); @@ -721,21 +721,21 @@ class SUNNonLinSolWrapper { * @param SysFn * @return */ - int setSysFn(SUNNonlinSolSysFn SysFn); + int set_sys_fn(SUNNonlinSolSysFn SysFn); /** * @brief Set linear solver setup function. * @param SetupFn * @return */ - int setLSetupFn(SUNNonlinSolLSetupFn SetupFn); + int set_l_setup_fn(SUNNonlinSolLSetupFn SetupFn); /** * @brief Set linear solver solve function. * @param SolveFn * @return */ - int setLSolveFn(SUNNonlinSolLSolveFn SolveFn); + int set_l_solve_fn(SUNNonlinSolLSolveFn SolveFn); /** * @brief Set function to test for convergence @@ -743,32 +743,32 @@ class SUNNonLinSolWrapper { * @param ctest_data * @return */ - int setConvTestFn(SUNNonlinSolConvTestFn CTestFn, void* ctest_data); + int set_conv_test_fn(SUNNonlinSolConvTestFn CTestFn, void* ctest_data); /** * @brief Set maximum number of non-linear iterations * @param maxiters * @return */ - int setMaxIters(int maxiters); + int set_max_iters(int maxiters); /** - * @brief getNumIters + * @brief get_num_iters * @return */ - long int getNumIters() const; + long int get_num_iters() const; /** - * @brief getCurIter + * @brief get_cur_iter * @return */ - int getCurIter() const; + int get_cur_iter() const; /** - * @brief getNumConvFails + * @brief get_num_conv_fails * @return */ - long int getNumConvFails() const; + long int get_num_conv_fails() const; protected: /** @@ -806,7 +806,7 @@ class SUNNonLinSolNewton : public SUNNonLinSolWrapper { * @param SysFn * @return */ - int getSysFn(SUNNonlinSolSysFn* SysFn) const; + int get_sys_fn(SUNNonlinSolSysFn* SysFn) const; }; /** @@ -837,7 +837,7 @@ class SUNNonLinSolFixedPoint : public SUNNonLinSolWrapper { * @param SysFn * @return */ - int getSysFn(SUNNonlinSolSysFn* SysFn) const; + int get_sys_fn(SUNNonlinSolSysFn* SysFn) const; }; } // namespace amici diff --git a/include/amici/sundials_matrix_wrapper.h b/include/amici/sundials_matrix_wrapper.h index 0686b12eb9..836aec077a 100644 --- a/include/amici/sundials_matrix_wrapper.h +++ b/include/amici/sundials_matrix_wrapper.h @@ -361,7 +361,7 @@ class SUNMatrixWrapper { void multiply( AmiVector& c, AmiVector const& b, realtype const alpha = 1.0 ) const { - multiply(c.getNVector(), b.getNVector(), alpha); + multiply(c.get_nvector(), b.get_nvector(), alpha); } /** @@ -481,7 +481,7 @@ class SUNMatrixWrapper { /** * @brief Writes the diagonal of sparse matrix A to a dense vector v. * - * @param v dense outut vector + * @param v dense output vector */ void to_diag(N_Vector v) const; @@ -588,7 +588,7 @@ class SUNMatrixWrapper { * @brief indicator whether this wrapper allocated matrix_ and is * responsible for deallocation */ - bool ownmat = true; + bool ownmat_ = true; }; /** diff --git a/include/amici/symbolic_functions.h b/include/amici/symbolic_functions.h index c065a74971..b1dca9921f 100644 --- a/include/amici/symbolic_functions.h +++ b/include/amici/symbolic_functions.h @@ -47,7 +47,7 @@ double pos_pow(double base, double exponent); * * @return NaN */ -double getNaN(); +double get_nan(); /** * @brief The sign function. diff --git a/include/amici/vector.h b/include/amici/vector.h index 997084ac29..fc65242996 100644 --- a/include/amici/vector.h +++ b/include/amici/vector.h @@ -110,7 +110,7 @@ class AmiVector { */ AmiVector(AmiVector&& other) noexcept : vec_(std::move(other.vec_)) { - synchroniseNVector(other.get_ctx()); + synchronise_nvector(other.get_ctx()); } /** @@ -132,8 +132,8 @@ class AmiVector { */ AmiVector& operator*=(AmiVector const& multiplier) { N_VProd( - getNVector(), const_cast(multiplier.getNVector()), - getNVector() + get_nvector(), const_cast(multiplier.get_nvector()), + get_nvector() ); return *this; } @@ -145,8 +145,8 @@ class AmiVector { */ AmiVector& operator/=(AmiVector const& divisor) { N_VDiv( - getNVector(), const_cast(divisor.getNVector()), - getNVector() + get_nvector(), const_cast(divisor.get_nvector()), + get_nvector() ); return *this; } @@ -181,19 +181,19 @@ class AmiVector { * @brief N_Vector accessor * @return N_Vector */ - N_Vector getNVector(); + N_Vector get_nvector(); /** * @brief N_Vector accessor * @return N_Vector */ - [[nodiscard]] const_N_Vector getNVector() const; + [[nodiscard]] const_N_Vector get_nvector() const; /** * @brief Vector accessor * @return Vector */ - [[nodiscard]] std::vector const& getVector() const; + [[nodiscard]] std::vector const& get_vector() const; /** * @brief returns the length of the vector @@ -254,7 +254,7 @@ class AmiVector { /** * @brief Take absolute value (in-place) */ - void abs() { N_VAbs(getNVector(), getNVector()); } + void abs() { N_VAbs(get_nvector(), get_nvector()); } /** * @brief Serialize AmiVector (see boost::serialization::serialize) @@ -299,7 +299,7 @@ class AmiVector { * @brief reconstructs nvec such that data pointer points to vec data array * @param sunctx SUNDIALS context */ - void synchroniseNVector(SUNContext sunctx); + void synchronise_nvector(SUNContext sunctx); }; /** @@ -395,21 +395,21 @@ class AmiVectorArray { * @brief accessor to NVectorArray * @return N_VectorArray */ - N_Vector* getNVectorArray(); + N_Vector* get_nvector_array(); /** * @brief accessor to NVector element * @param pos index of corresponding AmiVector * @return N_Vector */ - N_Vector getNVector(int pos); + N_Vector get_nvector(int pos); /** * @brief const accessor to NVector element * @param pos index of corresponding AmiVector * @return N_Vector */ - [[nodiscard]] const_N_Vector getNVector(int pos) const; + [[nodiscard]] const_N_Vector get_nvector(int pos) const; /** * @brief accessor to AmiVector elements @@ -499,13 +499,13 @@ inline std::ostream& operator<<(std::ostream& os, AmiVectorArray const& arr) { * @param y another vector with same size as x * @param z result vector of same size as x and y */ -inline void linearSum( +inline void linear_sum( realtype const a, AmiVector const& x, realtype const b, AmiVector const& y, AmiVector& z ) { N_VLinearSum( - a, const_cast(x.getNVector()), b, - const_cast(y.getNVector()), z.getNVector() + a, const_cast(x.get_nvector()), b, + const_cast(y.get_nvector()), z.get_nvector() ); } @@ -515,10 +515,10 @@ inline void linearSum( * @param y vector * @return dot product of x and y */ -inline realtype dotProd(AmiVector const& x, AmiVector const& y) { +inline realtype dot_prod(AmiVector const& x, AmiVector const& y) { return N_VDotProd( - const_cast(x.getNVector()), - const_cast(y.getNVector()) + const_cast(x.get_nvector()), + const_cast(y.get_nvector()) ); } @@ -540,7 +540,7 @@ inline span make_span(N_Vector nv) { * */ inline span make_span(amici::AmiVector const& av) { - return make_span(av.getVector()); + return make_span(av.get_vector()); } } // namespace gsl diff --git a/models/model_calvetti_py/main.cpp b/models/model_calvetti_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_calvetti_py/main.cpp +++ b/models/model_calvetti_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_calvetti_py/model_calvetti_py.cpp b/models/model_calvetti_py/model_calvetti_py.cpp index b20e15e782..55bcbfaaf7 100644 --- a/models/model_calvetti_py/model_calvetti_py.cpp +++ b/models/model_calvetti_py/model_calvetti_py.cpp @@ -5,11 +5,11 @@ namespace amici::model_model_calvetti_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "V1ss", // k[0] "R1ss", // k[1] "V2ss", // k[2] @@ -18,7 +18,7 @@ std::array fixedParameterNames = { "R3ss", // k[5] }; -std::array stateNames = { +std::array state_names = { "V1", // x_rdata[0] "V2", // x_rdata[1] "V3", // x_rdata[2] @@ -27,7 +27,7 @@ std::array stateNames = { "f3", // x_rdata[5] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] "y1", // y[1] "y2", // y[2] @@ -36,7 +36,7 @@ std::array observableNames = { "y5", // y[5] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] ObservableScaling::lin, // y[1] ObservableScaling::lin, // y[2] @@ -45,7 +45,7 @@ ObservableScaling::lin, // y[4] ObservableScaling::lin, // y[5] }; -std::array expressionNames = { +std::array expression_names = { "C1ss", // w[0] "C2ss", // w[1] "C3ss", // w[2] @@ -65,11 +65,11 @@ std::array expressionNames = { "flux_r0", // w[16] }; -std::array parameterIds = { +std::array parameter_ids = { }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "V1ss", // k[0] "R1ss", // k[1] "V2ss", // k[2] @@ -78,7 +78,7 @@ std::array fixedParameterIds = { "R3ss", // k[5] }; -std::array stateIds = { +std::array state_ids = { "V1", // x_rdata[0] "V2", // x_rdata[1] "V3", // x_rdata[2] @@ -87,7 +87,7 @@ std::array stateIds = { "f3", // x_rdata[5] }; -std::array observableIds = { +std::array observable_ids = { "obs_V1", // y[0] "obs_V2", // y[1] "obs_V3", // y[2] @@ -96,7 +96,7 @@ std::array observableIds = { "obs_f2", // y[5] }; -std::array expressionIds = { +std::array expression_ids = { "C1ss", // w[0] "C2ss", // w[1] "C3ss", // w[2] @@ -116,7 +116,7 @@ std::array expressionIds = { "flux_r0", // w[16] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1, 2, 3, 4, 5 }; diff --git a/models/model_calvetti_py/model_calvetti_py.h b/models/model_calvetti_py/model_calvetti_py.h index 834ebef1b7..97de93af24 100644 --- a/models/model_calvetti_py/model_calvetti_py.h +++ b/models/model_calvetti_py/model_calvetti_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_calvetti_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_calvetti_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_calvetti_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -416,7 +416,7 @@ class Model_model_calvetti_py : public amici::Model_DAE { } - std::string getName() const override { + std::string get_name() const override { return "model_calvetti_py"; } @@ -424,28 +424,28 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -454,55 +454,55 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -511,27 +511,27 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -540,7 +540,7 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -548,7 +548,7 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -556,16 +556,16 @@ class Model_model_calvetti_py : public amici::Model_DAE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_calvetti_py/swig/model_calvetti_py.i b/models/model_calvetti_py/swig/model_calvetti_py.i index 0047056d52..9e75161f53 100644 --- a/models/model_calvetti_py/swig/model_calvetti_py.i +++ b/models/model_calvetti_py/swig/model_calvetti_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_calvetti_py/wrapfunctions.cpp b/models/model_calvetti_py/wrapfunctions.cpp index 9061566fa9..7a6d217895 100644 --- a/models/model_calvetti_py/wrapfunctions.cpp +++ b/models/model_calvetti_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_calvetti_py::Model_model_calvetti_py() ); diff --git a/models/model_calvetti_py/wrapfunctions.h b/models/model_calvetti_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_calvetti_py/wrapfunctions.h +++ b/models/model_calvetti_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_dirac_py/main.cpp b/models/model_dirac_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_dirac_py/main.cpp +++ b/models/model_dirac_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_dirac_py/model_dirac_py.cpp b/models/model_dirac_py/model_dirac_py.cpp index 59776a1266..e0b939a903 100644 --- a/models/model_dirac_py/model_dirac_py.cpp +++ b/models/model_dirac_py/model_dirac_py.cpp @@ -5,59 +5,59 @@ namespace amici::model_model_dirac_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "p1", // p[0] "p2", // p[1] "p3", // p[2] "p4", // p[3] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { }; -std::array stateNames = { +std::array state_names = { "x1", // x_rdata[0] "x2", // x_rdata[1] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "p1", // p[0] "p2", // p[1] "p3", // p[2] "p4", // p[3] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { }; -std::array stateIds = { +std::array state_ids = { "x1", // x_rdata[0] "x2", // x_rdata[1] }; -std::array observableIds = { +std::array observable_ids = { "obs_x2", // y[0] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1 }; diff --git a/models/model_dirac_py/model_dirac_py.h b/models/model_dirac_py/model_dirac_py.h index 5152cc2ff6..d0c73abcc5 100644 --- a/models/model_dirac_py/model_dirac_py.h +++ b/models/model_dirac_py/model_dirac_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_dirac_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_dirac_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_dirac_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -403,7 +403,7 @@ class Model_model_dirac_py : public amici::Model_ODE { } - std::string getName() const override { + std::string get_name() const override { return "model_dirac_py"; } @@ -411,28 +411,28 @@ class Model_model_dirac_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -441,55 +441,55 @@ class Model_model_dirac_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -498,27 +498,27 @@ class Model_model_dirac_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -527,7 +527,7 @@ class Model_model_dirac_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -535,7 +535,7 @@ class Model_model_dirac_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -543,16 +543,16 @@ class Model_model_dirac_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_dirac_py/model_dirac_py/model_dirac_py.py b/models/model_dirac_py/model_dirac_py/model_dirac_py.py index fad7c72759..e9ed86904f 100644 --- a/models/model_dirac_py/model_dirac_py/model_dirac_py.py +++ b/models/model_dirac_py/model_dirac_py/model_dirac_py.py @@ -97,8 +97,8 @@ class _SwigNonDynamicMeta(type): def _get_import_time(): return _model_dirac_py._get_import_time() -def getModel(): - val = _model_dirac_py.getModel() +def get_model(): + val = _model_dirac_py.get_model() if '.' in __name__: val.module = _model_module diff --git a/models/model_dirac_py/swig/model_dirac_py.i b/models/model_dirac_py/swig/model_dirac_py.i index 58116cd70d..27869edf00 100644 --- a/models/model_dirac_py/swig/model_dirac_py.i +++ b/models/model_dirac_py/swig/model_dirac_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_dirac_py/wrapfunctions.cpp b/models/model_dirac_py/wrapfunctions.cpp index 9af7c0a091..6d9d1cf398 100644 --- a/models/model_dirac_py/wrapfunctions.cpp +++ b/models/model_dirac_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_dirac_py::Model_model_dirac_py() ); diff --git a/models/model_dirac_py/wrapfunctions.h b/models/model_dirac_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_dirac_py/wrapfunctions.h +++ b/models/model_dirac_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_events_py/main.cpp b/models/model_events_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_events_py/main.cpp +++ b/models/model_events_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_events_py/model_events_py.cpp b/models/model_events_py/model_events_py.cpp index bec1ccacfb..87bb71c88e 100644 --- a/models/model_events_py/model_events_py.cpp +++ b/models/model_events_py/model_events_py.cpp @@ -5,67 +5,67 @@ namespace amici::model_model_events_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "p1", // p[0] "p2", // p[1] "p3", // p[2] "p4", // p[3] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "k1", // k[0] "k2", // k[1] "k3", // k[2] "k4", // k[3] }; -std::array stateNames = { +std::array state_names = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableNames = { +std::array observable_names = { "y1", // y[0] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "p1", // p[0] "p2", // p[1] "p3", // p[2] "p4", // p[3] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "k1", // k[0] "k2", // k[1] "k3", // k[2] "k4", // k[3] }; -std::array stateIds = { +std::array state_ids = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableIds = { +std::array observable_ids = { "y1", // y[0] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1, 2 }; diff --git a/models/model_events_py/model_events_py.h b/models/model_events_py/model_events_py.h index 5a03c91a22..f452c05132 100644 --- a/models/model_events_py/model_events_py.h +++ b/models/model_events_py/model_events_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_events_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_events_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_events_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -438,7 +438,7 @@ class Model_model_events_py : public amici::Model_ODE { } - std::string getName() const override { + std::string get_name() const override { return "model_events_py"; } @@ -446,28 +446,28 @@ class Model_model_events_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -476,55 +476,55 @@ class Model_model_events_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -533,27 +533,27 @@ class Model_model_events_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -562,7 +562,7 @@ class Model_model_events_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -570,7 +570,7 @@ class Model_model_events_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -578,16 +578,16 @@ class Model_model_events_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_events_py/swig/model_events_py.i b/models/model_events_py/swig/model_events_py.i index 192014f2cd..f86cbab411 100644 --- a/models/model_events_py/swig/model_events_py.i +++ b/models/model_events_py/swig/model_events_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_events_py/wrapfunctions.cpp b/models/model_events_py/wrapfunctions.cpp index 4f53e8b48b..04c366c7b9 100644 --- a/models/model_events_py/wrapfunctions.cpp +++ b/models/model_events_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_events_py::Model_model_events_py() ); diff --git a/models/model_events_py/wrapfunctions.h b/models/model_events_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_events_py/wrapfunctions.h +++ b/models/model_events_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_jakstat_adjoint_py/main.cpp b/models/model_jakstat_adjoint_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_jakstat_adjoint_py/main.cpp +++ b/models/model_jakstat_adjoint_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.cpp b/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.cpp index 781de99002..c584ee0582 100644 --- a/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.cpp +++ b/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.cpp @@ -5,7 +5,7 @@ namespace amici::model_model_jakstat_adjoint_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "p1", // p[0] "p2", // p[1] "p3", // p[2] @@ -25,12 +25,12 @@ std::array parameterNames = { "sigma_pEpoR", // p[16] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "Omega_cyt", // k[0] "Omega_nuc", // k[1] }; -std::array stateNames = { +std::array state_names = { "STAT", // x_rdata[0] "pSTAT", // x_rdata[1] "pSTAT_pSTAT", // x_rdata[2] @@ -42,24 +42,24 @@ std::array stateNames = { "nSTAT5", // x_rdata[8] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] "y1", // y[1] "y2", // y[2] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] ObservableScaling::lin, // y[1] ObservableScaling::lin, // y[2] }; -std::array expressionNames = { +std::array expression_names = { "u", // w[0] "flux_r0", // w[1] }; -std::array parameterIds = { +std::array parameter_ids = { "p1", // p[0] "p2", // p[1] "p3", // p[2] @@ -79,12 +79,12 @@ std::array parameterIds = { "sigma_pEpoR", // p[16] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "Omega_cyt", // k[0] "Omega_nuc", // k[1] }; -std::array stateIds = { +std::array state_ids = { "STAT", // x_rdata[0] "pSTAT", // x_rdata[1] "pSTAT_pSTAT", // x_rdata[2] @@ -96,18 +96,18 @@ std::array stateIds = { "nSTAT5", // x_rdata[8] }; -std::array observableIds = { +std::array observable_ids = { "obs_pSTAT", // y[0] "obs_tSTAT", // y[1] "obs_spline", // y[2] }; -std::array expressionIds = { +std::array expression_ids = { "u", // w[0] "flux_r0", // w[1] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; diff --git a/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.h b/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.h index 8f9e90b82e..1520bbcf02 100644 --- a/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.h +++ b/models/model_jakstat_adjoint_py/model_jakstat_adjoint_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_jakstat_adjoint_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_jakstat_adjoint_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_jakstat_adjoint_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -411,7 +411,7 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { std::vector> fexplicit_roots(const realtype *p, const realtype *k) override { return {}; } - std::string getName() const override { + std::string get_name() const override { return "model_jakstat_adjoint_py"; } @@ -419,28 +419,28 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -449,55 +449,55 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -506,27 +506,27 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -535,7 +535,7 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -543,7 +543,7 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -551,16 +551,16 @@ class Model_model_jakstat_adjoint_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_jakstat_adjoint_py/swig/model_jakstat_adjoint_py.i b/models/model_jakstat_adjoint_py/swig/model_jakstat_adjoint_py.i index 57b2bc3c92..3f05b98996 100644 --- a/models/model_jakstat_adjoint_py/swig/model_jakstat_adjoint_py.i +++ b/models/model_jakstat_adjoint_py/swig/model_jakstat_adjoint_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_jakstat_adjoint_py/wrapfunctions.cpp b/models/model_jakstat_adjoint_py/wrapfunctions.cpp index ad3eb038f6..31d5fb7b35 100644 --- a/models/model_jakstat_adjoint_py/wrapfunctions.cpp +++ b/models/model_jakstat_adjoint_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_jakstat_adjoint_py::Model_model_jakstat_adjoint_py() ); diff --git a/models/model_jakstat_adjoint_py/wrapfunctions.h b/models/model_jakstat_adjoint_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_jakstat_adjoint_py/wrapfunctions.h +++ b/models/model_jakstat_adjoint_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_nested_events_py/main.cpp b/models/model_nested_events_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_nested_events_py/main.cpp +++ b/models/model_nested_events_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_nested_events_py/model_nested_events_py.cpp b/models/model_nested_events_py/model_nested_events_py.cpp index fea822d2e6..40603e18e2 100644 --- a/models/model_nested_events_py/model_nested_events_py.cpp +++ b/models/model_nested_events_py/model_nested_events_py.cpp @@ -5,7 +5,7 @@ namespace amici::model_model_nested_events_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "V_0", // p[0] "V_0_inject", // p[1] "t_0", // p[2] @@ -13,27 +13,27 @@ std::array parameterNames = { "delta_V", // p[4] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { }; -std::array stateNames = { +std::array state_names = { "Virus", // x_rdata[0] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "V_0", // p[0] "V_0_inject", // p[1] "t_0", // p[2] @@ -41,23 +41,23 @@ std::array parameterIds = { "delta_V", // p[4] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { }; -std::array stateIds = { +std::array state_ids = { "Virus", // x_rdata[0] }; -std::array observableIds = { +std::array observable_ids = { "obs_Virus", // y[0] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0 }; diff --git a/models/model_nested_events_py/model_nested_events_py.h b/models/model_nested_events_py/model_nested_events_py.h index 1406e3da07..b90345495f 100644 --- a/models/model_nested_events_py/model_nested_events_py.h +++ b/models/model_nested_events_py/model_nested_events_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_nested_events_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_nested_events_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_nested_events_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -411,7 +411,7 @@ class Model_model_nested_events_py : public amici::Model_ODE { } - std::string getName() const override { + std::string get_name() const override { return "model_nested_events_py"; } @@ -419,28 +419,28 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -449,55 +449,55 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -506,27 +506,27 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -535,7 +535,7 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -543,7 +543,7 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -551,16 +551,16 @@ class Model_model_nested_events_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_nested_events_py/swig/model_nested_events_py.i b/models/model_nested_events_py/swig/model_nested_events_py.i index ba5af5ebf8..9f03945317 100644 --- a/models/model_nested_events_py/swig/model_nested_events_py.i +++ b/models/model_nested_events_py/swig/model_nested_events_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_nested_events_py/wrapfunctions.cpp b/models/model_nested_events_py/wrapfunctions.cpp index efe20805bf..8846412b76 100644 --- a/models/model_nested_events_py/wrapfunctions.cpp +++ b/models/model_nested_events_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_nested_events_py::Model_model_nested_events_py() ); diff --git a/models/model_nested_events_py/wrapfunctions.h b/models/model_nested_events_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_nested_events_py/wrapfunctions.h +++ b/models/model_nested_events_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_neuron_py/main.cpp b/models/model_neuron_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_neuron_py/main.cpp +++ b/models/model_neuron_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_neuron_py/model_neuron_py.cpp b/models/model_neuron_py/model_neuron_py.cpp index 87a5b1701d..5ca0b9d008 100644 --- a/models/model_neuron_py/model_neuron_py.cpp +++ b/models/model_neuron_py/model_neuron_py.cpp @@ -5,61 +5,61 @@ namespace amici::model_model_neuron_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "a", // p[0] "b", // p[1] "c", // p[2] "d", // p[3] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "v0", // k[0] "I0", // k[1] }; -std::array stateNames = { +std::array state_names = { "v", // x_rdata[0] "u", // x_rdata[1] }; -std::array observableNames = { +std::array observable_names = { "v", // y[0] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "a", // p[0] "b", // p[1] "c", // p[2] "d", // p[3] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "v0", // k[0] "I0", // k[1] }; -std::array stateIds = { +std::array state_ids = { "v", // x_rdata[0] "u", // x_rdata[1] }; -std::array observableIds = { +std::array observable_ids = { "y1", // y[0] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1 }; diff --git a/models/model_neuron_py/model_neuron_py.h b/models/model_neuron_py/model_neuron_py.h index 9c90582736..dbbcc5b663 100644 --- a/models/model_neuron_py/model_neuron_py.h +++ b/models/model_neuron_py/model_neuron_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_neuron_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_neuron_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_neuron_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -433,7 +433,7 @@ class Model_model_neuron_py : public amici::Model_ODE { std::vector> fexplicit_roots(const realtype *p, const realtype *k) override { return {}; } - std::string getName() const override { + std::string get_name() const override { return "model_neuron_py"; } @@ -441,28 +441,28 @@ class Model_model_neuron_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -471,55 +471,55 @@ class Model_model_neuron_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -528,27 +528,27 @@ class Model_model_neuron_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -557,7 +557,7 @@ class Model_model_neuron_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -565,7 +565,7 @@ class Model_model_neuron_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -573,16 +573,16 @@ class Model_model_neuron_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_neuron_py/swig/model_neuron_py.i b/models/model_neuron_py/swig/model_neuron_py.i index 9b47c96e87..949da25226 100644 --- a/models/model_neuron_py/swig/model_neuron_py.i +++ b/models/model_neuron_py/swig/model_neuron_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_neuron_py/wrapfunctions.cpp b/models/model_neuron_py/wrapfunctions.cpp index a963101e46..bd950d6d6a 100644 --- a/models/model_neuron_py/wrapfunctions.cpp +++ b/models/model_neuron_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_neuron_py::Model_model_neuron_py() ); diff --git a/models/model_neuron_py/wrapfunctions.h b/models/model_neuron_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_neuron_py/wrapfunctions.h +++ b/models/model_neuron_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_robertson_py/main.cpp b/models/model_robertson_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_robertson_py/main.cpp +++ b/models/model_robertson_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_robertson_py/model_robertson_py.cpp b/models/model_robertson_py/model_robertson_py.cpp index a3a61b2018..c274f12cda 100644 --- a/models/model_robertson_py/model_robertson_py.cpp +++ b/models/model_robertson_py/model_robertson_py.cpp @@ -5,65 +5,65 @@ namespace amici::model_model_robertson_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "p1", // p[0] "p2", // p[1] "p3", // p[2] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "k1", // k[0] }; -std::array stateNames = { +std::array state_names = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] "y1", // y[1] "y2", // y[2] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] ObservableScaling::lin, // y[1] ObservableScaling::lin, // y[2] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "p1", // p[0] "p2", // p[1] "p3", // p[2] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "k1", // k[0] }; -std::array stateIds = { +std::array state_ids = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableIds = { +std::array observable_ids = { "obs_x1", // y[0] "obs_x2", // y[1] "obs_x3", // y[2] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1, 2 }; diff --git a/models/model_robertson_py/model_robertson_py.h b/models/model_robertson_py/model_robertson_py.h index 6e91cfd829..174b8e9c56 100644 --- a/models/model_robertson_py/model_robertson_py.h +++ b/models/model_robertson_py/model_robertson_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_robertson_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_robertson_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_robertson_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -395,7 +395,7 @@ class Model_model_robertson_py : public amici::Model_DAE { std::vector> fexplicit_roots(const realtype *p, const realtype *k) override { return {}; } - std::string getName() const override { + std::string get_name() const override { return "model_robertson_py"; } @@ -403,28 +403,28 @@ class Model_model_robertson_py : public amici::Model_DAE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -433,55 +433,55 @@ class Model_model_robertson_py : public amici::Model_DAE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -490,27 +490,27 @@ class Model_model_robertson_py : public amici::Model_DAE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -519,7 +519,7 @@ class Model_model_robertson_py : public amici::Model_DAE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -527,7 +527,7 @@ class Model_model_robertson_py : public amici::Model_DAE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -535,16 +535,16 @@ class Model_model_robertson_py : public amici::Model_DAE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_robertson_py/swig/model_robertson_py.i b/models/model_robertson_py/swig/model_robertson_py.i index 3a629ed8b7..99e14a1916 100644 --- a/models/model_robertson_py/swig/model_robertson_py.i +++ b/models/model_robertson_py/swig/model_robertson_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_robertson_py/wrapfunctions.cpp b/models/model_robertson_py/wrapfunctions.cpp index b3db86631b..98cad9f9f3 100644 --- a/models/model_robertson_py/wrapfunctions.cpp +++ b/models/model_robertson_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_robertson_py::Model_model_robertson_py() ); diff --git a/models/model_robertson_py/wrapfunctions.h b/models/model_robertson_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_robertson_py/wrapfunctions.h +++ b/models/model_robertson_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/models/model_steadystate_py/main.cpp b/models/model_steadystate_py/main.cpp index 28b10015d2..41cbc62010 100644 --- a/models/model_steadystate_py/main.cpp +++ b/models/model_steadystate_py/main.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/models/model_steadystate_py/model_steadystate_py.cpp b/models/model_steadystate_py/model_steadystate_py.cpp index 631841e06c..88ab4724d2 100644 --- a/models/model_steadystate_py/model_steadystate_py.cpp +++ b/models/model_steadystate_py/model_steadystate_py.cpp @@ -5,7 +5,7 @@ namespace amici::model_model_steadystate_py { // clang-format off -std::array parameterNames = { +std::array parameter_names = { "p1", // p[0] "p2", // p[1] "p3", // p[2] @@ -13,36 +13,36 @@ std::array parameterNames = { "p5", // p[4] }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { "k1", // k[0] "k2", // k[1] "k3", // k[2] "k4", // k[3] }; -std::array stateNames = { +std::array state_names = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableNames = { +std::array observable_names = { "y0", // y[0] "y1", // y[1] "y2", // y[2] }; -std::array observableScalings = { +std::array observable_scalings = { ObservableScaling::lin, // y[0] ObservableScaling::lin, // y[1] ObservableScaling::lin, // y[2] }; -std::array expressionNames = { +std::array expression_names = { "flux_r0", // w[0] }; -std::array parameterIds = { +std::array parameter_ids = { "p1", // p[0] "p2", // p[1] "p3", // p[2] @@ -50,30 +50,30 @@ std::array parameterIds = { "p5", // p[4] }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { "k1", // k[0] "k2", // k[1] "k3", // k[2] "k4", // k[3] }; -std::array stateIds = { +std::array state_ids = { "x1", // x_rdata[0] "x2", // x_rdata[1] "x3", // x_rdata[2] }; -std::array observableIds = { +std::array observable_ids = { "obs_x1", // y[0] "obs_x2", // y[1] "obs_x3", // y[2] }; -std::array expressionIds = { +std::array expression_ids = { "flux_r0", // w[0] }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { 0, 1, 2 }; diff --git a/models/model_steadystate_py/model_steadystate_py.h b/models/model_steadystate_py/model_steadystate_py.h index 1e6243b822..67b160e8fd 100644 --- a/models/model_steadystate_py/model_steadystate_py.h +++ b/models/model_steadystate_py/model_steadystate_py.h @@ -14,18 +14,18 @@ class Solver; namespace model_model_steadystate_py { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; extern void Jy_model_steadystate_py(realtype *Jy, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); extern void dJydsigma_model_steadystate_py(realtype *dJydsigma, const int iy, const realtype *p, const realtype *k, const realtype *y, const realtype *sigmay, const realtype *my); @@ -395,7 +395,7 @@ class Model_model_steadystate_py : public amici::Model_ODE { std::vector> fexplicit_roots(const realtype *p, const realtype *k) override { return {}; } - std::string getName() const override { + std::string get_name() const override { return "model_steadystate_py"; } @@ -403,28 +403,28 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -433,55 +433,55 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -490,27 +490,27 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -519,7 +519,7 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return true; } @@ -527,7 +527,7 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "0.34.1"; } @@ -535,16 +535,16 @@ class Model_model_steadystate_py : public amici::Model_ODE { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { - return "d5492c37f7dbc5faa374128e3559b96518e9a937"; + std::string get_amici_commit() const override { + return "f005fac9e2de7c3c90be2ac55d4ad165471ed1e7"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return true; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/models/model_steadystate_py/model_steadystate_py/__init__.py b/models/model_steadystate_py/model_steadystate_py/__init__.py index e5db4754f2..6407687e8f 100644 --- a/models/model_steadystate_py/model_steadystate_py/__init__.py +++ b/models/model_steadystate_py/model_steadystate_py/__init__.py @@ -35,7 +35,6 @@ for var in dir(model_steadystate_py): if not var.startswith("_"): globals()[var] = getattr(model_steadystate_py, var) -get_model = model_steadystate_py.getModel try: # _self: this module; will be set during import diff --git a/models/model_steadystate_py/swig/model_steadystate_py.i b/models/model_steadystate_py/swig/model_steadystate_py.i index 0ca0516bcf..f9e5333fa9 100644 --- a/models/model_steadystate_py/swig/model_steadystate_py.i +++ b/models/model_steadystate_py/swig/model_steadystate_py.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/models/model_steadystate_py/wrapfunctions.cpp b/models/model_steadystate_py/wrapfunctions.cpp index a7fa2126e3..7e3f38f6a8 100644 --- a/models/model_steadystate_py/wrapfunctions.cpp +++ b/models/model_steadystate_py/wrapfunctions.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_model_steadystate_py::Model_model_steadystate_py() ); diff --git a/models/model_steadystate_py/wrapfunctions.h b/models/model_steadystate_py/wrapfunctions.h index e7ba14ce79..e85a763625 100644 --- a/models/model_steadystate_py/wrapfunctions.h +++ b/models/model_steadystate_py/wrapfunctions.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/python/benchmark/benchmark_pysb.py b/python/benchmark/benchmark_pysb.py index 10b3d424ae..95697eceaf 100644 --- a/python/benchmark/benchmark_pysb.py +++ b/python/benchmark/benchmark_pysb.py @@ -86,17 +86,17 @@ pysb_model.name, outdir ) - model_pysb = amici_model_module.getModel() + model_pysb = amici_model_module.get_model() - model_pysb.setTimepoints(tspan) + model_pysb.set_timepoints(tspan) - solver = model_pysb.getSolver() - solver.setMaxSteps(int(1e6)) - solver.setAbsoluteTolerance(atol) - solver.setRelativeTolerance(rtol) + solver = model_pysb.create_solver() + solver.set_max_steps(int(1e6)) + solver.set_absolute_tolerance(atol) + solver.set_relative_tolerance(rtol) time_amici = ( timeit.Timer( - "rdata = amici.runAmiciSimulation(model, solver)", + "rdata = amici.run_simulation(model, solver)", globals={ "model": model_pysb, "solver": solver, diff --git a/python/sdist/amici/__init__.py b/python/sdist/amici/__init__.py index f5beae52d5..4a6a1f9ecb 100644 --- a/python/sdist/amici/__init__.py +++ b/python/sdist/amici/__init__.py @@ -146,10 +146,6 @@ class ModelModule(Protocol): # noqa: F811 To enable static type checking.""" - def getModel(self) -> amici.Model: - """Create a model instance.""" - ... - def get_model(self) -> amici.Model: """Create a model instance.""" ... diff --git a/python/sdist/amici/__init__.template.py b/python/sdist/amici/__init__.template.py index 13f67691e8..dd468d5e7b 100644 --- a/python/sdist/amici/__init__.template.py +++ b/python/sdist/amici/__init__.template.py @@ -35,7 +35,6 @@ for var in dir(TPL_MODELNAME): if not var.startswith("_"): globals()[var] = getattr(TPL_MODELNAME, var) -get_model = TPL_MODELNAME.getModel try: # _self: this module; will be set during import diff --git a/python/sdist/amici/__main__.py b/python/sdist/amici/__main__.py index 398c975dea..19b8e13592 100644 --- a/python/sdist/amici/__main__.py +++ b/python/sdist/amici/__main__.py @@ -4,7 +4,7 @@ from . import ( __version__, - compiledWithOpenMP, + compiled_with_openmp, has_clibs, hdf5_enabled, CpuTimer, @@ -20,7 +20,7 @@ def print_info(): if has_clibs: features.append("extensions") - if compiledWithOpenMP(): + if compiled_with_openmp(): features.append("OpenMP") if hdf5_enabled: diff --git a/python/sdist/amici/debugging/__init__.py b/python/sdist/amici/debugging/__init__.py index 55b24e7b18..46a93f45af 100644 --- a/python/sdist/amici/debugging/__init__.py +++ b/python/sdist/amici/debugging/__init__.py @@ -30,17 +30,17 @@ def get_model_for_preeq(model: amici.Model, edata: amici.ExpData): Output timepoints are set to ``[inf]`` and will have to be adjusted. """ model = model.clone() - model.setTimepoints([np.inf]) - model.setFixedParameters(edata.fixedParametersPreequilibration) + model.set_timepoints([np.inf]) + model.set_fixed_parameters(edata.fixed_parameters_pre_equilibration) if edata.pscale: - model.setParameterScale(edata.pscale) + model.set_parameter_scale(edata.pscale) if edata.parameters: - model.setParameters(edata.parameters) + model.set_parameters(edata.parameters) if edata.plist: - model.setParameterList(edata.plist) - model.setInitialStates(edata.x0) + model.set_parameter_list(edata.plist) + model.set_initial_state(edata.x0) # has to be set *after* parameter list/scale! - model.setInitialStateSensitivities(edata.sx0) - model.setT0(edata.tstart_) + model.set_initial_state_sensitivities(edata.sx0) + model.set_t0(edata.t_start) return model diff --git a/python/sdist/amici/gradient_check.py b/python/sdist/amici/gradient_check.py index 3b6f86572d..116b7c44f5 100644 --- a/python/sdist/amici/gradient_check.py +++ b/python/sdist/amici/gradient_check.py @@ -19,7 +19,7 @@ SensitivityMethod, SensitivityOrder, Solver, - runAmiciSimulation, + run_simulation, ) @@ -66,9 +66,9 @@ def check_finite_difference( finite difference step-size """ - og_sensitivity_order = solver.getSensitivityOrder() - og_parameters = model.getParameters() - og_plist = model.getParameterList() + og_sensitivity_order = solver.get_sensitivity_order() + og_parameters = model.get_parameters() + og_plist = model.get_parameter_list() if edata: og_eplist = edata.plist @@ -76,24 +76,24 @@ def check_finite_difference( p = copy.deepcopy(x0) plist = [ip] - model.setParameters(p) - model.setParameterList(plist) + model.set_parameters(p) + model.set_parameter_list(plist) if edata: edata.plist = plist # simulation with gradient if int(og_sensitivity_order) < int(SensitivityOrder.first): - solver.setSensitivityOrder(SensitivityOrder.first) - rdata = runAmiciSimulation(model, solver, edata) + solver.set_sensitivity_order(SensitivityOrder.first) + rdata = run_simulation(model, solver, edata) if rdata["status"] != AMICI_SUCCESS: raise AssertionError(f"Simulation failed (status {rdata['status']}") # finite difference - solver.setSensitivityOrder(SensitivityOrder.none) + solver.set_sensitivity_order(SensitivityOrder.none) pf = copy.deepcopy(x0) pb = copy.deepcopy(x0) - pscale = model.getParameterScale()[ip] + pscale = model.get_parameter_scale()[ip] if x0[ip] == 0 or pscale != int(ParameterScaling.none): pf[ip] += epsilon / 2 pb[ip] -= epsilon / 2 @@ -102,14 +102,14 @@ def check_finite_difference( pb[ip] /= 1 + epsilon / 2 # forward: - model.setParameters(pf) - rdataf = runAmiciSimulation(model, solver, edata) + model.set_parameters(pf) + rdataf = run_simulation(model, solver, edata) if rdataf["status"] != AMICI_SUCCESS: raise AssertionError(f"Simulation failed (status {rdataf['status']}") # backward: - model.setParameters(pb) - rdatab = runAmiciSimulation(model, solver, edata) + model.set_parameters(pb) + rdatab = run_simulation(model, solver, edata) if rdatab["status"] != AMICI_SUCCESS: raise AssertionError(f"Simulation failed (status {rdatab['status']}") @@ -132,14 +132,14 @@ def check_finite_difference( rtol=rtol, field=field, ip=ip, - parameter_id=model.getParameterIds()[ip] - if model.hasParameterIds() + parameter_id=model.get_parameter_ids()[ip] + if model.has_parameter_ids() else None, ) - solver.setSensitivityOrder(og_sensitivity_order) - model.setParameters(og_parameters) - model.setParameterList(og_plist) + solver.set_sensitivity_order(og_sensitivity_order) + model.set_parameters(og_parameters) + model.set_parameter_list(og_plist) if edata: edata.plist = og_eplist @@ -169,14 +169,14 @@ def check_derivatives( are zero :param skip_fields: list of fields to skip """ - p = np.array(model.getParameters()) + p = np.array(model.get_parameters()) - og_sens_order = solver.getSensitivityOrder() + og_sens_order = solver.get_sensitivity_order() if int(og_sens_order) < int(SensitivityOrder.first): - solver.setSensitivityOrder(SensitivityOrder.first) - rdata = runAmiciSimulation(model, solver, edata) - solver.setSensitivityOrder(og_sens_order) + solver.set_sensitivity_order(SensitivityOrder.first) + rdata = run_simulation(model, solver, edata) + solver.set_sensitivity_order(og_sens_order) if rdata["status"] != AMICI_SUCCESS: raise AssertionError(f"Simulation failed (status {rdata['status']}") @@ -184,8 +184,8 @@ def check_derivatives( fields = [] if ( - solver.getSensitivityMethod() == SensitivityMethod.forward - and solver.getSensitivityOrder() <= SensitivityOrder.first + solver.get_sensitivity_method() == SensitivityMethod.forward + and solver.get_sensitivity_order() <= SensitivityOrder.first ): if rdata.sx_ss is not None: fields.append("x_ss") @@ -193,7 +193,7 @@ def check_derivatives( fields.append("x") leastsquares_applicable = ( - solver.getSensitivityMethod() == SensitivityMethod.forward + solver.get_sensitivity_method() == SensitivityMethod.forward and edata is not None ) @@ -201,7 +201,7 @@ def check_derivatives( "ssigmay" in rdata.keys() and rdata["ssigmay"] is not None and rdata["ssigmay"].any() - and not model.getAddSigmaResiduals() + and not model.get_add_sigma_residuals() ): leastsquares_applicable = False @@ -229,7 +229,7 @@ def check_derivatives( fields = [f for f in fields if f not in (skip_fields or [])] # only check the sensitivities w.r.t. the selected parameters - plist = model.getParameterList() + plist = model.get_parameter_list() if edata and edata.plist: plist = edata.plist diff --git a/python/sdist/amici/numpy.py b/python/sdist/amici/numpy.py index 653bc13990..247ee6a05e 100644 --- a/python/sdist/amici/numpy.py +++ b/python/sdist/amici/numpy.py @@ -348,28 +348,28 @@ class ReturnDataView(SwigPtrView): "preeq_wrms", "preeq_t", "preeq_numsteps", - "preeq_numstepsB", + "preeq_numsteps_b", "preeq_status", "preeq_cpu_time", - "preeq_cpu_timeB", + "preeq_cpu_time_b", "posteq_wrms", "posteq_t", "posteq_numsteps", - "posteq_numstepsB", + "posteq_numsteps_b", "posteq_status", "posteq_cpu_time", - "posteq_cpu_timeB", + "posteq_cpu_time_b", "numsteps", - "numrhsevals", - "numerrtestfails", - "numnonlinsolvconvfails", + "num_rhs_evals", + "num_err_test_fails", + "num_non_lin_solv_conv_fails", "order", "cpu_time", - "numstepsB", - "numrhsevalsB", - "numerrtestfailsB", - "numnonlinsolvconvfailsB", - "cpu_timeB", + "numsteps_b", + "num_rhs_evals_b", + "num_err_test_fails_b", + "num_non_lin_solv_conv_fails_b", + "cpu_time_b", "cpu_time_total", "messages", "t_last", @@ -424,14 +424,14 @@ def __init__(self, rdata: ReturnDataPtr | ReturnData): "posteq_numlinsteps": [rdata.newton_maxsteps, 2], "posteq_numsteps": [3], "numsteps": [rdata.nt], - "numrhsevals": [rdata.nt], - "numerrtestfails": [rdata.nt], - "numnonlinsolvconvfails": [rdata.nt], + "num_rhs_evals": [rdata.nt], + "num_err_test_fails": [rdata.nt], + "num_non_lin_solv_conv_fails": [rdata.nt], "order": [rdata.nt], - "numstepsB": [rdata.nt], - "numrhsevalsB": [rdata.nt], - "numerrtestfailsB": [rdata.nt], - "numnonlinsolvconvfailsB": [rdata.nt], + "numsteps_b": [rdata.nt], + "num_rhs_evals_b": [rdata.nt], + "num_err_test_fails_b": [rdata.nt], + "num_non_lin_solv_conv_fails_b": [rdata.nt], } self.xr = XArrayFactory(self) super().__init__(rdata) @@ -481,18 +481,18 @@ def by_id( field = _entity_type_from_id(entity_id, self, model) if field in {"x", "x0", "x_ss", "sx", "sx0", "sx_ss"}: - ids = (model and model.getStateIds()) or self._swigptr.state_ids + ids = (model and model.get_state_ids()) or self._swigptr.state_ids elif field in {"w"}: ids = ( - model and model.getExpressionIds() + model and model.get_expression_ids() ) or self._swigptr.expression_ids elif field in {"y", "sy", "sigmay"}: ids = ( - model and model.getObservableIds() + model and model.get_observable_ids() ) or self._swigptr.observable_ids elif field in {"sllh"}: ids = ( - model and model.getParameterIds() + model and model.get_parameter_ids() ) or self._swigptr.parameter_ids else: raise NotImplementedError( @@ -514,13 +514,13 @@ class ExpDataView(SwigPtrView): _field_names = [ "ts", - "observedData", - "observedDataStdDev", - "observedEvents", - "observedEventsStdDev", - "fixedParameters", - "fixedParametersPreequilibration", - "fixedParametersPresimulation", + "observed_data", + "observed_data_std_dev", + "observed_events", + "observed_events_std_dev", + "fixed_parameters", + "fixed_parameters_pre_equilibration", + "fixed_parameters_presimulation", ] def __init__(self, edata: ExpDataPtr | ExpData): @@ -536,25 +536,25 @@ def __init__(self, edata: ExpDataPtr | ExpData): self._field_dimensions = { "ts": [edata.nt()], # observables - "observedData": [edata.nt(), edata.nytrue()], - "observedDataStdDev": [edata.nt(), edata.nytrue()], + "observed_data": [edata.nt(), edata.nytrue()], + "observed_data_std_dev": [edata.nt(), edata.nytrue()], # event observables - "observedEvents": [edata.nmaxevent(), edata.nztrue()], - "observedEventsStdDev": [edata.nmaxevent(), edata.nztrue()], + "observed_events": [edata.nmaxevent(), edata.nztrue()], + "observed_events_std_dev": [edata.nmaxevent(), edata.nztrue()], # fixed parameters - "fixedParameters": [len(edata.fixedParameters)], - "fixedParametersPreequilibration": [ - len(edata.fixedParametersPreequilibration) + "fixed_parameters": [len(edata.fixed_parameters)], + "fixed_parameters_pre_equilibration": [ + len(edata.fixed_parameters_pre_equilibration) ], - "fixedParametersPresimulation": [ - len(edata.fixedParametersPresimulation) + "fixed_parameters_presimulation": [ + len(edata.fixed_parameters_presimulation) ], } - edata.ts = edata.ts_ - edata.observedData = edata.getObservedData() - edata.observedDataStdDev = edata.getObservedDataStdDev() - edata.observedEvents = edata.getObservedEvents() - edata.observedEventsStdDev = edata.getObservedEventsStdDev() + edata.ts = edata.timepoints + edata.observed_data = edata.get_observed_data() + edata.observed_data_std_dev = edata.get_observed_data_std_dev() + edata.observed_events = edata.get_observed_events() + edata.observed_events_std_dev = edata.get_observed_events_std_dev() super().__init__(edata) @@ -590,14 +590,14 @@ def _entity_type_from_id( ) -> Literal["x", "y", "w", "p", "k"]: """Guess the type of some entity by its ID.""" for entity_type, symbol in ( - ("State", "x"), - ("Observable", "y"), - ("Expression", "w"), - ("Parameter", "p"), - ("FixedParameter", "k"), + ("state", "x"), + ("observable", "y"), + ("expression", "w"), + ("parameter", "p"), + ("fixed_parameter", "k"), ): if model: - if entity_id in getattr(model, f"get{entity_type}Ids")(): + if entity_id in getattr(model, f"get_{entity_type}_ids")(): return symbol else: if entity_id in getattr( diff --git a/python/sdist/amici/pandas.py b/python/sdist/amici/pandas.py index 0a3a2523fe..0e2c777b18 100644 --- a/python/sdist/amici/pandas.py +++ b/python/sdist/amici/pandas.py @@ -17,11 +17,11 @@ __all__ = [ "get_expressions_as_dataframe", - "getEdataFromDataFrame", - "getDataObservablesAsDataFrame", - "getSimulationObservablesAsDataFrame", - "getSimulationStatesAsDataFrame", - "getResidualsAsDataFrame", + "get_edata_from_data_frame", + "get_data_observables_as_data_frame", + "get_simulation_observables_as_data_frame", + "get_simulation_states_as_data_frame", + "get_residuals_as_data_frame", ] ExpDatas = ( @@ -70,7 +70,7 @@ def _process_rdata_list(rdata_list: ReturnDatas) -> list[amici.ReturnDataView]: return rdata_list -def getDataObservablesAsDataFrame( +def get_data_observables_as_data_frame( model: AmiciModel, edata_list: ExpDatas, by_id: bool | None = False ) -> pd.DataFrame: """ @@ -101,14 +101,14 @@ def getDataObservablesAsDataFrame( dicts = [] for edata in edata_list: npdata = ExpDataView(edata) - for i_time, timepoint in enumerate(edata.getTimepoints()): + for i_time, timepoint in enumerate(edata.get_timepoints()): datadict = {"time": timepoint, "datatype": "data"} # add observables and noises for i_obs, obs in enumerate( - _get_names_or_ids(model, "Observable", by_id=by_id) + _get_names_or_ids(model, "observable", by_id=by_id) ): - datadict[obs] = npdata["observedData"][i_time, i_obs] - datadict[obs + "_std"] = npdata["observedDataStdDev"][ + datadict[obs] = npdata["observed_data"][i_time, i_obs] + datadict[obs + "_std"] = npdata["observed_data_std_dev"][ i_time, i_obs ] @@ -120,7 +120,7 @@ def getDataObservablesAsDataFrame( return pd.DataFrame.from_records(dicts, columns=cols) -def getSimulationObservablesAsDataFrame( +def get_simulation_observables_as_data_frame( model: amici.Model, edata_list: ExpDatas, rdata_list: ReturnDatas, @@ -164,7 +164,7 @@ def getSimulationObservablesAsDataFrame( } # append simulations for i_obs, obs in enumerate( - _get_names_or_ids(model, "Observable", by_id=by_id) + _get_names_or_ids(model, "observable", by_id=by_id) ): datadict[obs] = rdata["y"][i_time, i_obs] datadict[obs + "_std"] = rdata["sigmay"][i_time, i_obs] @@ -178,7 +178,7 @@ def getSimulationObservablesAsDataFrame( return pd.DataFrame.from_records(dicts, columns=cols) -def getSimulationStatesAsDataFrame( +def get_simulation_states_as_data_frame( model: amici.Model, edata_list: ExpDatas, rdata_list: ReturnDatas, @@ -221,7 +221,7 @@ def getSimulationStatesAsDataFrame( # append states for i_state, state in enumerate( - _get_names_or_ids(model, "State", by_id=by_id) + _get_names_or_ids(model, "state", by_id=by_id) ): datadict[state] = rdata["x"][i_time, i_state] @@ -277,7 +277,7 @@ def get_expressions_as_dataframe( # append expressions for i_expr, expr in enumerate( - _get_names_or_ids(model, "Expression", by_id=by_id) + _get_names_or_ids(model, "expression", by_id=by_id) ): datadict[expr] = rdata["w"][i_time, i_expr] @@ -290,7 +290,7 @@ def get_expressions_as_dataframe( return pd.DataFrame.from_records(dicts, columns=cols) -def getResidualsAsDataFrame( +def get_residuals_as_data_frame( model: amici.Model, edata_list: ExpDatas, rdata_list: ReturnDatas, @@ -322,8 +322,10 @@ def getResidualsAsDataFrame( rdata_list = _process_rdata_list(rdata_list) # create observable and simulation dataframes - df_edata = getDataObservablesAsDataFrame(model, edata_list, by_id=by_id) - df_rdata = getSimulationObservablesAsDataFrame( + df_edata = get_data_observables_as_data_frame( + model, edata_list, by_id=by_id + ) + df_rdata = get_simulation_observables_as_data_frame( model, edata_list, rdata_list, by_id=by_id ) @@ -339,7 +341,7 @@ def getResidualsAsDataFrame( } # iterate over observables - for obs in _get_names_or_ids(model, "Observable", by_id=by_id): + for obs in _get_names_or_ids(model, "observable", by_id=by_id): # compute residual and append to dict datadict[obs] = abs( (df_edata.loc[row][obs] - df_rdata.loc[row][obs]) @@ -347,7 +349,7 @@ def getResidualsAsDataFrame( ) # iterate over fixed parameters - for par in _get_names_or_ids(model, "FixedParameter", by_id=by_id): + for par in _get_names_or_ids(model, "fixed_parameter", by_id=by_id): # fill in conditions datadict[par] = df_rdata.loc[row][par] datadict[par + "_preeq"] = df_rdata.loc[row][par + "_preeq"] @@ -391,39 +393,39 @@ def _fill_conditions_dict( datadict["t_presim"] = edata.t_presim for i_par, par in enumerate( - _get_names_or_ids(model, "FixedParameter", by_id=by_id) + _get_names_or_ids(model, "fixed_parameter", by_id=by_id) ): - if len(edata.fixedParameters): - datadict[par] = edata.fixedParameters[i_par] + if len(edata.fixed_parameters): + datadict[par] = edata.fixed_parameters[i_par] else: - datadict[par] = model.getFixedParameters()[i_par] + datadict[par] = model.get_fixed_parameters()[i_par] - if len(edata.fixedParametersPreequilibration): - datadict[par + "_preeq"] = edata.fixedParametersPreequilibration[ - i_par - ] + if len(edata.fixed_parameters_pre_equilibration): + datadict[par + "_preeq"] = ( + edata.fixed_parameters_pre_equilibration[i_par] + ) else: datadict[par + "_preeq"] = np.nan - if len(edata.fixedParametersPresimulation): - datadict[par + "_presim"] = edata.fixedParametersPresimulation[ + if len(edata.fixed_parameters_presimulation): + datadict[par + "_presim"] = edata.fixed_parameters_presimulation[ i_par ] else: datadict[par + "_presim"] = np.nan for i_par, par in enumerate( - _get_names_or_ids(model, "Parameter", by_id=by_id) + _get_names_or_ids(model, "parameter", by_id=by_id) ): if len(edata.parameters): datadict[par] = edata.parameters[i_par] else: - datadict[par] = model.getParameters()[i_par] + datadict[par] = model.get_parameters()[i_par] if len(edata.pscale): datadict[par + "_scale"] = edata.pscale[i_par] else: - datadict[par + "_scale"] = model.getParameterScale()[i_par] + datadict[par + "_scale"] = model.get_parameter_scale()[i_par] return datadict @@ -444,24 +446,28 @@ def _get_extended_observable_cols(model: AmiciModel, by_id: bool) -> list[str]: """ return ( ["condition_id", "time", "datatype", "t_presim"] - + _get_names_or_ids(model, "FixedParameter", by_id=by_id) + + _get_names_or_ids(model, "fixed_parameter", by_id=by_id) + [ name + "_preeq" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] + [ name + "_presim" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] - + _get_names_or_ids(model, "Parameter", by_id=by_id) + + _get_names_or_ids(model, "parameter", by_id=by_id) + [ name + "_scale" - for name in _get_names_or_ids(model, "Parameter", by_id=by_id) + for name in _get_names_or_ids(model, "parameter", by_id=by_id) ] - + _get_names_or_ids(model, "Observable", by_id=by_id) + + _get_names_or_ids(model, "observable", by_id=by_id) + [ name + "_std" - for name in _get_names_or_ids(model, "Observable", by_id=by_id) + for name in _get_names_or_ids(model, "observable", by_id=by_id) ] ) @@ -482,21 +488,25 @@ def _get_observable_cols(model: AmiciModel, by_id: bool) -> list[str]: """ return ( ["condition_id", "time", "t_presim"] - + _get_names_or_ids(model, "FixedParameter", by_id=by_id) + + _get_names_or_ids(model, "fixed_parameter", by_id=by_id) + [ name + "_preeq" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] + [ name + "_presim" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] - + _get_names_or_ids(model, "Parameter", by_id=by_id) + + _get_names_or_ids(model, "parameter", by_id=by_id) + [ name + "_scale" - for name in _get_names_or_ids(model, "Parameter", by_id=by_id) + for name in _get_names_or_ids(model, "parameter", by_id=by_id) ] - + _get_names_or_ids(model, "Observable", by_id=by_id) + + _get_names_or_ids(model, "observable", by_id=by_id) ) @@ -516,21 +526,25 @@ def _get_state_cols(model: AmiciModel, by_id: bool) -> list[str]: """ return ( ["condition_id", "time", "t_presim"] - + _get_names_or_ids(model, "FixedParameter", by_id=by_id) + + _get_names_or_ids(model, "fixed_parameter", by_id=by_id) + [ name + "_preeq" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] + [ name + "_presim" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] - + _get_names_or_ids(model, "Parameter", by_id=by_id) + + _get_names_or_ids(model, "parameter", by_id=by_id) + [ name + "_scale" - for name in _get_names_or_ids(model, "Parameter", by_id=by_id) + for name in _get_names_or_ids(model, "parameter", by_id=by_id) ] - + _get_names_or_ids(model, "State", by_id=by_id) + + _get_names_or_ids(model, "state", by_id=by_id) ) @@ -549,21 +563,25 @@ def _get_expression_cols(model: AmiciModel, by_id: bool) -> list[str]: """ return ( ["condition_id", "time", "t_presim"] - + _get_names_or_ids(model, "FixedParameter", by_id=by_id) + + _get_names_or_ids(model, "fixed_parameter", by_id=by_id) + [ name + "_preeq" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] + [ name + "_presim" - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids( + model, "fixed_parameter", by_id=by_id + ) ] - + _get_names_or_ids(model, "Parameter", by_id=by_id) + + _get_names_or_ids(model, "parameter", by_id=by_id) + [ name + "_scale" - for name in _get_names_or_ids(model, "Parameter", by_id=by_id) + for name in _get_names_or_ids(model, "parameter", by_id=by_id) ] - + _get_names_or_ids(model, "Expression", by_id=by_id) + + _get_names_or_ids(model, "expression", by_id=by_id) ) @@ -589,22 +607,22 @@ def _get_names_or_ids( """ # check whether variable type permitted variable_options = [ - "Parameter", - "FixedParameter", - "Observable", - "State", - "Expression", + "parameter", + "fixed_parameter", + "observable", + "state", + "expression", ] if variable not in variable_options: raise ValueError("Variable must be in " + str(variable_options)) # extract attributes - names = list(getattr(model, f"get{variable}Names")()) - ids = list(getattr(model, f"get{variable}Ids")()) + names = list(getattr(model, f"get_{variable}_names")()) + ids = list(getattr(model, f"get_{variable}_ids")()) # find out if model has names and ids - has_names = getattr(model, f"has{variable}Names")() - has_ids = getattr(model, f"has{variable}Ids")() + has_names = getattr(model, f"has_{variable}_names")() + has_ids = getattr(model, f"has_{variable}_ids")() # extract labels if not by_id and has_names and len(set(names)) == len(names): @@ -642,9 +660,8 @@ def _get_specialized_fixed_parameters( :param overwrite: dict specifying which values in condition are to be replaced. :param by_id: - bool - If True, ids are used as identifiers, otherwise the possibly more - descriptive names. + If True, ids are used as identifiers, otherwise the possibly more + descriptive names. :return: overwritten FixedParameter as list. @@ -654,11 +671,11 @@ def _get_specialized_fixed_parameters( cond[field] = overwrite[field] return [ float(cond[name]) - for name in _get_names_or_ids(model, "FixedParameter", by_id=by_id) + for name in _get_names_or_ids(model, "fixed_parameter", by_id=by_id) ] -def constructEdataFromDataFrame( +def construct_edata_from_data_frame( df: pd.DataFrame, model: AmiciModel, condition: pd.Series, @@ -695,12 +712,12 @@ def constructEdataFromDataFrame( # timepoints df = df.sort_values(by="time", ascending=True) - edata.setTimepoints(df["time"].values.astype(float)) + edata.set_timepoints(df["time"].values.astype(float)) # get fixed parameters from condition overwrite_preeq = {} overwrite_presim = {} - for par in list(_get_names_or_ids(model, "FixedParameter", by_id=by_id)): + for par in list(_get_names_or_ids(model, "fixed_parameter", by_id=by_id)): if par + "_preeq" in condition.keys() and not math.isnan( condition[par + "_preeq"].astype(float) ): @@ -711,23 +728,23 @@ def constructEdataFromDataFrame( overwrite_presim[par] = condition[par + "_presim"].astype(float) # fill in fixed parameters - edata.fixedParameters = ( - condition[_get_names_or_ids(model, "FixedParameter", by_id=by_id)] + edata.fixed_parameters = ( + condition[_get_names_or_ids(model, "fixed_parameter", by_id=by_id)] .astype(float) .values ) # fill in parameters edata.parameters = ( - condition[_get_names_or_ids(model, "Parameter", by_id=by_id)] + condition[_get_names_or_ids(model, "parameter", by_id=by_id)] .astype(float) .values ) - edata.pscale = amici.parameterScalingFromIntVector( + edata.pscale = amici.parameter_scaling_from_int_vector( [ amici.ParameterScaling(condition[par + "_scale"].astype(int)) - for par in list(_get_names_or_ids(model, "Parameter", by_id=by_id)) + for par in list(_get_names_or_ids(model, "parameter", by_id=by_id)) ] ) @@ -735,14 +752,14 @@ def constructEdataFromDataFrame( if any( [overwrite_preeq[key] != condition[key] for key in overwrite_preeq] ): - edata.fixedParametersPreequilibration = ( + edata.fixed_parameters_pre_equilibration = ( _get_specialized_fixed_parameters( model, condition, overwrite_preeq, by_id=by_id ) ) elif len(overwrite_preeq): - edata.fixedParametersPreequilibration = copy.deepcopy( - edata.fixedParameters + edata.fixed_parameters_pre_equilibration = copy.deepcopy( + edata.fixed_parameters ) # fill in presimulation parameters @@ -752,12 +769,14 @@ def constructEdataFromDataFrame( for key in overwrite_presim.keys() ] ): - edata.fixedParametersPresimulation = _get_specialized_fixed_parameters( - model, condition, overwrite_presim, by_id=by_id + edata.fixed_parameters_presimulation = ( + _get_specialized_fixed_parameters( + model, condition, overwrite_presim, by_id=by_id + ) ) elif len(overwrite_presim.keys()): - edata.fixedParametersPresimulation = copy.deepcopy( - edata.fixedParameters + edata.fixed_parameters_presimulation = copy.deepcopy( + edata.fixed_parameters ) # fill in presimulation time @@ -766,19 +785,19 @@ def constructEdataFromDataFrame( # fill in data and stds for obs_index, obs in enumerate( - _get_names_or_ids(model, "Observable", by_id=by_id) + _get_names_or_ids(model, "observable", by_id=by_id) ): if obs in df.keys(): - edata.setObservedData(df[obs].values.astype(float), obs_index) + edata.set_observed_data(df[obs].values.astype(float), obs_index) if obs + "_std" in df.keys(): - edata.setObservedDataStdDev( + edata.set_observed_data_std_dev( df[obs + "_std"].values.astype(float), obs_index ) return edata -def getEdataFromDataFrame( +def get_edata_from_data_frame( model: AmiciModel, df: pd.DataFrame, by_id: bool | None = False ) -> list[amici.amici.ExpData]: """ @@ -809,16 +828,16 @@ def getEdataFromDataFrame( # fixed parameters condition_parameters = _get_names_or_ids( - model, "FixedParameter", by_id=by_id + model, "fixed_parameter", by_id=by_id ) # preeq and presim parameters - for par in _get_names_or_ids(model, "FixedParameter", by_id=by_id): + for par in _get_names_or_ids(model, "fixed_parameter", by_id=by_id): if par + "_preeq" in df.columns: condition_parameters.append(par + "_preeq") if par + "_presim" in df.columns: condition_parameters.append(par + "_presim") # parameters & scales - for par in _get_names_or_ids(model, "Parameter", by_id=by_id): + for par in _get_names_or_ids(model, "parameter", by_id=by_id): condition_parameters.append(par) condition_parameters.append(par + "_scale") # presimulation time @@ -841,7 +860,7 @@ def getEdataFromDataFrame( edata_df = df[selected] edata_list.append( - constructEdataFromDataFrame(edata_df, model, row, by_id=by_id) + construct_edata_from_data_frame(edata_df, model, row, by_id=by_id) ) return edata_list diff --git a/python/sdist/amici/petab/conditions.py b/python/sdist/amici/petab/conditions.py index 8f7552bb60..dc8d00a0d8 100644 --- a/python/sdist/amici/petab/conditions.py +++ b/python/sdist/amici/petab/conditions.py @@ -184,19 +184,19 @@ def _get_par(model_par, value, mapping): # parameter list from mapping dict parameters = [ - map_sim_var[par_id] for par_id in amici_model.getParameterIds() + map_sim_var[par_id] for par_id in amici_model.get_parameter_ids() ] # scales list from mapping dict scales = [ petab_to_amici_scale(scale_map_sim_var[par_id]) - for par_id in amici_model.getParameterIds() + for par_id in amici_model.get_parameter_ids() ] # plist plist = [ ip - for ip, par_id in enumerate(amici_model.getParameterIds()) + for ip, par_id in enumerate(amici_model.get_parameter_ids()) if isinstance(parameter_mapping.map_sim_var[par_id], str) ] @@ -204,7 +204,7 @@ def _get_par(model_par, value, mapping): edata.parameters = np.asarray(parameters, dtype=float) if scales: - edata.pscale = amici.parameterScalingFromIntVector(scales) + edata.pscale = amici.parameter_scaling_from_int_vector(scales) if plist: edata.plist = plist @@ -214,18 +214,18 @@ def _get_par(model_par, value, mapping): if map_preeq_fix: fixed_pars_preeq = [ map_preeq_fix[par_id] - for par_id in amici_model.getFixedParameterIds() + for par_id in amici_model.get_fixed_parameter_ids() ] - edata.fixedParametersPreequilibration = fixed_pars_preeq + edata.fixed_parameters_pre_equilibration = fixed_pars_preeq ########################################################################## # fixed parameters simulation if map_sim_fix: fixed_pars_sim = [ map_sim_fix[par_id] - for par_id in amici_model.getFixedParameterIds() + for par_id in amici_model.get_fixed_parameter_ids() ] - edata.fixedParameters = fixed_pars_sim + edata.fixed_parameters = fixed_pars_sim def create_parameterized_edatas( @@ -353,7 +353,7 @@ def create_edata_for_condition( condition.get(PREEQUILIBRATION_CONDITION_ID) and states_in_condition_table ): - state_ids = amici_model.getStateIds() + state_ids = amici_model.get_state_ids() state_idx_reinitalization = [ state_ids.index(s) for s, (v, v_preeq) in states_in_condition_table.items() @@ -374,7 +374,7 @@ def create_edata_for_condition( timepoints_w_reps = _get_timepoints_with_replicates( df_for_condition=measurement_df ) - edata.setTimepoints(timepoints_w_reps) + edata.set_timepoints(timepoints_w_reps) ########################################################################## # measurements and sigmas @@ -383,8 +383,8 @@ def create_edata_for_condition( timepoints_w_reps=timepoints_w_reps, observable_ids=observable_ids, ) - edata.setObservedData(y.flatten()) - edata.setObservedDataStdDev(sigma_y.flatten()) + edata.set_observed_data(y.flatten()) + edata.set_observed_data_std_dev(sigma_y.flatten()) return edata @@ -415,7 +415,7 @@ def create_edatas( petab_problem.get_simulation_conditions_from_measurement_df() ) - observable_ids = amici_model.getObservableIds() + observable_ids = amici_model.get_observable_ids() measurement_groupvar = [SIMULATION_CONDITION_ID] if PREEQUILIBRATION_CONDITION_ID in simulation_conditions: diff --git a/python/sdist/amici/petab/import_helpers.py b/python/sdist/amici/petab/import_helpers.py index 1d248c1239..fa2e37e995 100644 --- a/python/sdist/amici/petab/import_helpers.py +++ b/python/sdist/amici/petab/import_helpers.py @@ -150,7 +150,7 @@ def _can_import_model( if jax: return hasattr(model_module, "Model") else: - return hasattr(model_module, "getModel") + return hasattr(model_module, "get_model") def get_fixed_parameters( @@ -252,8 +252,8 @@ def check_model( if petab_problem.parameter_df is None: return - amici_ids_free = set(amici_model.getParameterIds()) - amici_ids = amici_ids_free | set(amici_model.getFixedParameterIds()) + amici_ids_free = set(amici_model.get_parameter_ids()) + amici_ids = amici_ids_free | set(amici_model.get_fixed_parameter_ids()) petab_ids_free = set( petab_problem.parameter_df.loc[ diff --git a/python/sdist/amici/petab/parameter_mapping.py b/python/sdist/amici/petab/parameter_mapping.py index 4785b2f991..ca5ced6a60 100644 --- a/python/sdist/amici/petab/parameter_mapping.py +++ b/python/sdist/amici/petab/parameter_mapping.py @@ -531,8 +531,8 @@ def create_parameter_mapping_for_condition( # merge_preeq_and_sim_pars_condition below may fail. # TODO: This can be done already in parameter mapping creation. if amici_model is not None: - variable_par_ids = amici_model.getParameterIds() - fixed_par_ids = amici_model.getFixedParameterIds() + variable_par_ids = amici_model.get_parameter_ids() + fixed_par_ids = amici_model.get_fixed_parameter_ids() condition_map_preeq_var, condition_map_preeq_fix = _subset_dict( condition_map_preeq, variable_par_ids, fixed_par_ids ) diff --git a/python/sdist/amici/petab/petab_import.py b/python/sdist/amici/petab/petab_import.py index 4538be0d1d..b1564f7891 100644 --- a/python/sdist/amici/petab/petab_import.py +++ b/python/sdist/amici/petab/petab_import.py @@ -166,7 +166,7 @@ def import_petab_problem( ) return model - model = model_module.getModel() + model = model_module.get_model() check_model(amici_model=model, petab_problem=petab_problem) logger.info( diff --git a/python/sdist/amici/petab/sbml_import.py b/python/sdist/amici/petab/sbml_import.py index eb8872e05c..477f5d0d4a 100644 --- a/python/sdist/amici/petab/sbml_import.py +++ b/python/sdist/amici/petab/sbml_import.py @@ -413,7 +413,7 @@ def import_model_sbml( ): # check that the model extension was compiled successfully model_module = amici.import_model_module(model_name, model_output_dir) - model = model_module.getModel() + model = model_module.get_model() check_model(amici_model=model, petab_problem=petab_problem) return sbml_importer diff --git a/python/sdist/amici/petab/simulations.py b/python/sdist/amici/petab/simulations.py index 0ee04332d1..5b8906dced 100644 --- a/python/sdist/amici/petab/simulations.py +++ b/python/sdist/amici/petab/simulations.py @@ -132,7 +132,7 @@ def simulate_petab( logger.setLevel(log_level) if solver is None: - solver = amici_model.getSolver() + solver = amici_model.create_solver() # number of amici simulations will be number of unique # (preequilibrationConditionId, simulationConditionId) pairs. @@ -203,7 +203,7 @@ def simulate_petab( ) # Simulate - rdatas = amici.runAmiciSimulations( + rdatas = amici.run_simulations( amici_model, solver, edata_list=edatas, @@ -215,7 +215,7 @@ def simulate_petab( llh = sum(rdata["llh"] for rdata in rdatas) # Compute total sllh sllh = None - if solver.getSensitivityOrder() != amici.SensitivityOrder.none: + if solver.get_sensitivity_order() != amici.SensitivityOrder.none: sllh = aggregate_sllh( amici_model=amici_model, rdatas=rdatas, @@ -284,7 +284,7 @@ def aggregate_sllh( Aggregated likelihood sensitivities. """ accumulated_sllh = {} - model_parameter_ids = amici_model.getParameterIds() + model_parameter_ids = amici_model.get_parameter_ids() if petab_scale and petab_problem is None: raise ValueError( @@ -423,7 +423,7 @@ def rdatas_to_measurement_df( """ simulation_conditions = petab.get_simulation_conditions(measurement_df) - observable_ids = model.getObservableIds() + observable_ids = model.get_observable_ids() rows = [] # iterate over conditions for (_, condition), rdata in zip( diff --git a/python/sdist/amici/petab/simulator.py b/python/sdist/amici/petab/simulator.py index 407bf9f7f2..6d9432b4a7 100644 --- a/python/sdist/amici/petab/simulator.py +++ b/python/sdist/amici/petab/simulator.py @@ -15,7 +15,7 @@ import pandas as pd import petab.v1 as petab -from amici import AmiciModel, SensitivityMethod_none +from amici import AmiciModel, SensitivityMethod from .petab_import import import_petab_problem from .simulations import RDATAS, rdatas_to_measurement_df, simulate_petab @@ -81,8 +81,8 @@ def simulate_without_noise(self, **kwargs) -> pd.DataFrame: self.amici_model = kwargs[AMICI_MODEL] if AMICI_SOLVER not in kwargs: - kwargs[AMICI_SOLVER] = self.amici_model.getSolver() - kwargs[AMICI_SOLVER].setSensitivityMethod(SensitivityMethod_none) + kwargs[AMICI_SOLVER] = self.amici_model.create_solver() + kwargs[AMICI_SOLVER].set_sensitivity_method(SensitivityMethod.none) result = _subset_call(simulate_petab, kwargs) return rdatas_to_measurement_df( diff --git a/python/sdist/amici/plotting.py b/python/sdist/amici/plotting.py index 3067d26bc5..cef3752157 100644 --- a/python/sdist/amici/plotting.py +++ b/python/sdist/amici/plotting.py @@ -56,12 +56,13 @@ def plot_state_trajectories( if model is None and rdata.ptr.state_ids is None: labels = [f"$x_{{{ix}}}$" for ix in state_indices] elif model is not None and prefer_names: - labels = np.asarray(model.getStateNames())[list(state_indices)] + labels = np.asarray(model.get_state_names())[list(state_indices)] labels = [ - l if l else model.getStateIds()[ix] for ix, l in enumerate(labels) + l if l else model.get_state_ids()[ix] + for ix, l in enumerate(labels) ] elif model is not None: - labels = np.asarray(model.getStateIds())[list(state_indices)] + labels = np.asarray(model.get_state_ids())[list(state_indices)] else: labels = np.asarray(rdata.ptr.state_ids)[list(state_indices)] @@ -88,7 +89,7 @@ def plot_observable_trajectories( :param rdata: AMICI simulation results as returned by - :func:`amici.amici.runAmiciSimulation`. + :func:`amici.amici.run_simulation`. :param observable_indices: Indices of observables for which trajectories are to be plotted. :param ax: @@ -119,15 +120,17 @@ def plot_observable_trajectories( if model is None and rdata.ptr.observable_ids is None: labels = [f"$y_{{{iy}}}$" for iy in observable_indices] elif model is not None and prefer_names: - labels = np.asarray(model.getObservableNames())[ + labels = np.asarray(model.get_observable_names())[ list(observable_indices) ] labels = [ - l if l else model.getObservableIds()[ix] + l if l else model.get_observable_ids()[ix] for ix, l in enumerate(labels) ] elif model is not None: - labels = np.asarray(model.getObservableIds())[list(observable_indices)] + labels = np.asarray(model.get_observable_ids())[ + list(observable_indices) + ] else: labels = np.asarray(rdata.ptr.observable_ids)[list(observable_indices)] @@ -139,14 +142,14 @@ def plot_observable_trajectories( if edata is not None: ax.plot( edata.ts, - edata.observedData[:, iy], + edata.observed_data[:, iy], "x", label=f"exp. {label}", color=l.get_color(), ) ax.errorbar( edata.ts, - edata.observedData[:, iy], + edata.observed_data[:, iy], yerr=rdata.sigmay[:, iy], fmt="none", color=l.get_color(), @@ -169,11 +172,6 @@ def plot_jacobian(rdata: ReturnDataView): plt.title("Jacobian") -# backwards compatibility -plotStateTrajectories = plot_state_trajectories -plotObservableTrajectories = plot_observable_trajectories - - def plot_expressions( exprs: Sequence[StrOrExpr] | StrOrExpr, rdata: ReturnDataView ) -> None: diff --git a/python/sdist/amici/swig_wrappers.py b/python/sdist/amici/swig_wrappers.py index e4d5ed43c6..126c7bfd0c 100644 --- a/python/sdist/amici/swig_wrappers.py +++ b/python/sdist/amici/swig_wrappers.py @@ -20,22 +20,22 @@ __all__ = [ - "runAmiciSimulation", - "runAmiciSimulations", - "readSolverSettingsFromHDF5", - "writeSolverSettingsToHDF5", + "run_simulation", + "run_simulations", + "read_solver_settings_from_hdf5", + "write_solver_settings_to_hdf5", "set_model_settings", "get_model_settings", ] -def runAmiciSimulation( +def run_simulation( model: AmiciModel, solver: AmiciSolver, edata: AmiciExpData | None = None, ) -> "numpy.ReturnDataView": """ - Convenience wrapper around :py:func:`amici.amici.runAmiciSimulation` + Convenience wrapper around :py:func:`amici.amici.run_simulation` (generated by swig) :param model: @@ -43,7 +43,7 @@ def runAmiciSimulation( :param solver: Solver instance, must be generated from - :py:meth:`amici.amici.Model.getSolver` + :py:meth:`amici.amici.Model.create_solver` :param edata: ExpData instance (optional) @@ -53,9 +53,9 @@ def runAmiciSimulation( """ if ( model.ne > 0 - and solver.getSensitivityMethod() + and solver.get_sensitivity_method() == amici_swig.SensitivityMethod.adjoint - and solver.getSensitivityOrder() == amici_swig.SensitivityOrder.first + and solver.get_sensitivity_order() == amici_swig.SensitivityOrder.first ): warnings.warn( "Adjoint sensitivity analysis for models with discontinuous right hand sides (events/piecewise functions) has not been thoroughly tested. " @@ -64,16 +64,16 @@ def runAmiciSimulation( stacklevel=1, ) - rdata = amici_swig.runAmiciSimulation( + rdata = amici_swig.run_simulation( _get_ptr(solver), _get_ptr(edata), _get_ptr(model) ) _log_simulation(rdata) - if solver.getReturnDataReportingMode() == amici.RDataReporting.full: + if solver.get_return_data_reporting_mode() == amici.RDataReporting.full: _ids_and_names_to_rdata(rdata, model) return numpy.ReturnDataView(rdata) -def runAmiciSimulations( +def run_simulations( model: AmiciModel, solver: AmiciSolver, edata_list: AmiciExpDataVector, @@ -94,9 +94,9 @@ def runAmiciSimulations( """ if ( model.ne > 0 - and solver.getSensitivityMethod() + and solver.get_sensitivity_method() == amici_swig.SensitivityMethod.adjoint - and solver.getSensitivityOrder() == amici_swig.SensitivityOrder.first + and solver.get_sensitivity_order() == amici_swig.SensitivityOrder.first ): warnings.warn( "Adjoint sensitivity analysis for models with discontinuous right hand sides (events/piecewise functions) has not been thoroughly tested. " @@ -106,7 +106,7 @@ def runAmiciSimulations( ) edata_ptr_vector = amici_swig.ExpDataPtrVector(edata_list) - rdata_ptr_list = amici_swig.runAmiciSimulations( + rdata_ptr_list = amici_swig.run_simulations( _get_ptr(solver), edata_ptr_vector, _get_ptr(model), @@ -115,26 +115,29 @@ def runAmiciSimulations( ) for rdata in rdata_ptr_list: _log_simulation(rdata) - if solver.getReturnDataReportingMode() == amici.RDataReporting.full: + if ( + solver.get_return_data_reporting_mode() + == amici.RDataReporting.full + ): _ids_and_names_to_rdata(rdata, model) return [numpy.ReturnDataView(r) for r in rdata_ptr_list] -def readSolverSettingsFromHDF5( +def read_solver_settings_from_hdf5( file: str, solver: AmiciSolver, location: str | None = "solverSettings" ) -> None: """ - Convenience wrapper for :py:func:`amici.readSolverSettingsFromHDF5` + Convenience wrapper for :py:func:`amici.read_solver_settings_from_hdf5` :param file: hdf5 filename :param solver: Solver instance to which settings will be transferred :param location: location of solver settings in hdf5 file """ - amici_swig.readSolverSettingsFromHDF5(file, _get_ptr(solver), location) + amici_swig.read_solver_settings_from_hdf5(file, _get_ptr(solver), location) -def writeSolverSettingsToHDF5( +def write_solver_settings_to_hdf5( solver: AmiciSolver, file: str | object, location: str | None = "solverSettings", @@ -147,7 +150,7 @@ def writeSolverSettingsToHDF5( :param solver: Solver instance from which settings will be stored :param location: location of solver settings in hdf5 file """ - amici_swig.writeSolverSettingsToHDF5(_get_ptr(solver), file, location) + amici_swig.write_solver_settings_to_hdf5(_get_ptr(solver), file, location) # Values are suffixes of `get[...]` and `set[...]` `amici.Model` methods. @@ -155,27 +158,30 @@ def writeSolverSettingsToHDF5( # is a tuple where the first and second elements are the getter and setter # methods, respectively. model_instance_settings = [ - # `setParameter{List,Scale}` will clear initial state sensitivities, so - # `setParameter{List,Scale}` has to be called first. - "ParameterList", - "ParameterScale", # getter returns a SWIG object - "AddSigmaResiduals", - "AlwaysCheckFinite", - "FixedParameters", - "InitialStates", - ("getInitialStateSensitivities", "setUnscaledInitialStateSensitivities"), - "MinimumSigmaResiduals", - ("nMaxEvent", "setNMaxEvent"), - "Parameters", - "ReinitializationStateIdxs", - "ReinitializeFixedParameterInitialStates", - "StateIsNonNegative", - "SteadyStateComputationMode", - "SteadyStateSensitivityMode", - ("t0", "setT0"), - ("t0Preeq", "setT0Preeq"), - "Timepoints", - "_steadystate_mask", + # `set_parameter_{list,scale}` will clear initial state sensitivities, so + # `set_parameter_{list,scale}` has to be called first. + "parameter_list", + "parameter_scale", # getter returns a SWIG object + "add_sigma_residuals", + "always_check_finite", + "fixed_parameters", + "initial_state", + ( + "get_initial_state_sensitivities", + "set_unscaled_initial_state_sensitivities", + ), + "minimum_sigma_residuals", + ("n_max_event", "set_n_max_event"), + "parameters", + "reinitialization_state_idxs", + "reinitialize_fixed_parameter_initial_states", + "state_is_non_negative", + "steady_state_computation_mode", + "steady_state_sensitivity_mode", + ("t0", "set_t0"), + ("t0_preeq", "set_t0_preeq"), + "timepoints", + "steadystate_mask", ] @@ -190,22 +196,25 @@ def get_model_settings( """ settings = {} for setting in model_instance_settings: - getter = setting[0] if isinstance(setting, tuple) else f"get{setting}" + getter = setting[0] if isinstance(setting, tuple) else f"get_{setting}" - if getter == "getInitialStates" and not model.hasCustomInitialStates(): + if ( + getter == "get_initial_state" + and not model.has_custom_initial_state() + ): settings[setting] = [] continue if ( - getter == "getInitialStateSensitivities" - and not model.hasCustomInitialStateSensitivities() + getter == "get_initial_state_sensitivities" + and not model.has_custom_initial_state_sensitivities() ): settings[setting] = [] continue settings[setting] = getattr(model, getter)() - # TODO `amici.Model.getParameterScale` returns a SWIG object instead + # TODO `amici.Model.get_parameter_scale` returns a SWIG object instead # of a Python list/tuple. - if setting == "ParameterScale": + if setting == "parameter_scale": settings[setting] = tuple(settings[setting]) return settings @@ -221,7 +230,7 @@ def set_model_settings( values are provided to the setters. """ for setting, value in settings.items(): - setter = setting[1] if isinstance(setting, tuple) else f"set{setting}" + setter = setting[1] if isinstance(setting, tuple) else f"set_{setting}" getattr(model, setter)(value) @@ -245,18 +254,18 @@ def _ids_and_names_to_rdata( ): """Copy entity IDs and names from a Model to ReturnData.""" for entity_type in ( - "State", - "Observable", - "Expression", - "Parameter", - "FixedParameter", + "state", + "observable", + "expression", + "parameter", + "fixed_parameter", ): - for name_or_id in ("Ids", "Names"): - names_or_ids = getattr(model, f"get{entity_type}{name_or_id}")() + for name_or_id in ("ids", "names"): + names_or_ids = getattr(model, f"get_{entity_type}_{name_or_id}")() setattr( rdata, f"{entity_type.lower()}_{name_or_id.lower()}", names_or_ids, ) - rdata.state_ids_solver = model.getStateIdsSolver() - rdata.state_names_solver = model.getStateNamesSolver() + rdata.state_ids_solver = model.get_state_ids_solver() + rdata.state_names_solver = model.get_state_names_solver() diff --git a/python/sdist/amici/testing/models.py b/python/sdist/amici/testing/models.py index a92c9daac1..130e223c92 100644 --- a/python/sdist/amici/testing/models.py +++ b/python/sdist/amici/testing/models.py @@ -151,7 +151,7 @@ def import_model_calvetti(outdir: Path = None) -> Model: model_module = import_model_module(model_name, outdir) model = model_module.get_model() - assert model.getFixedParameterIds() == ( + assert model.get_fixed_parameter_ids() == ( "V1ss", "R1ss", "V2ss", @@ -652,4 +652,4 @@ def create_amici_model( ) model_module = import_model_module(model_name, output_dir) - return model_module.getModel() + return model_module.get_model() diff --git a/python/tests/petab_/test_petab_problem.py b/python/tests/petab_/test_petab_problem.py index 3137c5a936..f17ca6d58b 100644 --- a/python/tests/petab_/test_petab_problem.py +++ b/python/tests/petab_/test_petab_problem.py @@ -26,7 +26,7 @@ def test_amici_petab_problem_pregenerate(): # ensure parameter are updated edatas = app.get_edatas() app.set_parameters( - {app.model.getParameterIds()[0]: 0.12345}, scaled_parameters=True + {app.model.get_parameter_ids()[0]: 0.12345}, scaled_parameters=True ) for edata in edatas: assert edata.parameters[0] == 0.12345 @@ -50,7 +50,7 @@ def test_amici_petab_problem_on_demand(): # ensure parameter are updated app.set_parameters( - {app.model.getParameterIds()[0]: 0.12345}, scaled_parameters=True + {app.model.get_parameter_ids()[0]: 0.12345}, scaled_parameters=True ) # previously generated ExpDatas are not updated for edata in edatas: @@ -83,7 +83,7 @@ def test_amici_petab_problem_pregenerate_equals_on_demand(tempdir): petab_problem, store_edatas=False, amici_model=amici_model ) - parameter_update = {app_store_true.model.getParameterIds()[0]: 0.12345} + parameter_update = {app_store_true.model.get_parameter_ids()[0]: 0.12345} app_store_true.set_parameters(parameter_update, scaled_parameters=True) app_store_false.set_parameters(parameter_update, scaled_parameters=True) diff --git a/python/tests/splines_utils.py b/python/tests/splines_utils.py index 8aac6edfe3..535d0952c1 100644 --- a/python/tests/splines_utils.py +++ b/python/tests/splines_utils.py @@ -294,7 +294,7 @@ def simulate_splines( use_adjoint: bool = False, skip_sensitivity: bool = False, petab_problem=None, - amici_model=None, + amici_model: amici.Model = None, **kwargs, ): """ @@ -406,16 +406,16 @@ def simulate_splines( ) # Set solver options - solver = amici_model.getSolver() - solver.setRelativeTolerance(rtol) - solver.setAbsoluteTolerance(atol) - solver.setMaxSteps(maxsteps) + solver = amici_model.create_solver() + solver.set_relative_tolerance(rtol) + solver.set_absolute_tolerance(atol) + solver.set_max_steps(maxsteps) if not skip_sensitivity: - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_order(amici.SensitivityOrder.first) if use_adjoint: - solver.setSensitivityMethod(amici.SensitivityMethod.adjoint) + solver.set_sensitivity_method(amici.SensitivityMethod.adjoint) else: - solver.setSensitivityMethod(amici.SensitivityMethod.forward) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) # Compute and set timepoints # NB not working, will always be equal to the observation times @@ -439,8 +439,8 @@ def simulate_splines( edata = edatas[0] # Return state/parameter ordering - state_ids = amici_model.getStateIds() - param_ids = amici_model.getParameterIds() + state_ids = amici_model.get_state_ids() + param_ids = amici_model.get_parameter_ids() return ( initial_values, @@ -728,9 +728,9 @@ def param_by_name(id): and parameter_lists is not None ): for plist in parameter_lists: - amici_model.setParameterList(plist) - amici_model.setTimepoints(rdata.t) - rdata_partial = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model.set_parameter_list(plist) + amici_model.set_timepoints(rdata.t) + rdata_partial = amici.run_simulation(amici_model, amici_solver) assert rdata.sx[:, plist, :].shape == rdata_partial.sx.shape assert np.allclose(rdata.sx[:, plist, :], rdata_partial.sx) diff --git a/python/tests/test_antimony_import.py b/python/tests/test_antimony_import.py index 5eca823250..ab4156c897 100644 --- a/python/tests/test_antimony_import.py +++ b/python/tests/test_antimony_import.py @@ -35,8 +35,8 @@ def test_antimony_example(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() - amici_model.setTimepoints(np.linspace(0, 100, 200)) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model = model_module.get_model() + amici_model.set_timepoints(np.linspace(0, 100, 200)) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS diff --git a/python/tests/test_bngl.py b/python/tests/test_bngl.py index 9dbdb68ec1..b92ea566a5 100644 --- a/python/tests/test_bngl.py +++ b/python/tests/test_bngl.py @@ -88,15 +88,15 @@ def test_compare_to_pysb_simulation(example): amici_model_module = amici.import_model_module(pysb_model.name, outdir) - model_amici = amici_model_module.getModel() + model_amici = amici_model_module.get_model() - model_amici.setTimepoints(tspan) + model_amici.set_timepoints(tspan) - solver = model_amici.getSolver() - solver.setMaxSteps(10**6) - solver.setAbsoluteTolerance(atol) - solver.setRelativeTolerance(rtol) - rdata = amici.runAmiciSimulation(model_amici, solver) + solver = model_amici.create_solver() + solver.set_max_steps(10**6) + solver.set_absolute_tolerance(atol) + solver.set_relative_tolerance(rtol) + rdata = amici.run_simulation(model_amici, solver) # check agreement of species simulation assert np.isclose(rdata.x, pysb_simres.species, 1e-4, 1e-4).all() diff --git a/python/tests/test_compare_conservation_laws_sbml.py b/python/tests/test_compare_conservation_laws_sbml.py index 897aee40c4..2a6994533c 100644 --- a/python/tests/test_compare_conservation_laws_sbml.py +++ b/python/tests/test_compare_conservation_laws_sbml.py @@ -15,15 +15,15 @@ def edata_fixture(): edata_pre = ExpData( 2, 0, 0, np.array([0.0, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0]) ) - edata_pre.setObservedData([1.5] * 16) - edata_pre.fixedParameters = np.array([5.0, 20.0]) - edata_pre.fixedParametersPreequilibration = np.array([0.0, 10.0]) - edata_pre.reinitializeFixedParameterInitialStates = True + edata_pre.set_observed_data([1.5] * 16) + edata_pre.fixed_parameters = np.array([5.0, 20.0]) + edata_pre.fixed_parameters_pre_equilibration = np.array([0.0, 10.0]) + edata_pre.reinitialize_fixed_parameter_initial_states = True # edata for postequilibration edata_post = ExpData(2, 0, 0, np.array([float("inf")] * 3)) - edata_post.setObservedData([0.75] * 6) - edata_post.fixedParameters = np.array([7.5, 30.0]) + edata_post.set_observed_data([0.75] * 6) + edata_post.fixed_parameters = np.array([7.5, 30.0]) # edata with both equilibrations edata_full = ExpData( @@ -34,10 +34,10 @@ def edata_fixture(): [0.0, 0.0, 0.0, 1.0, 2.0, 2.0, 4.0, float("inf"), float("inf")] ), ) - edata_full.setObservedData([3.14] * 18) - edata_full.fixedParameters = np.array([1.0, 2.0]) - edata_full.fixedParametersPreequilibration = np.array([3.0, 4.0]) - edata_full.reinitializeFixedParameterInitialStates = True + edata_full.set_observed_data([3.14] * 18) + edata_full.fixed_parameters = np.array([1.0, 2.0]) + edata_full.fixed_parameters_pre_equilibration = np.array([3.0, 4.0]) + edata_full.reinitialize_fixed_parameter_initial_states = True return edata_pre, edata_post, edata_full @@ -114,8 +114,8 @@ def models(): ) # get the models and return - model_without_cl = model_without_cl_module.getModel() - model_with_cl = model_with_cl_module.getModel() + model_without_cl = model_without_cl_module.get_model() + model_with_cl = model_with_cl_module.get_model() return model_with_cl, model_without_cl @@ -130,23 +130,23 @@ def get_results( reinitialize_states=False, ): # set model and data properties - model.setReinitializeFixedParameterInitialStates(reinitialize_states) + model.set_reinitialize_fixed_parameter_initial_states(reinitialize_states) # get the solver, set the properties - solver = model.getSolver() - solver.setNewtonMaxSteps(20) - solver.setSensitivityOrder(sensi_order) - solver.setSensitivityMethodPreequilibration(sensi_meth_preeq) - solver.setSensitivityMethod(sensi_meth) - model.setSteadyStateSensitivityMode(stst_sensi_mode) - model.setSteadyStateComputationMode(stst_mode) + solver = model.create_solver() + solver.set_newton_max_steps(20) + solver.set_sensitivity_order(sensi_order) + solver.set_sensitivity_method_pre_equilibration(sensi_meth_preeq) + solver.set_sensitivity_method(sensi_meth) + model.set_steady_state_sensitivity_mode(stst_sensi_mode) + model.set_steady_state_computation_mode(stst_mode) if edata is None: - model.setTimepoints(np.linspace(0, 5, 101)) + model.set_timepoints(np.linspace(0, 5, 101)) else: - edata.reinitializeFixedParameterInitialStates = reinitialize_states + edata.reinitialize_fixed_parameter_initial_states = reinitialize_states # return simulation results - return amici.runAmiciSimulation(model, solver, edata) + return amici.run_simulation(model, solver, edata) @skip_on_valgrind @@ -157,9 +157,10 @@ def test_compare_conservation_laws_sbml(models, edata_fixture): assert model_with_cl.ncl() > 0 assert model_without_cl.nx_rdata == model_with_cl.nx_rdata assert model_with_cl.nx_solver < model_without_cl.nx_solver - assert len(model_with_cl.getStateIdsSolver()) == model_with_cl.nx_solver + assert len(model_with_cl.get_state_ids_solver()) == model_with_cl.nx_solver assert ( - len(model_without_cl.getStateIdsSolver()) == model_without_cl.nx_solver + len(model_without_cl.get_state_ids_solver()) + == model_without_cl.nx_solver ) # ----- compare simulations wo edata, sensi = 0, states ------------------ @@ -251,7 +252,7 @@ def test_compare_conservation_laws_sbml(models, edata_fixture): # ----- check failure st.st. sensi computation if run wo CLs ------------- # check failure of steady state sensitivity computation if run wo CLs - model_without_cl.setSteadyStateSensitivityMode( + model_without_cl.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.newtonOnly ) with warnings.catch_warnings(): diff --git a/python/tests/test_edata.py b/python/tests/test_edata.py index 0baa7443fb..1501898f7a 100644 --- a/python/tests/test_edata.py +++ b/python/tests/test_edata.py @@ -21,17 +21,17 @@ def test_edata_sensi_unscaling(model_units_module): # noqa: F811 parameter_scales_log10 = [amici.ParameterScaling.log10.value] * len( parameters0 ) - amici_parameter_scales_log10 = amici.parameterScalingFromIntVector( + amici_parameter_scales_log10 = amici.parameter_scaling_from_int_vector( parameter_scales_log10 ) - model = model_units_module.getModel() - model.setTimepoints(np.linspace(0, 1, 3)) - model.setParameterScale(parameter_scales_log10) - model.setParameters(parameters0) + model = model_units_module.get_model() + model.set_timepoints(np.linspace(0, 1, 3)) + model.set_parameter_scale(parameter_scales_log10) + model.set_parameters(parameters0) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) edata0 = amici.ExpData(model) edata0.pscale = amici_parameter_scales_log10 @@ -43,8 +43,8 @@ def test_edata_sensi_unscaling(model_units_module): # noqa: F811 edata1.parameters = parameters1 edata1.sx0 = sx0 - rdata0 = amici.runAmiciSimulation(model, solver, edata0) - rdata1 = amici.runAmiciSimulation(model, solver, edata1) + rdata0 = amici.run_simulation(model, solver, edata0) + rdata1 = amici.run_simulation(model, solver, edata1) # The initial state sensitivities are as specified. assert np.isclose(rdata0.sx0.flatten(), sx0).all() diff --git a/python/tests/test_events.py b/python/tests/test_events.py index 4a9096aaee..f4ae430da2 100644 --- a/python/tests/test_events.py +++ b/python/tests/test_events.py @@ -75,7 +75,7 @@ def model(request): sbml_model=sbml_model, model_name=request.param, ) - amici_model.setTimepoints(timepoints) + amici_model.set_timepoints(timepoints) return amici_model, parameters, timepoints, x_expected, sx_expected @@ -718,7 +718,7 @@ def test_models(model): # FIXME: For a few parameters of these models, adjoint sensitivities # are somewhat off. This needs to be investigated further. - asa_xfail = amici_model.getName() in ( + asa_xfail = amici_model.get_name() in ( "events_plus_heavisides", "piecewise_plus_event_semi_complicated", "nested_events", @@ -765,13 +765,13 @@ def test_handling_of_fixed_time_point_event_triggers(tempdir): model_module = import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() assert amici_model.ne == 5 assert amici_model.ne_solver == 0 - amici_model.setTimepoints(np.linspace(0, 10, 20)) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model.set_timepoints(np.linspace(0, 10, 20)) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS assert (rdata.x[rdata.ts < 1] == 0).all() assert (rdata.x[(rdata.ts >= 1) & (rdata.ts < 2)] == 1).all() @@ -787,8 +787,8 @@ def test_handling_of_fixed_time_point_event_triggers(tempdir): SensitivityMethod.forward, SensitivityMethod.adjoint, ): - amici_solver.setSensitivityMethod(sens_meth) - amici_solver.setSensitivityOrder(SensitivityOrder.first) + amici_solver.set_sensitivity_method(sens_meth) + amici_solver.set_sensitivity_order(SensitivityOrder.first) check_derivatives(amici_model, amici_solver, edata=edata) @@ -817,17 +817,17 @@ def test_multiple_event_assignment_with_compartment(tempdir): model_module = import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() assert amici_model.ne == 2 assert amici_model.ne_solver == 0 assert amici_model.nx_rdata == 3 - amici_model.setTimepoints(np.linspace(0, 15, 16)) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model.set_timepoints(np.linspace(0, 15, 16)) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS - idx_event_target = amici_model.getStateIds().index("event_target") - idx_unrelated = amici_model.getStateIds().index("unrelated") - idx_species_in_event_target = amici_model.getStateIds().index( + idx_event_target = amici_model.get_state_ids().index("event_target") + idx_unrelated = amici_model.get_state_ids().index("unrelated") + idx_species_in_event_target = amici_model.get_state_ids().index( "species_in_event_target" ) @@ -915,15 +915,15 @@ def test_event_priorities(tempdir): # check just after the trigger time, # the event does not fire at *exactly* 1 - model.setTimepoints([0, 1 + 1e-6, 2]) + model.set_timepoints([0, 1 + 1e-6, 2]) - solver = model.getSolver() - solver.setAbsoluteTolerance(1e-16) - solver.setRelativeTolerance(1e-14) - solver.setSensitivityOrder(SensitivityOrder.first) - solver.setSensitivityMethod(SensitivityMethod.forward) + solver = model.create_solver() + solver.set_absolute_tolerance(1e-16) + solver.set_relative_tolerance(1e-14) + solver.set_sensitivity_order(SensitivityOrder.first) + solver.set_sensitivity_method(SensitivityMethod.forward) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert np.all(rdata.by_id("target1") == [1, 11, 11]) assert np.all(rdata.by_id("target2") == [2, 22, 22]) @@ -934,8 +934,12 @@ def test_event_priorities(tempdir): # check forward sensitivities against finite differences # FIXME: sensitivities w.r.t. the bolus parameter are not correct - model.setParameterList( - [ip for ip, par in enumerate(model.getParameterIds()) if par != "two"] + model.set_parameter_list( + [ + ip + for ip, par in enumerate(model.get_parameter_ids()) + if par != "two" + ] ) check_derivatives( @@ -1003,14 +1007,14 @@ def test_random_event_ordering(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([0, 2, 3]) - solver = model.getSolver() + model.set_timepoints([0, 2, 3]) + solver = model.create_solver() # the outcomes of the random assignment outcomes = [] N = 1000 for i in range(N): - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert np.all(rdata.by_id("target_first") == [0, 2, 2]) assert np.all(rdata.by_id("target_last") == [0, 1, 1]) traj = rdata.by_id("target_rnd") @@ -1063,12 +1067,12 @@ def test_event_uses_values_from_trigger_time(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([0, 1.1, 2]) - solver = model.getSolver() - solver.setSensitivityOrder(SensitivityOrder.first) - solver.setSensitivityMethod(SensitivityMethod.forward) + model.set_timepoints([0, 1.1, 2]) + solver = model.create_solver() + solver.set_sensitivity_order(SensitivityOrder.first) + solver.set_sensitivity_method(SensitivityMethod.forward) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert np.all(rdata.by_id("target1") == [2, 2, 2]) assert np.all(rdata.by_id("target2") == [0, 3, 3]) @@ -1084,10 +1088,10 @@ def test_event_uses_values_from_trigger_time(tempdir): if sens_method == SensitivityMethod.forward: # FIXME: forward sensitivities w.r.t. the bolus parameter # of the first event are wrong - model.setParameterList( + model.set_parameter_list( [ ip - for ip, par in enumerate(model.getParameterIds()) + for ip, par in enumerate(model.get_parameter_ids()) if par not in ["one"] ] ) @@ -1095,15 +1099,15 @@ def test_event_uses_values_from_trigger_time(tempdir): # FIXME: adjoint sensitivities w.r.t. the bolus parameter `three` # are wrong. # maybe related to https://github.com/AMICI-dev/AMICI/issues/2805 - model.setParameterList( + model.set_parameter_list( [ ip - for ip, par in enumerate(model.getParameterIds()) + for ip, par in enumerate(model.get_parameter_ids()) if par not in ["one", "three"] ] ) - solver.setSensitivityMethod(sens_method) + solver.set_sensitivity_method(sens_method) check_derivatives( model, solver, @@ -1140,24 +1144,24 @@ def test_posteq_events_are_handled(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - solver = model.getSolver() + solver = model.create_solver() # test without post-equilibration - model.setTimepoints([10]) - rdata = amici.runAmiciSimulation(model, solver) + model.set_timepoints([10]) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_SUCCESS assert rdata.by_id("target").squeeze() == 2.0 assert rdata.by_id("obs_target").squeeze() == 2.0 # test with post-equilibration - model.setSteadyStateComputationMode( + model.set_steady_state_computation_mode( amici.SteadyStateComputationMode.integrationOnly ) - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) - model.setTimepoints([np.inf]) - rdata = amici.runAmiciSimulation(model, solver) + model.set_timepoints([np.inf]) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_SUCCESS assert rdata.by_id("target").squeeze() == 2.0 assert rdata.by_id("obs_target").squeeze() == 2.0 @@ -1169,8 +1173,8 @@ def test_posteq_events_are_handled(tempdir): SensitivityMethod.forward, SensitivityMethod.adjoint, ): - solver.setSensitivityOrder(SensitivityOrder.first) - solver.setSensitivityMethod(sens_method) + solver.set_sensitivity_order(SensitivityOrder.first) + solver.set_sensitivity_method(sens_method) check_derivatives( model, @@ -1219,22 +1223,22 @@ def test_preeq_presim_preserve_heaviside_state(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints(np.linspace(0, 2, 3)) - model.setSteadyStateComputationMode( + model.set_timepoints(np.linspace(0, 2, 3)) + model.set_steady_state_computation_mode( amici.SteadyStateComputationMode.integrationOnly ) - solver = model.getSolver() + solver = model.create_solver() # Only main simulation. E1 triggers, E2 does not. - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_SUCCESS assert list(rdata.by_id("target1")) == [1.0, 1.0, 1.0] assert list(rdata.by_id("target2")) == [0.0, 0.0, 0.0] # Pre-equilibration + main simulation. Both E1 and E2 trigger. edata = amici.ExpData(rdata, 1, 0, 0) - edata.fixedParametersPreequilibration = [1] - rdata = amici.runAmiciSimulation(model, solver, edata=edata) + edata.fixed_parameters_pre_equilibration = [1] + rdata = amici.run_simulation(model, solver, edata=edata) assert rdata.status == amici.AMICI_SUCCESS assert list(rdata.by_id("target1")) == [1.0, 1.0, 1.0] assert list(rdata.by_id("target2")) == [1.0, 1.0, 1.0] @@ -1254,10 +1258,10 @@ def test_preeq_presim_preserve_heaviside_state(tempdir): # Pre-equilibration + pre-simulation + main simulation. # Both E1 and E2 trigger. edata = amici.ExpData(rdata, 1, 0, 0) - edata.fixedParametersPreequilibration = [1] - edata.fixedParametersPresimulation = [1] + edata.fixed_parameters_pre_equilibration = [1] + edata.fixed_parameters_presimulation = [1] edata.t_presim = 10 - rdata = amici.runAmiciSimulation(model, solver, edata=edata) + rdata = amici.run_simulation(model, solver, edata=edata) assert rdata.status == amici.AMICI_SUCCESS assert list(rdata.by_id("target1")) == [1.0, 1.0, 1.0] assert list(rdata.by_id("target2")) == [1.0, 1.0, 1.0] @@ -1288,9 +1292,9 @@ def test_gh2926(tempdir): model = model_module.get_model() # check output just after t=10, otherwise the solver stops at `10 - eps` # and the event triggers only after the output was recorded - model.setTimepoints([0, 5, 10.1, 11]) - solver = model.getSolver() + model.set_timepoints([0, 5, 10.1, 11]) + solver = model.create_solver() - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_SUCCESS assert rdata.by_id("x1").tolist() == [1.0, 1.0, 2.0, 2.0] diff --git a/python/tests/test_hdf5.py b/python/tests/test_hdf5.py index ee9d5a3e3b..d4e860d176 100644 --- a/python/tests/test_hdf5.py +++ b/python/tests/test_hdf5.py @@ -17,14 +17,14 @@ def _modify_solver_attrs(solver): if isinstance(val, bool): cval = not val - elif attr == "setStabilityLimitFlag": + elif attr == "set_stability_limit_flag": cval = 0 - elif attr == "setReturnDataReportingMode": + elif attr == "set_return_data_reporting_mode": cval = amici.RDataReporting.likelihood - elif attr == "setMaxTime": + elif attr == "set_max_time": # default value is the maximum, must not add to that cval = random.random() - elif attr == "setConstraints": + elif attr == "set_constraints": cval = [1.0, 1.0] elif isinstance(val, int): cval = val + 1 @@ -40,15 +40,15 @@ def _modify_solver_attrs(solver): def test_solver_hdf5_roundtrip(sbml_example_presimulation_module): """TestCase class for AMICI HDF5 I/O""" - model = sbml_example_presimulation_module.getModel() - solver = model.getSolver() + model = sbml_example_presimulation_module.get_model() + solver = model.create_solver() _modify_solver_attrs(solver) hdf5file = "solverSettings.hdf5" - amici.writeSolverSettingsToHDF5(solver, hdf5file, "ssettings") + amici.write_solver_settings_to_hdf5(solver, hdf5file, "ssettings") - new_solver = model.getSolver() + new_solver = model.create_solver() # check that we changed everything for attr in dir(solver): @@ -60,7 +60,7 @@ def test_solver_hdf5_roundtrip(sbml_example_presimulation_module): != getattr(new_solver, attr.replace("set", "get"))() ), attr - amici.readSolverSettingsFromHDF5(hdf5file, new_solver, "ssettings") + amici.read_solver_settings_from_hdf5(hdf5file, new_solver, "ssettings") # check that reading in settings worked for attr in dir(solver): diff --git a/python/tests/test_heavisides.py b/python/tests/test_heavisides.py index 0bff2d4164..12a2ed2c3f 100644 --- a/python/tests/test_heavisides.py +++ b/python/tests/test_heavisides.py @@ -52,7 +52,7 @@ def model(request): sbml_model=sbml_model, model_name=request.param, ) - amici_model.setTimepoints(timepoints) + amici_model.set_timepoints(timepoints) return amici_model, parameters, timepoints, x_expected, sx_expected @@ -75,7 +75,7 @@ def test_models(model): # FIXME: For a few parameters of these models, adjoint sensitivities # are somewhat off. This needs to be investigated further. - asa_xfail = amici_model.getName() in ("state_and_param_dep_heavisides",) + asa_xfail = amici_model.get_name() in ("state_and_param_dep_heavisides",) check_trajectories_with_adjoint_sensitivities(amici_model, asa_xfail) diff --git a/python/tests/test_jax.py b/python/tests/test_jax.py index 3e5d0ee184..d2c1eb1cb6 100644 --- a/python/tests/test_jax.py +++ b/python/tests/test_jax.py @@ -121,33 +121,33 @@ def test_dimerization(): def _test_model(amici_module, jax_module, ts, p, k): - amici_model = amici_module.getModel() + amici_model = amici_module.get_model() - amici_model.setTimepoints(np.asarray(ts, dtype=np.float64)) - sol_amici_ref = amici.runAmiciSimulation( - amici_model, amici_model.getSolver() + amici_model.set_timepoints(np.asarray(ts, dtype=np.float64)) + sol_amici_ref = amici.run_simulation( + amici_model, amici_model.create_solver() ) jax_model = jax_module.Model() - amici_model.setParameters(np.asarray(p, dtype=np.float64)) - amici_model.setFixedParameters(np.asarray(k, dtype=np.float64)) + amici_model.set_parameters(np.asarray(p, dtype=np.float64)) + amici_model.set_fixed_parameters(np.asarray(k, dtype=np.float64)) edata = amici.ExpData(sol_amici_ref, 1.0, 1.0) - edata.parameters = amici_model.getParameters() - edata.fixedParameters = amici_model.getFixedParameters() - edata.pscale = amici_model.getParameterScale() - amici_solver = amici_model.getSolver() - amici_solver.setSensitivityMethod(amici.SensitivityMethod.forward) - amici_solver.setSensitivityOrder(amici.SensitivityOrder.first) - amici_solver.setAbsoluteTolerance(ATOL_SIM) - amici_solver.setRelativeTolerance(RTOL_SIM) - rs_amici = amici.runAmiciSimulations(amici_model, amici_solver, [edata]) + edata.parameters = amici_model.get_parameters() + edata.fixed_parameters = amici_model.get_fixed_parameters() + edata.pscale = amici_model.get_parameter_scale() + amici_solver = amici_model.create_solver() + amici_solver.set_sensitivity_method(amici.SensitivityMethod.forward) + amici_solver.set_sensitivity_order(amici.SensitivityOrder.first) + amici_solver.set_absolute_tolerance(ATOL_SIM) + amici_solver.set_relative_tolerance(RTOL_SIM) + rs_amici = amici.run_simulations(amici_model, amici_solver, [edata]) check_fields_jax( rs_amici, jax_model, - amici_model.getParameterIds(), - amici_model.getFixedParameterIds(), + amici_model.get_parameter_ids(), + amici_model.get_fixed_parameter_ids(), edata, ["x", "y", "llh", "res", "x0"], ) @@ -155,8 +155,8 @@ def _test_model(amici_module, jax_module, ts, p, k): check_fields_jax( rs_amici, jax_model, - amici_model.getParameterIds(), - amici_model.getFixedParameterIds(), + amici_model.get_parameter_ids(), + amici_model.get_fixed_parameter_ids(), edata, ["sllh", "sx0", "sx", "sres", "sy"], sensi_order=amici.SensitivityOrder.first, @@ -173,8 +173,8 @@ def check_fields_jax( sensi_order=amici.SensitivityOrder.none, ): r_jax = dict() - ts = np.array(edata.getTimepoints()) - my = np.array(edata.getObservedData()).reshape(len(ts), -1) + ts = np.array(edata.get_timepoints()) + my = np.array(edata.get_observed_data()).reshape(len(ts), -1) ts = np.repeat(ts.reshape(-1, 1), my.shape[1], axis=1) iys = np.repeat(np.arange(my.shape[1]).reshape(1, -1), len(ts), axis=0) my = my.flatten() @@ -187,7 +187,7 @@ def check_fields_jax( par_dict = { **dict(zip(parameter_ids, edata.parameters)), - **dict(zip(fixed_parameter_ids, edata.fixedParameters)), + **dict(zip(fixed_parameter_ids, edata.fixed_parameters)), } p = jnp.array([par_dict[par_id] for par_id in jax_model.parameter_ids]) diff --git a/python/tests/test_misc.py b/python/tests/test_misc.py index 80e1afaa03..272a2daccc 100644 --- a/python/tests/test_misc.py +++ b/python/tests/test_misc.py @@ -14,7 +14,7 @@ def test_parameter_scaling_from_int_vector(): """Ensure we can generate a ParameterScaling vector from Python""" - scale_vector = amici.parameterScalingFromIntVector( + scale_vector = amici.parameter_scaling_from_int_vector( [ amici.ParameterScaling.log10, amici.ParameterScaling.ln, diff --git a/python/tests/test_pandas.py b/python/tests/test_pandas.py index 40799120ad..114396fb18 100644 --- a/python/tests/test_pandas.py +++ b/python/tests/test_pandas.py @@ -12,9 +12,9 @@ combos = itertools.product([(10, 5), (5, 10), ()], repeat=3) cases = [ { - "fixedParameters": combo[0], - "fixedParametersPreequilibration": combo[1], - "fixedParametersPresimulation": combo[2], + "fixed_parameters": combo[0], + "fixed_parameters_pre_equilibration": combo[1], + "fixed_parameters_presimulation": combo[2], } for combo in combos ] @@ -26,10 +26,10 @@ def test_pandas_import_export(sbml_example_presimulation_module, case): """TestCase class for testing csv import using pandas""" # setup - model = sbml_example_presimulation_module.getModel() - model.setTimepoints(np.linspace(0, 60, 61)) - solver = model.getSolver() - rdata = amici.runAmiciSimulation(model, solver) + model = sbml_example_presimulation_module.get_model() + model.set_timepoints(np.linspace(0, 60, 61)) + solver = model.create_solver() + rdata = amici.run_simulation(model, solver) edata = [amici.ExpData(rdata, 0.01, 0)] # test copy constructor @@ -38,25 +38,25 @@ def test_pandas_import_export(sbml_example_presimulation_module, case): for fp in case: setattr(edata[0], fp, case[fp]) - df_edata = amici.getDataObservablesAsDataFrame(model, edata) - edata_reconstructed = amici.getEdataFromDataFrame(model, df_edata) + df_edata = amici.get_data_observables_as_data_frame(model, edata) + edata_reconstructed = amici.get_edata_from_data_frame(model, df_edata) for fp in [ - "fixedParameters", - "fixedParametersPreequilibration", - "fixedParametersPresimulation", + "fixed_parameters", + "fixed_parameters_pre_equilibration", + "fixed_parameters_presimulation", ]: - if fp != "fixedParameters" or case[fp] != (): + if fp != "fixed_parameters" or case[fp] != (): assert getattr(edata[0], fp) == getattr(edata_reconstructed[0], fp) assert case[fp] == getattr(edata_reconstructed[0], fp) else: - assert model.getFixedParameters() == getattr( + assert model.get_fixed_parameters() == getattr( edata_reconstructed[0], fp ) - assert model.getFixedParameters() == getattr( + assert model.get_fixed_parameters() == getattr( edata_reconstructed[0], fp ) diff --git a/python/tests/test_petab_objective.py b/python/tests/test_petab_objective.py index 260036a267..1201c6cf54 100755 --- a/python/tests/test_petab_objective.py +++ b/python/tests/test_petab_objective.py @@ -34,10 +34,10 @@ def lotka_volterra() -> petab.Problem: def test_simulate_petab_sensitivities(lotka_volterra): petab_problem = lotka_volterra amici_model = import_petab_problem(petab_problem) - amici_solver = amici_model.getSolver() + amici_solver = amici_model.create_solver() - amici_solver.setSensitivityOrder(amici.SensitivityOrder_first) - amici_solver.setMaxSteps(int(1e5)) + amici_solver.set_sensitivity_order(amici.SensitivityOrder.first) + amici_solver.set_max_steps(int(1e5)) problem_parameters = dict( zip(petab_problem.x_ids, petab_problem.x_nominal, strict=True) diff --git a/python/tests/test_petab_simulate.py b/python/tests/test_petab_simulate.py index f0310eaca5..e9eccf238d 100644 --- a/python/tests/test_petab_simulate.py +++ b/python/tests/test_petab_simulate.py @@ -58,7 +58,7 @@ def test_subset_call(petab_problem): model_name=model_name, model_output_dir=model_output_dir ) # Model name is handled correctly - assert simulator0.amici_model.getName() == model_name + assert simulator0.amici_model.get_name() == model_name # Check model output directory is created, by # :py:func:`amici.petab_import.import_petab_problem` assert (Path(model_output_dir) / model_name).is_dir() @@ -66,10 +66,10 @@ def test_subset_call(petab_problem): simulator = PetabSimulator(petab_problem) simulator.simulate(amici_model=simulator0.amici_model) # AMICI model is handled correctly to skip import - assert simulator.amici_model.getName() == model_name + assert simulator.amici_model.get_name() == model_name simulator.simulate() # AMICI model persists between :py:func:`PetabSimulator.simulate` calls - assert simulator.amici_model.getName() == model_name + assert simulator.amici_model.get_name() == model_name # Erroneous solver raises an error with pytest.raises(TypeError): simulator.simulate(solver=False) diff --git a/python/tests/test_preequilibration.py b/python/tests/test_preequilibration.py index 660acb2424..38b82f4304 100644 --- a/python/tests/test_preequilibration.py +++ b/python/tests/test_preequilibration.py @@ -24,51 +24,51 @@ @pytest.fixture def preeq_fixture(pysb_example_presimulation_module): - model = pysb_example_presimulation_module.getModel() - model.setReinitializeFixedParameterInitialStates(True) - model.setSteadyStateComputationMode( + model = pysb_example_presimulation_module.get_model() + model.set_reinitialize_fixed_parameter_initial_states(True) + model.set_steady_state_computation_mode( amici.SteadyStateComputationMode.integrateIfNewtonFails ) - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrateIfNewtonFails ) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setSensitivityMethod(amici.SensitivityMethod.forward) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) edata = get_data(model) edata.t_presim = 2 - edata.fixedParameters = [10, 2] - edata.fixedParametersPresimulation = [3, 2] - edata.fixedParametersPreequilibration = [3, 0] - edata.setTimepoints([1, 5]) + edata.fixed_parameters = [10, 2] + edata.fixed_parameters_presimulation = [3, 2] + edata.fixed_parameters_pre_equilibration = [3, 0] + edata.set_timepoints([1, 5]) edata_preeq = amici.ExpData(edata) edata_preeq.t_presim = 0 - edata_preeq.setTimepoints([np.inf]) - edata_preeq.fixedParameters = edata.fixedParametersPreequilibration - edata_preeq.fixedParametersPresimulation = () - edata_preeq.fixedParametersPreequilibration = () + edata_preeq.set_timepoints([np.inf]) + edata_preeq.fixed_parameters = edata.fixed_parameters_pre_equilibration + edata_preeq.fixed_parameters_presimulation = () + edata_preeq.fixed_parameters_pre_equilibration = () edata_presim = amici.ExpData(edata) edata_presim.t_presim = 0 - edata_presim.setTimepoints([edata.t_presim]) - edata_presim.fixedParameters = edata.fixedParametersPresimulation - edata_presim.fixedParametersPresimulation = () - edata_presim.fixedParametersPreequilibration = () + edata_presim.set_timepoints([edata.t_presim]) + edata_presim.fixed_parameters = edata.fixed_parameters_presimulation + edata_presim.fixed_parameters_presimulation = () + edata_presim.fixed_parameters_pre_equilibration = () edata_sim = amici.ExpData(edata) edata_sim.t_presim = 0 - edata_sim.setTimepoints(edata.getTimepoints()) - edata_sim.fixedParameters = edata.fixedParameters - edata_sim.fixedParametersPresimulation = () - edata_sim.fixedParametersPreequilibration = () + edata_sim.set_timepoints(edata.get_timepoints()) + edata_sim.fixed_parameters = edata.fixed_parameters + edata_sim.fixed_parameters_presimulation = () + edata_sim.fixed_parameters_pre_equilibration = () pscales = [ amici.ParameterScaling.log10, amici.ParameterScaling.ln, amici.ParameterScaling.none, - amici.parameterScalingFromIntVector( + amici.parameter_scaling_from_int_vector( [ amici.ParameterScaling.log10, amici.ParameterScaling.ln, @@ -117,41 +117,41 @@ def test_manual_preequilibration(preeq_fixture): settings = itertools.product(pscales, plists) for pscale, plist in settings: - model.setInitialStates([]) - model.setInitialStateSensitivities([]) - model.setParameterList(plist) - model.setParameterScale(pscale) + model.set_initial_state([]) + model.set_initial_state_sensitivities([]) + model.set_parameter_list(plist) + model.set_parameter_scale(pscale) # combined - rdata_auto = amici.runAmiciSimulation(model, solver, edata) + rdata_auto = amici.run_simulation(model, solver, edata) assert rdata_auto.status == amici.AMICI_SUCCESS # manual preequilibration - rdata_preeq = amici.runAmiciSimulation(model, solver, edata_preeq) + rdata_preeq = amici.run_simulation(model, solver, edata_preeq) assert rdata_preeq.status == amici.AMICI_SUCCESS # manual reinitialization + presimulation x0 = rdata_preeq["x"][0, :] - x0[1] = edata_presim.fixedParameters[0] - x0[2] = edata_presim.fixedParameters[1] + x0[1] = edata_presim.fixed_parameters[0] + x0[2] = edata_presim.fixed_parameters[1] sx0 = rdata_preeq["sx"][0, :, :] sx0[:, 1] = 0 sx0[:, 2] = 0 - model.setInitialStates(x0) - model.setInitialStateSensitivities(sx0.flatten()) - rdata_presim = amici.runAmiciSimulation(model, solver, edata_presim) + model.set_initial_state(x0) + model.set_initial_state_sensitivities(sx0.flatten()) + rdata_presim = amici.run_simulation(model, solver, edata_presim) assert rdata_presim.status == amici.AMICI_SUCCESS # manual reinitialization + simulation x0 = rdata_presim["x"][0, :] - x0[1] = edata_sim.fixedParameters[0] - x0[2] = edata_sim.fixedParameters[1] + x0[1] = edata_sim.fixed_parameters[0] + x0[2] = edata_sim.fixed_parameters[1] sx0 = rdata_presim["sx"][0, :, :] sx0[:, 1] = 0 sx0[:, 2] = 0 - model.setInitialStates(x0) - model.setInitialStateSensitivities(sx0.flatten()) - rdata_sim = amici.runAmiciSimulation(model, solver, edata_sim) + model.set_initial_state(x0) + model.set_initial_state_sensitivities(sx0.flatten()) + rdata_sim = amici.run_simulation(model, solver, edata_sim) assert rdata_sim.status == amici.AMICI_SUCCESS for variable in ["x", "sx"]: @@ -180,11 +180,11 @@ def test_parameter_reordering(preeq_fixture): plists, ) = preeq_fixture - rdata_ordered = amici.runAmiciSimulation(model, solver, edata) + rdata_ordered = amici.run_simulation(model, solver, edata) for plist in plists: - model.setParameterList(plist) - rdata_reordered = amici.runAmiciSimulation(model, solver, edata) + model.set_parameter_list(plist) + rdata_reordered = amici.run_simulation(model, solver, edata) for ip, p_index in enumerate(plist): assert_allclose( @@ -211,27 +211,27 @@ def test_data_replicates(preeq_fixture): ) = preeq_fixture sensi_meth = amici.SensitivityMethod.forward - solver.setSensitivityMethod(sensi_meth) + solver.set_sensitivity_method(sensi_meth) # add infty timepoint - y = edata.getObservedData() - stdy = edata.getObservedDataStdDev() - ts = np.hstack([*edata.getTimepoints(), np.inf]) - edata.setTimepoints(sorted(ts)) - edata.setObservedData(np.hstack([y, y[0]])) - edata.setObservedDataStdDev(np.hstack([stdy, stdy[0]])) - rdata_single = amici.runAmiciSimulation(model, solver, edata) + y = edata.get_observed_data() + stdy = edata.get_observed_data_std_dev() + ts = np.hstack([*edata.get_timepoints(), np.inf]) + edata.set_timepoints(sorted(ts)) + edata.set_observed_data(np.hstack([y, y[0]])) + edata.set_observed_data_std_dev(np.hstack([stdy, stdy[0]])) + rdata_single = amici.run_simulation(model, solver, edata) # duplicate data and timepoints - y = edata.getObservedData() - stdy = edata.getObservedDataStdDev() - ts = np.hstack([*edata.getTimepoints(), *edata.getTimepoints()]) + y = edata.get_observed_data() + stdy = edata.get_observed_data_std_dev() + ts = np.hstack([*edata.get_timepoints(), *edata.get_timepoints()]) idx = np.argsort(ts) - edata.setTimepoints(sorted(ts)) - edata.setObservedData(np.hstack([y, y])[idx]) - edata.setObservedDataStdDev(np.hstack([stdy, stdy])[idx]) + edata.set_timepoints(sorted(ts)) + edata.set_observed_data(np.hstack([y, y])[idx]) + edata.set_observed_data_std_dev(np.hstack([stdy, stdy])[idx]) - rdata_double = amici.runAmiciSimulation(model, solver, edata) + rdata_double = amici.run_simulation(model, solver, edata) for variable in ["llh", "sllh"]: assert_allclose( @@ -257,46 +257,46 @@ def test_parameter_in_expdata(preeq_fixture): plists, ) = preeq_fixture - rdata = amici.runAmiciSimulation(model, solver, edata) + rdata = amici.run_simulation(model, solver, edata) # get initial states will compute initial states if nothing is set, # this needs go first as we need unmodified model. Also set to # preequilibration fixpars first as this is where initial states would be # computed otherwise - model.setFixedParameters(edata.fixedParametersPreequilibration) - edata.x0 = model.getInitialStates() - edata.sx0 = model.getInitialStateSensitivities() + model.set_fixed_parameters(edata.fixed_parameters_pre_equilibration) + edata.x0 = model.get_initial_state() + edata.sx0 = model.get_initial_state_sensitivities() # perturb model initial states - model.setInitialStates(rdata["x_ss"] * 4) - model.setInitialStateSensitivities(rdata["sx_ss"].flatten() / 2) + model.set_initial_state(rdata["x_ss"] * 4) + model.set_initial_state_sensitivities(rdata["sx_ss"].flatten() / 2) # set ExpData plist - edata.plist = model.getParameterList() + edata.plist = model.get_parameter_list() # perturb model parameter list - model.setParameterList([i for i in reversed(model.getParameterList())]) + model.set_parameter_list([i for i in reversed(model.get_parameter_list())]) # set ExpData parameters - edata.parameters = model.getParameters() + edata.parameters = model.get_parameters() # perturb model parameters - model.setParameters(tuple(p * 2 for p in model.getParameters())) + model.set_parameters(tuple(p * 2 for p in model.get_parameters())) # set ExpData pscale - edata.pscale = model.getParameterScale() + edata.pscale = model.get_parameter_scale() # perturb model pscale, needs to be done after getting parameters, # otherwise we will mess up parameter value - model.setParameterScale( - amici.parameterScalingFromIntVector( + model.set_parameter_scale( + amici.parameter_scaling_from_int_vector( [ amici.ParameterScaling.log10 if scaling == amici.ParameterScaling.none else amici.ParameterScaling.none - for scaling in model.getParameterScale() + for scaling in model.get_parameter_scale() ] ) ) - rdata_edata = amici.runAmiciSimulation(model, solver, edata) + rdata_edata = amici.run_simulation(model, solver, edata) for variable in ["x", "sx"]: assert_allclose( rdata[variable][0, :], @@ -324,15 +324,15 @@ def test_equilibration_methods_with_adjoints(preeq_fixture): # we don't want presim edata.t_presim = 0.0 - edata.fixedParametersPresimulation = () + edata.fixed_parameters_presimulation = () # add infty timepoint - y = edata.getObservedData() - stdy = edata.getObservedDataStdDev() - ts = np.hstack([*edata.getTimepoints(), np.inf]) - edata.setTimepoints(sorted(ts)) - edata.setObservedData(np.hstack([y, y[0]])) - edata.setObservedDataStdDev(np.hstack([stdy, stdy[0]])) + y = edata.get_observed_data() + stdy = edata.get_observed_data_std_dev() + ts = np.hstack([*edata.get_timepoints(), np.inf]) + edata.set_timepoints(sorted(ts)) + edata.set_observed_data(np.hstack([y, y[0]])) + edata.set_observed_data_std_dev(np.hstack([stdy, stdy[0]])) rdatas = {} equil_meths = [ @@ -349,12 +349,12 @@ def test_equilibration_methods_with_adjoints(preeq_fixture): for setting in settings: # unpack, solver settings equil_meth, sensi_meth = setting - model.setSteadyStateSensitivityMode(equil_meth) - solver.setSensitivityMethod(sensi_meth) - solver.setNewtonMaxSteps(0) + model.set_steady_state_sensitivity_mode(equil_meth) + solver.set_sensitivity_method(sensi_meth) + solver.set_newton_max_steps(0) # add rdatas - rdatas[setting] = amici.runAmiciSimulation(model, solver, edata) + rdatas[setting] = amici.run_simulation(model, solver, edata) # assert successful simulation assert rdatas[setting]["status"] == amici.AMICI_SUCCESS @@ -391,15 +391,15 @@ def test_newton_solver_equilibration(preeq_fixture): # we don't want presim edata.t_presim = 0.0 - edata.fixedParametersPresimulation = () + edata.fixed_parameters_presimulation = () # add infty timepoint - y = edata.getObservedData() - stdy = edata.getObservedDataStdDev() - ts = np.hstack([*edata.getTimepoints(), np.inf]) - edata.setTimepoints(sorted(ts)) - edata.setObservedData(np.hstack([y, y[0]])) - edata.setObservedDataStdDev(np.hstack([stdy, stdy[0]])) + y = edata.get_observed_data() + stdy = edata.get_observed_data_std_dev() + ts = np.hstack([*edata.get_timepoints(), np.inf]) + edata.set_timepoints(sorted(ts)) + edata.set_observed_data(np.hstack([y, y[0]])) + edata.set_observed_data_std_dev(np.hstack([stdy, stdy[0]])) rdatas = {} settings = [ @@ -407,19 +407,19 @@ def test_newton_solver_equilibration(preeq_fixture): amici.SteadyStateSensitivityMode.newtonOnly, ] - solver.setNewtonStepSteadyStateCheck(True) - solver.setRelativeToleranceSteadyState(1e-12) + solver.set_newton_step_steady_state_check(True) + solver.set_relative_tolerance_steady_state(1e-12) for equil_meth in settings: # set sensi method sensi_meth = amici.SensitivityMethod.forward - solver.setSensitivityMethod(sensi_meth) - model.setSteadyStateSensitivityMode(equil_meth) + solver.set_sensitivity_method(sensi_meth) + model.set_steady_state_sensitivity_mode(equil_meth) if equil_meth == amici.SteadyStateSensitivityMode.newtonOnly: - solver.setNewtonMaxSteps(10) + solver.set_newton_max_steps(10) # add rdatas - rdatas[equil_meth] = amici.runAmiciSimulation(model, solver, edata) + rdatas[equil_meth] = amici.run_simulation(model, solver, edata) # assert successful simulation assert rdatas[equil_meth]["status"] == amici.AMICI_SUCCESS @@ -451,28 +451,28 @@ def test_newton_steadystate_check(preeq_fixture): # we don't want presim edata.t_presim = 0.0 - edata.fixedParametersPresimulation = () + edata.fixed_parameters_presimulation = () # add infty timepoint - y = edata.getObservedData() - stdy = edata.getObservedDataStdDev() - ts = np.hstack([*edata.getTimepoints(), np.inf]) - edata.setTimepoints(sorted(ts)) - edata.setObservedData(np.hstack([y, y[0]])) - edata.setObservedDataStdDev(np.hstack([stdy, stdy[0]])) + y = edata.get_observed_data() + stdy = edata.get_observed_data_std_dev() + ts = np.hstack([*edata.get_timepoints(), np.inf]) + edata.set_timepoints(sorted(ts)) + edata.set_observed_data(np.hstack([y, y[0]])) + edata.set_observed_data_std_dev(np.hstack([stdy, stdy[0]])) # set sensi method sensi_meth = amici.SensitivityMethod.forward - solver.setSensitivityMethod(sensi_meth) + solver.set_sensitivity_method(sensi_meth) - solver.setNewtonMaxSteps(100) + solver.set_newton_max_steps(100) rdatas = {} for newton_check in [True, False]: - solver.setNewtonStepSteadyStateCheck(newton_check) + solver.set_newton_step_steady_state_check(newton_check) # add rdatas - rdatas[newton_check] = amici.runAmiciSimulation(model, solver, edata) + rdatas[newton_check] = amici.run_simulation(model, solver, edata) # assert successful simulation assert rdatas[newton_check]["status"] == amici.AMICI_SUCCESS @@ -502,9 +502,9 @@ def test_steadystate_computation_mode(preeq_fixture): ) = preeq_fixture sensi_meth = amici.SensitivityMethod.forward - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setSensitivityMethodPreequilibration(sensi_meth) - solver.setNewtonMaxSteps(10) + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_sensitivity_method_pre_equilibration(sensi_meth) + solver.set_newton_max_steps(10) rdatas = {} stst_computation_modes = [ @@ -512,8 +512,8 @@ def test_steadystate_computation_mode(preeq_fixture): amici.SteadyStateComputationMode.newtonOnly, ] for mode in stst_computation_modes: - model.setSteadyStateComputationMode(mode) - rdatas[mode] = amici.runAmiciSimulation(model, solver, edata) + model.set_steady_state_computation_mode(mode) + rdatas[mode] = amici.run_simulation(model, solver, edata) # assert successful simulation assert rdatas[mode]["status"] == amici.AMICI_SUCCESS @@ -569,19 +569,19 @@ def test_simulation_errors(preeq_fixture): plists, ) = preeq_fixture - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setSensitivityMethodPreequilibration( + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_sensitivity_method_pre_equilibration( amici.SensitivityMethod.forward ) - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) - solver.setMaxSteps(1) + solver.set_max_steps(1) # exceeded maxsteps # preeq & posteq for e in [edata, edata_preeq]: - rdata = amici.runAmiciSimulation(model, solver, e) + rdata = amici.run_simulation(model, solver, e) assert rdata["status"] != amici.AMICI_SUCCESS assert rdata._swigptr.messages[0].severity == amici.LogSeverity_debug assert rdata._swigptr.messages[0].identifier == "EQUILIBRATION_FAILURE" @@ -593,21 +593,21 @@ def test_simulation_errors(preeq_fixture): assert rdata._swigptr.messages[1].identifier == "OTHER" # too long simulations - solver.setMaxSteps(int(1e4)) - solver.setRelativeToleranceSteadyState(0.0) - solver.setAbsoluteToleranceSteadyState(0.0) + solver.set_max_steps(int(1e4)) + solver.set_relative_tolerance_steady_state(0.0) + solver.set_absolute_tolerance_steady_state(0.0) # preeq & posteq for e in [edata_preeq, edata]: - rdata = amici.runAmiciSimulation(model, solver, e) + rdata = amici.run_simulation(model, solver, e) assert rdata["status"] != amici.AMICI_SUCCESS messages = [] # remove repeated RHSFUNC_FAIL messages for message in rdata._swigptr.messages: if not messages or message.message != messages[-1].message: messages.append(message) - assert messages[0].severity == amici.LogSeverity_debug + assert messages[0].severity == amici.LogSeverity.debug assert messages[0].identifier.endswith(":RHSFUNC_FAIL") - assert messages[1].severity == amici.LogSeverity_debug + assert messages[1].severity == amici.LogSeverity.debug assert messages[1].identifier == "EQUILIBRATION_FAILURE" assert "exceedingly long simulation time" in messages[1].message assert messages[2].severity == amici.LogSeverity_error @@ -625,13 +625,13 @@ def test_get_model_for_preeq(preeq_fixture): pscales, plists, ) = preeq_fixture - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) model_preeq = get_model_for_preeq(model, edata) # the exactly same settings are used, so results should match exactly - rdata1 = amici.runAmiciSimulation(model_preeq, solver) - rdata2 = amici.runAmiciSimulation(model, solver, edata_preeq) + rdata1 = amici.run_simulation(model_preeq, solver) + rdata2 = amici.run_simulation(model, solver, edata_preeq) assert_equal( rdata1.x, rdata2.x, @@ -667,13 +667,13 @@ def test_partial_eq(): model_module = amici.import_model_module( module_name=module_name, module_path=outdir ) - amici_model = model_module.getModel() - amici_model.setTimepoints([np.inf]) - amici_solver = amici_model.getSolver() - amici_solver.setRelativeToleranceSteadyState(1e-12) + amici_model = model_module.get_model() + amici_model.set_timepoints([np.inf]) + amici_solver = amici_model.create_solver() + amici_solver.set_relative_tolerance_steady_state(1e-12) # equilibration of `explodes` will fail - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_ERROR assert rdata.messages[0].identifier == "EQUILIBRATION_FAILURE" @@ -681,22 +681,22 @@ def test_partial_eq(): amici_model.set_steadystate_mask( [ 0 if state_id == "explodes" else 1 - for state_id in amici_model.getStateIdsSolver() + for state_id in amici_model.get_state_ids_solver() ] ) - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS assert_allclose( rdata.by_id("A"), 0.5, - atol=amici_solver.getAbsoluteToleranceSteadyState(), - rtol=amici_solver.getRelativeToleranceSteadyState(), + atol=amici_solver.get_absolute_tolerance_steady_state(), + rtol=amici_solver.get_relative_tolerance_steady_state(), ) assert_allclose( rdata.by_id("B"), 0.5, - atol=amici_solver.getAbsoluteToleranceSteadyState(), - rtol=amici_solver.getRelativeToleranceSteadyState(), + atol=amici_solver.get_absolute_tolerance_steady_state(), + rtol=amici_solver.get_relative_tolerance_steady_state(), ) assert rdata.t_last < 100 @@ -726,25 +726,25 @@ def test_preequilibration_t0(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() edata = amici.ExpData(amici_model) - edata.setTimepoints([0.0, 10_000.0]) - edata.fixedParametersPreequilibration = [1.0] - edata.fixedParameters = [0.0] - amici_model.setT0Preeq(-10_000.0) - amici_model.setT0(-2.0) - amici_solver = amici_model.getSolver() - amici_solver.setRelativeToleranceSteadyState(1e-5) - amici_model.setSteadyStateComputationMode( + edata.set_timepoints([0.0, 10_000.0]) + edata.fixed_parameters_pre_equilibration = [1.0] + edata.fixed_parameters = [0.0] + amici_model.set_t0_preeq(-10_000.0) + amici_model.set_t0(-2.0) + amici_solver = amici_model.create_solver() + amici_solver.set_relative_tolerance_steady_state(1e-5) + amici_model.set_steady_state_computation_mode( amici.SteadyStateComputationMode.integrationOnly ) - rdata = amici.runAmiciSimulation(amici_model, amici_solver, edata) + rdata = amici.run_simulation(amici_model, amici_solver, edata) assert rdata.status == amici.AMICI_SUCCESS assert set(rdata.by_id("t0_preeq")) == {-10_000.0} - idx_time_integral = amici_model.getStateIds().index("T") + idx_time_integral = amici_model.get_state_ids().index("T") assert np.isclose( - rdata.x_ss[idx_time_integral], rdata.preeq_t - amici_model.t0Preeq() + rdata.x_ss[idx_time_integral], rdata.preeq_t - amici_model.t0_preeq() ) @@ -789,30 +789,30 @@ def test_preequilibration_events(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() - target1_idx = amici_model.getStateIds().index("target1") - target2_idx = amici_model.getStateIds().index("target2") - target3_idx = amici_model.getStateIds().index("target3") - target4_idx = amici_model.getStateIds().index("target4") + amici_model = model_module.get_model() + target1_idx = amici_model.get_state_ids().index("target1") + target2_idx = amici_model.get_state_ids().index("target2") + target3_idx = amici_model.get_state_ids().index("target3") + target4_idx = amici_model.get_state_ids().index("target4") - amici_model.setTimepoints([0, 11]) - amici_solver = amici_model.getSolver() - amici_solver.setNewtonMaxSteps(10**5) + amici_model.set_timepoints([0, 11]) + amici_solver = amici_model.create_solver() + amici_solver.set_newton_max_steps(10**5) edata = amici.ExpData(amici_model) - edata.setTimepoints([0, 11]) - edata.fixedParametersPreequilibration = [1.0] - edata.fixedParameters = [0.0] + edata.set_timepoints([0, 11]) + edata.fixed_parameters_pre_equilibration = [1.0] + edata.fixed_parameters = [0.0] # Integration-only preequilibration should handle all events - amici_model = model_module.getModel() - amici_model.setSteadyStateSensitivityMode( + amici_model = model_module.get_model() + amici_model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) - amici_model.setSteadyStateComputationMode( + amici_model.set_steady_state_computation_mode( amici.SteadyStateSensitivityMode.integrationOnly ) - rdata = amici.runAmiciSimulation(amici_model, amici_solver, edata) + rdata = amici.run_simulation(amici_model, amici_solver, edata) assert rdata.status == amici.AMICI_SUCCESS assert rdata.preeq_t > 1e-3 # verifies that integration was done assert rdata.x_ss[target1_idx] == 1 @@ -825,30 +825,30 @@ def test_preequilibration_events(tempdir): assert np.all(rdata.x[:, target4_idx] == [1, 2]) edata = amici.ExpData(rdata, 1.0, 1.0, 1) - edata.fixedParametersPreequilibration = [1.0] - edata.fixedParameters = [0.0] + edata.fixed_parameters_pre_equilibration = [1.0] + edata.fixed_parameters = [0.0] - amici_solver.setSensitivityOrder(SensitivityOrder.first) + amici_solver.set_sensitivity_order(SensitivityOrder.first) for sensi_meth, sensi_meth_preeq in ( (SensitivityMethod.forward, SensitivityMethod.forward), (SensitivityMethod.adjoint, SensitivityMethod.forward), (SensitivityMethod.adjoint, SensitivityMethod.adjoint), ): - amici_solver.setSensitivityMethod(sensi_meth) - amici_solver.setSensitivityMethodPreequilibration(sensi_meth_preeq) + amici_solver.set_sensitivity_method(sensi_meth) + amici_solver.set_sensitivity_method_pre_equilibration(sensi_meth_preeq) # amici_model.requireSensitivitiesForAllParameters() # FIXME: finite differences w.r.t. trigger time are off # need different epsilon for trigger time - amici_model.setParameterList( + amici_model.set_parameter_list( [ i - for i, p in enumerate(amici_model.getParameterIds()) + for i, p in enumerate(amici_model.get_parameter_ids()) if p != "trigger_time2" ] ) - rdata = amici.runAmiciSimulation(amici_model, amici_solver, edata) + rdata = amici.run_simulation(amici_model, amici_solver, edata) assert rdata.status == amici.AMICI_SUCCESS check_derivatives( diff --git a/python/tests/test_pregenerated_models.py b/python/tests/test_pregenerated_models.py index 2acdff19c4..54dbcbadbd 100755 --- a/python/tests/test_pregenerated_models.py +++ b/python/tests/test_pregenerated_models.py @@ -61,30 +61,30 @@ def test_pregenerated_model_py(sub_test, case): test_model_module = amici.import_model_module( module_name=f"{model_name}_py", module_path=model_swig_folder ) - model = test_model_module.getModel() - solver = model.getSolver() - amici.readModelDataFromHDF5( + model = test_model_module.get_model() + solver = model.create_solver() + amici.read_model_data_from_hdf5( options_file, model.get(), f"/{sub_test}/{case}/options" ) if model_name == "model_steadystate": - model.setSteadyStateComputationMode( + model.set_steady_state_computation_mode( amici.SteadyStateComputationMode.integrateIfNewtonFails ) - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrateIfNewtonFails ) - amici.readSolverSettingsFromHDF5( + amici.read_solver_settings_from_hdf5( options_file, solver.get(), f"/{sub_test}/{case}/options" ) edata = None if "data" in expected_results[sub_test][case].keys(): - edata = amici.readSimulationExpData( + edata = amici.read_exp_data_from_hdf5( str(expected_results_file_py), f"/{sub_test}/{case}/data", model.get(), ) - rdata = amici.runAmiciSimulation(model, solver, edata) + rdata = amici.run_simulation(model, solver, edata) check_derivative_opts = dict() @@ -95,9 +95,9 @@ def test_pregenerated_model_py(sub_test, case): if ( edata - and solver.getSensitivityMethod() - and solver.getSensitivityOrder() - and len(model.getParameterList()) + and solver.get_sensitivity_method() + and solver.get_sensitivity_order() + and len(model.get_parameter_list()) and not model_name.startswith("model_neuron") and not case.endswith("byhandpreeq") ): @@ -130,7 +130,7 @@ def test_pregenerated_model_py(sub_test, case): if model_name == "model_steadystate" and case == "sensiforwarderrorint": edata = amici.amici.ExpData(model.get()) - # Test runAmiciSimulations: ensure running twice + # Test run_simulations: ensure running twice # with same ExpData yields same results if ( edata @@ -144,7 +144,7 @@ def test_pregenerated_model_py(sub_test, case): else: edatas = [edata.get(), edata.get()] - rdatas = amici.runAmiciSimulations( + rdatas = amici.run_simulations( model, solver, edatas, num_threads=2, failfast=False ) verify_simulation_results( @@ -159,12 +159,14 @@ def test_pregenerated_model_py(sub_test, case): ) # test residuals mode - if solver.getSensitivityMethod() == amici.SensitivityMethod.adjoint: + if solver.get_sensitivity_method() == amici.SensitivityMethod.adjoint: with pytest.raises(RuntimeError): - solver.setReturnDataReportingMode(amici.RDataReporting.residuals) + solver.set_return_data_reporting_mode( + amici.RDataReporting.residuals + ) else: - solver.setReturnDataReportingMode(amici.RDataReporting.residuals) - rdata = amici.runAmiciSimulation(model, solver, edata) + solver.set_return_data_reporting_mode(amici.RDataReporting.residuals) + rdata = amici.run_simulation(model, solver, edata) verify_simulation_results( rdata, expected_results[sub_test][case]["results"], @@ -172,13 +174,13 @@ def test_pregenerated_model_py(sub_test, case): **verify_simulation_opts, ) with pytest.raises(RuntimeError): - solver.setSensitivityMethod(amici.SensitivityMethod.adjoint) + solver.set_sensitivity_method(amici.SensitivityMethod.adjoint) chi2_ref = rdata.chi2 # test likelihood mode - solver.setReturnDataReportingMode(amici.RDataReporting.likelihood) - rdata = amici.runAmiciSimulation(model, solver, edata) + solver.set_return_data_reporting_mode(amici.RDataReporting.likelihood) + rdata = amici.run_simulation(model, solver, edata) verify_simulation_results( rdata, expected_results[sub_test][case]["results"], @@ -190,38 +192,38 @@ def test_pregenerated_model_py(sub_test, case): if ( model_name == "model_jakstat_adjoint" - and solver.getSensitivityMethod() != amici.SensitivityMethod.adjoint + and solver.get_sensitivity_method() != amici.SensitivityMethod.adjoint ): - model.setAddSigmaResiduals(True) - solver.setReturnDataReportingMode(amici.RDataReporting.full) - rdata = amici.runAmiciSimulation(model, solver, edata) + model.set_add_sigma_residuals(True) + solver.set_return_data_reporting_mode(amici.RDataReporting.full) + rdata = amici.run_simulation(model, solver, edata) # check whether activation changes chi2 assert chi2_ref != rdata.chi2 if ( edata - and solver.getSensitivityMethod() - and solver.getSensitivityOrder() - and len(model.getParameterList()) + and solver.get_sensitivity_method() + and solver.get_sensitivity_order() + and len(model.get_parameter_list()) ): check_derivatives(model, solver, edata, **check_derivative_opts) chi2_ref = rdata.chi2 res_ref = rdata.res - model.setMinimumSigmaResiduals(100) - rdata = amici.runAmiciSimulation(model, solver, edata) + model.set_minimum_sigma_residuals(100) + rdata = amici.run_simulation(model, solver, edata) # check whether changing the minimum changes res but not chi2 assert np.isclose(chi2_ref, rdata.chi2) assert not np.allclose(res_ref, rdata.res) - model.setMinimumSigmaResiduals(-10) - rdata = amici.runAmiciSimulation(model, solver, edata) + model.set_minimum_sigma_residuals(-10) + rdata = amici.run_simulation(model, solver, edata) # check whether having a bad minimum results in nan chi2 assert np.isnan(rdata.chi2) with pytest.raises(RuntimeError): - model.getParameterByName("thisParameterDoesNotExist") + model.get_parameter_by_name("thisParameterDoesNotExist") def verify_simulation_results( diff --git a/python/tests/test_pysb.py b/python/tests/test_pysb.py index fb2d7d5b9c..e931862f4a 100644 --- a/python/tests/test_pysb.py +++ b/python/tests/test_pysb.py @@ -14,12 +14,13 @@ import pysb.examples # noqa: F811 import pytest import sympy as sp -from amici import ParameterScaling, parameterScalingFromIntVector +from amici import ParameterScaling, parameter_scaling_from_int_vector from amici.gradient_check import check_derivatives from amici.pysb_import import pysb2amici from amici.testing import TemporaryDirectoryWinSafe, skip_on_valgrind from numpy.testing import assert_allclose from pysb.simulator import ScipyOdeSimulator +from pathlib import Path @skip_on_valgrind @@ -28,7 +29,7 @@ def test_compare_to_sbml_import( ): # -------------- PYSB ----------------- - model_pysb = pysb_example_presimulation_module.getModel() + model_pysb = pysb_example_presimulation_module.get_model() edata = get_data(model_pysb) @@ -36,7 +37,7 @@ def test_compare_to_sbml_import( # -------------- SBML ----------------- - model_sbml = sbml_example_presimulation_module.getModel() + model_sbml = sbml_example_presimulation_module.get_model() rdata_sbml = get_results(model_sbml, edata) @@ -47,7 +48,7 @@ def test_compare_to_sbml_import( # check equilibrium fixed parameters assert np.isclose( [sum(rdata["x_ss"][[1, 3]]), sum(rdata["x_ss"][[2, 4]])], - edata.fixedParametersPreequilibration, + edata.fixed_parameters_pre_equilibration, atol=1e-6, rtol=1e-6, ).all(), f"{importer} preequilibration" @@ -55,7 +56,7 @@ def test_compare_to_sbml_import( # check equilibrium initial parameters assert np.isclose( sum(rdata["x_ss"][[0, 3, 4, 5]]), - model.getParameterByName("PROT_0"), + model.get_parameter_by_name("PROT_0"), atol=1e-6, rtol=1e-6, ), f"{importer} preequilibration" @@ -64,7 +65,7 @@ def test_compare_to_sbml_import( # presimulation assert np.isclose( [rdata["x0"][1], rdata["x0"][2]], - edata.fixedParameters, + edata.fixed_parameters, atol=1e-6, rtol=1e-6, ).all(), f"{importer} presimulation" @@ -74,15 +75,15 @@ def test_compare_to_sbml_import( "preeq_t", "numsteps", "preeq_numsteps", - "numrhsevals", - "numerrtestfails", + "num_rhs_evals", + "num_err_test_fails", "order", "J", "xdot", "preeq_wrms", "preeq_cpu_time", "cpu_time", - "cpu_timeB", + "cpu_time_b", "cpu_time_total", "w", ] @@ -142,9 +143,7 @@ def test_compare_to_pysb_simulation(example): with amici.add_path(os.path.dirname(pysb.examples.__file__)): with amici.add_path( - os.path.join( - os.path.dirname(__file__), "..", "tests", "pysb_test_models" - ) + Path(__file__).parents[1] / "tests" / "pysb_test_models" ): # load example pysb.SelfExporter.cleanup() # reset pysb @@ -196,14 +195,14 @@ def test_compare_to_pysb_simulation(example): amici_model_module = amici.import_model_module( pysb_model.name, outdir ) - model_pysb = amici_model_module.getModel() - model_pysb.setTimepoints(tspan) + model_pysb = amici_model_module.get_model() + model_pysb.set_timepoints(tspan) - solver = model_pysb.getSolver() - solver.setMaxSteps(int(1e6)) - solver.setAbsoluteTolerance(atol) - solver.setRelativeTolerance(rtol) - rdata = amici.runAmiciSimulation(model_pysb, solver) + solver = model_pysb.create_solver() + solver.set_max_steps(int(1e6)) + solver.set_absolute_tolerance(atol) + solver.set_relative_tolerance(rtol) + rdata = amici.run_simulation(model_pysb, solver) # check agreement of species simulations assert np.isclose( @@ -224,20 +223,20 @@ def test_compare_to_pysb_simulation(example): "bngwiki_enzymatic_cycle_mm", "bngwiki_simple", ]: - solver.setAbsoluteTolerance(1e-14) - solver.setRelativeTolerance(1e-14) + solver.set_absolute_tolerance(1e-14) + solver.set_relative_tolerance(1e-14) epsilon = 1e-4 else: - solver.setAbsoluteTolerance(1e-10) - solver.setRelativeTolerance(1e-10) + solver.set_absolute_tolerance(1e-10) + solver.set_relative_tolerance(1e-10) epsilon = 1e-3 - model_pysb.setParameterScale( - parameterScalingFromIntVector( + model_pysb.set_parameter_scale( + parameter_scaling_from_int_vector( [ ParameterScaling.log10 if p > 0 else ParameterScaling.none - for p in model_pysb.getParameters() + for p in model_pysb.get_parameters() ] ) ) @@ -252,38 +251,38 @@ def test_compare_to_pysb_simulation(example): def get_data(model): - solver = model.getSolver() - model.setTimepoints(np.linspace(0, 60, 61)) - model.setSteadyStateSensitivityMode( + solver = model.create_solver() + model.set_timepoints(np.linspace(0, 60, 61)) + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrateIfNewtonFails ) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) edata = amici.ExpData(rdata, 0.1, 0.0) edata.t_presim = 2 - edata.fixedParameters = [10, 2] - edata.fixedParametersPresimulation = [3, 2] - edata.fixedParametersPreequilibration = [3, 0] - edata.reinitializeFixedParameterInitialStates = True + edata.fixed_parameters = [10, 2] + edata.fixed_parameters_presimulation = [3, 2] + edata.fixed_parameters_pre_equilibration = [3, 0] + edata.reinitialize_fixed_parameter_initial_states = True return edata def get_results(model, edata): - solver = model.getSolver() - solver.setSensitivityOrder(1) - edata.reinitializeFixedParameterInitialStates = True - model.setTimepoints(np.linspace(0, 60, 61)) - model.setSteadyStateSensitivityMode( + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) + edata.reinitialize_fixed_parameter_initial_states = True + model.set_timepoints(np.linspace(0, 60, 61)) + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrateIfNewtonFails ) - return amici.runAmiciSimulation(model, solver, edata) + return amici.run_simulation(model, solver, edata) @skip_on_valgrind def test_names_and_ids(pysb_example_presimulation_module): - model_pysb = pysb_example_presimulation_module.getModel() + model_pysb = pysb_example_presimulation_module.get_model() expected = { - "ExpressionIds": ( + "expression_ids": ( "__s2", "__s1", "__s5", @@ -294,11 +293,11 @@ def test_names_and_ids(pysb_example_presimulation_module): "initKin", "pPROT_obs", ), - "FixedParameterIds": ("DRUG_0", "KIN_0"), - "FixedParameterNames": ("DRUG_0", "KIN_0"), - "ObservableIds": ("pPROT_obs",), - "ObservableNames": ("pPROT_obs",), - "ParameterIds": ( + "fixed_parameter_ids": ("DRUG_0", "KIN_0"), + "fixed_parameter_names": ("DRUG_0", "KIN_0"), + "observable_ids": ("pPROT_obs",), + "observable_names": ("pPROT_obs",), + "parameter_ids": ( "PROT_0", "kon_prot_drug", "koff_prot_drug", @@ -306,8 +305,8 @@ def test_names_and_ids(pysb_example_presimulation_module): "kphospho_prot_kin", "kdephospho_prot", ), - "StateIds": ("__s0", "__s1", "__s2", "__s3", "__s4", "__s5"), - "StateNames": ( + "state_ids": ("__s0", "__s1", "__s2", "__s3", "__s4", "__s5"), + "state_names": ( "PROT(kin=None, drug=None, phospho='u')", "DRUG(bound=None)", "KIN(bound=None)", @@ -317,11 +316,11 @@ def test_names_and_ids(pysb_example_presimulation_module): ), } # Names and IDs are the same here - expected["ExpressionNames"] = expected["ExpressionIds"] - expected["ParameterNames"] = expected["ParameterIds"] + expected["expression_names"] = expected["expression_ids"] + expected["parameter_names"] = expected["parameter_ids"] for field_name, cur_expected in expected.items(): - actual = getattr(model_pysb, f"get{field_name}")() + actual = getattr(model_pysb, f"get_{field_name}")() assert actual == cur_expected @@ -353,7 +352,7 @@ def test_heavyside_and_special_symbols(): model_module = amici.import_model_module( module_name=model.name, module_path=outdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() assert amici_model.ne @@ -386,11 +385,11 @@ def test_energy(): model_module = amici.import_model_module( module_name=model_pysb.name, module_path=outdir ) - amici_model = model_module.getModel() - amici_model.setTimepoints(np.logspace(-4, 5, 10)) - solver = amici_model.getSolver() - solver.setRelativeTolerance(1e-14) - solver.setAbsoluteTolerance(1e-14) + amici_model = model_module.get_model() + amici_model.set_timepoints(np.logspace(-4, 5, 10)) + solver = amici_model.create_solver() + solver.set_relative_tolerance(1e-14) + solver.set_absolute_tolerance(1e-14) check_derivatives( amici_model, solver, epsilon=1e-4, rtol=1e-2, atol=1e-2 diff --git a/python/tests/test_rdata.py b/python/tests/test_rdata.py index 80ec3b80e6..8e552c793e 100644 --- a/python/tests/test_rdata.py +++ b/python/tests/test_rdata.py @@ -11,12 +11,12 @@ @pytest.fixture(scope="session") def rdata_by_id_fixture(sbml_example_presimulation_module): model_module = sbml_example_presimulation_module - model = model_module.getModel() - model.setTimepoints(np.linspace(0, 60, 61)) - solver = model.getSolver() - solver.setSensitivityMethod(amici.SensitivityMethod.forward) - solver.setSensitivityOrder(amici.SensitivityOrder.first) - rdata = amici.runAmiciSimulation(model, solver) + model = model_module.get_model() + model.set_timepoints(np.linspace(0, 60, 61)) + solver = model.create_solver() + solver.set_sensitivity_method(amici.SensitivityMethod.forward) + solver.set_sensitivity_order(amici.SensitivityOrder.first) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_SUCCESS return model, rdata @@ -25,23 +25,27 @@ def rdata_by_id_fixture(sbml_example_presimulation_module): def test_rdata_by_id(rdata_by_id_fixture): model, rdata = rdata_by_id_fixture - assert_array_equal(rdata.by_id(model.getStateIds()[1]), rdata.x[:, 1]) - assert_array_equal(rdata.by_id(model.getStateIds()[1], "x"), rdata.x[:, 1]) + assert_array_equal(rdata.by_id(model.get_state_ids()[1]), rdata.x[:, 1]) assert_array_equal( - rdata.by_id(model.getStateIds()[1], "x", model), rdata.x[:, 1] + rdata.by_id(model.get_state_ids()[1], "x"), rdata.x[:, 1] + ) + assert_array_equal( + rdata.by_id(model.get_state_ids()[1], "x", model), rdata.x[:, 1] ) assert_array_equal( - rdata.by_id(model.getObservableIds()[0], "y", model), rdata.y[:, 0] + rdata.by_id(model.get_observable_ids()[0], "y", model), rdata.y[:, 0] ) - assert_array_equal(rdata.by_id(model.getExpressionIds()[1]), rdata.w[:, 1]) assert_array_equal( - rdata.by_id(model.getExpressionIds()[1], "w", model), rdata.w[:, 1] + rdata.by_id(model.get_expression_ids()[1]), rdata.w[:, 1] + ) + assert_array_equal( + rdata.by_id(model.get_expression_ids()[1], "w", model), rdata.w[:, 1] ) assert_array_equal( - rdata.by_id(model.getStateIds()[1], "sx", model), rdata.sx[:, :, 1] + rdata.by_id(model.get_state_ids()[1], "sx", model), rdata.sx[:, :, 1] ) @@ -49,9 +53,9 @@ def test_rdata_by_id(rdata_by_id_fixture): def test_evaluate(rdata_by_id_fixture): # get IDs of model components model, rdata = rdata_by_id_fixture - expr0_id = model.getExpressionIds()[0] - state1_id = model.getStateIds()[1] - observable0_id = model.getObservableIds()[0] + expr0_id = model.get_expression_ids()[0] + state1_id = model.get_state_ids()[1] + observable0_id = model.get_observable_ids()[0] # ensure `evaluate` works for atoms expr0 = rdata.by_id(expr0_id) diff --git a/python/tests/test_sbml_import.py b/python/tests/test_sbml_import.py index 2dafd4acbe..178ae762ea 100644 --- a/python/tests/test_sbml_import.py +++ b/python/tests/test_sbml_import.py @@ -75,7 +75,7 @@ def test_sbml2amici_no_observables(tempdir): # Ensure import succeeds (no missing symbols) module_module = amici.import_model_module(model_name, tempdir) - assert hasattr(module_module, "getModel") + assert hasattr(module_module, "get_model") @skip_on_valgrind @@ -116,12 +116,12 @@ def test_nosensi(tempdir): module_name=model_name, module_path=tempdir ) - model = model_module.getModel() - model.setTimepoints(np.linspace(0, 60, 61)) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setSensitivityMethod(amici.SensitivityMethod.forward) - rdata = amici.runAmiciSimulation(model, solver) + model = model_module.get_model() + model.set_timepoints(np.linspace(0, 60, 61)) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_ERROR @@ -169,12 +169,12 @@ def test_sbml2amici_observable_dependent_error( ): """Check gradients for model with observable-dependent error""" model_module = observable_dependent_error_model - model = model_module.getModel() - model.setTimepoints(np.linspace(0, 60, 61)) - solver = model.getSolver() + model = model_module.get_model() + model.set_timepoints(np.linspace(0, 60, 61)) + solver = model.create_solver() # generate artificial data - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert_allclose( rdata.sigmay[:, 0], 0.1 + 0.05 * rdata.y[:, 0], @@ -185,17 +185,17 @@ def test_sbml2amici_observable_dependent_error( rdata.sigmay[:, 1], 0.02 * rdata.y[:, 1], rtol=1.0e-5, atol=1.0e-8 ) edata = amici.ExpData(rdata, 1.0, 0.0) - edata.setObservedDataStdDev(np.nan) + edata.set_observed_data_std_dev(np.nan) # check sensitivities - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_order(amici.SensitivityOrder.first) # FSA - solver.setSensitivityMethod(amici.SensitivityMethod.forward) - rdata = amici.runAmiciSimulation(model, solver, edata) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) + rdata = amici.run_simulation(model, solver, edata) assert np.any(rdata.ssigmay != 0.0) check_derivatives(model, solver, edata) # ASA - solver.setSensitivityMethod(amici.SensitivityMethod.adjoint) + solver.set_sensitivity_method(amici.SensitivityMethod.adjoint) check_derivatives(model, solver, edata) @@ -203,14 +203,14 @@ def test_sbml2amici_observable_dependent_error( def test_logging_works(observable_dependent_error_model, caplog): """Check that warnings are forwarded to Python logging""" model_module = observable_dependent_error_model - model = model_module.getModel() - model.setTimepoints(np.linspace(0, 60, 61)) - solver = model.getSolver() + model = model_module.get_model() + model.set_timepoints(np.linspace(0, 60, 61)) + solver = model.create_solver() # this will prematurely stop the simulation - solver.setMaxSteps(1) + solver.set_max_steps(1) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert rdata.status != amici.AMICI_SUCCESS assert "mxstep steps taken" in caplog.text @@ -218,8 +218,8 @@ def test_logging_works(observable_dependent_error_model, caplog): @skip_on_valgrind def test_model_module_is_set(observable_dependent_error_model): model_module = observable_dependent_error_model - assert model_module.getModel().module is model_module - assert isinstance(model_module.getModel().module, amici.ModelModule) + assert model_module.get_model().module is model_module + assert isinstance(model_module.get_model().module, amici.ModelModule) @pytest.fixture(scope="session") @@ -255,26 +255,26 @@ def model_steadystate_module(): def test_presimulation(sbml_example_presimulation_module): """Test 'presimulation' test model""" - model = sbml_example_presimulation_module.getModel() - solver = model.getSolver() - model.setTimepoints(np.linspace(0, 60, 61)) - model.setSteadyStateSensitivityMode( + model = sbml_example_presimulation_module.get_model() + solver = model.create_solver() + model.set_timepoints(np.linspace(0, 60, 61)) + model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) - solver.setSensitivityOrder(amici.SensitivityOrder.first) - model.setReinitializeFixedParameterInitialStates(True) + solver.set_sensitivity_order(amici.SensitivityOrder.first) + model.set_reinitialize_fixed_parameter_initial_states(True) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) edata = amici.ExpData(rdata, 0.1, 0.0) - edata.fixedParameters = [10, 2] - edata.fixedParametersPresimulation = [10, 2] - edata.fixedParametersPreequilibration = [3, 0] + edata.fixed_parameters = [10, 2] + edata.fixed_parameters_presimulation = [10, 2] + edata.fixed_parameters_pre_equilibration = [3, 0] assert isinstance( - amici.runAmiciSimulation(model, solver, edata), amici.ReturnDataView + amici.run_simulation(model, solver, edata), amici.ReturnDataView ) - solver.setRelativeTolerance(1e-12) - solver.setAbsoluteTolerance(1e-12) + solver.set_relative_tolerance(1e-12) + solver.set_absolute_tolerance(1e-12) check_derivatives(model, solver, edata, epsilon=1e-4) @@ -311,28 +311,28 @@ def test_presimulation_events(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([0, 1, 2]) + model.set_timepoints([0, 1, 2]) edata = amici.ExpData(model) edata.t_presim = 2 - edata.fixedParametersPresimulation = [1] - edata.fixedParameters = [0] - solver = model.getSolver() + edata.fixed_parameters_presimulation = [1] + edata.fixed_parameters = [0] + solver = model.create_solver() # generate artificial data - rdata = amici.runAmiciSimulation(model, solver, edata) + rdata = amici.run_simulation(model, solver, edata) edata_tmp = amici.ExpData(rdata, 1, 0) - edata.setTimepoints(np.array(edata_tmp.getTimepoints()) + 0.1) - edata.setObservedData(edata_tmp.getObservedData()) - edata.setObservedDataStdDev(edata_tmp.getObservedDataStdDev()) + edata.set_timepoints(np.array(edata_tmp.get_timepoints()) + 0.1) + edata.set_observed_data(edata_tmp.get_observed_data()) + edata.set_observed_data_std_dev(edata_tmp.get_observed_data_std_dev()) # sensitivities w.r.t. t_initial_presim (trigger time of an initial event) # are not supported edata.plist = [ ip - for ip, p in enumerate(model.getParameterIds()) + for ip, p in enumerate(model.get_parameter_ids()) if p != "t_initial_presim" ] - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_order(amici.SensitivityOrder.first) for sensi_method in ( amici.SensitivityMethod.forward, @@ -340,8 +340,8 @@ def test_presimulation_events(tempdir): # that fails forward simulation with adjoint sensitivities # amici.SensitivityMethod.adjoint, ): - solver.setSensitivityMethod(sensi_method) - rdata = amici.runAmiciSimulation(model, solver, edata) + solver.set_sensitivity_method(sensi_method) + rdata = amici.run_simulation(model, solver, edata) assert rdata.status == amici.AMICI_SUCCESS assert_allclose( @@ -397,33 +397,33 @@ def test_presimulation_events_and_sensitivities(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([0, 1, 2]) + model.set_timepoints([0, 1, 2]) edata = amici.ExpData(model) edata.t_presim = 2 - solver = model.getSolver() + solver = model.create_solver() # generate artificial data - rdata = amici.runAmiciSimulation(model, solver, edata) + rdata = amici.run_simulation(model, solver, edata) edata_tmp = amici.ExpData(rdata, 1, 0) - edata.setTimepoints(np.array(edata_tmp.getTimepoints()) + 0.1) - edata.setObservedData(edata_tmp.getObservedData()) - edata.setObservedDataStdDev(edata_tmp.getObservedDataStdDev()) + edata.set_timepoints(np.array(edata_tmp.get_timepoints()) + 0.1) + edata.set_observed_data(edata_tmp.get_observed_data()) + edata.set_observed_data_std_dev(edata_tmp.get_observed_data_std_dev()) - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_order(amici.SensitivityOrder.first) for sensi_method in ( amici.SensitivityMethod.forward, amici.SensitivityMethod.adjoint, ): - solver.setSensitivityMethod(sensi_method) - rdata = amici.runAmiciSimulation(model, solver, edata) + solver.set_sensitivity_method(sensi_method) + rdata = amici.run_simulation(model, solver, edata) assert rdata.status == amici.AMICI_SUCCESS assert_allclose( rdata.by_id("some_time"), np.array([0, 1, 2]) + 1.1, atol=1e-14 ) - model.requireSensitivitiesForAllParameters() + model.require_sensitivities_for_all_parameters() check_derivatives( model, solver, @@ -435,77 +435,79 @@ def test_presimulation_events_and_sensitivities(tempdir): def test_steadystate_simulation(model_steadystate_module): - model = model_steadystate_module.getModel() - model.setTimepoints(np.linspace(0, 60, 60)) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) - rdata = amici.runAmiciSimulation(model, solver) + model = model_steadystate_module.get_model() + model.set_timepoints(np.linspace(0, 60, 60)) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) + rdata = amici.run_simulation(model, solver) edata = [amici.ExpData(rdata, 1, 0)] edata[0].id = "some condition ID" - rdata = amici.runAmiciSimulations(model, solver, edata) + rdata = amici.run_simulations(model, solver, edata) assert rdata[0].status == amici.AMICI_SUCCESS assert rdata[0].id == edata[0].id # check roundtripping of DataFrame conversion - df_edata = amici.getDataObservablesAsDataFrame(model, edata) - edata_reconstructed = amici.getEdataFromDataFrame(model, df_edata) + df_edata = amici.get_data_observables_as_data_frame(model, edata) + edata_reconstructed = amici.get_edata_from_data_frame(model, df_edata) assert_allclose( - amici.ExpDataView(edata[0])["observedData"], - amici.ExpDataView(edata_reconstructed[0])["observedData"], + amici.ExpDataView(edata[0])["observed_data"], + amici.ExpDataView(edata_reconstructed[0])["observed_data"], rtol=1.0e-5, atol=1.0e-8, ) assert_allclose( - amici.ExpDataView(edata[0])["observedDataStdDev"], - amici.ExpDataView(edata_reconstructed[0])["observedDataStdDev"], + amici.ExpDataView(edata[0])["observed_data_std_dev"], + amici.ExpDataView(edata_reconstructed[0])["observed_data_std_dev"], rtol=1.0e-5, atol=1.0e-8, ) - if len(edata[0].fixedParameters): - assert list(edata[0].fixedParameters) == list( - edata_reconstructed[0].fixedParameters + if len(edata[0].fixed_parameters): + assert list(edata[0].fixed_parameters) == list( + edata_reconstructed[0].fixed_parameters ) else: - assert list(model.getFixedParameters()) == list( - edata_reconstructed[0].fixedParameters + assert list(model.get_fixed_parameters()) == list( + edata_reconstructed[0].fixed_parameters ) - assert list(edata[0].fixedParametersPreequilibration) == list( - edata_reconstructed[0].fixedParametersPreequilibration + assert list(edata[0].fixed_parameters_pre_equilibration) == list( + edata_reconstructed[0].fixed_parameters_pre_equilibration ) - df_state = amici.getSimulationStatesAsDataFrame(model, edata, rdata) + df_state = amici.get_simulation_states_as_data_frame(model, edata, rdata) assert_allclose( rdata[0]["x"], - df_state[list(model.getStateIds())].values, + df_state[list(model.get_state_ids())].values, rtol=1.0e-5, atol=1.0e-8, ) - df_obs = amici.getSimulationObservablesAsDataFrame(model, edata, rdata) + df_obs = amici.get_simulation_observables_as_data_frame( + model, edata, rdata + ) assert_allclose( rdata[0]["y"], - df_obs[list(model.getObservableIds())].values, + df_obs[list(model.get_observable_ids())].values, rtol=1.0e-5, atol=1.0e-8, ) - amici.getResidualsAsDataFrame(model, edata, rdata) + amici.get_residuals_as_data_frame(model, edata, rdata) df_expr = amici.pandas.get_expressions_as_dataframe(model, edata, rdata) assert_allclose( rdata[0]["w"], - df_expr[list(model.getExpressionIds())].values, + df_expr[list(model.get_expression_ids())].values, rtol=1.0e-5, atol=1.0e-8, ) - solver.setRelativeTolerance(1e-12) - solver.setAbsoluteTolerance(1e-12) + solver.set_relative_tolerance(1e-12) + solver.set_absolute_tolerance(1e-12) check_derivatives( model, solver, edata[0], atol=1e-3, rtol=1e-3, epsilon=1e-4 ) @@ -516,20 +518,20 @@ def test_steadystate_simulation(model_steadystate_module): def test_solver_reuse(model_steadystate_module): - model = model_steadystate_module.getModel() - model.setTimepoints(np.linspace(0, 60, 60)) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) - rdata = amici.runAmiciSimulation(model, solver) + model = model_steadystate_module.get_model() + model.set_timepoints(np.linspace(0, 60, 60)) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) + rdata = amici.run_simulation(model, solver) edata = amici.ExpData(rdata, 1, 0) for sensi_method in ( amici.SensitivityMethod.forward, amici.SensitivityMethod.adjoint, ): - solver.setSensitivityMethod(sensi_method) - rdata1 = amici.runAmiciSimulation(model, solver, edata) - rdata2 = amici.runAmiciSimulation(model, solver, edata) + solver.set_sensitivity_method(sensi_method) + rdata1 = amici.run_simulation(model, solver, edata) + rdata2 = amici.run_simulation(model, solver, edata) assert rdata1.status == amici.AMICI_SUCCESS @@ -589,32 +591,34 @@ def model_test_likelihoods(tempdir): @skip_on_valgrind def test_likelihoods(model_test_likelihoods): """Test the custom noise distributions used to define cost functions.""" - model = model_test_likelihoods.getModel() - model.setTimepoints(np.linspace(0, 60, 60)) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) + model = model_test_likelihoods.get_model() + model.set_timepoints(np.linspace(0, 60, 60)) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) # run model once to create an edata - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) sigmas = rdata["y"].max(axis=0) * 0.05 edata = amici.ExpData(rdata, sigmas, []) # just make all observables positive since some are logarithmic - while min(edata.getObservedData()) < 0: + while min(edata.get_observed_data()) < 0: edata = amici.ExpData(rdata, sigmas, []) # and now run for real and also compute likelihood values - rdata = amici.runAmiciSimulations(model, solver, [edata])[0] + rdata = amici.run_simulations(model, solver, [edata])[0] # check if the values make overall sense assert np.isfinite(rdata["llh"]) assert np.all(np.isfinite(rdata["sllh"])) assert np.any(rdata["sllh"]) - rdata_df = amici.getSimulationObservablesAsDataFrame( + rdata_df = amici.get_simulation_observables_as_data_frame( model, edata, rdata, by_id=True ) - edata_df = amici.getDataObservablesAsDataFrame(model, edata, by_id=True) + edata_df = amici.get_data_observables_as_data_frame( + model, edata, by_id=True + ) # check correct likelihood value llh_exp = -sum( @@ -635,11 +639,11 @@ def test_likelihoods(model_test_likelihoods): amici.SensitivityMethod.forward, amici.SensitivityMethod.adjoint, ]: - solver = model.getSolver() - solver.setSensitivityMethod(sensi_method) - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setRelativeTolerance(1e-12) - solver.setAbsoluteTolerance(1e-12) + solver = model.create_solver() + solver.set_sensitivity_method(sensi_method) + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_relative_tolerance(1e-12) + solver.set_absolute_tolerance(1e-12) check_derivatives( model, solver, @@ -676,11 +680,11 @@ def test_units(model_units_module): """ Test whether SBML import works for models using sbml:units annotations. """ - model = model_units_module.getModel() - model.setTimepoints(np.linspace(0, 1, 101)) - solver = model.getSolver() + model = model_units_module.get_model() + model.set_timepoints(np.linspace(0, 1, 101)) + solver = model.create_solver() - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) assert rdata["status"] == amici.AMICI_SUCCESS @@ -708,29 +712,29 @@ def test_sympy_exp_monkeypatch(tempdir): module_name=module_name, module_path=tempdir ) - model = model_module.getModel() - model.setTimepoints(np.linspace(0, 8, 250)) - model.requireSensitivitiesForAllParameters() - model.setAlwaysCheckFinite(True) - model.setParameterScale( - amici.parameterScalingFromIntVector( + model = model_module.get_model() + model.set_timepoints(np.linspace(0, 8, 250)) + model.require_sensitivities_for_all_parameters() + model.set_always_check_finite(True) + model.set_parameter_scale( + amici.parameter_scaling_from_int_vector( [ amici.ParameterScaling.none if re.match(r"n[0-9]+$", par_id) else amici.ParameterScaling.log10 - for par_id in model.getParameterIds() + for par_id in model.get_parameter_ids() ] ) ) - solver = model.getSolver() - solver.setSensitivityMethod(amici.SensitivityMethod.forward) - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver = model.create_solver() + solver.set_sensitivity_method(amici.SensitivityMethod.forward) + solver.set_sensitivity_order(amici.SensitivityOrder.first) - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) # print sensitivity-related results - assert rdata["status"] == amici.AMICI_SUCCESS + assert rdata.status == amici.AMICI_SUCCESS check_derivatives(model, solver, None, atol=1e-2, rtol=1e-2, epsilon=1e-3) @@ -779,27 +783,27 @@ def custom_nllh(m, y, sigma): def _test_set_parameters_by_dict(model_module): """Test setting parameter via id/name => value dicts""" - model = model_module.getModel() - old_parameter_values = model.getParameters() - parameter_ids = model.getParameterIds() + model = model_module.get_model() + old_parameter_values = model.get_parameters() + parameter_ids = model.get_parameter_ids() change_par_id = parameter_ids[-1] new_par_val = 0.1234 - old_par_val = model.getParameterById(change_par_id) + old_par_val = model.get_parameter_by_id(change_par_id) - assert model.getParameterById(change_par_id) != new_par_val - model.setParameterById({change_par_id: new_par_val}) - assert model.getParameterById(change_par_id) == new_par_val + assert model.get_parameter_by_id(change_par_id) != new_par_val + model.set_parameter_by_id({change_par_id: new_par_val}) + assert model.get_parameter_by_id(change_par_id) == new_par_val # reset and check we are back to original - model.setParameterById(change_par_id, old_par_val) - assert model.getParameters() == old_parameter_values + model.set_parameter_by_id(change_par_id, old_par_val) + assert model.get_parameters() == old_parameter_values # Same for by-name - parameter_names = model.getParameterNames() + parameter_names = model.get_parameter_names() change_par_name = parameter_names[-1] - model.setParameterByName({change_par_name: new_par_val}) - assert model.getParameterByName(change_par_name) == new_par_val - model.setParameterByName(change_par_name, old_par_val) - assert model.getParameters() == old_parameter_values + model.set_parameter_by_name({change_par_name: new_par_val}) + assert model.get_parameter_by_name(change_par_name) == new_par_val + model.set_parameter_by_name(change_par_name, old_par_val) + assert model.get_parameters() == old_parameter_values @skip_on_valgrind @@ -895,27 +899,27 @@ def test_constraints(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() - amici_model.setTimepoints(np.linspace(0, 100, 200)) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model = model_module.get_model() + amici_model.set_timepoints(np.linspace(0, 100, 200)) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS # should be non-negative in theory, but is expected to become negative # in practice assert np.any(rdata.x < 0) - amici_solver.setRelativeTolerance(1e-13) - amici_solver.setConstraints( + amici_solver.set_relative_tolerance(1e-13) + amici_solver.set_constraints( [Constraint.non_negative, Constraint.non_negative] ) - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + rdata = amici.run_simulation(amici_model, amici_solver) assert rdata.status == amici.AMICI_SUCCESS assert np.all(rdata.x >= 0) assert np.all( np.sum(rdata.x, axis=1) - np.sum(rdata.x[0]) < max( - np.sum(rdata.x[0]) * amici_solver.getRelativeTolerance(), - amici_solver.getAbsoluteTolerance(), + np.sum(rdata.x[0]) * amici_solver.get_relative_tolerance(), + amici_solver.get_absolute_tolerance(), ) ) @@ -961,7 +965,7 @@ def test_import_same_model_name(tempdir): model_module_1 = import_model_module( module_name=module_name, module_path=outdir_1 ) - assert model_module_1.get_model().getParameters()[0] == 1.0 + assert model_module_1.get_model().get_parameters()[0] == 1.0 # no error if the same model is loaded again without changes on disk model_module_1b = import_model_module( @@ -970,13 +974,13 @@ def test_import_same_model_name(tempdir): # downside: the modules will compare as different assert (model_module_1 == model_module_1b) is False assert model_module_1.__file__ == model_module_1b.__file__ - assert model_module_1b.get_model().getParameters()[0] == 1.0 + assert model_module_1b.get_model().get_parameters()[0] == 1.0 model_module_2 = import_model_module( module_name=module_name, module_path=outdir_2 ) - assert model_module_1.get_model().getParameters()[0] == 1.0 - assert model_module_2.get_model().getParameters()[0] == 2.0 + assert model_module_1.get_model().get_parameters()[0] == 1.0 + assert model_module_2.get_model().get_parameters()[0] == 2.0 # import the third model, with the same name and location as the second # model -- this is not supported, because there is some caching at @@ -998,14 +1002,14 @@ def test_import_same_model_name(tempdir): import_model_module(module_name=module_name, module_path=outdir_2) # this should not affect the previously loaded models - assert model_module_1.get_model().getParameters()[0] == 1.0 - assert model_module_2.get_model().getParameters()[0] == 2.0 + assert model_module_1.get_model().get_parameters()[0] == 1.0 + assert model_module_2.get_model().get_parameters()[0] == 2.0 # test that we can still import the model classically if we wanted to: with amici.set_path(outdir_1): import test_same_extension as model_module_1c # noqa: F401 - assert model_module_1c.get_model().getParameters()[0] == 1.0 + assert model_module_1c.get_model().get_parameters()[0] == 1.0 assert model_module_1c.get_model().module is model_module_1c @@ -1021,12 +1025,13 @@ def test_regression_2642(tempdir): module = amici.import_model_module( module_name=model_name, module_path=tempdir ) - model = module.getModel() - solver = model.getSolver() - model.setTimepoints(np.linspace(0, 1, 3)) - r = amici.runAmiciSimulation(model, solver) + model = module.get_model() + solver = model.create_solver() + model.set_timepoints(np.linspace(0, 1, 3)) + r = amici.run_simulation(model, solver) assert ( - len(np.unique(r.w[:, model.getExpressionIds().index("binding")])) == 1 + len(np.unique(r.w[:, model.get_expression_ids().index("binding")])) + == 1 ) @@ -1047,14 +1052,10 @@ def test_regression_2700(tempdir): ) model_module = import_model_module(model_name, tempdir) - model = model_module.get_model() - - model.setTimepoints([0, 1, 2]) - - solver = model.getSolver() - - rdata = amici.runAmiciSimulation(model, solver) + model.set_timepoints([0, 1, 2]) + solver = model.create_solver() + rdata = amici.run_simulation(model, solver) assert np.all(rdata.by_id("pp") == [1, 1, 1]) @@ -1091,10 +1092,9 @@ def test_heaviside_init_values_and_bool_to_float_conversion(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([0, 1, 2]) - - solver = model.getSolver() - rdata = amici.runAmiciSimulation(model, solver) + model.set_timepoints([0, 1, 2]) + solver = model.create_solver() + rdata = amici.run_simulation(model, solver) assert np.all(rdata.by_id("a") == np.array([2, 2, 2])), rdata.by_id("a") assert np.all(rdata.by_id("b") == np.array([0, 1, 1])), rdata.by_id("b") @@ -1119,11 +1119,11 @@ def test_t0(tempdir): model_module = import_model_module(model_name, tempdir) model = model_module.get_model() - model.setTimepoints([2]) - model.setT0(2) + model.set_timepoints([2]) + model.set_t0(2) - solver = model.getSolver() - rdata = amici.runAmiciSimulation(model, solver) + solver = model.create_solver() + rdata = amici.run_simulation(model, solver) assert rdata.x == [[2.0]], rdata.x diff --git a/python/tests/test_sbml_import_special_functions.py b/python/tests/test_sbml_import_special_functions.py index 70f7bfc187..644fc72411 100644 --- a/python/tests/test_sbml_import_special_functions.py +++ b/python/tests/test_sbml_import_special_functions.py @@ -50,39 +50,41 @@ def model_special_likelihoods(): @pytest.mark.flaky(reruns=5) def test_special_likelihoods(model_special_likelihoods): """Test special likelihood functions.""" - model = model_special_likelihoods.getModel() - model.setTimepoints(np.linspace(0, 60, 10)) - solver = model.getSolver() - solver.setSensitivityOrder(amici.SensitivityOrder.first) + model = model_special_likelihoods.get_model() + model.set_timepoints(np.linspace(0, 60, 10)) + solver = model.create_solver() + solver.set_sensitivity_order(amici.SensitivityOrder.first) # Test in region with positive density # run model once to create an edata - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) edata = amici.ExpData(rdata, 0.001, 0) # make sure measurements are smaller for non-degenerate probability - y = edata.getObservedData() + y = edata.get_observed_data() y = tuple(val * np.random.uniform(0, 1) for val in y) - edata.setObservedData(y) + edata.set_observed_data(y) # set sigmas sigma = 0.2 sigmas = sigma * np.ones(len(y)) - edata.setObservedDataStdDev(sigmas) + edata.set_observed_data_std_dev(sigmas) # and now run for real and also compute likelihood values - rdata = amici.runAmiciSimulations(model, solver, [edata])[0] + rdata = amici.run_simulations(model, solver, [edata])[0] # check if the values make overall sense assert np.isfinite(rdata["llh"]) assert np.all(np.isfinite(rdata["sllh"])) assert np.any(rdata["sllh"]) - rdata_df = amici.getSimulationObservablesAsDataFrame( + rdata_df = amici.get_simulation_observables_as_data_frame( model, edata, rdata, by_id=True ) - edata_df = amici.getDataObservablesAsDataFrame(model, edata, by_id=True) + edata_df = amici.get_data_observables_as_data_frame( + model, edata, by_id=True + ) # check correct likelihood value llh_exp = -sum( @@ -98,9 +100,9 @@ def test_special_likelihoods(model_special_likelihoods): amici.SensitivityMethod.forward, amici.SensitivityMethod.adjoint, ]: - solver = model.getSolver() - solver.setSensitivityMethod(sensi_method) - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver = model.create_solver() + solver.set_sensitivity_method(sensi_method) + solver.set_sensitivity_order(amici.SensitivityOrder.first) check_derivatives( model, solver, @@ -112,17 +114,17 @@ def test_special_likelihoods(model_special_likelihoods): # Test for m > y, i.e. in region with 0 density - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) edata = amici.ExpData(rdata, 0.001, 0) # make sure measurements are smaller for non-degenerate probability - y = edata.getObservedData() + y = edata.get_observed_data() y = tuple(val * np.random.uniform(0.5, 3) for val in y) - edata.setObservedData(y) - edata.setObservedDataStdDev(sigmas) + edata.set_observed_data(y) + edata.set_observed_data_std_dev(sigmas) # and now run for real and also compute likelihood values - rdata = amici.runAmiciSimulations(model, solver, [edata])[0] + rdata = amici.run_simulations(model, solver, [edata])[0] # m > y -> outside binomial domain -> 0 density assert rdata["llh"] == -np.inf @@ -155,7 +157,10 @@ def negative_binomial_nllh(m: np.ndarray, y: np.ndarray, p: float): @skip_on_valgrind def test_rateof(tempdir): - """Test chained rateOf to verify that model expressions are evaluated in the correct order.""" + """ + Test chained rateOf to verify that model expressions are evaluated in the + correct order. + """ ant_model = """ model test_chained_rateof species S1, S2, S3, S4; @@ -181,13 +186,13 @@ def test_rateof(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() t = np.linspace(0, 10, 11) - amici_model.setTimepoints(t) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model.set_timepoints(t) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) - state_ids_solver = amici_model.getStateIdsSolver() + state_ids_solver = amici_model.get_state_ids_solver() i_S1 = state_ids_solver.index("S1") i_S2 = state_ids_solver.index("S2") i_S3 = state_ids_solver.index("S3") @@ -234,13 +239,13 @@ def test_rateof_with_expression_dependent_rate(tempdir): model_module = amici.import_model_module( module_name=module_name, module_path=tempdir ) - amici_model = model_module.getModel() + amici_model = model_module.get_model() t = np.linspace(0, 10, 11) - amici_model.setTimepoints(t) - amici_solver = amici_model.getSolver() - rdata = amici.runAmiciSimulation(amici_model, amici_solver) + amici_model.set_timepoints(t) + amici_solver = amici_model.create_solver() + rdata = amici.run_simulation(amici_model, amici_solver) - state_ids_solver = amici_model.getStateIdsSolver() + state_ids_solver = amici_model.get_state_ids_solver() assert_array_almost_equal_nulp(rdata.by_id("e1"), 2 * t, 1) diff --git a/python/tests/test_swig_interface.py b/python/tests/test_swig_interface.py index b58b9e8b23..f09dfcd7b5 100644 --- a/python/tests/test_swig_interface.py +++ b/python/tests/test_swig_interface.py @@ -14,14 +14,14 @@ def test_version_number(pysb_example_presimulation_module): - model = pysb_example_presimulation_module.getModel() - assert model.getAmiciVersion() == amici.__version__ - assert model.getAmiciCommit() == amici.__commit__ + model = pysb_example_presimulation_module.get_model() + assert model.get_amici_version() == amici.__version__ + assert model.get_amici_commit() == amici.__commit__ def test_copy_constructors(pysb_example_presimulation_module): - model = pysb_example_presimulation_module.getModel() - solver = model.getSolver() + model = pysb_example_presimulation_module.get_model() + solver = model.create_solver() for obj in [model, solver]: for attr in dir(obj): @@ -68,60 +68,63 @@ def test_copy_constructors(pysb_example_presimulation_module): # Default values are based on `pysb_example_presimulation_module`. model_instance_settings0 = { # setting name: [default value, custom value] - "AddSigmaResiduals": [False, True], - "AlwaysCheckFinite": [False, True], + "add_sigma_residuals": [False, True], + "always_check_finite": [False, True], # Skipped due to model dependency in `'InitialStates'`. - "FixedParameters": None, - "InitialStates": [ + "fixed_parameters": None, + "initial_state": [ (10.0, 9.0, 1.0, 0.0, 0.0, 0.0), tuple([0.1] * 6), ], - ("getInitialStateSensitivities", "setUnscaledInitialStateSensitivities"): [ + ( + "get_initial_state_sensitivities", + "set_unscaled_initial_state_sensitivities", + ): [ tuple([1.0] + [0.0] * 35), tuple([0.1] * 36), ], - "_steadystate_mask": [ + "steadystate_mask": [ (), tuple([0] * 3), ], - "MinimumSigmaResiduals": [ + "minimum_sigma_residuals": [ 50.0, 60.0, ], - ("nMaxEvent", "setNMaxEvent"): [ + ("n_max_event", "set_n_max_event"): [ 10, 20, ], - "Parameters": [(10.0, 0.1, 0.1, 0.1, 0.1, 0.1), tuple([1.0] * 6)], + "parameters": [(10.0, 0.1, 0.1, 0.1, 0.1, 0.1), tuple([1.0] * 6)], # Skipped due to interdependency with `'InitialStateSensitivities'`. - "ParameterList": None, + "parameter_list": None, # Skipped due to interdependency with `'InitialStateSensitivities'`. - "ParameterScale": None, + "parameter_scale": None, # Skipped due to interdependencies with # `'ReinitializeFixedParameterInitialStates'`. - "ReinitializationStateIdxs": None, + "reinitialization_state_idxs": None, # Skipped due to interdependencies with `'ReinitializationStateIdxs'`. - "ReinitializeFixedParameterInitialStates": None, + "reinitialize_fixed_parameter_initial_states": None, # Skipped due to conservation laws in the test model # `pysb_example_presimulation_module.getModel()`. - "StateIsNonNegative": None, - "SteadyStateComputationMode": [ + "state_is_non_negative": None, + "steady_state_computation_mode": [ amici.SteadyStateComputationMode.integrationOnly, amici.SteadyStateComputationMode.integrateIfNewtonFails, ], - "SteadyStateSensitivityMode": [ + "steady_state_sensitivity_mode": [ amici.SteadyStateSensitivityMode.integrationOnly, amici.SteadyStateSensitivityMode.integrateIfNewtonFails, ], - ("t0", "setT0"): [ + ("t0", "set_t0"): [ 0.0, 1.0, ], - ("t0Preeq", "setT0Preeq"): [ + ("t0_preeq", "set_t0_preeq"): [ nan, -10.0, ], - "Timepoints": [ + "timepoints": [ tuple(), (1.0, 2.0, 3.0), ], @@ -134,7 +137,7 @@ def same_or_nan(a, b): def test_model_instance_settings(pysb_example_presimulation_module): - model0 = pysb_example_presimulation_module.getModel() + model0 = pysb_example_presimulation_module.get_model() # Indexes of values in the `model_instance_settings0` dictionary. i_default = 0 @@ -145,9 +148,9 @@ def test_model_instance_settings(pysb_example_presimulation_module): # the default setting for AlwaysCheckFinite depends on whether the amici # extension has been built in debug mode - model_instance_settings0["AlwaysCheckFinite"] = [ - model0.getAlwaysCheckFinite(), - not model0.getAlwaysCheckFinite(), + model_instance_settings0["always_check_finite"] = [ + model0.get_always_check_finite(), + not model0.get_always_check_finite(), ] # All settings are tested. @@ -164,13 +167,13 @@ def test_model_instance_settings(pysb_example_presimulation_module): assert all( default != custom for name, (default, custom) in model_instance_settings.items() - if name != "ReinitializeFixedParameterInitialStates" + if name != "reinitialize_fixed_parameter_initial_states" ) # All default values are as expected. for name, (default, custom) in model_instance_settings.items(): - getter = name[i_getter] if isinstance(name, tuple) else f"get{name}" - setter = name[i_setter] if isinstance(name, tuple) else f"set{name}" + getter = name[i_getter] if isinstance(name, tuple) else f"get_{name}" + setter = name[i_setter] if isinstance(name, tuple) else f"set_{name}" # Default values are as expected. assert same_or_nan(getattr(model0, getter)(), default), name # Custom value is set correctly. @@ -183,20 +186,20 @@ def test_model_instance_settings(pysb_example_presimulation_module): assert custom_settings[name] == model_instance_settings[name][i_custom] # Create a new model for comparison. - model = pysb_example_presimulation_module.getModel() + model = pysb_example_presimulation_module.get_model() # The new model has the default settings. model_default_settings = amici.get_model_settings(model) for name in model_instance_settings: if ( - name == "InitialStates" and not model.hasCustomInitialStates() + name == "initial_state" and not model.has_custom_initial_state() ) or ( name == ( - "getInitialStateSensitivities", - "setUnscaledInitialStateSensitivities", + "get_initial_state_sensitivities", + "set_unscaled_initial_state_sensitivities", ) - and not model.hasCustomInitialStateSensitivities() + and not model.has_custom_initial_state_sensitivities() ): # Here the expected value differs from what the getter would return assert model_default_settings[name] == [] @@ -226,25 +229,25 @@ def test_interdependent_settings(pysb_example_presimulation_module): `StateIsNonNegative` is still skipped, due to conservation laws in the test model. """ - model = pysb_example_presimulation_module.getModel() + model = pysb_example_presimulation_module.get_model() original_settings = { - "FixedParameters": (9.0, 1.0), - "ParameterList": (0, 1, 2, 3, 4, 5), - "ParameterScale": [0, 0, 0, 0, 0, 0], - "ReinitializationStateIdxs": tuple(), - "ReinitializeFixedParameterInitialStates": False, - "StateIsNonNegative": (False, False, False), + "fixed_parameters": (9.0, 1.0), + "parameter_list": (0, 1, 2, 3, 4, 5), + "parameter_scale": [0, 0, 0, 0, 0, 0], + "reinitialization_state_idxs": tuple(), + "reinitialize_fixed_parameter_initial_states": False, + "state_is_non_negative": (False, False, False), } expected_settings = { - "FixedParameters": (8.0, 2.0), - "ParameterList": (0, 1, 2, 3, 4), - "ParameterScale": [1, 0, 0, 0, 0, 0], - "ReinitializationStateIdxs": (0,), - "ReinitializeFixedParameterInitialStates": True, + "fixed_parameters": (8.0, 2.0), + "parameter_list": (0, 1, 2, 3, 4), + "parameter_scale": [1, 0, 0, 0, 0, 0], + "reinitialization_state_idxs": (0,), + "reinitialize_fixed_parameter_initial_states": True, # Skipped due to conservation laws in the test model. - # 'StateIsNonNegative': None, + # 'state_is_non_negative': None, } # Some values need to be transformed to be tested in Python @@ -256,7 +259,7 @@ def test_interdependent_settings(pysb_example_presimulation_module): getter_transformers.update( { # Convert from SWIG object. - "ParameterScale": lambda x: list(x) + "parameter_scale": lambda x: list(x) } ) @@ -298,43 +301,46 @@ def test_unhandled_settings(pysb_example_presimulation_module): - nMaxEvent - t0 """ - model = pysb_example_presimulation_module.getModel() + model = pysb_example_presimulation_module.get_model() not_handled = [ "get", - "getAmiciCommit", - "getAmiciVersion", - "getExpressionIds", - "getExpressionNames", - "getFixedParameterById", - "getFixedParameterByName", - "getFixedParameterIds", - "getFixedParameterNames", - "getName", - "getObservableIds", - "getObservableNames", - "getObservableScaling", - "getParameterById", - "getParameterByName", - "getParameterIds", - "getParameterNames", - "getSolver", - "getStateIds", - "getStateNames", - "getStateIdsSolver", - "getStateNamesSolver", - "getTimepoint", - "getUnscaledParameters", - "setAllStatesNonNegative", - "setFixedParameterById", - "setFixedParameterByName", - "setFixedParametersByIdRegex", - "setFixedParametersByNameRegex", - "setParameterById", - "setParameterByName", - "setParametersByIdRegex", - "setParametersByNameRegex", - "setInitialStateSensitivities", + "get_amici_commit", + "get_amici_version", + "get_explicit_roots", + "get_expression_ids", + "get_expression_names", + "get_fixed_parameter_by_id", + "get_fixed_parameter_by_name", + "get_fixed_parameter_ids", + "get_fixed_parameter_names", + "get_id_list", + "get_name", + "get_observable_ids", + "get_observable_names", + "get_observable_scaling", + "get_parameter_by_id", + "get_parameter_by_name", + "get_parameter_ids", + "get_parameter_names", + "get_second_order_mode", + "get_solver", + "get_state_ids", + "get_state_names", + "get_state_ids_solver", + "get_state_names_solver", + "get_timepoint", + "get_unscaled_parameters", + "set_all_states_non_negative", + "set_fixed_parameter_by_id", + "set_fixed_parameter_by_name", + "set_fixed_parameters_by_id_regex", + "set_fixed_parameters_by_name_regex", + "set_parameter_by_id", + "set_parameter_by_name", + "set_parameters_by_id_regex", + "set_parameters_by_name_regex", + "set_initial_state_sensitivities", "get_trigger_timepoints", "get_any_state_nonnegative", ] @@ -346,7 +352,7 @@ def test_unhandled_settings(pysb_example_presimulation_module): for name in ( names if isinstance(names, tuple) - else (f"get{names}", f"set{names}") + else (f"get_{names}", f"set_{names}") ) ] @@ -362,8 +368,8 @@ def is_callable_but_not_getter(obj, attr): if attr.startswith("get"): return ( "set" + attr[3:] not in dir(obj) - or attr.endswith("ById") - or attr.endswith("ByName") + or attr.endswith("by_id") + or attr.endswith("by_name") ) else: return True @@ -377,11 +383,11 @@ def get_val(obj, attr): def get_mod_val(val, attr, obj): - if attr == "getReturnDataReportingMode": + if attr == "get_return_data_reporting_mode": return amici.RDataReporting.likelihood - elif attr == "getParameterList": + elif attr == "get_parameter_list": return tuple(get_mod_val(val[0], "", obj) for _ in val) - elif attr == "getStateIsNonNegative": + elif attr == "get_state_is_non_negative": raise ValueError("Cannot modify value") elif attr == "get_steadystate_mask": return [0 for _ in range(obj.nx_solver)] @@ -412,36 +418,36 @@ def assert_same(a: dict, b: dict): for key in a: assert same_or_nan(a[key], b[key]), f"{key}: {a[key]} != {b[key]}" - model = pysb_example_presimulation_module.getModel() + model = pysb_example_presimulation_module.get_model() # ensure no-custom-(s)x0 is restored - assert not model.hasCustomInitialStates() - assert not model.hasCustomInitialStateSensitivities() + assert not model.has_custom_initial_state() + assert not model.has_custom_initial_state_sensitivities() settings = amici.get_model_settings(model) - model.setInitialStates(model.getInitialStates()) - model.setUnscaledInitialStateSensitivities( - model.getInitialStateSensitivities() + model.set_initial_state(model.get_initial_state()) + model.set_unscaled_initial_state_sensitivities( + model.get_initial_state_sensitivities() ) amici.set_model_settings(model, settings) - assert not model.hasCustomInitialStates() - assert not model.hasCustomInitialStateSensitivities() + assert not model.has_custom_initial_state() + assert not model.has_custom_initial_state_sensitivities() # ensure everything was set correctly, and there wasn't any problem # due to, e.g., interactions of different setters assert_same(settings, amici.get_model_settings(model)) # ensure custom (s)x0 is restored - model.setInitialStates(model.getInitialStates()) - model.setParameterScale(amici.ParameterScaling.log10) - sx0 = model.getInitialStateSensitivities() - model.setUnscaledInitialStateSensitivities(sx0) - assert model.hasCustomInitialStates() - assert model.hasCustomInitialStateSensitivities() + model.set_initial_state(model.get_initial_state()) + model.set_parameter_scale(amici.ParameterScaling.log10) + sx0 = model.get_initial_state_sensitivities() + model.set_unscaled_initial_state_sensitivities(sx0) + assert model.has_custom_initial_state() + assert model.has_custom_initial_state_sensitivities() settings = amici.get_model_settings(model) - model2 = pysb_example_presimulation_module.getModel() + model2 = pysb_example_presimulation_module.get_model() amici.set_model_settings(model2, settings) - assert model2.hasCustomInitialStates() - assert model2.hasCustomInitialStateSensitivities() - assert model2.getInitialStateSensitivities() == sx0 + assert model2.has_custom_initial_state() + assert model2.has_custom_initial_state_sensitivities() + assert model2.get_initial_state_sensitivities() == sx0 assert_same(settings, amici.get_model_settings(model2)) @@ -483,13 +489,13 @@ def test_edata_equality_operator(): def test_expdata_and_expdataview_are_deepcopyable(): edata1 = amici.ExpData(3, 2, 3, range(4)) - edata1.setObservedData(np.zeros((3, 4)).flatten()) + edata1.set_observed_data(np.zeros((3, 4)).flatten()) # ExpData edata2 = copy.deepcopy(edata1) assert edata1 == edata2 assert edata1.this != edata2.this - edata2.setTimepoints([0]) + edata2.set_timepoints([0]) assert edata1 != edata2 # ExpDataView @@ -505,35 +511,37 @@ def test_solvers_are_deepcopyable(): solver2 = copy.deepcopy(solver1) assert solver1.this != solver2.this assert ( - solver1.getRelativeTolerance() - == solver2.getRelativeTolerance() + solver1.get_relative_tolerance() + == solver2.get_relative_tolerance() + ) + solver2.set_relative_tolerance( + 100 * solver2.get_relative_tolerance() ) - solver2.setRelativeTolerance(100 * solver2.getRelativeTolerance()) assert ( - solver1.getRelativeTolerance() - != solver2.getRelativeTolerance() + solver1.get_relative_tolerance() + != solver2.get_relative_tolerance() ) def test_model_is_deepcopyable(pysb_example_presimulation_module): model_module = pysb_example_presimulation_module for model1 in ( - model_module.getModel(), - amici.ModelPtr(model_module.getModel()), + model_module.get_model(), + amici.ModelPtr(model_module.get_model()), ): model2 = copy.deepcopy(model1) assert model1.this != model2.this assert model1.t0() == model2.t0() - model2.setT0(100 + model2.t0()) + model2.set_t0(100 + model2.t0()) assert model1.t0() != model2.t0() def test_rdataview(sbml_example_presimulation_module): """Test some SwigPtrView functionality via ReturnDataView.""" model_module = sbml_example_presimulation_module - model = model_module.getModel() - model.setTimepoints([1, 2, 3]) - rdata = amici.runAmiciSimulation(model, model.getSolver()) + model = model_module.get_model() + model.set_timepoints([1, 2, 3]) + rdata = amici.run_simulation(model, model.create_solver()) assert isinstance(rdata, amici.ReturnDataView) # check that non-array attributes are looked up in the wrapped object @@ -560,7 +568,7 @@ def test_rdataview(sbml_example_presimulation_module): assert (rdata.x == xr_x).all() assert xr_x.dims == ("time", "state") assert (xr_x.coords["time"].data == rdata.ts).all() - assert (xr_x.coords["state"].data == model.getStateIds()).all() + assert (xr_x.coords["state"].data == model.get_state_ids()).all() def test_python_exceptions(sbml_example_presimulation_module): @@ -571,7 +579,7 @@ def test_python_exceptions(sbml_example_presimulation_module): with pytest.raises( RuntimeError, match="maxsteps must be a positive number" ): - solver.setMaxSteps(-1) + solver.set_max_steps(-1) # model extension throws and its swig-wrapper catches model = sbml_example_presimulation_module.get_model() @@ -587,51 +595,51 @@ def test_python_exceptions(sbml_example_presimulation_module): match=r"Number of initial conditions sensitivities \(36\) " r"in model does not match ExpData \(2\).", ): - amici.runAmiciSimulation(model, solver, edata) + amici.run_simulation(model, solver, edata) - amici.runAmiciSimulations( + amici.run_simulations( model, solver, [edata, edata], failfast=True, num_threads=1 ) # model throws, base catches, swig-exception handling is not involved - model.setParameters([nan] * model.np()) - model.setTimepoints([1]) - rdata = amici.runAmiciSimulation(model, solver) + model.set_parameters([nan] * model.np()) + model.set_timepoints([1]) + rdata = amici.run_simulation(model, solver) assert rdata.status == amici.AMICI_FIRST_RHSFUNC_ERR edata = amici.ExpData(1, 1, 1, [1]) - rdatas = amici.runAmiciSimulations( + rdatas = amici.run_simulations( model, solver, [edata, edata], failfast=True, num_threads=1 ) assert rdatas[0].status == amici.AMICI_FIRST_RHSFUNC_ERR # model throws, base catches, swig-exception handling is involved - from amici._amici import runAmiciSimulation + from amici._amici import run_simulation with pytest.raises( RuntimeError, match="AMICI failed to integrate the forward problem" ): # rethrow=True - runAmiciSimulation(solver, None, model.get(), True) + run_simulation(solver, None, model.get(), True) def test_reporting_mode_obs_llh(sbml_example_presimulation_module): model_module = sbml_example_presimulation_module - model = model_module.getModel() - solver = model.getSolver() + model = model_module.get_model() + solver = model.create_solver() - solver.setReturnDataReportingMode( + solver.set_return_data_reporting_mode( amici.RDataReporting.observables_likelihood ) - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_order(amici.SensitivityOrder.first) for sens_method in ( amici.SensitivityMethod.none, amici.SensitivityMethod.forward, amici.SensitivityMethod.adjoint, ): - solver.setSensitivityMethod(sens_method) - rdata = amici.runAmiciSimulation( + solver.set_sensitivity_method(sens_method) + rdata = amici.run_simulation( model, solver, amici.ExpData(1, 1, 1, [1]) ) assert ( @@ -643,7 +651,7 @@ def test_reporting_mode_obs_llh(sbml_example_presimulation_module): assert rdata.sigmay.size > 0 assert rdata.J is None - match solver.getSensitivityMethod(): + match solver.get_sensitivity_method(): case amici.SensitivityMethod.none: assert rdata.sllh is None case amici.SensitivityMethod.forward: diff --git a/python/tests/util.py b/python/tests/util.py index ce872bdf6d..30ca3f03fd 100644 --- a/python/tests/util.py +++ b/python/tests/util.py @@ -15,7 +15,7 @@ SensitivityMethod, SensitivityOrder, import_model_module, - runAmiciSimulation, + run_simulation, ) from amici.gradient_check import _check_close from numpy.testing import assert_allclose @@ -41,7 +41,7 @@ def create_amici_model(sbml_model, model_name, **kwargs) -> AmiciModel: ) model_module = import_model_module(model_name, output_dir) - return model_module.getModel() + return model_module.get_model() def check_trajectories_without_sensitivities( @@ -52,10 +52,10 @@ def check_trajectories_without_sensitivities( Check whether the AMICI simulation matches a known solution (ideally an analytically calculated one). """ - solver = amici_model.getSolver() - solver.setAbsoluteTolerance(1e-15) - solver.setRelativeTolerance(1e-12) - rdata = runAmiciSimulation(amici_model, solver=solver) + solver = amici_model.create_solver() + solver.set_absolute_tolerance(1e-15) + solver.set_relative_tolerance(1e-12) + rdata = run_simulation(amici_model, solver=solver) _check_close( rdata["x"], result_expected_x, field="x", rtol=5e-9, atol=1e-13 ) @@ -70,14 +70,14 @@ def check_trajectories_with_forward_sensitivities( Check whether the forward sensitivities of the AMICI simulation match a known solution (ideally an analytically calculated one). """ - solver = amici_model.getSolver() - solver.setSensitivityOrder(SensitivityOrder.first) - solver.setSensitivityMethod(SensitivityMethod.forward) - solver.setAbsoluteTolerance(1e-15) - solver.setRelativeTolerance(1e-13) - solver.setAbsoluteToleranceFSA(1e-15) - solver.setRelativeToleranceFSA(1e-13) - rdata = runAmiciSimulation(amici_model, solver=solver) + solver = amici_model.create_solver() + solver.set_sensitivity_order(SensitivityOrder.first) + solver.set_sensitivity_method(SensitivityMethod.forward) + solver.set_absolute_tolerance(1e-15) + solver.set_relative_tolerance(1e-13) + solver.set_absolute_tolerance_fsa(1e-15) + solver.set_relative_tolerance_fsa(1e-13) + rdata = run_simulation(amici_model, solver=solver) _check_close( rdata["x"], result_expected_x, field="x", rtol=1e-10, atol=1e-12 ) @@ -98,29 +98,29 @@ def check_trajectories_with_adjoint_sensitivities( sensitivities will not raise an AssertionError. """ # First compute dummy experimental data to use adjoints - solver = amici_model.getSolver() - rdata = runAmiciSimulation(amici_model, solver=solver) + solver = amici_model.create_solver() + rdata = run_simulation(amici_model, solver=solver) assert rdata.status == amici.AMICI_SUCCESS rng_seed = 42 edata = ExpData(rdata, 1.0, 1.0, rng_seed) # FSA - solver.setSensitivityOrder(SensitivityOrder.first) - solver.setSensitivityMethod(SensitivityMethod.forward) - solver.setAbsoluteTolerance(1e-15) - solver.setRelativeTolerance(1e-13) - rdata_fsa = runAmiciSimulation(amici_model, solver=solver, edata=edata) + solver.set_sensitivity_order(SensitivityOrder.first) + solver.set_sensitivity_method(SensitivityMethod.forward) + solver.set_absolute_tolerance(1e-15) + solver.set_relative_tolerance(1e-13) + rdata_fsa = run_simulation(amici_model, solver=solver, edata=edata) assert rdata_fsa.status == amici.AMICI_SUCCESS # ASA - solver.setSensitivityMethod(SensitivityMethod.adjoint) - solver.setAbsoluteTolerance(1e-16) - solver.setRelativeTolerance(1e-14) - solver.setAbsoluteToleranceB(1e-16) - solver.setRelativeToleranceB(1e-15) - solver.setAbsoluteToleranceQuadratures(1e-14) - solver.setRelativeToleranceQuadratures(1e-8) - rdata_asa = runAmiciSimulation(amici_model, solver=solver, edata=edata) + solver.set_sensitivity_method(SensitivityMethod.adjoint) + solver.set_absolute_tolerance(1e-16) + solver.set_relative_tolerance(1e-14) + solver.set_absolute_tolerance_b(1e-16) + solver.set_relative_tolerance_b(1e-15) + solver.set_absolute_tolerance_quadratures(1e-14) + solver.set_relative_tolerance_quadratures(1e-8) + rdata_asa = run_simulation(amici_model, solver=solver, edata=edata) assert rdata_asa.status == amici.AMICI_SUCCESS assert_allclose(rdata_fsa.x, rdata_asa.x, atol=1e-14, rtol=1e-10) @@ -131,25 +131,25 @@ def check_trajectories_with_adjoint_sensitivities( "asa": rdata_asa["sllh"], "fd": np.nan, }, - index=list(amici_model.getParameterIds()), + index=list(amici_model.get_parameter_ids()), ) df["abs_diff"] = df["fsa"] - df["asa"] df["rel_diff"] = df["abs_diff"] / df["fsa"] # Also test against finite differences - parameters = amici_model.getUnscaledParameters() - solver.setSensitivityOrder(SensitivityOrder.none) + parameters = amici_model.get_unscaled_parameters() + solver.set_sensitivity_order(SensitivityOrder.none) sllh_fd = [] eps = 1e-5 for i_par, par in enumerate(parameters): tmp_par = np.array(parameters[:]) tmp_par[i_par] += eps - amici_model.setParameters(tmp_par) - rdata_p = runAmiciSimulation(amici_model, solver=solver, edata=edata) + amici_model.set_parameters(tmp_par) + rdata_p = run_simulation(amici_model, solver=solver, edata=edata) tmp_par = np.array(parameters[:]) tmp_par[i_par] -= eps - amici_model.setParameters(tmp_par) - rdata_m = runAmiciSimulation(amici_model, solver=solver, edata=edata) + amici_model.set_parameters(tmp_par) + rdata_m = run_simulation(amici_model, solver=solver, edata=edata) sllh_fd.append((rdata_p["llh"] - rdata_m["llh"]) / (2 * eps)) df["fd"] = sllh_fd df["asa_matches_fsa"] = np.isclose( diff --git a/src/abstract_model.cpp b/src/abstract_model.cpp index 3c8ba018b6..15b9b9acf1 100644 --- a/src/abstract_model.cpp +++ b/src/abstract_model.cpp @@ -4,11 +4,11 @@ namespace amici { -std::string AbstractModel::getAmiciVersion() const { +std::string AbstractModel::get_amici_version() const { throw AmiException("Version not set during code generation"); } -std::string AbstractModel::getAmiciCommit() const { +std::string AbstractModel::get_amici_commit() const { throw AmiException("Commit not set during code generation"); } @@ -22,7 +22,7 @@ void AbstractModel:: ); } -bool AbstractModel::isFixedParameterStateReinitializationAllowed() const { +bool AbstractModel::is_fixed_parameter_state_reinitialization_allowed() const { return false; } diff --git a/src/amici.cpp b/src/amici.cpp index 85e5cdc5b9..6e98071f75 100644 --- a/src/amici.cpp +++ b/src/amici.cpp @@ -61,21 +61,22 @@ std::map simulation_status_to_str_map = { {AMICI_LINESEARCH_FAIL, "AMICI_LINESEARCH_FAIL"}, }; -std::unique_ptr runAmiciSimulation( +std::unique_ptr run_simulation( Solver& solver, ExpData const* edata, Model& model, bool const rethrow ) { // create a temporary logger instance for Solver and Model to capture // messages from only this simulation Logger logger; - solver.logger = &logger; - model.logger = &logger; + solver.set_logger(&logger); + model.set_logger(&logger); // prevent dangling pointer auto _ = gsl::finally([&solver, &model] { - solver.logger = model.logger = nullptr; + solver.set_logger(nullptr); + model.set_logger(nullptr); }); CpuTimer cpu_timer; - solver.startTimer(); + solver.start_timer(); // Applies condition-specific model settings and restores them when going // out of scope. (This also sets `plist`, which is required for initializing @@ -94,9 +95,9 @@ std::unique_ptr runAmiciSimulation( try { fwd = std::make_unique(edata, &model, &solver); - fwd->workForwardProblem(); + fwd->run(); - if (edata && solver.computingASA()) { + if (edata && solver.computing_asa()) { bwd_success = false; // NOLINT bwd = std::make_unique(*fwd); @@ -107,7 +108,7 @@ std::unique_ptr runAmiciSimulation( rdata->status = AMICI_SUCCESS; } catch (IntegrationFailure const& ex) { - if (ex.error_code == AMICI_RHSFUNC_FAIL && solver.timeExceeded()) { + if (ex.error_code == AMICI_RHSFUNC_FAIL && solver.time_exceeded()) { rdata->status = AMICI_MAX_TIME_EXCEEDED; if (rethrow) throw; @@ -128,7 +129,7 @@ std::unique_ptr runAmiciSimulation( ); } } catch (IntegrationFailureB const& ex) { - if (ex.error_code == AMICI_RHSFUNC_FAIL && solver.timeExceeded()) { + if (ex.error_code == AMICI_RHSFUNC_FAIL && solver.time_exceeded()) { rdata->status = AMICI_MAX_TIME_EXCEEDED; if (rethrow) throw; @@ -176,7 +177,7 @@ std::unique_ptr runAmiciSimulation( } try { - rdata->processSimulationObjects( + rdata->process_simulation_objects( fwd.get(), bwd_success ? bwd.get() : nullptr, model, solver, edata ); } catch (std::exception const& ex) { @@ -189,24 +190,24 @@ std::unique_ptr runAmiciSimulation( ); } - rdata->t_last = solver.gett(); + rdata->t_last = solver.get_t(); rdata->cpu_time_total = cpu_timer.elapsed_milliseconds(); // verify that reported CPU times are plausible gsl_EnsuresDebug(rdata->cpu_time <= rdata->cpu_time_total); - gsl_EnsuresDebug(rdata->cpu_timeB <= rdata->cpu_time_total); + gsl_EnsuresDebug(rdata->cpu_time_b <= rdata->cpu_time_total); gsl_EnsuresDebug(rdata->preeq_cpu_time <= rdata->cpu_time_total); - gsl_EnsuresDebug(rdata->preeq_cpu_timeB <= rdata->cpu_time_total); + gsl_EnsuresDebug(rdata->preeq_cpu_time_b <= rdata->cpu_time_total); gsl_EnsuresDebug(rdata->posteq_cpu_time <= rdata->cpu_time_total); - gsl_EnsuresDebug(rdata->posteq_cpu_timeB <= rdata->cpu_time_total); - if (fwd && !fwd->getPostequilibrationProblem()) + gsl_EnsuresDebug(rdata->posteq_cpu_time_b <= rdata->cpu_time_total); + if (fwd && !fwd->get_posteq_problem()) gsl_EnsuresDebug( std::ranges::is_sorted(rdata->numsteps) || rdata->status != AMICI_SUCCESS ); - if (fwd && !fwd->getPreequilibrationProblem()) + if (fwd && !fwd->get_preeq_problem()) gsl_EnsuresDebug( - std::ranges::is_sorted(rdata->numstepsB) + std::ranges::is_sorted(rdata->numsteps_b) || rdata->status != AMICI_SUCCESS ); @@ -215,7 +216,7 @@ std::unique_ptr runAmiciSimulation( return rdata; } -std::vector> runAmiciSimulations( +std::vector> run_simulations( Solver const& solver, std::vector const& edatas, Model const& model, bool const failfast, #if defined(_OPENMP) @@ -245,7 +246,7 @@ std::vector> runAmiciSimulations( ConditionContext conditionContext(myModel.get(), edatas[i]); results[i] = std::make_unique(solver, model); } else { - results[i] = runAmiciSimulation(*mySolver, edatas[i], *myModel); + results[i] = run_simulation(*mySolver, edatas[i], *myModel); } } catch (std::exception const& ex) { results[i] = std::make_unique(solver, model); diff --git a/src/backwardproblem.cpp b/src/backwardproblem.cpp index dbbcc17eb8..9a6f5ada1e 100644 --- a/src/backwardproblem.cpp +++ b/src/backwardproblem.cpp @@ -14,12 +14,12 @@ BackwardProblem::BackwardProblem(ForwardProblem& fwd) : model_(fwd.model) , solver_(fwd.solver) , edata_(fwd.edata) - , t_(fwd.getFinalTime()) - , discs_main_(fwd.getDiscontinuities()) - , dJydx_(fwd.getAdjointUpdates(*model_, *edata_)) - , dJzdx_(fwd.getDJzdx()) - , preeq_problem_(fwd.getPreequilibrationProblem()) - , posteq_problem_(fwd.getPostequilibrationProblem()) + , t_(fwd.get_final_time()) + , discs_main_(fwd.get_discontinuities()) + , dJydx_(fwd.get_adjoint_updates(*model_, *edata_)) + , dJzdx_(fwd.get_dJzdx()) + , preeq_problem_(fwd.get_preeq_problem()) + , posteq_problem_(fwd.get_posteq_problem()) , presim_result(fwd.get_presimulation_result()) , ws_(model_, solver_) , simulator_(model_, solver_, &ws_) {} @@ -27,26 +27,27 @@ BackwardProblem::BackwardProblem(ForwardProblem& fwd) void BackwardProblem::workBackwardProblem() { if (model_->nx_solver <= 0 - || solver_->getSensitivityOrder() < SensitivityOrder::first - || solver_->getSensitivityMethod() != SensitivityMethod::adjoint + || solver_->get_sensitivity_order() < SensitivityOrder::first + || solver_->get_sensitivity_method() != SensitivityMethod::adjoint || model_->nplist() == 0) { return; } - handlePostequilibration(); + handle_postequilibration(); // handle main simulation // If we have posteq, infinity timepoints were already treated int it = model_->nt() - 1; - while (it >= 0 && std::isinf(model_->getTimepoint(it))) { + while (it >= 0 && std::isinf(model_->get_timepoint(it))) { --it; } ws_.discs_ = discs_main_; - ws_.nroots_ = compute_nroots(discs_main_, model_->ne, model_->nMaxEvent()); + ws_.nroots_ + = compute_nroots(discs_main_, model_->ne, model_->n_max_event()); simulator_.run( - t_, model_->t0(), it, model_->getTimepoints(), &dJydx_, &dJzdx_ + t_, model_->t0(), it, model_->get_timepoints(), &dJydx_, &dJzdx_ ); // handle presimulation @@ -56,7 +57,7 @@ void BackwardProblem::workBackwardProblem() { ); ws_.discs_ = presim_result.discs; ws_.nroots_ - = compute_nroots(ws_.discs_, model_->ne, model_->nMaxEvent()); + = compute_nroots(ws_.discs_, model_->ne, model_->n_max_event()); simulator_.run( model_->t0(), model_->t0() - edata_->t_presim, -1, {}, &dJydx_, &dJzdx_ @@ -70,7 +71,8 @@ void BackwardProblem::workBackwardProblem() { // handle pre-equilibration if (preeq_problem_ - && preeq_problem_->get_solver()->getSensitivityMethodPreequilibration() + && preeq_problem_->get_solver() + ->get_sensitivity_method_pre_equilibration() == SensitivityMethod::adjoint) { auto preeq_solver = preeq_problem_->get_solver(); @@ -86,31 +88,31 @@ void BackwardProblem::workBackwardProblem() { "non-constant states is not yet implemented. Stopping." ); - auto const t0 - = std::isnan(model_->t0Preeq()) ? model_->t0() : model_->t0Preeq(); + auto const t0 = std::isnan(model_->t0_preeq()) ? model_->t0() + : model_->t0_preeq(); auto const& preeq_result = preeq_problem_->get_result(); // If there were no discontinuities or no simulation was performed, // we can use the steady-state shortcuts. // If not we need to do the regular backward integration. - if (preeq_problem_->getSteadyStateStatus()[1] + if (preeq_problem_->get_steady_state_status()[1] == SteadyStateStatus::not_run || preeq_result.discs.empty()) { - preeq_solver->updateAndReinitStatesAndSensitivities(model_); + preeq_solver->update_and_reinit_states_and_sensitivities(model_); auto preeq_final_fwd_state = preeq_result.final_state_; preeq_problem_bwd_.emplace( *solver_, *model_, preeq_final_fwd_state.sol, &ws_ ); preeq_problem_bwd_->run(t0); - } else if (preeq_problem_->getSteadyStateStatus()[1] + } else if (preeq_problem_->get_steady_state_status()[1] != SteadyStateStatus::not_run) { // backward integration of the pre-equilibration problem // (only if preequilibration was done via simulation) ws_.discs_ = preeq_result.discs; ws_.nroots_ - = compute_nroots(ws_.discs_, model_->ne, model_->nMaxEvent()); + = compute_nroots(ws_.discs_, model_->ne, model_->n_max_event()); EventHandlingBwdSimulator preeq_simulator( model_, preeq_solver, &ws_ ); @@ -128,14 +130,14 @@ void BackwardProblem::workBackwardProblem() { } } -void BackwardProblem::handlePostequilibration() { +void BackwardProblem::handle_postequilibration() { if (!posteq_problem_) { return; } // initialize xB - only process the post-equilibration timepoints for (int it = 0; it < model_->nt(); it++) { - if (std::isinf(model_->getTimepoint(it))) { + if (std::isinf(model_->get_timepoint(it))) { for (int ix = 0; ix < model_->nxtrue_solver; ix++) ws_.xB_[ix] += dJydx_[ix + it * model_->nx_solver]; } @@ -146,22 +148,23 @@ void BackwardProblem::handlePostequilibration() { // If there were no discontinuities or no simulation was performed, // we can use the steady-state shortcuts. // If not we need to do the regular backward integration. - if (posteq_problem_->getSteadyStateStatus()[1] == SteadyStateStatus::not_run + if (posteq_problem_->get_steady_state_status()[1] + == SteadyStateStatus::not_run || posteq_result.discs.empty()) { - auto final_state = posteq_problem_->getFinalSimulationState(); + auto final_state = posteq_problem_->get_final_simulation_state(); posteq_problem_bwd_.emplace(*solver_, *model_, final_state.sol, &ws_); posteq_problem_bwd_->run(model_->t0()); // re-initialize state vectors for main simulation - model_->initializeB(ws_.xB_, ws_.dxB_, ws_.xQB_, true); - } else if (posteq_problem_->getSteadyStateStatus()[1] + model_->initialize_b(ws_.xB_, ws_.dxB_, ws_.xQB_, true); + } else if (posteq_problem_->get_steady_state_status()[1] != SteadyStateStatus::not_run) { // backward integration of the post-equilibration problem // (only if post-equilibration was done via simulation) ws_.discs_ = posteq_result.discs; ws_.nroots_ - = compute_nroots(ws_.discs_, model_->ne, model_->nMaxEvent()); + = compute_nroots(ws_.discs_, model_->ne, model_->n_max_event()); EventHandlingBwdSimulator posteq_simulator(model_, solver_, &ws_); posteq_simulator.run( posteq_result.final_state_.sol.t, @@ -176,7 +179,7 @@ void BackwardProblem::handlePostequilibration() { } } -void EventHandlingBwdSimulator::handleEventB( +void EventHandlingBwdSimulator::handle_event_b( Discontinuity const& disc, std::vector const* dJzdx ) { for (int ie = 0; ie < model_->ne; ie++) { @@ -185,11 +188,11 @@ void EventHandlingBwdSimulator::handleEventB( continue; } - model_->addAdjointQuadratureEventUpdate( + model_->add_adjoint_quadrature_event_update( ws_->xQB_, ie, t_, disc.x_post, ws_->xB_, disc.xdot_post, disc.xdot_pre, disc.x_pre, disc.dx_post ); - model_->addAdjointStateEventUpdate( + model_->add_adjoint_state_event_update( ws_->xB_, ie, t_, disc.x_post, disc.xdot_post, disc.xdot_pre, disc.x_pre, disc.dx_post ); @@ -210,20 +213,20 @@ void EventHandlingBwdSimulator::handleEventB( } // apply pre-event state - auto state = model_->getModelState(); + auto state = model_->get_model_state(); state.h = disc.h_pre; state.total_cl = disc.total_cl_pre; - model_->setModelState(state); + model_->set_model_state(state); } -void EventHandlingBwdSimulator::handleDataPointB( +void EventHandlingBwdSimulator::handle_datapoint_b( int const it, std::vector const* dJydx ) { // The solver wasn't reset yet, as xB_ is necessary for solver setup. // For initial time point (we are integrating backwards!), diagnosis needs // to be stored outside this function. if (it < model_->nt() - 1) - solver_->storeDiagnosisB(ws_->which); + solver_->store_diagnosis_b(ws_->which); Expects(dJydx != nullptr); for (int ix = 0; ix < model_->nxtrue_solver; ix++) { @@ -234,7 +237,7 @@ void EventHandlingBwdSimulator::handleDataPointB( } } -realtype EventHandlingBwdSimulator::getTnext(int const it) { +realtype EventHandlingBwdSimulator::get_next_t(int const it) { if (it < 0 && ws_->discs_.empty()) { throw AmiException( "No more timepoints (it=%d, ie=%d) available at %f. This should " @@ -245,21 +248,21 @@ realtype EventHandlingBwdSimulator::getTnext(int const it) { } if (!ws_->discs_.empty() - && (it < 0 || ws_->discs_.back().time > model_->getTimepoint(it))) { + && (it < 0 || ws_->discs_.back().time > model_->get_timepoint(it))) { double const tdisc = ws_->discs_.back().time; return tdisc; } - return model_->getTimepoint(it); + return model_->get_timepoint(it); } BwdSimWorkspace::BwdSimWorkspace( gsl::not_null model, gsl::not_null solver ) : model_(model) - , xB_(model_->nx_solver, solver->getSunContext()) - , dxB_(model_->nx_solver, solver->getSunContext()) - , xQB_(model_->nJ * model_->nplist(), solver->getSunContext()) {} + , xB_(model_->nx_solver, solver->get_sun_context()) + , dxB_(model_->nx_solver, solver->get_sun_context()) + , xQB_(model_->nJ * model_->nplist(), solver->get_sun_context()) {} void EventHandlingBwdSimulator::run( realtype const t_start, realtype const t_end, realtype it, @@ -275,54 +278,56 @@ void EventHandlingBwdSimulator::run( // datapoint at t_start? if (it >= 0 && timepoints[it] == t_start) { - handleDataPointB(it, dJydx); - solver_->setupB( + handle_datapoint_b(it, dJydx); + solver_->setup_b( &ws_->which, timepoints[it], model_, ws_->xB_, ws_->dxB_, ws_->xQB_ ); // for the initial datapoint, diagnosis needs to be stored after setup // as it is not called in handleDataPointB - solver_->storeDiagnosisB(ws_->which); + solver_->store_diagnosis_b(ws_->which); --it; } else { // no data points, only discontinuities, just set up the solver // (e.g., during presimulation) - solver_->setupB( + solver_->setup_b( &ws_->which, t_start, model_, ws_->xB_, ws_->dxB_, ws_->xQB_ ); } while (it >= 0 || !ws_->discs_.empty()) { // check if next timepoint is a discontinuity or a data-point - double const tnext = getTnext(it); + double const tnext = get_next_t(it); if (tnext < t_) { - solver_->runB(tnext); - solver_->writeSolutionB( + solver_->run_b(tnext); + solver_->write_solution_b( t_, ws_->xB_, ws_->dxB_, ws_->xQB_, ws_->which ); } // handle data-point if (it >= 0 && tnext == timepoints[it]) { - handleDataPointB(it, dJydx); + handle_datapoint_b(it, dJydx); it--; } // handle discontinuity if (!ws_->discs_.empty() && tnext == ws_->discs_.back().time) { - handleEventB(ws_->discs_.back(), dJzdx); + handle_event_b(ws_->discs_.back(), dJzdx); ws_->discs_.pop_back(); } // reinitialize state - solver_->reInitB(ws_->which, t_, ws_->xB_, ws_->dxB_); - solver_->quadReInitB(ws_->which, ws_->xQB_); + solver_->reinit_b(ws_->which, t_, ws_->xB_, ws_->dxB_); + solver_->reinit_quad_b(ws_->which, ws_->xQB_); } // we still need to integrate from first datapoint to t_start if (t_ > t_end) { - solver_->runB(t_end); - solver_->writeSolutionB(t_, ws_->xB_, ws_->dxB_, ws_->xQB_, ws_->which); + solver_->run_b(t_end); + solver_->write_solution_b( + t_, ws_->xB_, ws_->dxB_, ws_->xQB_, ws_->which + ); } } @@ -343,10 +348,10 @@ void computeQBfromQ( yQB.zero(); // yQB += dxdotdp * yQ // fill dxdotdp with current values - auto const& plist = model.getParameterList(); + auto const& plist = model.get_parameter_list(); model.fdxdotdp(state.t, state.x, state.dx); model.get_dxdotdp_full().multiply( - yQB.getNVector(), yQ.getNVector(), plist, true + yQB.get_nvector(), yQ.get_nvector(), plist, true ); } @@ -354,12 +359,12 @@ SteadyStateBackwardProblem::SteadyStateBackwardProblem( Solver const& solver, Model& model, SolutionState& final_state, gsl::not_null ws ) - : xQ_(model.nJ * model.nx_solver, solver.getSunContext()) + : xQ_(model.nJ * model.nx_solver, solver.get_sun_context()) , final_state_(final_state) - , newton_solver_( - NewtonSolver(model, solver.getLinearSolver(), solver.getSunContext()) - ) - , newton_step_conv_(solver.getNewtonStepSteadyStateCheck()) + , newton_solver_(NewtonSolver( + model, solver.get_linear_solver(), solver.get_sun_context() + )) + , newton_step_conv_(solver.get_newton_step_steady_state_check()) , model_(&model) , solver_(&solver) , ws_(ws) {} @@ -375,14 +380,14 @@ void SteadyStateBackwardProblem::run(realtype const t0) { CpuTimer const cpu_timer; compute_steady_state_quadrature(t0); - cpu_timeB_ = cpu_timer.elapsed_milliseconds(); + cpu_time_b_ = cpu_timer.elapsed_milliseconds(); } -AmiVector const& SteadyStateBackwardProblem::getAdjointState() const { +AmiVector const& SteadyStateBackwardProblem::get_adjoint_state() const { return ws_->xB_; } -AmiVector const& SteadyStateBackwardProblem::getAdjointQuadrature() const { +AmiVector const& SteadyStateBackwardProblem::get_adjoint_quadrature() const { return ws_->xQB_; } @@ -396,7 +401,7 @@ void SteadyStateBackwardProblem::compute_steady_state_quadrature( // We therefore compute the integral over xB first and then do a // matrix-vector multiplication. - auto const sensitivityMode = model_->getSteadyStateSensitivityMode(); + auto const sensitivityMode = model_->get_steady_state_sensitivity_mode(); // Try to compute the analytical solution for quadrature algebraically if (sensitivityMode == SteadyStateSensitivityMode::newtonOnly @@ -408,11 +413,11 @@ void SteadyStateBackwardProblem::compute_steady_state_quadrature( if (sensitivityMode == SteadyStateSensitivityMode::integrationOnly || (sensitivityMode == SteadyStateSensitivityMode::integrateIfNewtonFails - && !hasQuadrature())) + && !has_quadrature())) compute_quadrature_by_simulation(t0); // If the analytic solution and integration did not work, throw - if (!hasQuadrature()) + if (!has_quadrature()) throw AmiException( "Steady state backward computation failed: Linear " "system could not be solved (possibly due to singular Jacobian), " @@ -436,10 +441,10 @@ void SteadyStateBackwardProblem::compute_quadrature_by_lin_solve() { // try to solve the linear system try { // compute integral over xB and write to xQ - newton_solver_.prepareLinearSystemB( + newton_solver_.prepare_linear_system_b( *model_, {final_state_.t, final_state_.x, final_state_.dx} ); - newton_solver_.solveLinearSystem(xQ_); + newton_solver_.solve_linear_system(xQ_); // Compute the quadrature as the inner product xQ * dxdotdp computeQBfromQ( *model_, xQ_, ws_->xQB_, @@ -467,13 +472,13 @@ void SteadyStateBackwardProblem::compute_quadrature_by_simulation( xQ_.zero(); auto const sim_solver = std::unique_ptr(solver_->clone()); - sim_solver->logger = solver_->logger; - sim_solver->setSensitivityMethod(SensitivityMethod::none); - sim_solver->setSensitivityOrder(SensitivityOrder::none); + sim_solver->set_logger(solver_->get_logger()); + sim_solver->set_sensitivity_method(SensitivityMethod::none); + sim_solver->set_sensitivity_order(SensitivityOrder::none); sim_solver->setup( t0, model_, ws_->xB_, ws_->dxB_, final_state_.sx, final_state_.sx ); - sim_solver->setupSteadystate( + sim_solver->setup_steady_state( t0, model_, final_state_.x, final_state_.dx, ws_->xB_, ws_->dxB_, xQ_ ); @@ -498,22 +503,22 @@ void SteadyStateBackwardProblem::run_simulation(Solver const& solver) { ); } - int& sim_steps = numstepsB_; + int& sim_steps = num_steps_b_; // WRMS computer for xQB WRMSComputer wrms_computer_xQB_( - model_->nplist(), solver.getSunContext(), - solver.getAbsoluteToleranceQuadratures(), - solver.getRelativeToleranceQuadratures(), AmiVector() + model_->nplist(), solver.get_sun_context(), + solver.get_absolute_tolerance_quadratures(), + solver.get_relative_tolerance_quadratures(), AmiVector() ); // time-derivative of quadrature state vector - AmiVector xQBdot(model_->nplist(), solver.getSunContext()); + AmiVector xQBdot(model_->nplist(), solver.get_sun_context()); int const convergence_check_frequency = newton_step_conv_ ? 25 : 1; - auto const max_steps = (solver.getMaxStepsBackwardProblem() > 0) - ? solver.getMaxStepsBackwardProblem() - : solver.getMaxSteps() * 100; + auto const max_steps = (solver.get_max_steps_backward_problem() > 0) + ? solver.get_max_steps_backward_problem() + : solver.get_max_steps() * 100; while (true) { if (sim_steps % convergence_check_frequency == 0) { @@ -556,7 +561,7 @@ void SteadyStateBackwardProblem::run_simulation(Solver const& solver) { // direction w.r.t. current t. solver.step(std::max(final_state_.t, 1.0) * 10); - solver.writeSolution( + solver.write_solution( final_state_.t, ws_->xB_, final_state_.dx, final_state_.sx, xQ_ ); } diff --git a/src/edata.cpp b/src/edata.cpp index d26cb6afb7..2139d3cc33 100644 --- a/src/edata.cpp +++ b/src/edata.cpp @@ -2,7 +2,7 @@ #include "amici/defines.h" #include "amici/model.h" #include "amici/rdata.h" -#include "amici/symbolic_functions.h" // getNaN +#include "amici/symbolic_functions.h" // get_nan #include #include @@ -16,7 +16,7 @@ ExpData::ExpData(int const nytrue, int const nztrue, int const nmaxevent) : nytrue_(nytrue) , nztrue_(nztrue) , nmaxevent_(nmaxevent) { - applyDimensions(); + apply_dimensions(); } ExpData::ExpData( @@ -27,7 +27,7 @@ ExpData::ExpData( , nytrue_(nytrue) , nztrue_(nztrue) , nmaxevent_(nmaxevent) { - applyDimensions(); + apply_dimensions(); } ExpData::ExpData( @@ -38,8 +38,8 @@ ExpData::ExpData( , nytrue_(nytrue) , nztrue_(nztrue) , nmaxevent_(nmaxevent) { - this->fixedParameters = std::move(fixedParameters); - applyDimensions(); + this->fixed_parameters = std::move(fixedParameters); + apply_dimensions(); } ExpData::ExpData( @@ -53,22 +53,22 @@ ExpData::ExpData( , nytrue_(nytrue) , nztrue_(nztrue) , nmaxevent_(nmaxevent) { - applyDimensions(); - setObservedData(observedData); - setObservedDataStdDev(observedDataStdDev); - setObservedEvents(observedEvents); - setObservedEventsStdDev(observedEventsStdDev); + apply_dimensions(); + set_observed_data(observedData); + set_observed_data_std_dev(observedDataStdDev); + set_observed_events(observedEvents); + set_observed_events_std_dev(observedEventsStdDev); } ExpData::ExpData(Model const& model) : ExpData( - model.nytrue, model.nztrue, model.nMaxEvent(), model.getTimepoints(), - model.getFixedParameters() + model.nytrue, model.nztrue, model.n_max_event(), + model.get_timepoints(), model.get_fixed_parameters() ) { - reinitializeFixedParameterInitialStates - = model.getReinitializeFixedParameterInitialStates() - && model.getReinitializationStateIdxs().empty(); - reinitialization_state_idxs_sim = model.getReinitializationStateIdxs(); + reinitialize_fixed_parameter_initial_states + = model.get_reinitialize_fixed_parameter_initial_states() + && model.get_reinitialization_state_idxs().empty(); + reinitialization_state_idxs_sim = model.get_reinitialization_state_idxs(); } ExpData::ExpData( @@ -133,24 +133,28 @@ ExpData::ExpData( id = rdata.id; } -void ExpData::setTimepoints(std::vector const& ts) { +void ExpData::set_timepoints(std::vector const& ts) { if (!std::ranges::is_sorted(ts)) throw AmiException( "Encountered non-monotonic timepoints, please order timepoints " "such that they are monotonically increasing!" ); - ts_ = ts; - applyDataDimension(); + timepoints = ts; + apply_data_dimension(); } -std::vector const& ExpData::getTimepoints() const { return ts_; } +std::vector const& ExpData::get_timepoints() const { + return timepoints; +} -int ExpData::nt() const { return gsl::narrow(ts_.size()); } +int ExpData::nt() const { return gsl::narrow(timepoints.size()); } -realtype ExpData::getTimepoint(int const it) const { return ts_.at(it); } +realtype ExpData::get_timepoint(int const it) const { + return timepoints.at(it); +} -void ExpData::setObservedData(std::vector const& observedData) { - checkDataDimension(observedData, "observedData"); +void ExpData::set_observed_data(std::vector const& observedData) { + check_data_dimension(observedData, "observedData"); if (observedData.size() == static_cast(nt()) * nytrue_) observed_data_ = observedData; @@ -158,7 +162,7 @@ void ExpData::setObservedData(std::vector const& observedData) { observed_data_.clear(); } -void ExpData::setObservedData( +void ExpData::set_observed_data( std::vector const& observedData, int iy ) { if (observedData.size() != static_cast(nt())) @@ -171,26 +175,26 @@ void ExpData::setObservedData( observed_data_.at(iy + it * nytrue_) = observedData.at(it); } -bool ExpData::isSetObservedData(int const it, int const iy) const { +bool ExpData::is_set_observed_data(int const it, int const iy) const { return !observed_data_.empty() && !isnan(observed_data_.at(it * nytrue_ + iy)); } -std::vector const& ExpData::getObservedData() const { +std::vector const& ExpData::get_observed_data() const { return observed_data_; } -realtype const* ExpData::getObservedDataPtr(int const it) const { +realtype const* ExpData::get_observed_data_ptr(int const it) const { if (!observed_data_.empty()) return &observed_data_.at(it * nytrue_); return nullptr; } -void ExpData::setObservedDataStdDev( +void ExpData::set_observed_data_std_dev( std::vector const& observedDataStdDev ) { - checkDataDimension(observedDataStdDev, "observedDataStdDev"); + check_data_dimension(observedDataStdDev, "observedDataStdDev"); checkSigmaPositivity(observedDataStdDev, "observedDataStdDev"); if (observedDataStdDev.size() == static_cast(nt()) * nytrue_) @@ -199,12 +203,12 @@ void ExpData::setObservedDataStdDev( observed_data_std_dev_.clear(); } -void ExpData::setObservedDataStdDev(realtype const stdDev) { +void ExpData::set_observed_data_std_dev(realtype const stdDev) { checkSigmaPositivity(stdDev, "stdDev"); std::ranges::fill(observed_data_std_dev_, stdDev); } -void ExpData::setObservedDataStdDev( +void ExpData::set_observed_data_std_dev( std::vector const& observedDataStdDev, int const iy ) { if (observedDataStdDev.size() != static_cast(nt())) @@ -219,30 +223,30 @@ void ExpData::setObservedDataStdDev( = observedDataStdDev.at(it); } -void ExpData::setObservedDataStdDev(realtype const stdDev, int const iy) { +void ExpData::set_observed_data_std_dev(realtype const stdDev, int const iy) { checkSigmaPositivity(stdDev, "stdDev"); for (int it = 0; it < nt(); ++it) observed_data_std_dev_.at(iy + it * nytrue_) = stdDev; } -bool ExpData::isSetObservedDataStdDev(int const it, int const iy) const { +bool ExpData::is_set_observed_data_std_dev(int const it, int const iy) const { return !observed_data_std_dev_.empty() && !isnan(observed_data_std_dev_.at(it * nytrue_ + iy)); } -std::vector const& ExpData::getObservedDataStdDev() const { +std::vector const& ExpData::get_observed_data_std_dev() const { return observed_data_std_dev_; } -realtype const* ExpData::getObservedDataStdDevPtr(int const it) const { +realtype const* ExpData::get_observed_data_std_dev_ptr(int const it) const { if (!observed_data_std_dev_.empty()) return &observed_data_std_dev_.at(it * nytrue_); return nullptr; } -void ExpData::setObservedEvents(std::vector const& observedEvents) { - checkEventsDimension(observedEvents, "observedEvents"); +void ExpData::set_observed_events(std::vector const& observedEvents) { + check_events_dimension(observedEvents, "observedEvents"); if (observedEvents.size() == static_cast(nmaxevent_) * nztrue_) observed_events_ = observedEvents; @@ -250,7 +254,7 @@ void ExpData::setObservedEvents(std::vector const& observedEvents) { observed_events_.clear(); } -void ExpData::setObservedEvents( +void ExpData::set_observed_events( std::vector const& observedEvents, int const iz ) { if (observedEvents.size() != static_cast(nmaxevent_)) { @@ -265,26 +269,26 @@ void ExpData::setObservedEvents( observed_events_.at(iz + ie * nztrue_) = observedEvents.at(ie); } -bool ExpData::isSetObservedEvents(int const ie, int const iz) const { +bool ExpData::is_set_observed_events(int const ie, int const iz) const { return !observed_events_.empty() && !isnan(observed_events_.at(ie * nztrue_ + iz)); } -std::vector const& ExpData::getObservedEvents() const { +std::vector const& ExpData::get_observed_events() const { return observed_events_; } -realtype const* ExpData::getObservedEventsPtr(int const ie) const { +realtype const* ExpData::get_observed_events_ptr(int const ie) const { if (!observed_events_.empty()) return &observed_events_.at(ie * nztrue_); return nullptr; } -void ExpData::setObservedEventsStdDev( +void ExpData::set_observed_events_std_dev( std::vector const& observedEventsStdDev ) { - checkEventsDimension(observedEventsStdDev, "observedEventsStdDev"); + check_events_dimension(observedEventsStdDev, "observedEventsStdDev"); checkSigmaPositivity(observedEventsStdDev, "observedEventsStdDev"); if (observedEventsStdDev.size() == (unsigned)nmaxevent_ * nztrue_) @@ -293,12 +297,12 @@ void ExpData::setObservedEventsStdDev( observed_events_std_dev_.clear(); } -void ExpData::setObservedEventsStdDev(realtype const stdDev) { +void ExpData::set_observed_events_std_dev(realtype const stdDev) { checkSigmaPositivity(stdDev, "stdDev"); std::ranges::fill(observed_events_std_dev_, stdDev); } -void ExpData::setObservedEventsStdDev( +void ExpData::set_observed_events_std_dev( std::vector const& observedEventsStdDev, int const iz ) { if (observedEventsStdDev.size() != (unsigned)nmaxevent_) @@ -314,25 +318,25 @@ void ExpData::setObservedEventsStdDev( = observedEventsStdDev.at(ie); } -void ExpData::setObservedEventsStdDev(realtype const stdDev, int const iz) { +void ExpData::set_observed_events_std_dev(realtype const stdDev, int const iz) { checkSigmaPositivity(stdDev, "stdDev"); for (int ie = 0; ie < nmaxevent_; ++ie) observed_events_std_dev_.at(iz + ie * nztrue_) = stdDev; } -bool ExpData::isSetObservedEventsStdDev(int const ie, int const iz) const { +bool ExpData::is_set_observed_events_std_dev(int const ie, int const iz) const { if (!observed_events_std_dev_.empty()) // avoid out of bound memory access return !isnan(observed_events_std_dev_.at(ie * nztrue_ + iz)); return false; } -std::vector const& ExpData::getObservedEventsStdDev() const { +std::vector const& ExpData::get_observed_events_std_dev() const { return observed_events_std_dev_; } -realtype const* ExpData::getObservedEventsStdDevPtr(int const ie) const { +realtype const* ExpData::get_observed_events_std_dev_ptr(int const ie) const { if (!observed_events_std_dev_.empty()) return &observed_events_std_dev_.at(ie * nztrue_); @@ -340,28 +344,28 @@ realtype const* ExpData::getObservedEventsStdDevPtr(int const ie) const { } void ExpData::clear_observations() { - std::ranges::fill(observed_data_, getNaN()); - std::ranges::fill(observed_data_std_dev_, getNaN()); - std::ranges::fill(observed_events_, getNaN()); - std::ranges::fill(observed_events_std_dev_, getNaN()); + std::ranges::fill(observed_data_, get_nan()); + std::ranges::fill(observed_data_std_dev_, get_nan()); + std::ranges::fill(observed_events_, get_nan()); + std::ranges::fill(observed_events_std_dev_, get_nan()); } -void ExpData::applyDimensions() { - applyDataDimension(); - applyEventDimension(); +void ExpData::apply_dimensions() { + apply_data_dimension(); + apply_event_dimension(); } -void ExpData::applyDataDimension() { - observed_data_.resize(nt() * nytrue_, getNaN()); - observed_data_std_dev_.resize(nt() * nytrue_, getNaN()); +void ExpData::apply_data_dimension() { + observed_data_.resize(nt() * nytrue_, get_nan()); + observed_data_std_dev_.resize(nt() * nytrue_, get_nan()); } -void ExpData::applyEventDimension() { - observed_events_.resize(nmaxevent_ * nztrue_, getNaN()); - observed_events_std_dev_.resize(nmaxevent_ * nztrue_, getNaN()); +void ExpData::apply_event_dimension() { + observed_events_.resize(nmaxevent_ * nztrue_, get_nan()); + observed_events_std_dev_.resize(nmaxevent_ * nztrue_, get_nan()); } -void ExpData::checkDataDimension( +void ExpData::check_data_dimension( std::vector const& input, char const* fieldname ) const { if (input.size() != static_cast(nt()) * nytrue_ && !input.empty()) @@ -371,7 +375,7 @@ void ExpData::checkDataDimension( ); } -void ExpData::checkEventsDimension( +void ExpData::check_events_dimension( std::vector const& input, char const* fieldname ) const { if (input.size() != static_cast(nmaxevent_) * nztrue_ @@ -406,31 +410,32 @@ ConditionContext::ConditionContext( Model* model, ExpData const* edata, FixedParameterContext fpc ) : model_(model) - , original_parameters_(model->getParameters()) - , original_fixed_parameters_(model->getFixedParameters()) + , original_parameters_(model->get_parameters()) + , original_fixed_parameters_(model->get_fixed_parameters()) , original_tstart_(model->t0()) - , original_tstart_preeq_(model->t0Preeq()) - , original_timepoints_(model->getTimepoints()) - , original_parameter_list_(model->getParameterList()) - , original_scaling_(model->getParameterScale()) + , original_tstart_preeq_(model->t0_preeq()) + , original_timepoints_(model->get_timepoints()) + , original_parameter_list_(model->get_parameter_list()) + , original_scaling_(model->get_parameter_scale()) , original_reinitialize_fixed_parameter_initial_states_( - model->getReinitializeFixedParameterInitialStates() - && model->getReinitializationStateIdxs().empty() + model->get_reinitialize_fixed_parameter_initial_states() + && model->get_reinitialization_state_idxs().empty() ) - , original_reinitialization_state_idxs(model->getReinitializationStateIdxs() + , original_reinitialization_state_idxs( + model->get_reinitialization_state_idxs() ) { - if (model->hasCustomInitialStates()) - original_x0_ = model->getInitialStates(); + if (model->has_custom_initial_state()) + original_x0_ = model->get_initial_state(); - if (model->hasCustomInitialStateSensitivities()) - original_sx0_ = model->getInitialStateSensitivities(); + if (model->has_custom_initial_state_sensitivities()) + original_sx0_ = model->get_initial_state_sensitivities(); - applyCondition(edata, fpc); + apply_condition(edata, fpc); } ConditionContext::~ConditionContext() { restore(); } -void ConditionContext::applyCondition( +void ConditionContext::apply_condition( ExpData const* edata, FixedParameterContext fpc ) { if (!edata) @@ -439,7 +444,7 @@ void ConditionContext::applyCondition( // this needs to go first, otherwise nplist will not have the right // dimension for all other fields that depend on Model::nplist if (!edata->plist.empty()) - model_->setParameterList(edata->plist); + model_->set_parameter_list(edata->plist); // this needs to go second as setParameterScale will reset sx0 if (!edata->pscale.empty()) { @@ -449,7 +454,7 @@ void ConditionContext::applyCondition( " match ExpData (%zd).", model_->np(), edata->pscale.size() ); - model_->setParameterScale(edata->pscale); + model_->set_parameter_scale(edata->pscale); } // this needs to be set in the model before handling initial state @@ -461,7 +466,7 @@ void ConditionContext::applyCondition( " match ExpData (%zd).", model_->np(), edata->parameters.size() ); - model_->setParameters(edata->parameters); + model_->set_parameters(edata->parameters); } if (!edata->x0.empty()) { @@ -471,7 +476,7 @@ void ConditionContext::applyCondition( " not match ExpData (%zd).", model_->nx_rdata, edata->x0.size() ); - model_->setInitialStates(edata->x0); + model_->set_initial_state(edata->x0); } if (!edata->sx0.empty()) { @@ -481,93 +486,98 @@ void ConditionContext::applyCondition( " in model does not match ExpData (%zd).", model_->nx_rdata * model_->nplist(), edata->sx0.size() ); - model_->setInitialStateSensitivities(edata->sx0); + model_->set_initial_state_sensitivities(edata->sx0); } - model_->setReinitializeFixedParameterInitialStates( - edata->reinitializeFixedParameterInitialStates + model_->set_reinitialize_fixed_parameter_initial_states( + edata->reinitialize_fixed_parameter_initial_states ); switch (fpc) { case FixedParameterContext::simulation: - if (!edata->fixedParameters.empty()) { + if (!edata->fixed_parameters.empty()) { // fixed parameter in model are superseded by those provided in // edata - if (edata->fixedParameters.size() != (unsigned)model_->nk()) + if (edata->fixed_parameters.size() != (unsigned)model_->nk()) throw AmiException( "Number of fixed parameters (%d) in model does" "not match ExpData (%zd).", - model_->nk(), edata->fixedParameters.size() + model_->nk(), edata->fixed_parameters.size() ); - model_->setFixedParameters(edata->fixedParameters); - if (!edata->reinitializeFixedParameterInitialStates) - model_->setReinitializationStateIdxs( + model_->set_fixed_parameters(edata->fixed_parameters); + if (!edata->reinitialize_fixed_parameter_initial_states) + model_->set_reinitialization_state_idxs( edata->reinitialization_state_idxs_sim ); } break; case FixedParameterContext::preequilibration: - if (!edata->fixedParametersPreequilibration.empty()) { + if (!edata->fixed_parameters_pre_equilibration.empty()) { // fixed parameter in model are superseded by those provided in // edata - if (edata->fixedParametersPreequilibration.size() + if (edata->fixed_parameters_pre_equilibration.size() != (unsigned)model_->nk()) throw AmiException( "Number of fixed parameters (%d) in model does" "not match ExpData (preequilibration) (%zd).", - model_->nk(), edata->fixedParametersPreequilibration.size() + model_->nk(), + edata->fixed_parameters_pre_equilibration.size() ); - model_->setFixedParameters(edata->fixedParametersPreequilibration); + model_->set_fixed_parameters( + edata->fixed_parameters_pre_equilibration + ); } break; case FixedParameterContext::presimulation: - if (!edata->fixedParametersPresimulation.empty()) { + if (!edata->fixed_parameters_presimulation.empty()) { // fixed parameter in model are superseded by those provided in // edata - if (edata->fixedParametersPresimulation.size() + if (edata->fixed_parameters_presimulation.size() != (unsigned)model_->nk()) throw AmiException( "Number of fixed parameters (%d) in model does" " not match ExpData (presimulation) (%zd).", - model_->nk(), edata->fixedParametersPresimulation.size() + model_->nk(), edata->fixed_parameters_presimulation.size() ); - model_->setFixedParameters(edata->fixedParametersPresimulation); - if (!edata->reinitializeFixedParameterInitialStates) - model_->setReinitializationStateIdxs( + model_->set_fixed_parameters(edata->fixed_parameters_presimulation); + if (!edata->reinitialize_fixed_parameter_initial_states) + model_->set_reinitialization_state_idxs( edata->reinitialization_state_idxs_presim ); } break; } - model_->setT0(edata->tstart_); + model_->set_t0(edata->t_start); if (edata->nt()) { // fixed parameter in model are superseded by those provided in edata - model_->setTimepoints(edata->getTimepoints()); + model_->set_timepoints(edata->get_timepoints()); } } void ConditionContext::restore() { // parameter list has to be set before initial state sensitivities - model_->setParameterList(original_parameter_list_); + model_->set_parameter_list(original_parameter_list_); // parameter scale has to be set before initial state sensitivities - model_->setParameterScale(original_scaling_); + model_->set_parameter_scale(original_scaling_); if (!original_x0_.empty()) - model_->setInitialStates(original_x0_); + model_->set_initial_state(original_x0_); if (!original_sx0_.empty()) - model_->setUnscaledInitialStateSensitivities(original_sx0_); - - model_->setParameters(original_parameters_); - model_->setFixedParameters(original_fixed_parameters_); - model_->setT0(original_tstart_); - model_->setT0Preeq(original_tstart_preeq_); - model_->setTimepoints(original_timepoints_); - model_->setReinitializeFixedParameterInitialStates( + model_->set_unscaled_initial_state_sensitivities(original_sx0_); + + model_->set_parameters(original_parameters_); + model_->set_fixed_parameters(original_fixed_parameters_); + model_->set_t0(original_tstart_); + model_->set_t0_preeq(original_tstart_preeq_); + model_->set_timepoints(original_timepoints_); + model_->set_reinitialize_fixed_parameter_initial_states( original_reinitialize_fixed_parameter_initial_states_ ); - model_->setReinitializationStateIdxs(original_reinitialization_state_idxs); + model_->set_reinitialization_state_idxs( + original_reinitialization_state_idxs + ); } } // namespace amici diff --git a/src/exception.cpp b/src/exception.cpp index 85c2f0ebd1..8ed16ab5dc 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -25,7 +25,7 @@ char const* AmiException::getBacktrace() const { return trace_.data(); } void AmiException::storeBacktrace(int const nMaxFrames, int const first_frame) { snprintf( trace_.data(), trace_.size(), "%s", - backtraceString(nMaxFrames, first_frame).c_str() + get_backtrace_string(nMaxFrames, first_frame).c_str() ); } diff --git a/src/forwardproblem.cpp b/src/forwardproblem.cpp index 934117c349..6c384c1942 100644 --- a/src/forwardproblem.cpp +++ b/src/forwardproblem.cpp @@ -44,7 +44,7 @@ ForwardProblem::ForwardProblem( : model(model) , solver(solver) , edata(edata) - , dJzdx_(model->nJ * model->nx_solver * model->nMaxEvent(), 0.0) + , dJzdx_(model->nJ * model->nx_solver * model->n_max_event(), 0.0) , uses_presimulation_(edata && edata->t_presim > 0) , ws_(model, solver) , main_simulator_(model, solver, &ws_, &dJzdx_) @@ -109,21 +109,21 @@ void EventHandlingSimulator::run( int const status = solver_->run(next_t_stop); // sx will be copied from solver on demand if sensitivities // are computed - solver_->writeSolution(ws_->sol); + solver_->write_solution(ws_->sol); if (status == AMICI_ILL_INPUT) { // clustering of roots => turn off root-finding - solver_->turnOffRootFinding(); + solver_->turn_off_root_finding(); } else if (status == AMICI_ROOT_RETURN || ws_->sol.t == next_t_event) { // solver-tracked or time-triggered event - solver_->getRootInfo(ws_->roots_found.data()); + solver_->get_root_info(ws_->roots_found.data()); // check if we are at a trigger timepoint. // if so, set the root-found flag if (ws_->sol.t == next_t_event) { for (auto const ie : - model_->explicit_roots_[ws_->sol.t]) { + model_->get_explicit_roots().at(ws_->sol.t)) { // determine the direction of root crossing from // root function value at the previous event ws_->roots_found[ie] @@ -139,16 +139,16 @@ void EventHandlingSimulator::run( handle_datapoint(next_t_out); if (store_diagnosis) { // store diagnosis information for debugging - solver_->storeDiagnosis(); + solver_->store_diagnosis(); } } // fill events if (model_->nz > 0 && model_->nt() > 0) { - fill_events(model_->nMaxEvent(), edata); + fill_events(model_->n_max_event(), edata); } - result.final_state_ = {.sol = ws_->sol, .mod = model_->getModelState()}; + result.final_state_ = {.sol = ws_->sol, .mod = model_->get_model_state()}; } void EventHandlingSimulator::run_steady_state( @@ -180,7 +180,7 @@ void EventHandlingSimulator::run_steady_state( } // check for maxsteps - if (sim_steps >= solver_->getMaxSteps()) { + if (sim_steps >= solver_->get_max_steps()) { throw IntegrationFailure(AMICI_TOO_MUCH_WORK, ws_->sol.t); } @@ -199,23 +199,24 @@ void EventHandlingSimulator::run_steady_state( ? next_t_event : std::max(ws_->sol.t, 1.0) * 10; auto status = solver_->step(tout); - solver_->writeSolution(ws_->sol); + solver_->write_solution(ws_->sol); if (status < 0) { throw IntegrationFailure(status, ws_->sol.t); } else if (status == AMICI_ROOT_RETURN || ws_->sol.t >= next_t_event) { if (ws_->sol.t >= next_t_event) { // Solver::step will over-step next_t_event - solver_->writeSolution(next_t_event, ws_->sol); + solver_->write_solution(next_t_event, ws_->sol); } // solver-tracked or time-triggered event - solver_->getRootInfo(ws_->roots_found.data()); + solver_->get_root_info(ws_->roots_found.data()); // check if we are at a trigger timepoint. // if so, set the root-found flag if (ws_->sol.t == next_t_event) { - for (auto const ie : model_->explicit_roots_[ws_->sol.t]) { + for (auto const ie : + model_->get_explicit_roots().at(ws_->sol.t)) { // determine the direction of root crossing from // root function value at the previous event ws_->roots_found[ie] = std::copysign(1, -ws_->rootvals[ie]); @@ -230,52 +231,52 @@ void EventHandlingSimulator::run_steady_state( } } - result.final_state_ = {.sol = ws_->sol, .mod = model_->getModelState()}; + result.final_state_ = {.sol = ws_->sol, .mod = model_->get_model_state()}; } -void ForwardProblem::workForwardProblem() { - handlePreequilibration(); +void ForwardProblem::run() { + handle_preequilibration(); { FinalStateStorer fss(this); - handlePresimulation(); - handleMainSimulation(); + handle_presimulation(); + handle_main_simulation(); } - handlePostequilibration(); + handle_postequilibration(); } -void ForwardProblem::handlePreequilibration() { - if (!edata || edata->fixedParametersPreequilibration.empty()) { +void ForwardProblem::handle_preequilibration() { + if (!edata || edata->fixed_parameters_pre_equilibration.empty()) { return; } ConditionContext cc2(model, edata, FixedParameterContext::preequilibration); preeq_problem_.emplace(&ws_, *solver, *model, true); - auto t0 = std::isnan(model->t0Preeq()) ? model->t0() : model->t0Preeq(); + auto t0 = std::isnan(model->t0_preeq()) ? model->t0() : model->t0_preeq(); // The solver was not run before, set up everything. model->initialize( t0, ws_.sol.x, ws_.sol.dx, ws_.sol.sx, ws_.sdx, - solver->getSensitivityOrder() >= SensitivityOrder::first, + solver->get_sensitivity_order() >= SensitivityOrder::first, ws_.roots_found ); - if (solver->getSensitivityOrder() >= SensitivityOrder::first - and solver->getSensitivityMethod() != SensitivityMethod::none) { - model->initializeStateSensitivities(t0, ws_.sol.sx, ws_.sol.x); + if (solver->get_sensitivity_order() >= SensitivityOrder::first + and solver->get_sensitivity_method() != SensitivityMethod::none) { + model->initialize_state_sensitivities(t0, ws_.sol.sx, ws_.sol.x); } solver->setup(t0, model, ws_.sol.x, ws_.sol.dx, ws_.sol.sx, ws_.sdx); - preeq_problem_->workSteadyStateProblem(*solver, -1, t0); + preeq_problem_->run(*solver, -1, t0); - ws_.sol.x = preeq_problem_->getState(); - ws_.sol.sx = preeq_problem_->getStateSensitivity(); + ws_.sol.x = preeq_problem_->get_state(); + ws_.sol.sx = preeq_problem_->get_state_sensitivity(); preequilibrated_ = true; } -void ForwardProblem::handlePresimulation() { +void ForwardProblem::handle_presimulation() { if (!uses_presimulation_) return; @@ -296,38 +297,38 @@ void ForwardProblem::handlePresimulation() { if (!preequilibrated_) { model->initialize( ws_.sol.t, ws_.sol.x, ws_.sol.dx, ws_.sol.sx, ws_.sdx, - solver->getSensitivityOrder() >= SensitivityOrder::first, + solver->get_sensitivity_order() >= SensitivityOrder::first, ws_.roots_found ); } else if (model->ne) { // copy, since model state will be updated in reinit_events - auto h_old = model->getModelState().h; + auto h_old = model->get_model_state().h; model->reinit_events( ws_.sol.t, ws_.sol.x, ws_.sol.dx, h_old, ws_.roots_found ); } solver->setup(ws_.sol.t, model, ws_.sol.x, ws_.sol.dx, ws_.sol.sx, ws_.sdx); - solver->updateAndReinitStatesAndSensitivities(model); + solver->update_and_reinit_states_and_sensitivities(model); std::vector const timepoints{model->t0()}; pre_simulator_.run(ws_.sol.t, edata, timepoints, false); - solver->writeSolution(ws_.sol); + solver->write_solution(ws_.sol); } -void ForwardProblem::handleMainSimulation() { +void ForwardProblem::handle_main_simulation() { // When computing adjoint sensitivity analysis with presimulation, // we need to store sx after the reinitialization after preequilibration // but before reinitialization after presimulation. As presimulation with // ASA will not update sx, we can simply extract the values here. - if (solver->computingASA() && uses_presimulation_) - ws_.sol.sx = solver->getStateSensitivity(model->t0()); + if (solver->computing_asa() && uses_presimulation_) + ws_.sol.sx = solver->get_state_sensitivity(model->t0()); if (!preequilibrated_ && !uses_presimulation_) { // if preequilibration or presimulation was done, the model was already // initialized model->initialize( model->t0(), ws_.sol.x, ws_.sol.dx, ws_.sol.sx, ws_.sdx, - solver->getSensitivityOrder() >= SensitivityOrder::first, + solver->get_sensitivity_order() >= SensitivityOrder::first, ws_.roots_found ); } @@ -343,10 +344,10 @@ void ForwardProblem::handleMainSimulation() { if (preequilibrated_ || uses_presimulation_) { // Reset the time and re-initialize events for the main simulation - solver->updateAndReinitStatesAndSensitivities(model); + solver->update_and_reinit_states_and_sensitivities(model); if (model->ne) { // copy, since model state will be updated in reinit_events - auto h_old = model->getModelState().h; + auto h_old = model->get_model_state().h; model->reinit_events( ws_.sol.t, ws_.sol.x, ws_.sol.dx, h_old, ws_.roots_found ); @@ -354,29 +355,29 @@ void ForwardProblem::handleMainSimulation() { } // update x0 after computing consistence IC/reinitialization - ws_.sol.x = solver->getState(model->t0()); + ws_.sol.x = solver->get_state(model->t0()); // When computing forward sensitivities, we generally want to update sx // after presimulation/preequilibration, and if we didn't do either this // also won't harm. when computing ASA, we only want to update here if we // didn't update before presimulation (if applicable). - if (solver->computingFSA() - || (solver->computingASA() && !uses_presimulation_)) - ws_.sol.sx = solver->getStateSensitivity(model->t0()); + if (solver->computing_fsa() + || (solver->computing_asa() && !uses_presimulation_)) + ws_.sol.sx = solver->get_state_sensitivity(model->t0()); - main_simulator_.run(ws_.sol.t, edata, model->getTimepoints(), true); + main_simulator_.run(ws_.sol.t, edata, model->get_timepoints(), true); it_ = main_simulator_.it_; } -void ForwardProblem::handlePostequilibration() { - if (getCurrentTimeIteration() < model->nt()) { +void ForwardProblem::handle_postequilibration() { + if (get_current_time_iteration() < model->nt()) { posteq_problem_.emplace(&ws_, *solver, *model, false); - auto it = getCurrentTimeIteration(); - auto t0 = it < 1 ? model->t0() : model->getTimepoint(it - 1); + auto it = get_current_time_iteration(); + auto t0 = it < 1 ? model->t0() : model->get_timepoint(it - 1); // The solver was run before, extract current state from solver. - solver->writeSolution(ws_.sol); + solver->write_solution(ws_.sol); Expects(t0 == ws_.sol.t); - posteq_problem_->workSteadyStateProblem(*solver, it, t0); + posteq_problem_->run(*solver, it, t0); } } @@ -420,7 +421,7 @@ void EventHandlingSimulator::handle_events( // not after processing every single event, but after processing all events // that did not trigger a secondary event auto store_post_event_info = [this]() { - if (solver_->computingASA()) { + if (solver_->computing_asa()) { // store updated x to compute jump in discontinuity result.discs.back().x_post = ws_->sol.x; result.discs.back().dx_post = ws_->sol.dx; @@ -433,7 +434,7 @@ void EventHandlingSimulator::handle_events( store_pre_event_info(false); if (!initial_event) { - model_->updateHeaviside(ws_->roots_found); + model_->update_heaviside(ws_->roots_found); } // Collect all triggered events waiting for execution @@ -472,15 +473,15 @@ void EventHandlingSimulator::handle_events( // Execute the event // Apply bolus to the state and the sensitivities - model_->addStateEventUpdate( + model_->add_state_event_update( ws_->sol.x, ie, ws_->sol.t, ws_->xdot, ws_->xdot_old, state_old.has_value() ? state_old->sol.x : ws_->sol.x, - state_old.has_value() ? state_old->mod : model_->getModelState() + state_old.has_value() ? state_old->mod : model_->get_model_state() ); - if (solver_->computingFSA()) { + if (solver_->computing_fsa()) { // compute the new xdot model_->fxdot(ws_->sol.t, ws_->sol.x, ws_->sol.dx, ws_->xdot); - model_->addStateSensitivityEventUpdate( + model_->add_state_sensitivity_event_update( ws_->sol.sx, ie, ws_->sol.t, ws_->sol.x, ws_->x_old, ws_->xdot, ws_->xdot_old, state_old.has_value() ? state_old->sol.sx : ws_->sol.sx, @@ -495,15 +496,15 @@ void EventHandlingSimulator::handle_events( store_pre_event_info(true); - model_->updateHeaviside(ws_->roots_found); + model_->update_heaviside(ws_->roots_found); } } store_post_event_info(); // reinitialize the solver after all events have been processed - solver_->reInit(ws_->sol.t, ws_->sol.x, ws_->sol.dx); - if (solver_->computingFSA()) { - solver_->sensReInit(ws_->sol.sx, ws_->sdx); + solver_->reinit(ws_->sol.t, ws_->sol.x, ws_->sol.dx); + if (solver_->computing_fsa()) { + solver_->sens_reinit(ws_->sol.sx, ws_->sdx); } } @@ -517,14 +518,14 @@ void EventHandlingSimulator::handle_initial_events(ExpData const* edata) { void EventHandlingSimulator::store_event(ExpData const* edata) { bool const is_last_timepoint - = (ws_->sol.t == model_->getTimepoint(model_->nt() - 1)); + = (ws_->sol.t == model_->get_timepoint(model_->nt() - 1)); if (is_last_timepoint) { // call from fillEvent at last timepoint model_->froot(ws_->sol.t, ws_->sol.x, ws_->sol.dx, ws_->rootvals); for (int ie = 0; ie < model_->ne; ie++) { ws_->roots_found.at(ie) - = (ws_->nroots.at(ie) < model_->nMaxEvent()) ? 1 : 0; + = (ws_->nroots.at(ie) < model_->n_max_event()) ? 1 : 0; } result.discs.back().root_info = ws_->roots_found; } @@ -540,7 +541,7 @@ void EventHandlingSimulator::store_event(ExpData const* edata) { // EVENT OUTPUT for (int ie = 0; ie < model_->ne; ie++) { // only look for roots of the root function, not discontinuities - if (ws_->nroots.at(ie) >= model_->nMaxEvent()) + if (ws_->nroots.at(ie) >= model_->n_max_event()) continue; // only consider transitions false -> true or event filling @@ -548,9 +549,9 @@ void EventHandlingSimulator::store_event(ExpData const* edata) { continue; } - if (edata && solver_->computingASA()) { + if (edata && solver_->computing_asa()) { Expects(dJzdx_ != nullptr); - model_->getAdjointStateEventUpdate( + model_->get_adjoint_state_event_update( slice( *dJzdx_, ws_->nroots.at(ie), model_->nx_solver * model_->nJ ), @@ -563,7 +564,7 @@ void EventHandlingSimulator::store_event(ExpData const* edata) { if (is_last_timepoint) { // call from fillEvent at last timepoint // loop until all events are filled - fill_events(model_->nMaxEvent(), edata); + fill_events(model_->n_max_event(), edata); } } @@ -572,13 +573,13 @@ void EventHandlingSimulator::store_pre_event_state( ) { // If we need to do forward sensitivities later on, we need to store the old // x and the old xdot. - if (solver_->getSensitivityOrder() >= SensitivityOrder::first) { + if (solver_->get_sensitivity_order() >= SensitivityOrder::first) { // store x and xdot to compute jump in sensitivities ws_->x_old.copy(ws_->sol.x); model_->fxdot(ws_->sol.t, ws_->sol.x, ws_->sol.dx, ws_->xdot); ws_->xdot_old.copy(ws_->xdot); } - if (solver_->computingFSA()) { + if (solver_->computing_fsa()) { // compute event-time derivative only for primary events, we get // into trouble with multiple simultaneously firing events here (but // is this really well-defined then?), in that case, just use the @@ -587,7 +588,7 @@ void EventHandlingSimulator::store_pre_event_state( for (int ie = 0; ie < model_->ne; ie++) { // only consider transitions false -> true if (ws_->roots_found.at(ie) == 1) { - model_->getEventTimeSensitivity( + model_->get_event_time_sensitivity( ws_->stau, ws_->sol.t, ie, ws_->sol.x, ws_->sol.sx, ws_->sol.dx ); @@ -598,11 +599,11 @@ void EventHandlingSimulator::store_pre_event_state( // t0 has no parameter dependency std::ranges::fill(ws_->stau, 0.0); } - } else if (solver_->computingASA()) { + } else if (solver_->computing_asa()) { result.discs.back().xdot_pre = ws_->xdot_old; result.discs.back().x_pre = ws_->x_old; - result.discs.back().h_pre = model_->getModelState().h; - result.discs.back().total_cl_pre = model_->getModelState().total_cl; + result.discs.back().h_pre = model_->get_model_state().h; + result.discs.back().total_cl_pre = model_->get_model_state().total_cl; } } @@ -646,8 +647,8 @@ int EventHandlingSimulator::detect_secondary_events() { if (secondevent > 0) { // Secondary events may result in wrong forward sensitivities // if the secondary event has a bolus... - if (solver_->computingFSA() && solver_->logger) - solver_->logger->log( + if (solver_->computing_fsa() && solver_->get_logger()) + solver_->get_logger()->log( LogSeverity::warning, "SECONDARY_EVENT", "Secondary event was triggered. Depending on " "the bolus of the secondary event, forward " @@ -666,15 +667,15 @@ void EventHandlingSimulator::handle_datapoint(realtype t) { } std::vector -ForwardProblem::getAdjointUpdates(Model& model, ExpData const& edata) { +ForwardProblem::get_adjoint_updates(Model& model, ExpData const& edata) { std::vector dJydx(model.nJ * model.nx_solver * model.nt(), 0.0); for (int it = 0; it < model.nt(); it++) { - if (std::isinf(model.getTimepoint(it))) + if (std::isinf(model.get_timepoint(it))) break; - model.getAdjointStateObservableUpdate( + model.get_adjoint_state_observable_update( slice(dJydx, it, model.nx_solver * model.nJ), it, - getSimulationStateTimepoint(it).sol.x, edata + get_simulation_state_timepoint(it).sol.x, edata ); } @@ -682,10 +683,10 @@ ForwardProblem::getAdjointUpdates(Model& model, ExpData const& edata) { // Complement dJydx from postequilibration. This shouldn't overwrite // anything but only fill in previously 0 values, as only non-inf // timepoints were filled above. - auto const& x = posteq_problem_->getState(); + auto const& x = posteq_problem_->get_state(); for (int it = 0; it < model.nt(); it++) { - if (std::isinf(model.getTimepoint(it))) { - model.getAdjointStateObservableUpdate( + if (std::isinf(model.get_timepoint(it))) { + model.get_adjoint_state_observable_update( slice(dJydx, it, model.nx_solver * model.nJ), it, x, edata ); } @@ -695,7 +696,7 @@ ForwardProblem::getAdjointUpdates(Model& model, ExpData const& edata) { } SimulationState EventHandlingSimulator::get_simulation_state() { - return {.sol = ws_->sol, .mod = model_->getModelState()}; + return {.sol = ws_->sol, .mod = model_->get_model_state()}; } std::vector compute_nroots( @@ -746,43 +747,44 @@ writeErrorString(std::string& errorString, SteadyStateStatus status) { } } -SteadystateProblem::SteadystateProblem( +SteadyStateProblem::SteadyStateProblem( FwdSimWorkspace* ws, Solver const& solver, Model& model, bool const is_preeq ) : is_preeq_(is_preeq) , ws_(ws) , wrms_computer_x_( - model.nx_solver, solver.getSunContext(), - solver.getAbsoluteToleranceSteadyState(), - solver.getRelativeToleranceSteadyState(), - AmiVector(model.get_steadystate_mask(), solver.getSunContext()) - ) - , newton_solver_( - NewtonSolver(model, solver.getLinearSolver(), solver.getSunContext()) + model.nx_solver, solver.get_sun_context(), + solver.get_absolute_tolerance_steady_state(), + solver.get_relative_tolerance_steady_state(), + AmiVector(model.get_steadystate_mask(), solver.get_sun_context()) ) + , newton_solver_(NewtonSolver( + model, solver.get_linear_solver(), solver.get_sun_context() + )) , newtons_method_( - &model, solver.getSunContext(), &newton_solver_, - solver.getNewtonDampingFactorMode(), - solver.getNewtonDampingFactorLowerBound(), solver.getNewtonMaxSteps(), - solver.getNewtonStepSteadyStateCheck() + &model, solver.get_sun_context(), &newton_solver_, + solver.get_newton_damping_factor_mode(), + solver.get_newton_damping_factor_lower_bound(), + solver.get_newton_max_steps(), + solver.get_newton_step_steady_state_check() ) - , newton_step_conv_(solver.getNewtonStepSteadyStateCheck()) + , newton_step_conv_(solver.get_newton_step_steady_state_check()) , solver_(&solver) , model_(&model) { // Check for compatibility of options - if (solver.getSensitivityMethod() == SensitivityMethod::forward - && solver.getSensitivityMethodPreequilibration() + if (solver.get_sensitivity_method() == SensitivityMethod::forward + && solver.get_sensitivity_method_pre_equilibration() == SensitivityMethod::adjoint - && solver.getSensitivityOrder() > SensitivityOrder::none) + && solver.get_sensitivity_order() > SensitivityOrder::none) throw AmiException( "Preequilibration using adjoint sensitivities " "is not compatible with using forward " "sensitivities during simulation" ); - if (solver.getSensitivityMethod() == SensitivityMethod::forward - && model.getSteadyStateComputationMode() + if (solver.get_sensitivity_method() == SensitivityMethod::forward + && model.get_steady_state_computation_mode() == SteadyStateComputationMode::newtonOnly - && model.getSteadyStateSensitivityMode() + && model.get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrationOnly) throw AmiException( "For forward sensitivity analysis steady-state " @@ -794,9 +796,7 @@ SteadystateProblem::SteadystateProblem( ); } -void SteadystateProblem::workSteadyStateProblem( - Solver& solver, int it, realtype t0 -) { +void SteadyStateProblem::run(Solver& solver, int it, realtype t0) { // Compute steady state, track computation time CpuTimer cpu_timer; ws_->sol.t = t0; @@ -804,22 +804,22 @@ void SteadystateProblem::workSteadyStateProblem( // store final results at exit, independent of success or failure auto const _ = gsl::finally([&]() { cpu_time_ = cpu_timer.elapsed_milliseconds(); - period_result_.final_state_.mod = model_->getModelState(); + period_result_.final_state_.mod = model_->get_model_state(); period_result_.final_state_.sol = ws_->sol; }); - flagUpdatedState(); + flag_updated_state(); newton_solver_.reinitialize(); - findSteadyState(it, t0); + find_steady_state(it, t0); // Check whether state sensitivities still need to be computed. // Did we already compute forward sensitivities? bool const forwardSensisAlreadyComputed - = solver.getSensitivityOrder() >= SensitivityOrder::first + = solver.get_sensitivity_order() >= SensitivityOrder::first && steady_state_status_[1] == SteadyStateStatus::success - && (model_->getSteadyStateSensitivityMode() + && (model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrationOnly - || model_->getSteadyStateSensitivityMode() + || model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrateIfNewtonFails); bool const simulationStartedInSteadystate = steady_state_status_[0] == SteadyStateStatus::success @@ -828,13 +828,13 @@ void SteadystateProblem::workSteadyStateProblem( // Do we need forward sensitivities for pre- or post-equilibration? bool const needForwardSensisPosteq = !is_preeq_ && !forwardSensisAlreadyComputed - && solver.getSensitivityOrder() >= SensitivityOrder::first - && solver.getSensitivityMethod() == SensitivityMethod::forward; + && solver.get_sensitivity_order() >= SensitivityOrder::first + && solver.get_sensitivity_method() == SensitivityMethod::forward; bool const needForwardSensisPreeq = is_preeq_ && !forwardSensisAlreadyComputed - && solver.getSensitivityMethodPreequilibration() + && solver.get_sensitivity_method_pre_equilibration() == SensitivityMethod::forward - && solver.getSensitivityOrder() >= SensitivityOrder::first; + && solver.get_sensitivity_order() >= SensitivityOrder::first; // Do we need to do the linear system solve to get forward sensitivities? if ((needForwardSensisPreeq || needForwardSensisPosteq) @@ -842,7 +842,7 @@ void SteadystateProblem::workSteadyStateProblem( try { // This might still fail, if the Jacobian is singular and // simulation did not find a steady state. - newton_solver_.computeNewtonSensis( + newton_solver_.compute_newton_sensis( ws_->sol.sx, *model_, {ws_->sol} ); } catch (NewtonFailure const&) { @@ -854,7 +854,7 @@ void SteadystateProblem::workSteadyStateProblem( } } -SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( +SteadyStateStatus SteadyStateProblem::find_steady_state_by_simulation( int const /*it*/, realtype const t0 ) { if (simulator_.has_value()) { @@ -864,7 +864,7 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( // might not have stored all required information for sensitivity // computation.) auto const& init_sim_state = simulator_->result.initial_state_; - model_->setModelState(init_sim_state.mod); + model_->set_model_state(init_sim_state.mod); ws_->sol = init_sim_state.sol; } @@ -876,23 +876,23 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( // if we aren't using ASA in combination with events. auto main_solver = solver_; auto new_solver = std::unique_ptr(main_solver->clone()); - new_solver->logger = main_solver->logger; + new_solver->set_logger(main_solver->get_logger()); // do we need sensitivities? - if (new_solver->getSensitivityOrder() >= SensitivityOrder::first - && (model_->getSteadyStateSensitivityMode() + if (new_solver->get_sensitivity_order() >= SensitivityOrder::first + && (model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrationOnly - || model_->getSteadyStateSensitivityMode() + || model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrateIfNewtonFails )) { // need FSA to compute sx0 for the pre/main simulation, // or enable ASA for backward integration of pre-equibration - new_solver->setSensitivityMethod( - new_solver->getSensitivityMethodPreequilibration() + new_solver->set_sensitivity_method( + new_solver->get_sensitivity_method_pre_equilibration() ); } else { - new_solver->setSensitivityMethod(SensitivityMethod::none); - new_solver->setSensitivityOrder(SensitivityOrder::none); + new_solver->set_sensitivity_method(SensitivityMethod::none); + new_solver->set_sensitivity_order(SensitivityOrder::none); } new_solver->setup( t0, model_, ws_->sol.x, ws_->sol.dx, ws_->sol.sx, ws_->sdx @@ -901,14 +901,14 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( solver_ = preeq_solver_unique_ptr_.get(); } - runSteadystateSimulationFwd(); + run_steadystate_simulation_fwd(); return SteadyStateStatus::success; } catch (IntegrationFailure const& ex) { switch (ex.error_code) { case AMICI_TOO_MUCH_WORK: - if (model_->logger) - model_->logger->log( + if (model_->get_logger()) + model_->get_logger()->log( LogSeverity::debug, "EQUILIBRATION_FAILURE", "AMICI equilibration exceeded maximum number of" " integration steps at t=%g.", @@ -916,8 +916,8 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( ); return SteadyStateStatus::failed_convergence; case AMICI_RHSFUNC_FAIL: - if (model_->logger) - model_->logger->log( + if (model_->get_logger()) + model_->get_logger()->log( LogSeverity::debug, "EQUILIBRATION_FAILURE", "AMICI equilibration was stopped after exceedingly" " long simulation time at t=%g.", @@ -925,16 +925,16 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( ); return SteadyStateStatus::failed_too_long_simulation; default: - if (model_->logger) - model_->logger->log( + if (model_->get_logger()) + model_->get_logger()->log( LogSeverity::debug, "OTHER", "AMICI equilibration failed at t=%g.", ex.time ); return SteadyStateStatus::failed; } } catch (AmiException const& ex) { - if (model_->logger) - model_->logger->log( + if (model_->get_logger()) + model_->get_logger()->log( LogSeverity::debug, "OTHER", "AMICI equilibration failed: %s", ex.what() ); @@ -942,7 +942,7 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( } } -[[noreturn]] void SteadystateProblem::handleSteadyStateFailure( +[[noreturn]] void SteadyStateProblem::handle_steady_state_failure( bool tried_newton_1, bool tried_simulation, bool tried_newton_2 ) const { // Throw error message according to error codes @@ -962,7 +962,7 @@ SteadyStateStatus SteadystateProblem::findSteadyStateBySimulation( throw AmiException(errorString.c_str()); } -realtype SteadystateProblem::getWrmsFSA(WRMSComputer& wrms_computer_sx) { +realtype SteadyStateProblem::get_wrms_fsa(WRMSComputer& wrms_computer_sx) { // Forward sensitivities: Compute weighted error norm for their RHS realtype wrms = 0.0; @@ -977,7 +977,7 @@ realtype SteadystateProblem::getWrmsFSA(WRMSComputer& wrms_computer_sx) { ws_->sol.dx, ws_->xdot ); if (newton_step_conv_) { - newton_solver_.solveLinearSystem(ws_->xdot); + newton_solver_.solve_linear_system(ws_->xdot); } wrms = wrms_computer_sx.wrms(ws_->xdot, ws_->sol.sx[ip]); // ideally this function would report the maximum of all wrms over @@ -992,7 +992,7 @@ realtype SteadystateProblem::getWrmsFSA(WRMSComputer& wrms_computer_sx) { return wrms; } -bool SteadystateProblem::checkSteadyStateSuccess() const { +bool SteadyStateProblem::check_steady_state_success() const { // Did one of the attempts yield a steady state? return std::ranges::any_of( steady_state_status_, [](SteadyStateStatus status @@ -1000,43 +1000,44 @@ bool SteadystateProblem::checkSteadyStateSuccess() const { ); } -void SteadystateProblem::runSteadystateSimulationFwd() { +void SteadyStateProblem::run_steadystate_simulation_fwd() { if (model_->nx_solver == 0) return; // Do we also have to check for convergence of sensitivities? auto sensitivity_method = SensitivityMethod::none; - if (solver_->getSensitivityOrder() > SensitivityOrder::none - && solver_->getSensitivityMethod() == SensitivityMethod::forward) { + if (solver_->get_sensitivity_order() > SensitivityOrder::none + && solver_->get_sensitivity_method() == SensitivityMethod::forward) { sensitivity_method = SensitivityMethod::forward; } // If forward sensitivity computation by simulation is disabled, // disable forward sensitivity integration in the solver. // Sensitivities will be computed by newtonsolver.computeNewtonSensis then. - if (model_->getSteadyStateSensitivityMode() + if (model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::newtonOnly) { - solver_->switchForwardSensisOff(); + solver_->switch_forward_sensis_off(); sensitivity_method = SensitivityMethod::none; } // function for sensitivity convergence check or dummy std::function sensi_converged; - if (solver_->getSensiSteadyStateCheck() + if (solver_->get_sensi_steady_state_check() && sensitivity_method == SensitivityMethod::forward) { sensi_converged = - [&, wrms_computer_sx = WRMSComputer( - model_->nx_solver, solver_->getSunContext(), - solver_->getAbsoluteToleranceSteadyStateSensi(), - solver_->getRelativeToleranceSteadyStateSensi(), - AmiVector( - model_->get_steadystate_mask(), solver_->getSunContext() - ) - )]() mutable -> bool { - updateSensiSimulation(); + [&, + wrms_computer_sx = WRMSComputer( + model_->nx_solver, solver_->get_sun_context(), + solver_->get_absolute_tolerance_steady_state_sensi(), + solver_->get_relative_tolerance_steady_state_sensi(), + AmiVector( + model_->get_steadystate_mask(), solver_->get_sun_context() + ) + )]() mutable -> bool { + update_sensi_simulation(); // getWrms needs to be called before getWrmsFSA // such that the linear system is prepared for newton-type // convergence check - return getWrmsFSA(wrms_computer_sx) < conv_thresh; + return get_wrms_fsa(wrms_computer_sx) < conv_thresh; }; } else { sensi_converged = []() { return true; }; @@ -1059,8 +1060,8 @@ void SteadystateProblem::runSteadystateSimulationFwd() { auto check_convergence = [&](bool state_changed) { if (state_changed) { // update current solution - flagUpdatedState(); - updateRightHandSide(); + flag_updated_state(); + update_rhs(); } wrms_ = get_wrms_state(); if (wrms_ < conv_thresh && sensi_converged()) { @@ -1072,7 +1073,7 @@ void SteadystateProblem::runSteadystateSimulationFwd() { // Create a new simulator that uses the (potentially changed) solver // with the right sensitivity settings. simulator_.emplace(model_, solver_, ws_, nullptr); - simulator_->result.initial_state_.mod = model_->getModelState(); + simulator_->result.initial_state_.mod = model_->get_model_state(); simulator_->result.initial_state_.sol = ws_->sol; // store results on (any) exit @@ -1080,7 +1081,7 @@ void SteadystateProblem::runSteadystateSimulationFwd() { simulator_->handle_initial_events(nullptr); - updateRightHandSide(); + update_rhs(); int const convergence_check_frequency = newton_step_conv_ ? 25 : 1; @@ -1089,15 +1090,15 @@ void SteadystateProblem::runSteadystateSimulationFwd() { ); if (numsteps_.at(1)) { - flagUpdatedState(); + flag_updated_state(); } // if check_sensi_conv_ is deactivated, we still have to update sensis if (sensitivity_method == SensitivityMethod::forward) - updateSensiSimulation(); + update_sensi_simulation(); } -void SteadystateProblem::findSteadyState(int it, realtype t0) { +void SteadyStateProblem::find_steady_state(int it, realtype t0) { steady_state_status_.resize(3, SteadyStateStatus::not_run); // Turn off Newton's method if 'integrationOnly' approach is chosen for // steady-state computation or newton_maxsteps is set to 0 or @@ -1108,48 +1109,50 @@ void SteadystateProblem::findSteadyState(int it, realtype t0) { // chosen for sensitivity computation it is enforced that steady state is // computed only by numerical integration as well. bool const turnOffNewton - = model_->getSteadyStateComputationMode() + = model_->get_steady_state_computation_mode() == SteadyStateComputationMode::integrationOnly - || solver_->getNewtonMaxSteps() == 0 - || (solver_->getSensitivityOrder() >= SensitivityOrder::first - && model_->getSteadyStateSensitivityMode() + || solver_->get_newton_max_steps() == 0 + || (solver_->get_sensitivity_order() >= SensitivityOrder::first + && model_->get_steady_state_sensitivity_mode() == SteadyStateSensitivityMode::integrationOnly && ((is_preeq_ - && solver_->getSensitivityMethodPreequilibration() + && solver_->get_sensitivity_method_pre_equilibration() == SensitivityMethod::forward) - || solver_->getSensitivityMethod() + || solver_->get_sensitivity_method() == SensitivityMethod::forward)); - bool const turnOffSimulation = model_->getSteadyStateComputationMode() + bool const turnOffSimulation = model_->get_steady_state_computation_mode() == SteadyStateComputationMode::newtonOnly; // First, try to run the Newton solver. if (!turnOffNewton) - findSteadyStateByNewtonsMethod(false); + find_steady_state_by_newtons_method(false); // Newton solver didn't work, so try to simulate to steady state. - if (!turnOffSimulation && !checkSteadyStateSuccess()) - steady_state_status_[1] = findSteadyStateBySimulation(it, t0); + if (!turnOffSimulation && !check_steady_state_success()) + steady_state_status_[1] = find_steady_state_by_simulation(it, t0); /* Simulation didn't work, retry the Newton solver from last sim state. */ - if (!turnOffNewton && !turnOffSimulation && !checkSteadyStateSuccess()) - findSteadyStateByNewtonsMethod(true); + if (!turnOffNewton && !turnOffSimulation && !check_steady_state_success()) + find_steady_state_by_newtons_method(true); // Nothing worked, throw an as informative error as possible. - if (!checkSteadyStateSuccess()) - handleSteadyStateFailure( + if (!check_steady_state_success()) + handle_steady_state_failure( !turnOffNewton, !turnOffSimulation, !turnOffNewton && !turnOffSimulation ); } -void SteadystateProblem::findSteadyStateByNewtonsMethod(bool newton_retry) { +void SteadyStateProblem::find_steady_state_by_newtons_method( + bool newton_retry +) { // store initial state and handle initial events, unless that was already // done during a previous (failed) simulation if (!newton_retry) { simulator_.emplace(model_, solver_, ws_, nullptr); // store initial state - simulator_->result.initial_state_.mod = model_->getModelState(); + simulator_->result.initial_state_.mod = model_->get_model_state(); simulator_->result.initial_state_.sol = ws_->sol; simulator_->handle_initial_events(nullptr); @@ -1162,11 +1165,11 @@ void SteadystateProblem::findSteadyStateByNewtonsMethod(bool newton_retry) { int const stage = newton_retry ? 2 : 0; try { - updateRightHandSide(); + update_rhs(); newtons_method_.run(ws_->xdot, {ws_->sol}, wrms_computer_x_); steady_state_status_[stage] = SteadyStateStatus::success; // store final state - period_result_.final_state_.mod = model_->getModelState(); + period_result_.final_state_.mod = model_->get_model_state(); period_result_.final_state_.sol = ws_->sol; } catch (NewtonFailure const& ex) { switch (ex.error_code) { @@ -1191,22 +1194,22 @@ void SteadystateProblem::findSteadyStateByNewtonsMethod(bool newton_retry) { } numsteps_.at(stage) = newtons_method_.get_num_steps(); wrms_ = newtons_method_.get_wrms(); - flagUpdatedState(); + flag_updated_state(); } -void SteadystateProblem::flagUpdatedState() { +void SteadyStateProblem::flag_updated_state() { xdot_updated_ = false; sensis_updated_ = false; } -void SteadystateProblem::updateSensiSimulation() { +void SteadyStateProblem::update_sensi_simulation() { if (sensis_updated_) return; - ws_->sol.sx = solver_->getStateSensitivity(ws_->sol.t); + ws_->sol.sx = solver_->get_state_sensitivity(ws_->sol.t); sensis_updated_ = true; } -void SteadystateProblem::updateRightHandSide() { +void SteadyStateProblem::update_rhs() { if (xdot_updated_) return; model_->fxdot(ws_->sol.t, ws_->sol.x, ws_->sol.dx, ws_->xdot); diff --git a/src/hdf5.cpp b/src/hdf5.cpp index 50c5997793..5034f0927d 100644 --- a/src/hdf5.cpp +++ b/src/hdf5.cpp @@ -62,15 +62,15 @@ void checkEventDimensionsCompatible( // if this is rank 1, n and m can be swapped if (n == 1) { compatible - &= (n == (unsigned)model.nMaxEvent() || n == (unsigned)model.nztrue - ); + &= (n == (unsigned)model.n_max_event() + || n == (unsigned)model.nztrue); compatible - &= (m == (unsigned)model.nztrue || m == (unsigned)model.nMaxEvent() - ); - compatible &= (m * n == (unsigned)model.nytrue * model.nMaxEvent()); + &= (m == (unsigned)model.nztrue + || m == (unsigned)model.n_max_event()); + compatible &= (m * n == (unsigned)model.nytrue * model.n_max_event()); } else { compatible &= (n == (unsigned)model.nztrue); - compatible &= (m == (unsigned)model.nMaxEvent()); + compatible &= (m == (unsigned)model.n_max_event()); } if (!compatible) @@ -80,7 +80,7 @@ void checkEventDimensionsCompatible( )); } -void createGroup( +void create_group( H5::H5File const& file, std::string const& groupPath, bool recursively ) { #if H5_VERSION_GE(1, 10, 6) @@ -109,7 +109,7 @@ void createGroup( #endif } -std::unique_ptr readSimulationExpData( +std::unique_ptr read_exp_data_from_hdf5( std::string const& hdf5Filename, std::string const& hdf5Root, Model const& model ) { @@ -119,26 +119,26 @@ std::unique_ptr readSimulationExpData( auto edata = std::make_unique(model); - if (attributeExists(file, hdf5Root, "id")) { - edata->id = getStringAttribute(file, hdf5Root, "id"); + if (attribute_exists(file, hdf5Root, "id")) { + edata->id = get_string_attribute(file, hdf5Root, "id"); } if (model.ny * model.nt() > 0) { - if (locationExists(file, hdf5Root + "/Y")) { - auto const my = getDoubleDataset2D(file, hdf5Root + "/Y", m, n); + if (location_exists(file, hdf5Root + "/Y")) { + auto const my = get_double_2d_dataset(file, hdf5Root + "/Y", m, n); checkMeasurementDimensionsCompatible(m, n, model); - edata->setObservedData(my); + edata->set_observed_data(my); } else { throw AmiException( "Missing %s/Y in %s", hdf5Root.c_str(), hdf5Filename.c_str() ); } - if (locationExists(file, hdf5Root + "/Sigma_Y")) { + if (location_exists(file, hdf5Root + "/Sigma_Y")) { auto const sigmay - = getDoubleDataset2D(file, hdf5Root + "/Sigma_Y", m, n); + = get_double_2d_dataset(file, hdf5Root + "/Sigma_Y", m, n); checkMeasurementDimensionsCompatible(m, n, model); - edata->setObservedDataStdDev(sigmay); + edata->set_observed_data_std_dev(sigmay); } else { throw AmiException( "Missing %s/Sigma_Y in %s", hdf5Root.c_str(), @@ -147,21 +147,22 @@ std::unique_ptr readSimulationExpData( } } - if (model.nz * model.nMaxEvent() > 0) { - if (locationExists(file, hdf5Root + "/Z")) { - auto const mz = getDoubleDataset2D(file, hdf5Root + "/Z", m, n); + if (model.nz * model.n_max_event() > 0) { + if (location_exists(file, hdf5Root + "/Z")) { + auto const mz = get_double_2d_dataset(file, hdf5Root + "/Z", m, n); checkEventDimensionsCompatible(m, n, model); - edata->setObservedEvents(mz); + edata->set_observed_events(mz); } else { throw AmiException( "Missing %s/Z in %s", hdf5Root.c_str(), hdf5Filename.c_str() ); } - if (locationExists(file, hdf5Root + "/Sigma_Z")) { - auto sigmaz = getDoubleDataset2D(file, hdf5Root + "/Sigma_Z", m, n); + if (location_exists(file, hdf5Root + "/Sigma_Z")) { + auto sigmaz + = get_double_2d_dataset(file, hdf5Root + "/Sigma_Z", m, n); checkEventDimensionsCompatible(m, n, model); - edata->setObservedEventsStdDev(sigmaz); + edata->set_observed_events_std_dev(sigmaz); } else { throw AmiException( "Missing %s/Sigma_Z in %s", hdf5Root.c_str(), @@ -170,161 +171,169 @@ std::unique_ptr readSimulationExpData( } } - if (locationExists(file, hdf5Root + "/condition")) { - edata->fixedParameters - = getDoubleDataset1D(file, hdf5Root + "/condition"); + if (location_exists(file, hdf5Root + "/condition")) { + edata->fixed_parameters + = get_double_1d_dataset(file, hdf5Root + "/condition"); } - if (locationExists(file, hdf5Root + "/conditionPreequilibration")) { - edata->fixedParametersPreequilibration - = getDoubleDataset1D(file, hdf5Root + "/conditionPreequilibration"); + if (location_exists(file, hdf5Root + "/conditionPreequilibration")) { + edata->fixed_parameters_pre_equilibration = get_double_1d_dataset( + file, hdf5Root + "/conditionPreequilibration" + ); } - if (locationExists(file, hdf5Root + "/conditionPresimulation")) { - edata->fixedParametersPresimulation - = getDoubleDataset1D(file, hdf5Root + "/conditionPresimulation"); + if (location_exists(file, hdf5Root + "/conditionPresimulation")) { + edata->fixed_parameters_presimulation + = get_double_1d_dataset(file, hdf5Root + "/conditionPresimulation"); } - if (attributeExists(file, hdf5Root, "t_presim")) { - edata->t_presim = getDoubleScalarAttribute(file, hdf5Root, "t_presim"); + if (attribute_exists(file, hdf5Root, "t_presim")) { + edata->t_presim + = get_double_scalar_attribute(file, hdf5Root, "t_presim"); } - if (locationExists(file, hdf5Root + "/ts")) { - edata->setTimepoints(getDoubleDataset1D(file, hdf5Root + "/ts")); + if (location_exists(file, hdf5Root + "/ts")) { + edata->set_timepoints(get_double_1d_dataset(file, hdf5Root + "/ts")); } - if (attributeExists( + if (attribute_exists( file, hdf5Root, "/reinitializeFixedParameterInitialStates" )) { - edata->reinitializeFixedParameterInitialStates - = static_cast(getIntScalarAttribute( + edata->reinitialize_fixed_parameter_initial_states + = static_cast(get_int_scalar_attribute( file, hdf5Root, "/reinitializeFixedParameterInitialStates" )); } - if (locationExists(file, hdf5Root + "/parameters")) { - edata->parameters = getDoubleDataset1D(file, hdf5Root + "/parameters"); + if (location_exists(file, hdf5Root + "/parameters")) { + edata->parameters + = get_double_1d_dataset(file, hdf5Root + "/parameters"); } - if (locationExists(file, hdf5Root + "/x0")) { - edata->x0 = getDoubleDataset1D(file, hdf5Root + "/x0"); + if (location_exists(file, hdf5Root + "/x0")) { + edata->x0 = get_double_1d_dataset(file, hdf5Root + "/x0"); } - if (locationExists(file, hdf5Root + "/sx0")) { - edata->sx0 = getDoubleDataset1D(file, hdf5Root + "/sx0"); + if (location_exists(file, hdf5Root + "/sx0")) { + edata->sx0 = get_double_1d_dataset(file, hdf5Root + "/sx0"); } - if (locationExists(file, hdf5Root + "/pscale")) { - auto pscaleInt = getIntDataset1D(file, hdf5Root + "/pscale"); + if (location_exists(file, hdf5Root + "/pscale")) { + auto pscaleInt = get_int_1d_dataset(file, hdf5Root + "/pscale"); edata->pscale.resize(pscaleInt.size()); for (int i = 0; (unsigned)i < pscaleInt.size(); ++i) edata->pscale[i] = static_cast(pscaleInt[i]); } - if (locationExists(file, hdf5Root + "/plist")) { - edata->plist = getIntDataset1D(file, hdf5Root + "/plist"); + if (location_exists(file, hdf5Root + "/plist")) { + edata->plist = get_int_1d_dataset(file, hdf5Root + "/plist"); } - if (locationExists( + if (location_exists( file, hdf5Root + "/reinitialization_state_idxs_presim" )) { - edata->reinitialization_state_idxs_presim = getIntDataset1D( + edata->reinitialization_state_idxs_presim = get_int_1d_dataset( file, hdf5Root + "/reinitialization_state_idxs_presim" ); } - if (locationExists(file, hdf5Root + "/reinitialization_state_idxs_sim")) { - edata->reinitialization_state_idxs_sim = getIntDataset1D( + if (location_exists(file, hdf5Root + "/reinitialization_state_idxs_sim")) { + edata->reinitialization_state_idxs_sim = get_int_1d_dataset( file, hdf5Root + "/reinitialization_state_idxs_sim" ); } - if (attributeExists(file, hdf5Root, "tstart")) { - edata->tstart_ = getDoubleScalarAttribute(file, hdf5Root, "tstart"); + if (attribute_exists(file, hdf5Root, "tstart")) { + edata->t_start = get_double_scalar_attribute(file, hdf5Root, "tstart"); } - if (attributeExists(file, hdf5Root, "tstart_preeq")) { - edata->tstart_preeq_ - = getDoubleScalarAttribute(file, hdf5Root, "tstart_preeq"); + if (attribute_exists(file, hdf5Root, "tstart_preeq")) { + edata->t_start_preeq + = get_double_scalar_attribute(file, hdf5Root, "tstart_preeq"); } return edata; } -void writeSimulationExpData( +void write_exp_data_to_hdf5( ExpData const& edata, H5::H5File const& file, std::string const& hdf5Location ) { - if (!locationExists(file, hdf5Location)) - createGroup(file, hdf5Location); + if (!location_exists(file, hdf5Location)) + create_group(file, hdf5Location); H5LTset_attribute_string( file.getId(), hdf5Location.c_str(), "id", edata.id.c_str() ); if (edata.nt()) - createAndWriteDouble1DDataset( - file, hdf5Location + "/ts", edata.getTimepoints() + create_and_write_double_1d_dataset( + file, hdf5Location + "/ts", edata.get_timepoints() ); - if (!edata.fixedParameters.empty()) - createAndWriteDouble1DDataset( - file, hdf5Location + "/condition", edata.fixedParameters + if (!edata.fixed_parameters.empty()) + create_and_write_double_1d_dataset( + file, hdf5Location + "/condition", edata.fixed_parameters ); - if (!edata.fixedParametersPreequilibration.empty()) - createAndWriteDouble1DDataset( + if (!edata.fixed_parameters_pre_equilibration.empty()) + create_and_write_double_1d_dataset( file, hdf5Location + "/conditionPreequilibration", - edata.fixedParametersPreequilibration + edata.fixed_parameters_pre_equilibration ); - if (!edata.fixedParametersPresimulation.empty()) - createAndWriteDouble1DDataset( + if (!edata.fixed_parameters_presimulation.empty()) + create_and_write_double_1d_dataset( file, hdf5Location + "/conditionPresimulation", - edata.fixedParametersPresimulation + edata.fixed_parameters_presimulation ); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "t_presim", &edata.t_presim, 1 ); - if (!edata.getObservedData().empty()) - createAndWriteDouble2DDataset( - file, hdf5Location + "/Y", edata.getObservedData(), edata.nt(), + if (!edata.get_observed_data().empty()) + create_and_write_double_2d_dataset( + file, hdf5Location + "/Y", edata.get_observed_data(), edata.nt(), edata.nytrue() ); - if (!edata.getObservedDataStdDev().empty()) - createAndWriteDouble2DDataset( - file, hdf5Location + "/Sigma_Y", edata.getObservedDataStdDev(), + if (!edata.get_observed_data_std_dev().empty()) + create_and_write_double_2d_dataset( + file, hdf5Location + "/Sigma_Y", edata.get_observed_data_std_dev(), edata.nt(), edata.nytrue() ); - if (!edata.getObservedEvents().empty()) - createAndWriteDouble2DDataset( - file, hdf5Location + "/Z", edata.getObservedEvents(), + if (!edata.get_observed_events().empty()) + create_and_write_double_2d_dataset( + file, hdf5Location + "/Z", edata.get_observed_events(), edata.nmaxevent(), edata.nztrue() ); - if (!edata.getObservedEventsStdDev().empty()) - createAndWriteDouble2DDataset( - file, hdf5Location + "/Sigma_Z", edata.getObservedEventsStdDev(), - edata.nmaxevent(), edata.nztrue() + if (!edata.get_observed_events_std_dev().empty()) + create_and_write_double_2d_dataset( + file, hdf5Location + "/Sigma_Z", + edata.get_observed_events_std_dev(), edata.nmaxevent(), + edata.nztrue() ); - int int_attr = edata.reinitializeFixedParameterInitialStates; + int int_attr = edata.reinitialize_fixed_parameter_initial_states; H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "reinitializeFixedParameterInitialStates", &int_attr, 1 ); if (!edata.parameters.empty()) - createAndWriteDouble1DDataset( + create_and_write_double_1d_dataset( file, hdf5Location + "/parameters", edata.parameters ); if (!edata.x0.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/x0", edata.x0); + create_and_write_double_1d_dataset( + file, hdf5Location + "/x0", edata.x0 + ); if (!edata.sx0.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/sx0", edata.sx0); + create_and_write_double_1d_dataset( + file, hdf5Location + "/sx0", edata.sx0 + ); std::vector int_buffer; @@ -332,14 +341,18 @@ void writeSimulationExpData( int_buffer.resize(edata.pscale.size()); for (int i = 0; (unsigned)i < edata.pscale.size(); i++) int_buffer[i] = static_cast(edata.pscale[i]); - createAndWriteInt1DDataset(file, hdf5Location + "/pscale", int_buffer); + create_and_write_int_1d_dataset( + file, hdf5Location + "/pscale", int_buffer + ); } if (!edata.plist.empty()) { int_buffer.resize(edata.plist.size()); for (int i = 0; (unsigned)i < edata.plist.size(); i++) int_buffer[i] = static_cast(edata.plist[i]); - createAndWriteInt1DDataset(file, hdf5Location + "/plist", int_buffer); + create_and_write_int_1d_dataset( + file, hdf5Location + "/plist", int_buffer + ); } if (!edata.reinitialization_state_idxs_presim.empty()) { @@ -348,7 +361,7 @@ void writeSimulationExpData( (unsigned)i < edata.reinitialization_state_idxs_presim.size(); i++) int_buffer[i] = static_cast(edata.reinitialization_state_idxs_presim[i]); - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/reinitialization_state_idxs_presim", int_buffer ); @@ -360,31 +373,31 @@ void writeSimulationExpData( (unsigned)i < edata.reinitialization_state_idxs_sim.size(); i++) int_buffer[i] = static_cast(edata.reinitialization_state_idxs_sim[i]); - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/reinitialization_state_idxs_sim", int_buffer ); } H5LTset_attribute_double( - file.getId(), hdf5Location.c_str(), "tstart", &edata.tstart_, 1 + file.getId(), hdf5Location.c_str(), "tstart", &edata.t_start, 1 ); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "tstart_preeq", - &edata.tstart_preeq_, 1 + &edata.t_start_preeq, 1 ); } -void writeReturnData( +void write_return_data_to_hdf5( ReturnData const& rdata, H5::H5File const& file, std::string const& hdf5Location ) { - if (!locationExists(file, hdf5Location)) - createGroup(file, hdf5Location); + if (!location_exists(file, hdf5Location)) + create_group(file, hdf5Location); if (!rdata.ts.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/t", rdata.ts); + create_and_write_double_1d_dataset(file, hdf5Location + "/t", rdata.ts); H5LTset_attribute_string( file.getId(), hdf5Location.c_str(), "id", rdata.id.c_str() @@ -402,102 +415,108 @@ void writeReturnData( ); if (!rdata.sllh.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/sllh", rdata.sllh); + create_and_write_double_1d_dataset( + file, hdf5Location + "/sllh", rdata.sllh + ); if (!rdata.res.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/res", rdata.res); + create_and_write_double_1d_dataset( + file, hdf5Location + "/res", rdata.res + ); if (!rdata.sres.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/sres", rdata.sres, rdata.nt * rdata.nytrue, rdata.nplist ); if (!rdata.FIM.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/FIM", rdata.FIM, rdata.nplist, rdata.nplist ); if (!rdata.x0.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/x0", rdata.x0); + create_and_write_double_1d_dataset( + file, hdf5Location + "/x0", rdata.x0 + ); if (!rdata.x.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/x", rdata.x, rdata.nt, rdata.nx_rdata ); if (!rdata.y.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/y", rdata.y, rdata.nt, rdata.ny ); if (!rdata.w.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/w", rdata.w, rdata.nt, rdata.nw ); if (!rdata.z.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/z", rdata.z, rdata.nmaxevent, rdata.nz ); if (!rdata.rz.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/rz", rdata.rz, rdata.nmaxevent, rdata.nz ); if (!rdata.sigmay.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/sigmay", rdata.sigmay, rdata.nt, rdata.ny ); if (!rdata.sigmaz.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/sigmaz", rdata.sigmaz, rdata.nmaxevent, rdata.nz ); if (!rdata.s2llh.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/s2llh", rdata.s2llh, rdata.nJ - 1, rdata.nplist ); if (!rdata.sx0.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/sx0", rdata.sx0, rdata.nplist, rdata.nx_rdata ); if (!rdata.sx.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/sx", rdata.sx, rdata.nt, rdata.nplist, rdata.nx_rdata ); if (!rdata.sy.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/sy", rdata.sy, rdata.nt, rdata.nplist, rdata.ny ); if (!rdata.ssigmay.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/ssigmay", rdata.ssigmay, rdata.nt, rdata.nplist, rdata.ny ); if (!rdata.sz.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/sz", rdata.sz, rdata.nmaxevent, rdata.nplist, rdata.nz ); if (!rdata.srz.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/srz", rdata.srz, rdata.nmaxevent, rdata.nplist, rdata.nz ); if (!rdata.ssigmaz.empty()) - createAndWriteDouble3DDataset( + create_and_write_double_3d_dataset( file, hdf5Location + "/ssigmaz", rdata.ssigmaz, rdata.nmaxevent, rdata.nplist, rdata.nz ); @@ -543,86 +562,92 @@ void writeReturnData( int_buffer.resize(rdata.pscale.size()); for (int i = 0; (unsigned)i < rdata.pscale.size(); i++) int_buffer[i] = static_cast(rdata.pscale[i]); - createAndWriteInt1DDataset(file, hdf5Location + "/pscale", int_buffer); + create_and_write_int_1d_dataset( + file, hdf5Location + "/pscale", int_buffer + ); } - writeLogItemsToHDF5(file, rdata.messages, hdf5Location + "/messages"); + write_log_items_to_hdf5(file, rdata.messages, hdf5Location + "/messages"); - writeReturnDataDiagnosis(rdata, file, hdf5Location + "/diagnosis"); + write_return_data_diagnosis(rdata, file, hdf5Location + "/diagnosis"); } -void writeReturnDataDiagnosis( +void write_return_data_diagnosis( ReturnData const& rdata, H5::H5File const& file, std::string const& hdf5Location ) { - if (!locationExists(file, hdf5Location)) - createGroup(file, hdf5Location); + if (!location_exists(file, hdf5Location)) + create_group(file, hdf5Location); if (!rdata.xdot.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/xdot", rdata.xdot); + create_and_write_double_1d_dataset( + file, hdf5Location + "/xdot", rdata.xdot + ); if (!rdata.numsteps.empty()) - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/numsteps", rdata.numsteps ); - if (!rdata.numrhsevals.empty()) - createAndWriteInt1DDataset( - file, hdf5Location + "/numrhsevals", rdata.numrhsevals + if (!rdata.num_rhs_evals.empty()) + create_and_write_int_1d_dataset( + file, hdf5Location + "/numrhsevals", rdata.num_rhs_evals ); - if (!rdata.numerrtestfails.empty()) - createAndWriteInt1DDataset( - file, hdf5Location + "/numerrtestfails", rdata.numerrtestfails + if (!rdata.num_err_test_fails.empty()) + create_and_write_int_1d_dataset( + file, hdf5Location + "/numerrtestfails", rdata.num_err_test_fails ); - if (!rdata.numnonlinsolvconvfails.empty()) - createAndWriteInt1DDataset( + if (!rdata.num_non_lin_solv_conv_fails.empty()) + create_and_write_int_1d_dataset( file, hdf5Location + "/numnonlinsolvconvfails", - rdata.numnonlinsolvconvfails + rdata.num_non_lin_solv_conv_fails ); if (!rdata.order.empty()) - createAndWriteInt1DDataset(file, hdf5Location + "/order", rdata.order); + create_and_write_int_1d_dataset( + file, hdf5Location + "/order", rdata.order + ); - if (!rdata.numstepsB.empty()) - createAndWriteInt1DDataset( - file, hdf5Location + "/numstepsB", rdata.numstepsB + if (!rdata.numsteps_b.empty()) + create_and_write_int_1d_dataset( + file, hdf5Location + "/numstepsB", rdata.numsteps_b ); - if (!rdata.numrhsevalsB.empty()) - createAndWriteInt1DDataset( - file, hdf5Location + "/numrhsevalsB", rdata.numrhsevalsB + if (!rdata.num_rhs_evals_b.empty()) + create_and_write_int_1d_dataset( + file, hdf5Location + "/numrhsevalsB", rdata.num_rhs_evals_b ); - if (!rdata.numerrtestfailsB.empty()) - createAndWriteInt1DDataset( - file, hdf5Location + "/numerrtestfailsB", rdata.numerrtestfailsB + if (!rdata.num_err_test_fails_b.empty()) + create_and_write_int_1d_dataset( + file, hdf5Location + "/numerrtestfailsB", rdata.num_err_test_fails_b ); - if (!rdata.numnonlinsolvconvfailsB.empty()) - createAndWriteInt1DDataset( + if (!rdata.num_non_lin_solv_conv_fails_b.empty()) + create_and_write_int_1d_dataset( file, hdf5Location + "/numnonlinsolvconvfailsB", - rdata.numnonlinsolvconvfailsB + rdata.num_non_lin_solv_conv_fails_b ); if (!rdata.preeq_status.empty()) { std::vector preeq_status_int(rdata.preeq_status.size()); for (int i = 0; (unsigned)i < rdata.preeq_status.size(); i++) preeq_status_int[i] = static_cast(rdata.preeq_status[i]); - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/preeq_status", preeq_status_int ); } if (!rdata.preeq_numsteps.empty()) - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/preeq_numsteps", rdata.preeq_numsteps ); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "preeq_numstepsB", - &rdata.preeq_numstepsB, 1 + &rdata.preeq_numsteps_b, 1 ); H5LTset_attribute_double( @@ -632,7 +657,7 @@ void writeReturnDataDiagnosis( H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "preeq_cpu_timeB", - &rdata.preeq_cpu_timeB, 1 + &rdata.preeq_cpu_time_b, 1 ); H5LTset_attribute_double( @@ -647,19 +672,19 @@ void writeReturnDataDiagnosis( std::vector posteq_status_int(rdata.posteq_status.size()); for (int i = 0; (unsigned)i < rdata.posteq_status.size(); i++) posteq_status_int[i] = static_cast(rdata.posteq_status[i]); - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/posteq_status", posteq_status_int ); } if (!rdata.posteq_numsteps.empty()) - createAndWriteInt1DDataset( + create_and_write_int_1d_dataset( file, hdf5Location + "/posteq_numsteps", rdata.posteq_numsteps ); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "posteq_numstepsB", - &rdata.posteq_numstepsB, 1 + &rdata.posteq_numsteps_b, 1 ); H5LTset_attribute_double( @@ -669,7 +694,7 @@ void writeReturnDataDiagnosis( H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "posteq_cpu_timeB", - &rdata.posteq_cpu_timeB, 1 + &rdata.posteq_cpu_time_b, 1 ); H5LTset_attribute_double( @@ -685,7 +710,7 @@ void writeReturnDataDiagnosis( ); H5LTset_attribute_double( - file.getId(), hdf5Location.c_str(), "cpu_timeB", &rdata.cpu_timeB, 1 + file.getId(), hdf5Location.c_str(), "cpu_timeB", &rdata.cpu_time_b, 1 ); H5LTset_attribute_double( @@ -698,15 +723,17 @@ void writeReturnDataDiagnosis( ); if (!rdata.J.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/J", rdata.J, rdata.nx_rdata, rdata.nx_rdata ); if (!rdata.x_ss.empty()) - createAndWriteDouble1DDataset(file, hdf5Location + "/x_ss", rdata.x_ss); + create_and_write_double_1d_dataset( + file, hdf5Location + "/x_ss", rdata.x_ss + ); if (!rdata.sx_ss.empty()) - createAndWriteDouble2DDataset( + create_and_write_double_2d_dataset( file, hdf5Location + "/sx_ss", rdata.sx_ss, rdata.nplist, rdata.nx_rdata ); @@ -719,7 +746,7 @@ struct LogItemCStr { char const* message; }; -void writeLogItemsToHDF5( +void write_log_items_to_hdf5( H5::H5File const& file, std::vector const& logItems, std::string const& hdf5Location ) { @@ -781,16 +808,16 @@ void writeLogItemsToHDF5( } } -void writeReturnData( +void write_return_data_to_hdf5( ReturnData const& rdata, std::string const& hdf5Filename, std::string const& hdf5Location ) { - auto file = createOrOpenForWriting(hdf5Filename); + auto file = create_or_open_for_writing(hdf5Filename); - writeReturnData(rdata, file, hdf5Location); + write_return_data_to_hdf5(rdata, file, hdf5Location); } -std::string getStringAttribute( +std::string get_string_attribute( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ) { @@ -825,7 +852,7 @@ std::string getStringAttribute( return {value.data()}; } -double getDoubleScalarAttribute( +double get_double_scalar_attribute( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ) { @@ -848,7 +875,7 @@ double getDoubleScalarAttribute( return data; } -int getIntScalarAttribute( +int get_int_scalar_attribute( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ) { @@ -870,7 +897,7 @@ int getIntScalarAttribute( return data; } -void createAndWriteInt1DDataset( +void create_and_write_int_1d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span const buffer ) { @@ -882,7 +909,7 @@ void createAndWriteInt1DDataset( dataset.write(buffer.data(), H5::PredType::NATIVE_INT); } -void createAndWriteDouble1DDataset( +void create_and_write_double_1d_dataset( const H5::H5File& file, std::string const& datasetName, gsl::span buffer ) { @@ -894,7 +921,7 @@ void createAndWriteDouble1DDataset( dataset.write(buffer.data(), H5::PredType::NATIVE_DOUBLE); } -void createAndWriteDouble2DDataset( +void create_and_write_double_2d_dataset( const H5::H5File& file, std::string const& datasetName, gsl::span const buffer, hsize_t const m, hsize_t const n ) { @@ -907,7 +934,7 @@ void createAndWriteDouble2DDataset( dataset.write(buffer.data(), H5::PredType::NATIVE_DOUBLE); } -void createAndWriteInt2DDataset( +void create_and_write_int_2d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span const buffer, hsize_t const m, hsize_t const n ) { @@ -920,7 +947,7 @@ void createAndWriteInt2DDataset( dataset.write(buffer.data(), H5::PredType::NATIVE_INT); } -void createAndWriteDouble3DDataset( +void create_and_write_double_3d_dataset( H5::H5File const& file, std::string const& datasetName, gsl::span const buffer, hsize_t const m, hsize_t const n, hsize_t const o @@ -934,7 +961,7 @@ void createAndWriteDouble3DDataset( dataset.write(buffer.data(), H5::PredType::NATIVE_DOUBLE); } -bool attributeExists( +bool attribute_exists( H5::H5File const& file, std::string const& optionsObject, std::string const& attributeName ) { @@ -946,7 +973,7 @@ bool attributeExists( return result > 0; } -bool attributeExists( +bool attribute_exists( H5::H5Object const& object, std::string const& attributeName ) { AMICI_H5_SAVE_ERROR_HANDLER; @@ -955,462 +982,469 @@ bool attributeExists( return result > 0; } -void writeSolverSettingsToHDF5( +void write_solver_settings_to_hdf5( Solver const& solver, std::string const& hdf5Filename, std::string const& hdf5Location ) { - auto const file = createOrOpenForWriting(hdf5Filename); + auto const file = create_or_open_for_writing(hdf5Filename); - writeSolverSettingsToHDF5(solver, file, hdf5Location); + write_solver_settings_to_hdf5(solver, file, hdf5Location); } -void writeSolverSettingsToHDF5( +void write_solver_settings_to_hdf5( Solver const& solver, H5::H5File const& file, std::string const& hdf5Location ) { - if (!locationExists(file, hdf5Location)) - createGroup(file, hdf5Location); + if (!location_exists(file, hdf5Location)) + create_group(file, hdf5Location); double dbuffer; int ibuffer; - dbuffer = solver.getAbsoluteTolerance(); + dbuffer = solver.get_absolute_tolerance(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "atol", &dbuffer, 1 ); - dbuffer = solver.getRelativeTolerance(); + dbuffer = solver.get_relative_tolerance(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "rtol", &dbuffer, 1 ); - dbuffer = solver.getAbsoluteToleranceFSA(); + dbuffer = solver.get_absolute_tolerance_fsa(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "atol_fsa", &dbuffer, 1 ); - dbuffer = solver.getRelativeToleranceFSA(); + dbuffer = solver.get_relative_tolerance_fsa(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "rtol_fsa", &dbuffer, 1 ); - dbuffer = solver.getAbsoluteToleranceB(); + dbuffer = solver.get_absolute_tolerance_b(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "atolB", &dbuffer, 1 ); - dbuffer = solver.getRelativeToleranceB(); + dbuffer = solver.get_relative_tolerance_b(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "rtolB", &dbuffer, 1 ); - dbuffer = solver.getAbsoluteToleranceQuadratures(); + dbuffer = solver.get_absolute_tolerance_quadratures(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "quad_atol", &dbuffer, 1 ); - dbuffer = solver.getRelativeToleranceQuadratures(); + dbuffer = solver.get_relative_tolerance_quadratures(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "quad_rtol", &dbuffer, 1 ); - dbuffer = solver.getSteadyStateToleranceFactor(); + dbuffer = solver.get_steady_state_tolerance_factor(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_tol_factor", &dbuffer, 1 ); - dbuffer = solver.getAbsoluteToleranceSteadyState(); + dbuffer = solver.get_absolute_tolerance_steady_state(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_atol", &dbuffer, 1 ); - dbuffer = solver.getRelativeToleranceSteadyState(); + dbuffer = solver.get_relative_tolerance_steady_state(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_rtol", &dbuffer, 1 ); - dbuffer = solver.getSteadyStateSensiToleranceFactor(); + dbuffer = solver.get_steady_state_sensi_tolerance_factor(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_tol_sensi_factor", &dbuffer, 1 ); - dbuffer = solver.getAbsoluteToleranceSteadyStateSensi(); + dbuffer = solver.get_absolute_tolerance_steady_state_sensi(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_atol_sensi", &dbuffer, 1 ); - dbuffer = solver.getRelativeToleranceSteadyStateSensi(); + dbuffer = solver.get_relative_tolerance_steady_state_sensi(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "ss_rtol_sensi", &dbuffer, 1 ); - dbuffer = solver.getMaxTime(); + dbuffer = solver.get_max_time(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "maxtime", &dbuffer, 1 ); - dbuffer = solver.getMaxStepSize(); + dbuffer = solver.get_max_step_size(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "max_step_size", &dbuffer, 1 ); - ibuffer = gsl::narrow(solver.getMaxSteps()); + ibuffer = gsl::narrow(solver.get_max_steps()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "maxsteps", &ibuffer, 1 ); - ibuffer = gsl::narrow(solver.getMaxStepsBackwardProblem()); + ibuffer = gsl::narrow(solver.get_max_steps_backward_problem()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "maxstepsB", &ibuffer, 1 ); - ibuffer = static_cast(solver.getLinearMultistepMethod()); + ibuffer = static_cast(solver.get_linear_multistep_method()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "lmm", &ibuffer, 1 ); - ibuffer = static_cast(solver.getNonlinearSolverIteration()); + ibuffer = static_cast(solver.get_non_linear_solver_iteration()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "iter", &ibuffer, 1 ); - ibuffer = static_cast(solver.getStabilityLimitFlag()); + ibuffer = static_cast(solver.get_stability_limit_flag()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "stldet", &ibuffer, 1 ); - ibuffer = static_cast(solver.getStateOrdering()); + ibuffer = static_cast(solver.get_state_ordering()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "ordering", &ibuffer, 1 ); - ibuffer = static_cast(solver.getInterpolationType()); + ibuffer = static_cast(solver.get_interpolation_type()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "interpType", &ibuffer, 1 ); - ibuffer = static_cast(solver.getSensitivityMethod()); + ibuffer = static_cast(solver.get_sensitivity_method()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "sensi_meth", &ibuffer, 1 ); - ibuffer = static_cast(solver.getSensitivityMethodPreequilibration()); + ibuffer + = static_cast(solver.get_sensitivity_method_pre_equilibration()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "sensi_meth_preeq", &ibuffer, 1 ); - ibuffer = static_cast(solver.getSensitivityOrder()); + ibuffer = static_cast(solver.get_sensitivity_order()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "sensi", &ibuffer, 1 ); - ibuffer = gsl::narrow(solver.getNewtonMaxSteps()); + ibuffer = gsl::narrow(solver.get_newton_max_steps()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "newton_maxsteps", &ibuffer, 1 ); - ibuffer = static_cast(solver.getNewtonDampingFactorMode()); + ibuffer = static_cast(solver.get_newton_damping_factor_mode()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "newton_damping_factor_mode", &ibuffer, 1 ); - dbuffer = solver.getNewtonDampingFactorLowerBound(); + dbuffer = solver.get_newton_damping_factor_lower_bound(); H5LTset_attribute_double( file.getId(), hdf5Location.c_str(), "newton_damping_factor_lower_bound", &dbuffer, 1 ); - ibuffer = static_cast(solver.getLinearSolver()); + ibuffer = static_cast(solver.get_linear_solver()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "linsol", &ibuffer, 1 ); - ibuffer = static_cast(solver.getInternalSensitivityMethod()); + ibuffer = static_cast(solver.get_internal_sensitivity_method()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "ism", &ibuffer, 1 ); - ibuffer = static_cast(solver.getReturnDataReportingMode()); + ibuffer = static_cast(solver.get_return_data_reporting_mode()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "rdrm", &ibuffer, 1 ); - ibuffer = static_cast(solver.getNewtonStepSteadyStateCheck()); + ibuffer = static_cast(solver.get_newton_step_steady_state_check()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "newton_step_steadystate_conv", &ibuffer, 1 ); - ibuffer = static_cast(solver.getSensiSteadyStateCheck()); + ibuffer = static_cast(solver.get_sensi_steady_state_check()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "check_sensi_steadystate_conv", &ibuffer, 1 ); - ibuffer = static_cast(solver.getMaxNonlinIters()); + ibuffer = static_cast(solver.get_max_nonlin_iters()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "max_nonlin_iters", &ibuffer, 1 ); - ibuffer = static_cast(solver.getMaxConvFails()); + ibuffer = static_cast(solver.get_max_conv_fails()); H5LTset_attribute_int( file.getId(), hdf5Location.c_str(), "max_conv_fails", &ibuffer, 1 ); - createAndWriteDouble1DDataset( - file, hdf5Location + "/constraints", solver.getConstraints() + create_and_write_double_1d_dataset( + file, hdf5Location + "/constraints", solver.get_constraints() ); } -void readSolverSettingsFromHDF5( +void read_solver_settings_from_hdf5( H5::H5File const& file, Solver& solver, std::string const& datasetPath ) { - if (attributeExists(file, datasetPath, "atol")) { - solver.setAbsoluteTolerance( - getDoubleScalarAttribute(file, datasetPath, "atol") + if (attribute_exists(file, datasetPath, "atol")) { + solver.set_absolute_tolerance( + get_double_scalar_attribute(file, datasetPath, "atol") ); } - if (attributeExists(file, datasetPath, "rtol")) { - solver.setRelativeTolerance( - getDoubleScalarAttribute(file, datasetPath, "rtol") + if (attribute_exists(file, datasetPath, "rtol")) { + solver.set_relative_tolerance( + get_double_scalar_attribute(file, datasetPath, "rtol") ); } - if (attributeExists(file, datasetPath, "atol_fsa")) { - solver.setAbsoluteToleranceFSA( - getDoubleScalarAttribute(file, datasetPath, "atol_fsa") + if (attribute_exists(file, datasetPath, "atol_fsa")) { + solver.set_absolute_tolerance_fsa( + get_double_scalar_attribute(file, datasetPath, "atol_fsa") ); } - if (attributeExists(file, datasetPath, "rtol_fsa")) { - solver.setRelativeToleranceFSA( - getDoubleScalarAttribute(file, datasetPath, "rtol_fsa") + if (attribute_exists(file, datasetPath, "rtol_fsa")) { + solver.set_relative_tolerance_fsa( + get_double_scalar_attribute(file, datasetPath, "rtol_fsa") ); } - if (attributeExists(file, datasetPath, "atolB")) { - solver.setAbsoluteToleranceB( - getDoubleScalarAttribute(file, datasetPath, "atolB") + if (attribute_exists(file, datasetPath, "atolB")) { + solver.set_absolute_tolerance_b( + get_double_scalar_attribute(file, datasetPath, "atolB") ); } - if (attributeExists(file, datasetPath, "rtolB")) { - solver.setRelativeToleranceB( - getDoubleScalarAttribute(file, datasetPath, "rtolB") + if (attribute_exists(file, datasetPath, "rtolB")) { + solver.set_relative_tolerance_b( + get_double_scalar_attribute(file, datasetPath, "rtolB") ); } - if (attributeExists(file, datasetPath, "quad_atol")) { - solver.setAbsoluteToleranceQuadratures( - getDoubleScalarAttribute(file, datasetPath, "quad_atol") + if (attribute_exists(file, datasetPath, "quad_atol")) { + solver.set_absolute_tolerance_quadratures( + get_double_scalar_attribute(file, datasetPath, "quad_atol") ); } - if (attributeExists(file, datasetPath, "quad_rtol")) { - solver.setRelativeToleranceQuadratures( - getDoubleScalarAttribute(file, datasetPath, "quad_rtol") + if (attribute_exists(file, datasetPath, "quad_rtol")) { + solver.set_relative_tolerance_quadratures( + get_double_scalar_attribute(file, datasetPath, "quad_rtol") ); } - if (attributeExists(file, datasetPath, "ss_tol_factor")) { - solver.setSteadyStateToleranceFactor( - getDoubleScalarAttribute(file, datasetPath, "ss_tol_factor") + if (attribute_exists(file, datasetPath, "ss_tol_factor")) { + solver.set_steady_state_tolerance_factor( + get_double_scalar_attribute(file, datasetPath, "ss_tol_factor") ); } - if (attributeExists(file, datasetPath, "ss_atol")) { - solver.setAbsoluteToleranceSteadyState( - getDoubleScalarAttribute(file, datasetPath, "ss_atol") + if (attribute_exists(file, datasetPath, "ss_atol")) { + solver.set_absolute_tolerance_steady_state( + get_double_scalar_attribute(file, datasetPath, "ss_atol") ); } - if (attributeExists(file, datasetPath, "ss_rtol")) { - solver.setRelativeToleranceSteadyState( - getDoubleScalarAttribute(file, datasetPath, "ss_rtol") + if (attribute_exists(file, datasetPath, "ss_rtol")) { + solver.set_relative_tolerance_steady_state( + get_double_scalar_attribute(file, datasetPath, "ss_rtol") ); } - if (attributeExists(file, datasetPath, "ss_tol_sensi_factor")) { - solver.setSteadyStateSensiToleranceFactor( - getDoubleScalarAttribute(file, datasetPath, "ss_tol_sensi_factor") + if (attribute_exists(file, datasetPath, "ss_tol_sensi_factor")) { + solver.set_steady_state_sensi_tolerance_factor( + get_double_scalar_attribute( + file, datasetPath, "ss_tol_sensi_factor" + ) ); } - if (attributeExists(file, datasetPath, "ss_atol_sensi")) { - solver.setAbsoluteToleranceSteadyStateSensi( - getDoubleScalarAttribute(file, datasetPath, "ss_atol_sensi") + if (attribute_exists(file, datasetPath, "ss_atol_sensi")) { + solver.set_absolute_tolerance_steady_state_sensi( + get_double_scalar_attribute(file, datasetPath, "ss_atol_sensi") ); } - if (attributeExists(file, datasetPath, "ss_rtol_sensi")) { - solver.setRelativeToleranceSteadyStateSensi( - getDoubleScalarAttribute(file, datasetPath, "ss_rtol_sensi") + if (attribute_exists(file, datasetPath, "ss_rtol_sensi")) { + solver.set_relative_tolerance_steady_state_sensi( + get_double_scalar_attribute(file, datasetPath, "ss_rtol_sensi") ); } - if (attributeExists(file, datasetPath, "maxtime")) { - solver.setMaxTime(getDoubleScalarAttribute(file, datasetPath, "maxtime") + if (attribute_exists(file, datasetPath, "maxtime")) { + solver.set_max_time( + get_double_scalar_attribute(file, datasetPath, "maxtime") ); } - if (attributeExists(file, datasetPath, "max_step_size")) { - solver.setMaxStepSize( - getDoubleScalarAttribute(file, datasetPath, "max_step_size") + if (attribute_exists(file, datasetPath, "max_step_size")) { + solver.set_max_step_size( + get_double_scalar_attribute(file, datasetPath, "max_step_size") ); } - if (attributeExists(file, datasetPath, "maxsteps")) { - solver.setMaxSteps(getIntScalarAttribute(file, datasetPath, "maxsteps") + if (attribute_exists(file, datasetPath, "maxsteps")) { + solver.set_max_steps( + get_int_scalar_attribute(file, datasetPath, "maxsteps") ); } - if (attributeExists(file, datasetPath, "maxstepsB")) { - solver.setMaxStepsBackwardProblem( - getIntScalarAttribute(file, datasetPath, "maxstepsB") + if (attribute_exists(file, datasetPath, "maxstepsB")) { + solver.set_max_steps_backward_problem( + get_int_scalar_attribute(file, datasetPath, "maxstepsB") ); } - if (attributeExists(file, datasetPath, "lmm")) { - solver.setLinearMultistepMethod( + if (attribute_exists(file, datasetPath, "lmm")) { + solver.set_linear_multistep_method( static_cast( - getIntScalarAttribute(file, datasetPath, "lmm") + get_int_scalar_attribute(file, datasetPath, "lmm") ) ); } - if (attributeExists(file, datasetPath, "iter")) { - solver.setNonlinearSolverIteration( + if (attribute_exists(file, datasetPath, "iter")) { + solver.set_non_linear_solver_iteration( static_cast( - getIntScalarAttribute(file, datasetPath, "iter") + get_int_scalar_attribute(file, datasetPath, "iter") ) ); } - if (attributeExists(file, datasetPath, "stldet")) { - solver.setStabilityLimitFlag( - getIntScalarAttribute(file, datasetPath, "stldet") + if (attribute_exists(file, datasetPath, "stldet")) { + solver.set_stability_limit_flag( + get_int_scalar_attribute(file, datasetPath, "stldet") ); } - if (attributeExists(file, datasetPath, "ordering")) { - solver.setStateOrdering( - getIntScalarAttribute(file, datasetPath, "ordering") + if (attribute_exists(file, datasetPath, "ordering")) { + solver.set_state_ordering( + get_int_scalar_attribute(file, datasetPath, "ordering") ); } - if (attributeExists(file, datasetPath, "interpType")) { - solver.setInterpolationType( + if (attribute_exists(file, datasetPath, "interpType")) { + solver.set_interpolation_type( static_cast( - getIntScalarAttribute(file, datasetPath, "interpType") + get_int_scalar_attribute(file, datasetPath, "interpType") ) ); } - if (attributeExists(file, datasetPath, "sensi_meth")) { - solver.setSensitivityMethod( + if (attribute_exists(file, datasetPath, "sensi_meth")) { + solver.set_sensitivity_method( static_cast( - getIntScalarAttribute(file, datasetPath, "sensi_meth") + get_int_scalar_attribute(file, datasetPath, "sensi_meth") ) ); } - if (attributeExists(file, datasetPath, "sensi_meth_preeq")) { - solver.setSensitivityMethodPreequilibration( + if (attribute_exists(file, datasetPath, "sensi_meth_preeq")) { + solver.set_sensitivity_method_pre_equilibration( static_cast( - getIntScalarAttribute(file, datasetPath, "sensi_meth_preeq") + get_int_scalar_attribute(file, datasetPath, "sensi_meth_preeq") ) ); } - if (attributeExists(file, datasetPath, "sensi")) { - solver.setSensitivityOrder( + if (attribute_exists(file, datasetPath, "sensi")) { + solver.set_sensitivity_order( static_cast( - getIntScalarAttribute(file, datasetPath, "sensi") + get_int_scalar_attribute(file, datasetPath, "sensi") ) ); } - if (attributeExists(file, datasetPath, "newton_maxsteps")) { - solver.setNewtonMaxSteps( - getIntScalarAttribute(file, datasetPath, "newton_maxsteps") + if (attribute_exists(file, datasetPath, "newton_maxsteps")) { + solver.set_newton_max_steps( + get_int_scalar_attribute(file, datasetPath, "newton_maxsteps") ); } - if (attributeExists(file, datasetPath, "newton_damping_factor_mode")) { - solver.setNewtonDampingFactorMode( - static_cast(getIntScalarAttribute( + if (attribute_exists(file, datasetPath, "newton_damping_factor_mode")) { + solver.set_newton_damping_factor_mode( + static_cast(get_int_scalar_attribute( file, datasetPath, "newton_damping_factor_mode" )) ); } - if (attributeExists( + if (attribute_exists( file, datasetPath, "newton_damping_factor_lower_bound" )) { - solver.setNewtonDampingFactorLowerBound(getDoubleScalarAttribute( - file, datasetPath, "newton_damping_factor_lower_bound" - )); + solver.set_newton_damping_factor_lower_bound( + get_double_scalar_attribute( + file, datasetPath, "newton_damping_factor_lower_bound" + ) + ); } - if (attributeExists(file, datasetPath, "linsol")) { - solver.setLinearSolver( + if (attribute_exists(file, datasetPath, "linsol")) { + solver.set_linear_solver( static_cast( - getIntScalarAttribute(file, datasetPath, "linsol") + get_int_scalar_attribute(file, datasetPath, "linsol") ) ); } - if (attributeExists(file, datasetPath, "ism")) { - solver.setInternalSensitivityMethod( + if (attribute_exists(file, datasetPath, "ism")) { + solver.set_internal_sensitivity_method( static_cast( - getIntScalarAttribute(file, datasetPath, "ism") + get_int_scalar_attribute(file, datasetPath, "ism") ) ); } - if (attributeExists(file, datasetPath, "rdrm")) { - solver.setReturnDataReportingMode( + if (attribute_exists(file, datasetPath, "rdrm")) { + solver.set_return_data_reporting_mode( static_cast( - getIntScalarAttribute(file, datasetPath, "rdrm") + get_int_scalar_attribute(file, datasetPath, "rdrm") ) ); } - if (attributeExists(file, datasetPath, "newton_step_steadystate_conv")) { - solver.setNewtonStepSteadyStateCheck(getIntScalarAttribute( + if (attribute_exists(file, datasetPath, "newton_step_steadystate_conv")) { + solver.set_newton_step_steady_state_check(get_int_scalar_attribute( file, datasetPath, "newton_step_steadystate_conv" )); } - if (attributeExists(file, datasetPath, "check_sensi_steadystate_conv")) { - solver.setSensiSteadyStateCheck(getIntScalarAttribute( + if (attribute_exists(file, datasetPath, "check_sensi_steadystate_conv")) { + solver.set_sensi_steady_state_check(get_int_scalar_attribute( file, datasetPath, "check_sensi_steadystate_conv" )); } - if (attributeExists(file, datasetPath, "max_nonlin_iters")) { - solver.setMaxNonlinIters( - getIntScalarAttribute(file, datasetPath, "max_nonlin_iters") + if (attribute_exists(file, datasetPath, "max_nonlin_iters")) { + solver.set_max_nonlin_iters( + get_int_scalar_attribute(file, datasetPath, "max_nonlin_iters") ); } - if (attributeExists(file, datasetPath, "max_conv_fails")) { - solver.setMaxConvFails( - getIntScalarAttribute(file, datasetPath, "max_conv_fails") + if (attribute_exists(file, datasetPath, "max_conv_fails")) { + solver.set_max_conv_fails( + get_int_scalar_attribute(file, datasetPath, "max_conv_fails") ); } - if (locationExists(file, datasetPath + "/constraints")) { - solver.setConstraints( - getDoubleDataset1D(file, datasetPath + "/constraints") + if (location_exists(file, datasetPath + "/constraints")) { + solver.set_constraints( + get_double_1d_dataset(file, datasetPath + "/constraints") ); } } -void readSolverSettingsFromHDF5( +void read_solver_settings_from_hdf5( std::string const& hdffile, Solver& solver, std::string const& datasetPath ) { H5::H5File file( @@ -1418,10 +1452,10 @@ void readSolverSettingsFromHDF5( H5::FileAccPropList::DEFAULT ); - readSolverSettingsFromHDF5(file, solver, datasetPath); + read_solver_settings_from_hdf5(file, solver, datasetPath); } -void readModelDataFromHDF5( +void read_model_data_from_hdf5( std::string const& hdffile, Model& model, std::string const& datasetPath ) { H5::H5File file( @@ -1429,95 +1463,99 @@ void readModelDataFromHDF5( H5::FileAccPropList::DEFAULT ); - readModelDataFromHDF5(file, model, datasetPath); + read_model_data_from_hdf5(file, model, datasetPath); } -void readModelDataFromHDF5( +void read_model_data_from_hdf5( const H5::H5File& file, Model& model, std::string const& datasetPath ) { - if (attributeExists(file, datasetPath, "tstart")) { - model.setT0(getDoubleScalarAttribute(file, datasetPath, "tstart")); + if (attribute_exists(file, datasetPath, "tstart")) { + model.set_t0(get_double_scalar_attribute(file, datasetPath, "tstart")); } - if (attributeExists(file, datasetPath, "tstart_preeq")) { - model.setT0Preeq( - getDoubleScalarAttribute(file, datasetPath, "tstart_preeq") + if (attribute_exists(file, datasetPath, "tstart_preeq")) { + model.set_t0_preeq( + get_double_scalar_attribute(file, datasetPath, "tstart_preeq") ); } - if (locationExists(file, datasetPath + "/pscale")) { - auto pscaleInt = getIntDataset1D(file, datasetPath + "/pscale"); + if (location_exists(file, datasetPath + "/pscale")) { + auto pscaleInt = get_int_1d_dataset(file, datasetPath + "/pscale"); std::vector pscale(pscaleInt.size()); for (int i = 0; (unsigned)i < pscaleInt.size(); ++i) pscale[i] = static_cast(pscaleInt[i]); - model.setParameterScale(pscale); - } else if (attributeExists(file, datasetPath, "pscale")) { + model.set_parameter_scale(pscale); + } else if (attribute_exists(file, datasetPath, "pscale")) { // if pscale is the same for all parameters, // it can be set as scalar attribute for convenience - model.setParameterScale( + model.set_parameter_scale( static_cast( - getDoubleScalarAttribute(file, datasetPath, "pscale") + get_double_scalar_attribute(file, datasetPath, "pscale") ) ); } - if (attributeExists(file, datasetPath, "nmaxevent")) { - model.setNMaxEvent(getIntScalarAttribute(file, datasetPath, "nmaxevent") + if (attribute_exists(file, datasetPath, "nmaxevent")) { + model.set_n_max_event( + get_int_scalar_attribute(file, datasetPath, "nmaxevent") ); } - if (attributeExists(file, datasetPath, "steadyStateComputationMode")) { - model.setSteadyStateComputationMode( - static_cast(getIntScalarAttribute( + if (attribute_exists(file, datasetPath, "steadyStateComputationMode")) { + model.set_steady_state_computation_mode( + static_cast(get_int_scalar_attribute( file, datasetPath, "steadyStateComputationMode" )) ); } - if (attributeExists(file, datasetPath, "steadyStateSensitivityMode")) { - model.setSteadyStateSensitivityMode( - static_cast(getIntScalarAttribute( + if (attribute_exists(file, datasetPath, "steadyStateSensitivityMode")) { + model.set_steady_state_sensitivity_mode( + static_cast(get_int_scalar_attribute( file, datasetPath, "steadyStateSensitivityMode" )) ); } - if (locationExists(file, datasetPath + "/theta")) { - model.setParameters(getDoubleDataset1D(file, datasetPath + "/theta")); + if (location_exists(file, datasetPath + "/theta")) { + model.set_parameters(get_double_1d_dataset(file, datasetPath + "/theta") + ); } - if (locationExists(file, datasetPath + "/kappa")) { - model.setFixedParameters( - getDoubleDataset1D(file, datasetPath + "/kappa") + if (location_exists(file, datasetPath + "/kappa")) { + model.set_fixed_parameters( + get_double_1d_dataset(file, datasetPath + "/kappa") ); } - if (locationExists(file, datasetPath + "/ts")) { - model.setTimepoints(getDoubleDataset1D(file, datasetPath + "/ts")); + if (location_exists(file, datasetPath + "/ts")) { + model.set_timepoints(get_double_1d_dataset(file, datasetPath + "/ts")); } - if (locationExists(file, datasetPath + "/sens_ind")) { - auto sensInd = getIntDataset1D(file, datasetPath + "/sens_ind"); - model.setParameterList(sensInd); + if (location_exists(file, datasetPath + "/sens_ind")) { + auto sensInd = get_int_1d_dataset(file, datasetPath + "/sens_ind"); + model.set_parameter_list(sensInd); } - if (locationExists(file, datasetPath + "/x0")) { - auto x0 = getDoubleDataset1D(file, datasetPath + "/x0"); + if (location_exists(file, datasetPath + "/x0")) { + auto x0 = get_double_1d_dataset(file, datasetPath + "/x0"); if (!x0.empty()) - model.setInitialStates(x0); + model.set_initial_state(x0); } - if (locationExists(file, datasetPath + "/steadystate_mask")) { - auto mask = getDoubleDataset1D(file, datasetPath + "/steadystate_mask"); + if (location_exists(file, datasetPath + "/steadystate_mask")) { + auto mask + = get_double_1d_dataset(file, datasetPath + "/steadystate_mask"); if (!mask.empty()) model.set_steadystate_mask(mask); } - if (locationExists(file, datasetPath + "/sx0")) { + if (location_exists(file, datasetPath + "/sx0")) { hsize_t length0 = 0; hsize_t length1 = 0; - auto sx0 - = getDoubleDataset2D(file, datasetPath + "/sx0", length0, length1); + auto sx0 = get_double_2d_dataset( + file, datasetPath + "/sx0", length0, length1 + ); if (!sx0.empty()) { if (length0 != (unsigned)model.nplist() && length1 != (unsigned)model.nx_rdata) @@ -1526,23 +1564,24 @@ void readModelDataFromHDF5( "Expected %dx%d, got %llu, %llu.", model.nx_rdata, model.nplist(), length0, length1 )); - model.setUnscaledInitialStateSensitivities(sx0); + model.set_unscaled_initial_state_sensitivities(sx0); } } - if (attributeExists(file, datasetPath, "sigma_res")) { - auto sigma_res = getIntScalarAttribute(file, datasetPath, "sigma_res"); - model.setAddSigmaResiduals(static_cast(sigma_res)); + if (attribute_exists(file, datasetPath, "sigma_res")) { + auto sigma_res + = get_int_scalar_attribute(file, datasetPath, "sigma_res"); + model.set_add_sigma_residuals(static_cast(sigma_res)); } - if (attributeExists(file, datasetPath, "min_sigma")) { + if (attribute_exists(file, datasetPath, "min_sigma")) { auto min_sigma - = getDoubleScalarAttribute(file, datasetPath, "min_sigma"); - model.setMinimumSigmaResiduals(min_sigma); + = get_double_scalar_attribute(file, datasetPath, "min_sigma"); + model.set_minimum_sigma_residuals(min_sigma); } } -H5::H5File createOrOpenForWriting(std::string const& hdf5filename) { +H5::H5File create_or_open_for_writing(std::string const& hdf5filename) { AMICI_H5_SAVE_ERROR_HANDLER; try { H5::H5File file(hdf5filename.c_str(), H5F_ACC_RDWR); @@ -1554,20 +1593,20 @@ H5::H5File createOrOpenForWriting(std::string const& hdf5filename) { } } -bool locationExists(const H5::H5File& file, std::string const& location) { +bool location_exists(const H5::H5File& file, std::string const& location) { AMICI_H5_SAVE_ERROR_HANDLER; auto result = H5Lexists(file.getId(), location.c_str(), H5P_DEFAULT) > 0; AMICI_H5_RESTORE_ERROR_HANDLER; return result; } -bool locationExists(std::string const& filename, std::string const& location) { +bool location_exists(std::string const& filename, std::string const& location) { H5::H5File file(filename.c_str(), H5F_ACC_RDONLY); - return locationExists(file, location); + return location_exists(file, location); } std::vector -getIntDataset1D(const H5::H5File& file, std::string const& name) { +get_int_1d_dataset(const H5::H5File& file, std::string const& name) { auto dataset = file.openDataSet(name.c_str()); auto dataspace = dataset.getSpace(); @@ -1584,7 +1623,7 @@ getIntDataset1D(const H5::H5File& file, std::string const& name) { } std::vector -getDoubleDataset1D(const H5::H5File& file, std::string const& name) { +get_double_1d_dataset(const H5::H5File& file, std::string const& name) { auto dataset = file.openDataSet(name.c_str()); auto dataspace = dataset.getSpace(); @@ -1601,7 +1640,7 @@ getDoubleDataset1D(const H5::H5File& file, std::string const& name) { return result; } -std::vector getDoubleDataset2D( +std::vector get_double_2d_dataset( const H5::H5File& file, std::string const& name, hsize_t& m, hsize_t& n ) { m = n = 0; @@ -1625,7 +1664,7 @@ std::vector getDoubleDataset2D( return result; } -std::vector getDoubleDataset3D( +std::vector get_double_3d_dataset( const H5::H5File& file, std::string const& name, hsize_t& m, hsize_t& n, hsize_t& o ) { @@ -1651,13 +1690,13 @@ std::vector getDoubleDataset3D( return result; } -void writeSimulationExpData( +void write_exp_data_to_hdf5( ExpData const& edata, std::string const& filepath, std::string const& hdf5Location ) { - auto const file = createOrOpenForWriting(filepath); + auto const file = create_or_open_for_writing(filepath); - writeSimulationExpData(edata, file, hdf5Location); + write_exp_data_to_hdf5(edata, file, hdf5Location); } } // namespace amici::hdf5 diff --git a/src/logging.cpp b/src/logging.cpp index 96376397f9..59335c13f1 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -18,7 +18,7 @@ void Logger::log( ) { va_list argptr; va_start(argptr, format); - auto const message = printfToString(format, argptr); + auto const message = printf_to_string(format, argptr); va_end(argptr); log(severity, identifier, message); diff --git a/src/main.template.cpp b/src/main.template.cpp index 28b10015d2..41cbc62010 100644 --- a/src/main.template.cpp +++ b/src/main.template.cpp @@ -25,24 +25,24 @@ int main() { std::cout << "********************************" << std::endl << std::endl; // Create a model instance - auto model = amici::generic_model::getModel(); + auto model = amici::generic_model::get_model(); // Set desired output timepoints - model->setTimepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); + model->set_timepoints({0.0, 1.0, 10.0, 100.0, 1000.0}); // Create a solver instance - auto solver = model->getSolver(); + auto solver = model->create_solver(); // Optionally set integration tolerance - solver->setAbsoluteTolerance(1e-16); - solver->setRelativeTolerance(1e-8); + solver->set_absolute_tolerance(1e-16); + solver->set_relative_tolerance(1e-8); // Run the simulation using default parameters set during model import // (can be changed using model->setParameters() or model->setParameterBy*()) - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); // Print observable time course - auto observable_ids = model->getObservableIds(); + auto observable_ids = model->get_observable_ids(); std::cout << "Simulated observables for timepoints " << rdata->ts << "\n\n"; for (int i_observable = 0; i_observable < rdata->ny; ++i_observable) { std::cout << observable_ids[i_observable] << ":\n\t"; @@ -59,12 +59,12 @@ int main() { std::cout << "**********************************" << std::endl << std::endl; // Enable first-order sensitivity analysis - solver->setSensitivityOrder(amici::SensitivityOrder::first); + solver->set_sensitivity_order(amici::SensitivityOrder::first); // Use forward sensitivities - solver->setSensitivityMethod(amici::SensitivityMethod::forward); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); // Run the simulation - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); // Print state sensitivities sx... // ... for the first timepoint... @@ -73,8 +73,8 @@ int main() { int i_nplist = 0; // get identifiers from model - auto state_ids = model->getStateIds(); - auto parameter_ids = model->getParameterIds(); + auto state_ids = model->get_state_ids(); + auto parameter_ids = model->get_parameter_ids(); std::cout << "State sensitivities for timepoint " << rdata->ts[i_time] << std::endl; // nt x nplist x nx diff --git a/src/misc.cpp b/src/misc.cpp index 14623f2bdf..8e5ea8b5d1 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -20,11 +20,11 @@ namespace amici { -void writeSlice(AmiVector const& s, gsl::span const b) { - writeSlice(s.getVector(), b); +void write_slice(AmiVector const& s, gsl::span const b) { + write_slice(s.get_vector(), b); } -double getUnscaledParameter( +double unscale_parameter( double const scaledParameter, ParameterScaling const scaling ) { switch (scaling) { @@ -39,7 +39,7 @@ double getUnscaledParameter( throw AmiException("Invalid value for ParameterScaling."); } -void unscaleParameters( +void unscale_parameters( gsl::span const bufferScaled, gsl::span const pscale, gsl::span const bufferUnscaled @@ -49,11 +49,11 @@ void unscaleParameters( for (gsl::span::index_type ip = 0; ip < bufferScaled.size(); ++ip) { - bufferUnscaled[ip] = getUnscaledParameter(bufferScaled[ip], pscale[ip]); + bufferUnscaled[ip] = unscale_parameter(bufferScaled[ip], pscale[ip]); } } -double getScaledParameter( +double scale_parameter( double const unscaledParameter, ParameterScaling const scaling ) { switch (scaling) { @@ -68,7 +68,7 @@ double getScaledParameter( throw AmiException("Invalid value for ParameterScaling."); } -void scaleParameters( +void scale_parameters( gsl::span const bufferUnscaled, gsl::span const pscale, gsl::span const bufferScaled @@ -78,11 +78,11 @@ void scaleParameters( for (gsl::span::index_type ip = 0; ip < bufferUnscaled.size(); ++ip) { - bufferScaled[ip] = getScaledParameter(bufferUnscaled[ip], pscale[ip]); + bufferScaled[ip] = scale_parameter(bufferUnscaled[ip], pscale[ip]); } } -std::string backtraceString(int const maxFrames, int const first_frame) { +std::string get_backtrace_string(int const maxFrames, int const first_frame) { std::ostringstream trace_buf; #ifdef PLATFORM_WINDOWS @@ -132,7 +132,7 @@ std::string backtraceString(int const maxFrames, int const first_frame) { } std::string -regexErrorToString(std::regex_constants::error_type const err_type) { +regex_error_to_string(std::regex_constants::error_type const err_type) { switch (err_type) { case std::regex_constants::error_collate: return "error_collate"; @@ -165,7 +165,7 @@ regexErrorToString(std::regex_constants::error_type const err_type) { } } -std::string printfToString(char const* fmt, va_list ap) { +std::string printf_to_string(char const* fmt, va_list ap) { // Get size of string va_list ap_count; va_copy(ap_count, ap); diff --git a/src/model.cpp b/src/model.cpp index 4cac939f6e..fc0a67108b 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -163,7 +163,7 @@ static int setValueByIdRegex( return n_found; } catch (std::regex_error const& e) { - auto err_string = regexErrorToString(e.code()); + auto err_string = regex_error_to_string(e.code()); throw AmiException( "Specified regex pattern %s could not be compiled:" " %s (%s)", @@ -179,12 +179,12 @@ Model::Model( std::vector events ) : ModelDimensions(model_dimensions) - , o2mode(o2mode) - , idlist(std::move(idlist)) , state_(*this) , derived_state_(*this) , z2event_(std::move(z2event)) , state_is_non_negative_(nx_solver, false) + , o2_mode_(o2mode) + , id_list_(std::move(idlist)) , simulation_parameters_(std::move(simulation_parameters)) , events_(std::move(events)) { model_dimensions.validate(); @@ -194,7 +194,7 @@ Model::Model( ); Expects( model_dimensions.nk - == gsl::narrow(simulation_parameters_.fixedParameters.size()) + == gsl::narrow(simulation_parameters_.fixed_parameters.size()) ); Expects((events_.size() == (unsigned long)ne)); @@ -203,14 +203,14 @@ Model::Model( model_dimensions.np, ParameterScaling::none ); - unscaleParameters( + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); - state_.fixedParameters = simulation_parameters_.fixedParameters; + state_.fixed_parameters = simulation_parameters_.fixed_parameters; state_.plist = simulation_parameters_.plist; - requireSensitivitiesForAllParameters(); + require_sensitivities_for_all_parameters(); } bool operator==(Model const& a, Model const& b) { @@ -219,8 +219,8 @@ bool operator==(Model const& a, Model const& b) { return (static_cast(a) == static_cast(b)) - && (a.o2mode == b.o2mode) && (a.z2event_ == b.z2event_) - && (a.idlist == b.idlist) + && (a.o2_mode_ == b.o2_mode_) && (a.z2event_ == b.z2event_) + && (a.id_list_ == b.id_list_) && (a.simulation_parameters_ == b.simulation_parameters_) && (a.x0data_ == b.x0data_) && (a.sx0data_ == b.sx0data_) && (a.nmaxevent_ == b.nmaxevent_) @@ -251,11 +251,11 @@ void Model::initialize( AmiVectorArray& /*sdx*/, bool const computeSensitivities, std::vector& roots_found ) { - initializeStates(t, x); - initializeSplines(); + initialize_state(t, x); + initialize_splines(); if (computeSensitivities) { - initializeStateSensitivities(t, sx, x); - initializeSplineSensitivities(); + initialize_state_sensitivities(t, sx, x); + initialize_spline_sensitivities(); } fdx0(x, dx); @@ -263,10 +263,10 @@ void Model::initialize( fsdx0(); if (ne) - initEvents(t, x, dx, roots_found); + initialize_events(t, x, dx, roots_found); // evaluate static expressions once - auto x_pos = computeX_pos(x); + auto x_pos = compute_x_pos(x); fw(t, x_pos, true); fdwdw(t, x_pos, true); fdwdx(t, x_pos, true); @@ -282,7 +282,7 @@ void Model::reinitialize( fx0_fixedParameters(t, x); // re-evaluate static expressions once - auto x_pos = computeX_pos(x); + auto x_pos = compute_x_pos(x); fw(t, x_pos, true); fdwdw(t, x_pos, true); fdwdx(t, x_pos, true); @@ -292,7 +292,7 @@ void Model::reinitialize( } } -void Model::initializeB( +void Model::initialize_b( AmiVector& xB, AmiVector& dxB, AmiVector& xQB, bool posteq ) const { xB.zero(); @@ -301,25 +301,25 @@ void Model::initializeB( xQB.zero(); } -void Model::initializeStates(realtype t, AmiVector& x) { +void Model::initialize_state(realtype t, AmiVector& x) { if (x0data_.empty()) { fx0(t, x); } else { std::vector x0_solver(nx_solver, 0.0); ftotal_cl( state_.total_cl.data(), x0data_.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data() + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); fx_solver(x0_solver.data(), x0data_.data()); std::copy(x0_solver.cbegin(), x0_solver.cend(), x.data()); } - checkFinite(x.getVector(), ModelQuantity::x0, t); + check_finite(x.get_vector(), ModelQuantity::x0, t); } -void Model::initializeSplines() { +void Model::initialize_splines() { splines_ = fcreate_splines( - state_.unscaledParameters.data(), state_.fixedParameters.data() + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); derived_state_.spl_.resize(splines_.size(), 0.0); for (auto& spline : splines_) { @@ -327,7 +327,7 @@ void Model::initializeSplines() { } } -void Model::initializeSplineSensitivities() { +void Model::initialize_spline_sensitivities() { derived_state_.sspl_ = SUNMatrixWrapper(splines_.size(), np(), derived_state_.sunctx_); int allnodes = 0; @@ -343,12 +343,12 @@ void Model::initializeSplineSensitivities() { std::ranges::fill(tmp_dvalues, 0.0); std::ranges::fill(tmp_dslopes, 0.0); fdspline_valuesdp( - tmp_dvalues.data(), state_.unscaledParameters.data(), - state_.fixedParameters.data(), plist(ip) + tmp_dvalues.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), plist(ip) ); fdspline_slopesdp( - tmp_dslopes.data(), state_.unscaledParameters.data(), - state_.fixedParameters.data(), plist(ip) + tmp_dslopes.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), plist(ip) ); /* NB dspline_valuesdp/dspline_slopesdp must be filled * using the following order for the indices @@ -377,7 +377,7 @@ void Model::initializeSplineSensitivities() { } } -void Model::initializeStateSensitivities( +void Model::initialize_state_sensitivities( realtype t, AmiVectorArray& sx, AmiVector const& x ) { if (sx0data_.empty()) { @@ -391,8 +391,8 @@ void Model::initializeStateSensitivities( fstotal_cl( stcl, &sx0data_.at(ip * nx_rdata), plist(ip), derived_state_.x_rdata_.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data(), - state_.total_cl.data() + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.total_cl.data() ); fsx_solver(sx0_solver_slice.data(), &sx0data_.at(ip * nx_rdata)); for (int ix = 0; ix < nx_solver; ix++) { @@ -402,7 +402,7 @@ void Model::initializeStateSensitivities( } } -void Model::initEvents( +void Model::initialize_events( realtype t, AmiVector const& x, AmiVector const& dx, std::vector& roots_found ) { @@ -444,7 +444,7 @@ void Model::reinit_explicit_roots() { // evaluate timepoints auto const exp_roots = fexplicit_roots( - state_.unscaledParameters.data(), state_.fixedParameters.data() + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); Expects(exp_roots.size() == gsl::narrow(ne - ne_solver)); @@ -473,102 +473,104 @@ int Model::np() const { } int Model::nk() const { - return gsl::narrow(state_.fixedParameters.size()); + return gsl::narrow(state_.fixed_parameters.size()); } int Model::ncl() const { return nx_rdata - nx_solver; } int Model::nx_reinit() const { return nx_solver_reinit; } -double const* Model::k() const { return state_.fixedParameters.data(); } +double const* Model::k() const { return state_.fixed_parameters.data(); } -int Model::nMaxEvent() const { return nmaxevent_; } +int Model::n_max_event() const { return nmaxevent_; } -void Model::setNMaxEvent(int nmaxevent) { nmaxevent_ = nmaxevent; } +void Model::set_n_max_event(int nmaxevent) { nmaxevent_ = nmaxevent; } int Model::nt() const { - return gsl::narrow(simulation_parameters_.ts_.size()); + return gsl::narrow(simulation_parameters_.timepoints.size()); } -std::vector const& Model::getParameterScale() const { +std::vector const& Model::get_parameter_scale() const { return simulation_parameters_.pscale; } -void Model::setParameterScale(ParameterScaling pscale) { +void Model::set_parameter_scale(ParameterScaling pscale) { simulation_parameters_.pscale.assign( simulation_parameters_.pscale.size(), pscale ); - scaleParameters( - state_.unscaledParameters, simulation_parameters_.pscale, + scale_parameters( + state_.unscaled_parameters, simulation_parameters_.pscale, simulation_parameters_.parameters ); sx0data_.clear(); } -void Model::setParameterScale(std::vector const& pscaleVec) { +void Model::set_parameter_scale( + std::vector const& pscaleVec +) { if (pscaleVec.size() != simulation_parameters_.parameters.size()) throw AmiException( "Dimension mismatch. Size of parameter scaling does " "not match number of model parameters." ); simulation_parameters_.pscale = pscaleVec; - scaleParameters( - state_.unscaledParameters, simulation_parameters_.pscale, + scale_parameters( + state_.unscaled_parameters, simulation_parameters_.pscale, simulation_parameters_.parameters ); sx0data_.clear(); } -std::vector const& Model::getUnscaledParameters() const { - return state_.unscaledParameters; +std::vector const& Model::get_unscaled_parameters() const { + return state_.unscaled_parameters; } -std::vector const& Model::getParameters() const { +std::vector const& Model::get_parameters() const { return simulation_parameters_.parameters; } -realtype Model::getParameterById(std::string const& par_id) const { - if (!hasParameterIds()) +realtype Model::get_parameter_by_id(std::string const& par_id) const { + if (!has_parameter_ids()) throw AmiException( "Could not access parameters by id as they are not set" ); return getValueById( - getParameterIds(), simulation_parameters_.parameters, par_id, + get_parameter_ids(), simulation_parameters_.parameters, par_id, "parameters", "id" ); } -realtype Model::getParameterByName(std::string const& par_name) const { - if (!hasParameterNames()) +realtype Model::get_parameter_by_name(std::string const& par_name) const { + if (!has_parameter_names()) throw AmiException( "Could not access parameters by name as they are not set" ); return getValueById( - getParameterNames(), simulation_parameters_.parameters, par_name, + get_parameter_names(), simulation_parameters_.parameters, par_name, "parameters", "name" ); } -void Model::setParameters(std::vector const& p) { +void Model::set_parameters(std::vector const& p) { if (p.size() != (unsigned)np()) throw AmiException( "Dimension mismatch. Size of parameters does not " "match number of model parameters." ); simulation_parameters_.parameters = p; - state_.unscaledParameters.resize(simulation_parameters_.parameters.size()); - unscaleParameters( + state_.unscaled_parameters.resize(simulation_parameters_.parameters.size()); + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); } -void Model::setParameterById( +void Model::set_parameter_by_id( std::map const& p, bool const ignoreErrors ) { for (auto const& [parameter_id, value] : p) { try { - setParameterById(parameter_id, value); + set_parameter_by_id(parameter_id, value); } catch (AmiException const&) { if (!ignoreErrors) throw; @@ -576,64 +578,66 @@ void Model::setParameterById( } } -void Model::setParameterById(std::string const& par_id, realtype const value) { - if (!hasParameterIds()) +void Model::set_parameter_by_id( + std::string const& par_id, realtype const value +) { + if (!has_parameter_ids()) throw AmiException( "Could not access parameters by id as they are not set" ); setValueById( - getParameterIds(), simulation_parameters_.parameters, value, par_id, + get_parameter_ids(), simulation_parameters_.parameters, value, par_id, "parameter", "id" ); - unscaleParameters( + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); } -int Model::setParametersByIdRegex( +int Model::set_parameters_by_id_regex( std::string const& par_id_regex, realtype const value ) { - if (!hasParameterIds()) + if (!has_parameter_ids()) throw AmiException( "Could not access parameters by id as they are not set" ); int n_found = setValueByIdRegex( - getParameterIds(), simulation_parameters_.parameters, value, + get_parameter_ids(), simulation_parameters_.parameters, value, par_id_regex, "parameter", "id" ); - unscaleParameters( + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); return n_found; } -void Model::setParameterByName( +void Model::set_parameter_by_name( std::string const& par_name, realtype const value ) { - if (!hasParameterNames()) + if (!has_parameter_names()) throw AmiException( "Could not access parameters by name as they are not set" ); setValueById( - getParameterNames(), simulation_parameters_.parameters, value, par_name, - "parameter", "name" + get_parameter_names(), simulation_parameters_.parameters, value, + par_name, "parameter", "name" ); - unscaleParameters( + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); } -void Model::setParameterByName( +void Model::set_parameter_by_name( std::map const& p, bool ignoreErrors ) { for (auto const& [name, value] : p) { try { - setParameterByName(name, value); + set_parameter_by_name(name, value); } catch (AmiException const&) { if (!ignoreErrors) throw; @@ -641,218 +645,220 @@ void Model::setParameterByName( } } -int Model::setParametersByNameRegex( +int Model::set_parameters_by_name_regex( std::string const& par_name_regex, realtype value ) { - if (!hasParameterNames()) + if (!has_parameter_names()) throw AmiException( "Could not access parameters by name as they are not set" ); int n_found = setValueByIdRegex( - getParameterNames(), simulation_parameters_.parameters, value, + get_parameter_names(), simulation_parameters_.parameters, value, par_name_regex, "parameter", "name" ); - unscaleParameters( + unscale_parameters( simulation_parameters_.parameters, simulation_parameters_.pscale, - state_.unscaledParameters + state_.unscaled_parameters ); return n_found; } -std::vector const& Model::getFixedParameters() const { - return state_.fixedParameters; +std::vector const& Model::get_fixed_parameters() const { + return state_.fixed_parameters; } -realtype Model::getFixedParameterById(std::string const& par_id) const { - if (!hasFixedParameterIds()) +realtype Model::get_fixed_parameter_by_id(std::string const& par_id) const { + if (!has_fixed_parameter_ids()) throw AmiException( "Could not access fixed parameters by id as they are not set" ); return getValueById( - getFixedParameterIds(), state_.fixedParameters, par_id, + get_fixed_parameter_ids(), state_.fixed_parameters, par_id, "fixedParameters", "id" ); } -realtype Model::getFixedParameterByName(std::string const& par_name) const { - if (!hasFixedParameterNames()) +realtype Model::get_fixed_parameter_by_name(std::string const& par_name) const { + if (!has_fixed_parameter_names()) throw AmiException( "Could not access fixed parameters by name as they are not set" ); return getValueById( - getFixedParameterNames(), state_.fixedParameters, par_name, + get_fixed_parameter_names(), state_.fixed_parameters, par_name, "fixedParameters", "name" ); } -void Model::setFixedParameters(std::vector const& k) { +void Model::set_fixed_parameters(std::vector const& k) { if (k.size() != (unsigned)nk()) throw AmiException( "Dimension mismatch. Size of fixedParameters does " "not match number of fixed model parameters." ); - state_.fixedParameters = k; + state_.fixed_parameters = k; } -void Model::setFixedParameterById(std::string const& par_id, realtype value) { - if (!hasFixedParameterIds()) +void Model::set_fixed_parameter_by_id( + std::string const& par_id, realtype value +) { + if (!has_fixed_parameter_ids()) throw AmiException( "Could not access fixed parameters by id as they are not set" ); setValueById( - getFixedParameterIds(), state_.fixedParameters, value, par_id, + get_fixed_parameter_ids(), state_.fixed_parameters, value, par_id, "fixedParameters", "id" ); } -int Model::setFixedParametersByIdRegex( +int Model::set_fixed_parameters_by_id_regex( std::string const& par_id_regex, realtype value ) { - if (!hasFixedParameterIds()) + if (!has_fixed_parameter_ids()) throw AmiException( "Could not access fixed parameters by id as they are not set" ); return setValueByIdRegex( - getFixedParameterIds(), state_.fixedParameters, value, par_id_regex, + get_fixed_parameter_ids(), state_.fixed_parameters, value, par_id_regex, "fixedParameters", "id" ); } -void Model::setFixedParameterByName( +void Model::set_fixed_parameter_by_name( std::string const& par_name, realtype value ) { - if (!hasFixedParameterNames()) + if (!has_fixed_parameter_names()) throw AmiException( "Could not access fixed parameters by name as they are not set" ); setValueById( - getFixedParameterNames(), state_.fixedParameters, value, par_name, + get_fixed_parameter_names(), state_.fixed_parameters, value, par_name, "fixedParameters", "name" ); } -int Model::setFixedParametersByNameRegex( +int Model::set_fixed_parameters_by_name_regex( std::string const& par_name_regex, realtype value ) { - if (!hasFixedParameterNames()) + if (!has_fixed_parameter_names()) throw AmiException( "Could not access fixed parameters by name as they are not set" ); return setValueByIdRegex( - getFixedParameterIds(), state_.fixedParameters, value, par_name_regex, - "fixedParameters", "name" + get_fixed_parameter_ids(), state_.fixed_parameters, value, + par_name_regex, "fixedParameters", "name" ); } -std::string Model::getName() const { return ""; } +std::string Model::get_name() const { return ""; } -bool Model::hasParameterNames() const { - return np() == 0 || !getParameterNames().empty(); +bool Model::has_parameter_names() const { + return np() == 0 || !get_parameter_names().empty(); } -std::vector Model::getParameterNames() const { return {}; } +std::vector Model::get_parameter_names() const { return {}; } -bool Model::hasStateNames() const { - return nx_rdata == 0 || !getStateNames().empty(); +bool Model::has_state_names() const { + return nx_rdata == 0 || !get_state_names().empty(); } -std::vector Model::getStateNames() const { return {}; } +std::vector Model::get_state_names() const { return {}; } -std::vector Model::getStateNamesSolver() const { return {}; } +std::vector Model::get_state_names_solver() const { return {}; } -bool Model::hasFixedParameterNames() const { - return nk() == 0 || !getFixedParameterNames().empty(); +bool Model::has_fixed_parameter_names() const { + return nk() == 0 || !get_fixed_parameter_names().empty(); } -std::vector Model::getFixedParameterNames() const { return {}; } +std::vector Model::get_fixed_parameter_names() const { return {}; } -bool Model::hasObservableNames() const { - return ny == 0 || !getObservableNames().empty(); +bool Model::has_observable_names() const { + return ny == 0 || !get_observable_names().empty(); } -std::vector Model::getObservableNames() const { return {}; } +std::vector Model::get_observable_names() const { return {}; } -bool Model::hasExpressionNames() const { - return ny == 0 || !getExpressionNames().empty(); +bool Model::has_expression_names() const { + return ny == 0 || !get_expression_names().empty(); } -std::vector Model::getExpressionNames() const { return {}; } +std::vector Model::get_expression_names() const { return {}; } -bool Model::hasParameterIds() const { - return np() == 0 || !getParameterIds().empty(); +bool Model::has_parameter_ids() const { + return np() == 0 || !get_parameter_ids().empty(); } -std::vector Model::getParameterIds() const { return {}; } +std::vector Model::get_parameter_ids() const { return {}; } -bool Model::hasStateIds() const { - return nx_rdata == 0 || !getStateIds().empty(); +bool Model::has_state_ids() const { + return nx_rdata == 0 || !get_state_ids().empty(); } -std::vector Model::getStateIds() const { return {}; } +std::vector Model::get_state_ids() const { return {}; } -std::vector Model::getStateIdsSolver() const { return {}; } +std::vector Model::get_state_ids_solver() const { return {}; } -bool Model::hasFixedParameterIds() const { - return nk() == 0 || !getFixedParameterIds().empty(); +bool Model::has_fixed_parameter_ids() const { + return nk() == 0 || !get_fixed_parameter_ids().empty(); } -std::vector Model::getFixedParameterIds() const { return {}; } +std::vector Model::get_fixed_parameter_ids() const { return {}; } -bool Model::hasObservableIds() const { - return ny == 0 || !getObservableIds().empty(); +bool Model::has_observable_ids() const { + return ny == 0 || !get_observable_ids().empty(); } -std::vector Model::getObservableIds() const { return {}; } +std::vector Model::get_observable_ids() const { return {}; } -bool Model::hasExpressionIds() const { - return ny == 0 || !getExpressionIds().empty(); +bool Model::has_expression_ids() const { + return ny == 0 || !get_expression_ids().empty(); } -std::vector Model::getExpressionIds() const { return {}; } +std::vector Model::get_expression_ids() const { return {}; } -bool Model::hasQuadraticLLH() const { return true; } +bool Model::has_quadratic_llh() const { return true; } -std::vector const& Model::getTimepoints() const { - return simulation_parameters_.ts_; +std::vector const& Model::get_timepoints() const { + return simulation_parameters_.timepoints; } -double Model::getTimepoint(int const it) const { - return simulation_parameters_.ts_.at(it); +double Model::get_timepoint(int const it) const { + return simulation_parameters_.timepoints.at(it); } -void Model::setTimepoints(std::vector const& ts) { +void Model::set_timepoints(std::vector const& ts) { if (!std::ranges::is_sorted(ts)) throw AmiException( "Encountered non-monotonic timepoints, please order" " timepoints such that they are monotonically" " increasing!" ); - simulation_parameters_.ts_ = ts; + simulation_parameters_.timepoints = ts; } -double Model::t0() const { return simulation_parameters_.tstart_; } +double Model::t0() const { return simulation_parameters_.t_start; } -void Model::setT0(double t0) { simulation_parameters_.tstart_ = t0; } +void Model::set_t0(double t0) { simulation_parameters_.t_start = t0; } -double Model::t0Preeq() const { return simulation_parameters_.tstart_preeq_; } +double Model::t0_preeq() const { return simulation_parameters_.t_start_preeq; } -void Model::setT0Preeq(double t0_preeq) { - simulation_parameters_.tstart_preeq_ = t0_preeq; +void Model::set_t0_preeq(double t0_preeq) { + simulation_parameters_.t_start_preeq = t0_preeq; } -std::vector const& Model::getStateIsNonNegative() const { +std::vector const& Model::get_state_is_non_negative() const { return state_is_non_negative_; } -void Model::setStateIsNonNegative(std::vector const& nonNegative) { +void Model::set_state_is_non_negative(std::vector const& nonNegative) { auto any_state_non_negative = std::ranges::any_of(nonNegative, [](bool x) { return x; }); if (nx_solver != nx_rdata) { @@ -876,15 +882,17 @@ void Model::setStateIsNonNegative(std::vector const& nonNegative) { any_state_non_negative_ = any_state_non_negative; } -void Model::setAllStatesNonNegative() { - setStateIsNonNegative(std::vector(nx_solver, true)); +void Model::set_all_states_non_negative() { + set_state_is_non_negative(std::vector(nx_solver, true)); } -std::vector const& Model::getParameterList() const { return state_.plist; } +std::vector const& Model::get_parameter_list() const { + return state_.plist; +} int Model::plist(int pos) const { return state_.plist.at(pos); } -void Model::setParameterList(std::vector const& plist) { +void Model::set_parameter_list(std::vector const& plist) { int np = this->np(); // cannot capture 'this' in lambda expression if (std::ranges::any_of(plist, [&np](int idx) { return idx < 0 || idx >= np; @@ -893,10 +901,10 @@ void Model::setParameterList(std::vector const& plist) { } state_.plist = plist; - initializeVectors(); + initialize_vectors(); } -std::vector Model::getInitialStates(realtype t0) { +std::vector Model::get_initial_state(realtype t0) { if (!x0data_.empty()) { return x0data_; } @@ -906,12 +914,12 @@ std::vector Model::getInitialStates(realtype t0) { * changing parameters etc. */ std::vector x0(nx_rdata, 0.0); - fx0(x0.data(), t0, state_.unscaledParameters.data(), - state_.fixedParameters.data()); + fx0(x0.data(), t0, state_.unscaled_parameters.data(), + state_.fixed_parameters.data()); return x0; } -void Model::setInitialStates(std::vector const& x0) { +void Model::set_initial_state(std::vector const& x0) { if (x0.size() != (unsigned)nx_rdata && !x0.empty()) throw AmiException( "Dimension mismatch. Size of x0 does not match " @@ -926,9 +934,9 @@ void Model::setInitialStates(std::vector const& x0) { x0data_ = x0; } -bool Model::hasCustomInitialStates() const { return !x0data_.empty(); } +bool Model::has_custom_initial_state() const { return !x0data_.empty(); } -std::vector Model::getInitialStateSensitivities(realtype t0) { +std::vector Model::get_initial_state_sensitivities(realtype t0) { if (!sx0data_.empty()) { return sx0data_; } @@ -938,17 +946,17 @@ std::vector Model::getInitialStateSensitivities(realtype t0) { * invalidated upon changing parameters etc. */ std::vector sx0(nx_rdata * nplist(), 0.0); - auto x0 = getInitialStates(t0); + auto x0 = get_initial_state(t0); for (int ip = 0; ip < nplist(); ip++) { fsx0( - sx0.data(), t0, x0.data(), state_.unscaledParameters.data(), - state_.fixedParameters.data(), plist(ip) + sx0.data(), t0, x0.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), plist(ip) ); } return sx0; } -void Model::setInitialStateSensitivities(std::vector const& sx0) { +void Model::set_initial_state_sensitivities(std::vector const& sx0) { if (sx0.size() != (unsigned)nx_rdata * nplist() && !sx0.empty()) throw AmiException( "Dimension mismatch. Size of sx0 does not match " @@ -968,10 +976,11 @@ void Model::setInitialStateSensitivities(std::vector const& sx0) { // revert chainrule switch (simulation_parameters_.pscale.at(plist(ip))) { case ParameterScaling::log10: - chainrulefactor = state_.unscaledParameters.at(plist(ip)) * log(10); + chainrulefactor + = state_.unscaled_parameters.at(plist(ip)) * log(10); break; case ParameterScaling::ln: - chainrulefactor = state_.unscaledParameters.at(plist(ip)); + chainrulefactor = state_.unscaled_parameters.at(plist(ip)); break; case ParameterScaling::none: chainrulefactor = 1.0; @@ -983,14 +992,14 @@ void Model::setInitialStateSensitivities(std::vector const& sx0) { = sx0.at(ip * nx_rdata + ix) / chainrulefactor; } } - setUnscaledInitialStateSensitivities(sx0_rdata); + set_unscaled_initial_state_sensitivities(sx0_rdata); } -bool Model::hasCustomInitialStateSensitivities() const { +bool Model::has_custom_initial_state_sensitivities() const { return !sx0data_.empty(); } -void Model::setUnscaledInitialStateSensitivities( +void Model::set_unscaled_initial_state_sensitivities( std::vector const& sx0 ) { if (sx0.size() != (unsigned)nx_rdata * nplist() && !sx0.empty()) @@ -1008,11 +1017,11 @@ void Model::setUnscaledInitialStateSensitivities( sx0data_ = sx0; } -void Model::setSteadyStateComputationMode( +void Model::set_steady_state_computation_mode( SteadyStateComputationMode const mode ) { - if (mode != SteadyStateComputationMode::integrationOnly && ne && logger) { - logger->log( + if (mode != SteadyStateComputationMode::integrationOnly && ne && logger_) { + logger_->log( LogSeverity::warning, "WARNING", "Non-initial events will not be handled if Newton's method is used " "for steady state computation." @@ -1021,33 +1030,33 @@ void Model::setSteadyStateComputationMode( steadystate_computation_mode_ = mode; } -SteadyStateComputationMode Model::getSteadyStateComputationMode() const { +SteadyStateComputationMode Model::get_steady_state_computation_mode() const { return steadystate_computation_mode_; } -void Model::setSteadyStateSensitivityMode( +void Model::set_steady_state_sensitivity_mode( SteadyStateSensitivityMode const mode ) { steadystate_sensitivity_mode_ = mode; } -SteadyStateSensitivityMode Model::getSteadyStateSensitivityMode() const { +SteadyStateSensitivityMode Model::get_steady_state_sensitivity_mode() const { return steadystate_sensitivity_mode_; } -void Model::setReinitializeFixedParameterInitialStates(bool flag) { - if (flag && !isFixedParameterStateReinitializationAllowed()) +void Model::set_reinitialize_fixed_parameter_initial_states(bool flag) { + if (flag && !is_fixed_parameter_state_reinitialization_allowed()) throw AmiException( "State reinitialization cannot be enabled for this model " "as this feature was disabled at compile time. Most likely," " this was because some initial states depending on " "fixedParameters also depended on parameters." ); - simulation_parameters_.reinitializeFixedParameterInitialStates = flag; + simulation_parameters_.reinitialize_fixed_parameter_initial_states = flag; if (flag) { simulation_parameters_ - .reinitializeAllFixedParameterDependentInitialStatesForSimulation( + .reinitialize_all_fixed_parameter_dependent_initial_states_for_simulation( nx_rdata ); } else { @@ -1055,36 +1064,36 @@ void Model::setReinitializeFixedParameterInitialStates(bool flag) { } } -bool Model::getReinitializeFixedParameterInitialStates() const { - return simulation_parameters_.reinitializeFixedParameterInitialStates +bool Model::get_reinitialize_fixed_parameter_initial_states() const { + return simulation_parameters_.reinitialize_fixed_parameter_initial_states || !simulation_parameters_.reinitialization_state_idxs_sim.empty(); } -void Model::requireSensitivitiesForAllParameters() { +void Model::require_sensitivities_for_all_parameters() { state_.plist.resize(np()); std::iota(state_.plist.begin(), state_.plist.end(), 0); - initializeVectors(); + initialize_vectors(); } -void Model::getExpression( +void Model::get_expression( gsl::span w, realtype const t, AmiVector const& x ) { - fw(t, computeX_pos(x), false); - writeSlice(derived_state_.w_, w); + fw(t, compute_x_pos(x), false); + write_slice(derived_state_.w_, w); } -void Model::getObservable( +void Model::get_observable( gsl::span y, realtype const t, AmiVector const& x ) { fy(t, x); - writeSlice(derived_state_.y_, y); + write_slice(derived_state_.y_, y); } -ObservableScaling Model::getObservableScaling(int /*iy*/) const { +ObservableScaling Model::get_observable_scaling(int /*iy*/) const { return ObservableScaling::lin; } -void Model::getObservableSensitivity( +void Model::get_observable_sensitivity( gsl::span sy, realtype const t, AmiVector const& x, AmiVectorArray const& sx ) { @@ -1113,25 +1122,25 @@ void Model::getObservableSensitivity( nx_solver, 1.0, derived_state_.dydp_.data(), ny ); } - writeSlice(derived_state_.dydp_, sy); + write_slice(derived_state_.dydp_, sy); if (always_check_finite_) - checkFinite(sy, ModelQuantity::sy, nplist()); + check_finite(sy, ModelQuantity::sy, nplist()); } -void Model::getObservableSigma( +void Model::get_observable_sigma( gsl::span sigmay, int const it, ExpData const* edata ) { fsigmay(it, edata); - writeSlice(derived_state_.sigmay_, sigmay); + write_slice(derived_state_.sigmay_, sigmay); } -void Model::getObservableSigmaSensitivity( +void Model::get_observable_sigma_sensitivity( gsl::span ssigmay, gsl::span sy, int const it, ExpData const* edata ) { fdsigmaydp(it, edata); - writeSlice(derived_state_.dsigmaydp_, ssigmay); + write_slice(derived_state_.dsigmaydp_, ssigmay); // ssigmay = dsigmaydy*(dydx_solver*sx+dydp)+dsigmaydp // = dsigmaydy*sy+dsigmaydp @@ -1152,28 +1161,28 @@ void Model::getObservableSigmaSensitivity( ); if (always_check_finite_) - checkFinite(ssigmay, ModelQuantity::ssigmay, nplist()); + check_finite(ssigmay, ModelQuantity::ssigmay, nplist()); } -void Model::addObservableObjective( +void Model::add_observable_objective( realtype& Jy, int const it, AmiVector const& x, ExpData const& edata ) { - fy(edata.getTimepoint(it), x); + fy(edata.get_timepoint(it), x); fsigmay(it, &edata); std::vector nllh(nJ, 0.0); for (int iyt = 0; iyt < nytrue; iyt++) { - if (edata.isSetObservedData(it, iyt)) { + if (edata.is_set_observed_data(it, iyt)) { std::ranges::fill(nllh, 0.0); - fJy(nllh.data(), iyt, state_.unscaledParameters.data(), - state_.fixedParameters.data(), derived_state_.y_.data(), - derived_state_.sigmay_.data(), edata.getObservedDataPtr(it)); + fJy(nllh.data(), iyt, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.y_.data(), + derived_state_.sigmay_.data(), edata.get_observed_data_ptr(it)); Jy -= nllh.at(0); } } } -void Model::addObservableObjectiveSensitivity( +void Model::add_observable_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int const it, AmiVector const& x, AmiVectorArray const& sx, ExpData const& edata ) { @@ -1199,10 +1208,10 @@ void Model::addObservableObjectiveSensitivity( nJ ); - writeLLHSensitivitySlice(derived_state_.dJydp_, sllh, s2llh); + write_llh_sensitivity_slice(derived_state_.dJydp_, sllh, s2llh); } -void Model::addPartialObservableObjectiveSensitivity( +void Model::add_partial_observable_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int const it, AmiVector const& x, ExpData const& edata ) { @@ -1211,25 +1220,25 @@ void Model::addPartialObservableObjectiveSensitivity( fdJydp(it, x, edata); - writeLLHSensitivitySlice(derived_state_.dJydp_, sllh, s2llh); + write_llh_sensitivity_slice(derived_state_.dJydp_, sllh, s2llh); } -void Model::getAdjointStateObservableUpdate( +void Model::get_adjoint_state_observable_update( gsl::span dJydx, int const it, AmiVector const& x, ExpData const& edata ) { fdJydx(it, x, edata); - writeSlice(derived_state_.dJydx_, dJydx); + write_slice(derived_state_.dJydx_, dJydx); } -void Model::getEvent( +void Model::get_event( gsl::span z, int const ie, realtype const t, AmiVector const& x ) { fz(ie, t, x); - writeSliceEvent(derived_state_.z_, z, ie); + write_slice_event(derived_state_.z_, z, ie); } -void Model::getEventSensitivity( +void Model::get_event_sensitivity( gsl::span sz, int const ie, realtype const t, AmiVector const& x, AmiVectorArray const& sx ) { @@ -1255,16 +1264,16 @@ void Model::getEventSensitivity( nz ); - addSlice(derived_state_.dzdp_, sz); + add_slice(derived_state_.dzdp_, sz); if (always_check_finite_) - checkFinite(sz, ModelQuantity::sz, nplist()); + check_finite(sz, ModelQuantity::sz, nplist()); } -void Model::getUnobservedEventSensitivity( +void Model::get_unobserved_event_sensitivity( gsl::span sz, int const ie ) { - checkBufferSize(sz, nz * nplist()); + check_buffer_size(sz, nz * nplist()); for (int iz = 0; iz < nz; ++iz) if (z2event_.at(iz) == ie) @@ -1272,14 +1281,14 @@ void Model::getUnobservedEventSensitivity( sz[ip * nz + iz] = 0.0; } -void Model::getEventRegularization( +void Model::get_event_regularization( gsl::span rz, int const ie, realtype const t, AmiVector const& x ) { frz(ie, t, x); - writeSliceEvent(derived_state_.rz_, rz, ie); + write_slice_event(derived_state_.rz_, rz, ie); } -void Model::getEventRegularizationSensitivity( +void Model::get_event_regularization_sensitivity( gsl::span srz, int const ie, realtype const t, AmiVector const& x, AmiVectorArray const& sx ) { @@ -1306,29 +1315,29 @@ void Model::getEventRegularizationSensitivity( nz ); - addSlice(derived_state_.drzdp_, srz); + add_slice(derived_state_.drzdp_, srz); if (always_check_finite_) - checkFinite(srz, ModelQuantity::srz, nplist()); + check_finite(srz, ModelQuantity::srz, nplist()); } -void Model::getEventSigma( +void Model::get_event_sigma( gsl::span sigmaz, int const ie, int const nroots, realtype const t, ExpData const* edata ) { fsigmaz(ie, nroots, t, edata); - writeSliceEvent(derived_state_.sigmaz_, sigmaz, ie); + write_slice_event(derived_state_.sigmaz_, sigmaz, ie); } -void Model::getEventSigmaSensitivity( +void Model::get_event_sigma_sensitivity( gsl::span ssigmaz, int const ie, int const nroots, realtype const t, ExpData const* edata ) { fdsigmazdp(ie, nroots, t, edata); - writeSensitivitySliceEvent(derived_state_.dsigmazdp_, ssigmaz, ie); + write_sensitivity_slice_event(derived_state_.dsigmazdp_, ssigmaz, ie); } -void Model::addEventObjective( +void Model::add_event_objective( realtype& Jz, int const ie, int const nroots, realtype const t, AmiVector const& x, ExpData const& edata ) { @@ -1337,18 +1346,18 @@ void Model::addEventObjective( std::vector nllh(nJ, 0.0); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { std::ranges::fill(nllh, 0.0); - fJz(nllh.data(), iztrue, state_.unscaledParameters.data(), - state_.fixedParameters.data(), derived_state_.z_.data(), + fJz(nllh.data(), iztrue, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.z_.data(), derived_state_.sigmaz_.data(), - edata.getObservedEventsPtr(nroots)); + edata.get_observed_events_ptr(nroots)); Jz -= nllh.at(0); } } } -void Model::addEventObjectiveRegularization( +void Model::add_event_objective_regularization( realtype& Jrz, int const ie, int const nroots, realtype const t, AmiVector const& x, ExpData const& edata ) { @@ -1357,11 +1366,11 @@ void Model::addEventObjectiveRegularization( std::vector nllh(nJ, 0.0); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { std::ranges::fill(nllh, 0.0); fJrz( - nllh.data(), iztrue, state_.unscaledParameters.data(), - state_.fixedParameters.data(), derived_state_.rz_.data(), + nllh.data(), iztrue, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.rz_.data(), derived_state_.sigmaz_.data() ); Jrz -= nllh.at(0); @@ -1369,7 +1378,7 @@ void Model::addEventObjectiveRegularization( } } -void Model::addEventObjectiveSensitivity( +void Model::add_event_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int const ie, int const nroots, realtype const t, AmiVector const& x, AmiVectorArray const& sx, ExpData const& edata @@ -1402,18 +1411,18 @@ void Model::addEventObjectiveSensitivity( ); // sJy += multResult + dJydp - writeLLHSensitivitySlice(derived_state_.dJzdp_, sllh, s2llh); + write_llh_sensitivity_slice(derived_state_.dJzdp_, sllh, s2llh); } -void Model::getAdjointStateEventUpdate( +void Model::get_adjoint_state_event_update( gsl::span dJzdx, int const ie, int const nroots, realtype const t, AmiVector const& x, ExpData const& edata ) { fdJzdx(ie, nroots, t, x, edata); - writeSlice(derived_state_.dJzdx_, dJzdx); + write_slice(derived_state_.dJzdx_, dJzdx); } -void Model::addPartialEventObjectiveSensitivity( +void Model::add_partial_event_objective_sensitivity( std::vector& sllh, std::vector& s2llh, int const ie, int const nroots, realtype const t, AmiVector const& x, ExpData const& edata ) { @@ -1422,10 +1431,10 @@ void Model::addPartialEventObjectiveSensitivity( fdJzdp(ie, nroots, t, x, edata); - writeLLHSensitivitySlice(derived_state_.dJzdp_, sllh, s2llh); + write_llh_sensitivity_slice(derived_state_.dJzdp_, sllh, s2llh); } -void Model::getEventTimeSensitivity( +void Model::get_event_time_sensitivity( std::vector& stau, realtype const t, int const ie, AmiVector const& x, AmiVectorArray const& sx, AmiVector const& dx ) { @@ -1434,38 +1443,39 @@ void Model::getEventTimeSensitivity( for (int ip = 0; ip < nplist(); ip++) { fstau( - &stau.at(ip), t, computeX_pos(x), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), dx.data(), - state_.total_cl.data(), sx.data(ip), plist(ip), ie + &stau.at(ip), t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), + state_.h.data(), dx.data(), state_.total_cl.data(), sx.data(ip), + plist(ip), ie ); } } -void Model::addStateEventUpdate( +void Model::add_state_event_update( AmiVector& x, int const ie, realtype const t, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, ModelState const& state ) { derived_state_.deltax_.assign(nx_solver, 0.0); - std::copy_n(computeX_pos(x), nx_solver, x.data()); + std::copy_n(compute_x_pos(x), nx_solver, x.data()); // compute update fdeltax( derived_state_.deltax_.data(), t, x.data(), - state.unscaledParameters.data(), state.fixedParameters.data(), + state.unscaled_parameters.data(), state.fixed_parameters.data(), state.h.data(), ie, xdot.data(), xdot_old.data(), x_old.data() ); if (always_check_finite_) { - checkFinite(derived_state_.deltax_, ModelQuantity::deltax, t); + check_finite(derived_state_.deltax_, ModelQuantity::deltax, t); } // update amici_daxpy(nx_solver, 1.0, derived_state_.deltax_.data(), 1, x.data(), 1); } -void Model::addStateSensitivityEventUpdate( +void Model::add_state_sensitivity_event_update( AmiVectorArray& sx, int const ie, realtype const t, AmiVector const& x, AmiVector const& x_old, AmiVector const& xdot, AmiVector const& xdot_old, AmiVectorArray const& sx_old, std::vector const& stau @@ -1479,13 +1489,13 @@ void Model::addStateSensitivityEventUpdate( // compute update fdeltasx( derived_state_.deltasx_.data(), t, x.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data(), plist(ip), ie, xdot.data(), xdot_old.data(), sx_old.data(ip), &stau.at(ip), state_.total_cl.data(), x_old.data() ); if (always_check_finite_) { - checkFinite( + check_finite( derived_state_.deltasx_, ModelQuantity::deltasx, nplist() ); } @@ -1496,7 +1506,7 @@ void Model::addStateSensitivityEventUpdate( } } -void Model::addAdjointStateEventUpdate( +void Model::add_adjoint_state_event_update( AmiVector& xB, int const ie, realtype const t, AmiVector const& x, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, AmiVector const& dx @@ -1506,14 +1516,14 @@ void Model::addAdjointStateEventUpdate( // compute update fdeltaxB( - derived_state_.deltaxB_.data(), t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.deltaxB_.data(), t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), dx.data(), ie, xdot.data(), xdot_old.data(), x_old.data(), xB.data(), state_.total_cl.data() ); if (always_check_finite_) { - checkFinite(derived_state_.deltaxB_, ModelQuantity::deltaxB, t); + check_finite(derived_state_.deltaxB_, ModelQuantity::deltaxB, t); } // apply update @@ -1523,7 +1533,7 @@ void Model::addAdjointStateEventUpdate( += derived_state_.deltaxB_.at(ix + iJ * nxtrue_solver); } -void Model::addAdjointQuadratureEventUpdate( +void Model::add_adjoint_quadrature_event_update( AmiVector& xQB, int const ie, realtype const t, AmiVector const& x, AmiVector const& xB, AmiVector const& xdot, AmiVector const& xdot_old, AmiVector const& x_old, AmiVector const& dx @@ -1532,8 +1542,8 @@ void Model::addAdjointQuadratureEventUpdate( derived_state_.deltaqB_.assign(nJ, 0.0); fdeltaqB( - derived_state_.deltaqB_.data(), t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.deltaqB_.data(), t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), dx.data(), plist(ip), ie, xdot.data(), xdot_old.data(), x_old.data(), xB.data() ); @@ -1543,17 +1553,17 @@ void Model::addAdjointQuadratureEventUpdate( } if (always_check_finite_) { - checkFinite(derived_state_.deltaqB_, ModelQuantity::deltaqB, t); + check_finite(derived_state_.deltaqB_, ModelQuantity::deltaqB, t); } } -void Model::updateHeaviside(std::vector const& rootsfound) { +void Model::update_heaviside(std::vector const& rootsfound) { for (int ie = 0; ie < ne; ie++) { state_.h.at(ie) += rootsfound.at(ie); } } -int Model::checkFinite( +int Model::check_finite( gsl::span array, ModelQuantity model_quantity, realtype t ) const { auto it = std::ranges::find_if(array, [](realtype x) { @@ -1589,28 +1599,28 @@ int Model::checkFinite( case ModelQuantity::JDiag: case ModelQuantity::deltax: case ModelQuantity::deltaxB: - if (hasStateIds()) { - element_id = getStateIdsSolver()[flat_index]; + if (has_state_ids()) { + element_id = get_state_ids_solver()[flat_index]; } break; case ModelQuantity::y: - if (hasObservableIds()) { - element_id = getObservableIds()[flat_index]; + if (has_observable_ids()) { + element_id = get_observable_ids()[flat_index]; } break; case ModelQuantity::w: - if (hasExpressionIds()) { - element_id = getExpressionIds()[flat_index]; + if (has_expression_ids()) { + element_id = get_expression_ids()[flat_index]; } break; case ModelQuantity::k: - if (hasFixedParameterIds()) { - element_id = getFixedParameterIds()[flat_index]; + if (has_fixed_parameter_ids()) { + element_id = get_fixed_parameter_ids()[flat_index]; } break; case ModelQuantity::p: - if (hasParameterIds()) { - element_id = getParameterIds()[flat_index]; + if (has_parameter_ids()) { + element_id = get_parameter_ids()[flat_index]; } break; default: @@ -1626,12 +1636,12 @@ int Model::checkFinite( gsl_ExpectsDebug(false); model_quantity_str = std::to_string(static_cast(model_quantity)); } - if (logger) { + if (logger_) { auto t_msg = std::isfinite(t) ? std::string(" at t=" + std::to_string(t) + " ") : std::string(); - logger->log( + logger_->log( LogSeverity::warning, msg_id, "AMICI encountered a %s value for %s[%i] (%s)%s", non_finite_type.c_str(), model_quantity_str.c_str(), @@ -1641,17 +1651,17 @@ int Model::checkFinite( // check upstream, without infinite recursion if (model_quantity != ModelQuantity::k && model_quantity != ModelQuantity::p && model_quantity != ModelQuantity::ts) { - checkFinite(state_.fixedParameters, ModelQuantity::k, t); - checkFinite(state_.unscaledParameters, ModelQuantity::p, t); + check_finite(state_.fixed_parameters, ModelQuantity::k, t); + check_finite(state_.unscaled_parameters, ModelQuantity::p, t); if (!always_check_finite_ && model_quantity != ModelQuantity::w) { // don't check twice if always_check_finite_ is true - checkFinite(derived_state_.w_, ModelQuantity::w, t); + check_finite(derived_state_.w_, ModelQuantity::w, t); } } return AMICI_RECOVERABLE_ERROR; } -int Model::checkFinite( +int Model::check_finite( gsl::span array, ModelQuantity model_quantity, size_t num_cols, realtype t ) const { @@ -1683,47 +1693,47 @@ int Model::checkFinite( case ModelQuantity::ssigmay: case ModelQuantity::dydp: case ModelQuantity::dsigmaydp: - if (hasObservableIds()) - row_id += " " + getObservableIds()[row]; - if (hasParameterIds()) - col_id += " " + getParameterIds()[plist(gsl::narrow(col))]; + if (has_observable_ids()) + row_id += " " + get_observable_ids()[row]; + if (has_parameter_ids()) + col_id += " " + get_parameter_ids()[plist(gsl::narrow(col))]; break; case ModelQuantity::dydx: - if (hasObservableIds()) - row_id += " " + getObservableIds()[row]; - if (hasStateIds()) - col_id += " " + getStateIdsSolver()[col]; + if (has_observable_ids()) + row_id += " " + get_observable_ids()[row]; + if (has_state_ids()) + col_id += " " + get_state_ids_solver()[col]; break; case ModelQuantity::deltasx: - if (hasStateIds()) - row_id += " " + getStateIdsSolver()[row]; - if (hasParameterIds()) - col_id += " " + getParameterIds()[plist(gsl::narrow(col))]; + if (has_state_ids()) + row_id += " " + get_state_ids_solver()[row]; + if (has_parameter_ids()) + col_id += " " + get_parameter_ids()[plist(gsl::narrow(col))]; break; case ModelQuantity::dJydy: case ModelQuantity::dJydsigma: - if (hasObservableIds()) - col_id += " " + getObservableIds()[col]; + if (has_observable_ids()) + col_id += " " + get_observable_ids()[col]; break; case ModelQuantity::dJydx: case ModelQuantity::dJzdx: case ModelQuantity::dJrzdx: case ModelQuantity::dzdx: case ModelQuantity::drzdx: - if (hasStateIds()) - col_id += " " + getStateIdsSolver()[col]; + if (has_state_ids()) + col_id += " " + get_state_ids_solver()[col]; break; case ModelQuantity::deltaqB: case ModelQuantity::sz: case ModelQuantity::dzdp: case ModelQuantity::drzdp: case ModelQuantity::dsigmazdp: - if (hasParameterIds()) - col_id += " " + getParameterIds()[plist(gsl::narrow(col))]; + if (has_parameter_ids()) + col_id += " " + get_parameter_ids()[plist(gsl::narrow(col))]; break; case ModelQuantity::dsigmaydy: - if (hasObservableIds()) { - auto obs_ids = getObservableIds(); + if (has_observable_ids()) { + auto obs_ids = get_observable_ids(); row_id += " " + obs_ids[row]; col_id += " " + obs_ids[col]; } @@ -1742,12 +1752,12 @@ int Model::checkFinite( model_quantity_str = std::to_string(static_cast(model_quantity)); } - if (logger) { + if (logger_) { auto t_msg = std::isfinite(t) ? std::string(" at t=" + std::to_string(t) + " ") : std::string(); - logger->log( + logger_->log( LogSeverity::warning, msg_id, "AMICI encountered a %s value for %s[%i] (%s, %s)%s", non_finite_type.c_str(), model_quantity_str.c_str(), @@ -1757,14 +1767,14 @@ int Model::checkFinite( } // check upstream - checkFinite(state_.fixedParameters, ModelQuantity::k, t); - checkFinite(state_.unscaledParameters, ModelQuantity::p, t); - checkFinite(derived_state_.w_, ModelQuantity::w, t); + check_finite(state_.fixed_parameters, ModelQuantity::k, t); + check_finite(state_.unscaled_parameters, ModelQuantity::p, t); + check_finite(derived_state_.w_, ModelQuantity::w, t); return AMICI_RECOVERABLE_ERROR; } -int Model::checkFinite( +int Model::check_finite( SUNMatrix m, ModelQuantity model_quantity, realtype t ) const { // check flat array, to see if there are any issues @@ -1799,30 +1809,30 @@ int Model::checkFinite( switch (model_quantity) { case ModelQuantity::J: case ModelQuantity::JB: - if (hasStateIds()) { - auto state_ids = getStateIdsSolver(); + if (has_state_ids()) { + auto state_ids = get_state_ids_solver(); row_id += " " + state_ids[row]; col_id += " " + state_ids[col]; } break; case ModelQuantity::dwdx: - if (hasExpressionIds()) - row_id += " " + getExpressionIds()[row]; - if (hasStateIds()) - col_id += " " + getStateIdsSolver()[col]; + if (has_expression_ids()) + row_id += " " + get_expression_ids()[row]; + if (has_state_ids()) + col_id += " " + get_state_ids_solver()[col]; break; case ModelQuantity::dwdw: - if (hasExpressionIds()) { - auto expr_ids = getExpressionIds(); + if (has_expression_ids()) { + auto expr_ids = get_expression_ids(); row_id += " " + expr_ids[row]; col_id += " " + expr_ids[col]; } break; case ModelQuantity::dwdp: - if (hasExpressionIds()) - row_id += " " + getExpressionIds()[row]; - if (hasParameterIds()) - col_id += " " + getParameterIds()[col]; + if (has_expression_ids()) + row_id += " " + get_expression_ids()[row]; + if (has_parameter_ids()) + col_id += " " + get_parameter_ids()[col]; break; default: break; @@ -1838,8 +1848,8 @@ int Model::checkFinite( model_quantity_str = std::to_string(static_cast(model_quantity)); } - if (logger) - logger->log( + if (logger_) + logger_->log( LogSeverity::warning, msg_id, "AMICI encountered a %s value for %s[%i] (%s, %s) at t=%g", non_finite_type.c_str(), model_quantity_str.c_str(), @@ -1847,35 +1857,35 @@ int Model::checkFinite( ); // check upstream - checkFinite(state_.fixedParameters, ModelQuantity::k, t); - checkFinite(state_.unscaledParameters, ModelQuantity::p, t); - checkFinite(derived_state_.w_, ModelQuantity::w, t); + check_finite(state_.fixed_parameters, ModelQuantity::k, t); + check_finite(state_.unscaled_parameters, ModelQuantity::p, t); + check_finite(derived_state_.w_, ModelQuantity::w, t); return AMICI_RECOVERABLE_ERROR; } -void Model::setAlwaysCheckFinite(bool alwaysCheck) { +void Model::set_always_check_finite(bool alwaysCheck) { always_check_finite_ = alwaysCheck; } -bool Model::getAlwaysCheckFinite() const { return always_check_finite_; } +bool Model::get_always_check_finite() const { return always_check_finite_; } void Model::fx0(realtype t, AmiVector& x) { std::ranges::fill(derived_state_.x_rdata_, 0.0); /* this function also computes initial total abundances */ - fx0(derived_state_.x_rdata_.data(), t, state_.unscaledParameters.data(), - state_.fixedParameters.data()); + fx0(derived_state_.x_rdata_.data(), t, state_.unscaled_parameters.data(), + state_.fixed_parameters.data()); fx_solver(x.data(), derived_state_.x_rdata_.data()); ftotal_cl( state_.total_cl.data(), derived_state_.x_rdata_.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data() + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); - checkFinite(derived_state_.x_rdata_, ModelQuantity::x0_rdata, t); + check_finite(derived_state_.x_rdata_, ModelQuantity::x0_rdata, t); } void Model::fx0_fixedParameters(realtype t, AmiVector& x) { - if (!getReinitializeFixedParameterInitialStates()) + if (!get_reinitialize_fixed_parameter_initial_states()) return; /* we transform to the unreduced states x_rdata and then apply @@ -1883,19 +1893,20 @@ void Model::fx0_fixedParameters(realtype t, AmiVector& x) { conservation laws and (ii) be able to correctly compute total abundances after updating the state variables */ fx_rdata( - derived_state_.x_rdata_.data(), computeX_pos(x), state_.total_cl.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data() + derived_state_.x_rdata_.data(), compute_x_pos(x), + state_.total_cl.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data() ); fx0_fixedParameters( - derived_state_.x_rdata_.data(), t, state_.unscaledParameters.data(), - state_.fixedParameters.data(), + derived_state_.x_rdata_.data(), t, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), simulation_parameters_.reinitialization_state_idxs_sim ); fx_solver(x.data(), derived_state_.x_rdata_.data()); /* update total abundances */ ftotal_cl( state_.total_cl.data(), derived_state_.x_rdata_.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data() + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); } @@ -1907,15 +1918,15 @@ void Model::fsx0(realtype t, AmiVectorArray& sx, AmiVector const& x) { stcl = &state_.stotal_cl.at(plist(ip) * ncl()); std::ranges::fill(derived_state_.sx_rdata_, 0.0); fsx0( - derived_state_.sx_rdata_.data(), t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.sx_rdata_.data(), t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), plist(ip) ); fsx_solver(sx.data(ip), derived_state_.sx_rdata_.data()); fstotal_cl( stcl, derived_state_.sx_rdata_.data(), plist(ip), - derived_state_.x_rdata_.data(), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.total_cl.data() + derived_state_.x_rdata_.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.total_cl.data() ); } } @@ -1923,7 +1934,7 @@ void Model::fsx0(realtype t, AmiVectorArray& sx, AmiVector const& x) { void Model::fsx0_fixedParameters( realtype t, AmiVectorArray& sx, AmiVector const& x ) { - if (!getReinitializeFixedParameterInitialStates()) + if (!get_reinitialize_fixed_parameter_initial_states()) return; realtype* stcl = nullptr; for (int ip = 0; ip < nplist(); ip++) { @@ -1931,19 +1942,19 @@ void Model::fsx0_fixedParameters( stcl = &state_.stotal_cl.at(plist(ip) * ncl()); fsx_rdata( derived_state_.sx_rdata_.data(), sx.data(ip), stcl, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), x.data(), state_.total_cl.data(), plist(ip) ); fsx0_fixedParameters( - derived_state_.sx_rdata_.data(), t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.sx_rdata_.data(), t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), plist(ip), simulation_parameters_.reinitialization_state_idxs_sim ); fsx_solver(sx.data(ip), derived_state_.sx_rdata_.data()); fstotal_cl( stcl, derived_state_.sx_rdata_.data(), plist(ip), - derived_state_.x_rdata_.data(), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.total_cl.data() + derived_state_.x_rdata_.data(), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.total_cl.data() ); } } @@ -1952,11 +1963,11 @@ void Model::fsdx0() {} void Model::fx_rdata(gsl::span x_rdata, AmiVector const& x) { fx_rdata( - x_rdata.data(), computeX_pos(x), state_.total_cl.data(), - state_.unscaledParameters.data(), state_.fixedParameters.data() + x_rdata.data(), compute_x_pos(x), state_.total_cl.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data() ); if (always_check_finite_) - checkFinite( + check_finite( x_rdata, ModelQuantity::x_rdata, std::numeric_limits::quiet_NaN() ); @@ -1972,38 +1983,38 @@ void Model::fsx_rdata( stcl = &state_.stotal_cl.at(plist(ip) * ncl()); fsx_rdata( &sx_rdata[ip * nx_rdata], sx.data(ip), stcl, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), x_solver.data(), state_.total_cl.data(), plist(ip) ); } } -void Model::writeSliceEvent( +void Model::write_slice_event( gsl::span slice, gsl::span buffer, int const ie ) { - checkBufferSize(buffer, slice.size()); - checkBufferSize(buffer, z2event_.size()); + check_buffer_size(buffer, slice.size()); + check_buffer_size(buffer, z2event_.size()); for (unsigned izt = 0; izt < z2event_.size(); ++izt) if (z2event_.at(izt) == ie) buffer[izt] = slice[izt]; } -void Model::writeSensitivitySliceEvent( +void Model::write_sensitivity_slice_event( gsl::span slice, gsl::span buffer, int const ie ) { - checkBufferSize(buffer, slice.size()); - checkBufferSize(buffer, z2event_.size() * nplist()); + check_buffer_size(buffer, slice.size()); + check_buffer_size(buffer, z2event_.size() * nplist()); for (int ip = 0; ip < nplist(); ++ip) for (unsigned izt = 0; izt < z2event_.size(); ++izt) if (z2event_.at(izt) == ie) buffer[ip * nztrue + izt] = slice[ip * nztrue + izt]; } -void Model::writeLLHSensitivitySlice( +void Model::write_llh_sensitivity_slice( std::vector const& dLLhdp, std::vector& sllh, std::vector& s2llh ) { - checkLLHBufferSize(sllh, s2llh); + check_llh_buffer_size(sllh, s2llh); amici_daxpy(nplist(), -1.0, dLLhdp.data(), nJ, sllh.data(), 1); for (int iJ = 1; iJ < nJ; ++iJ) @@ -2012,7 +2023,7 @@ void Model::writeLLHSensitivitySlice( ); } -void Model::checkLLHBufferSize( +void Model::check_llh_buffer_size( std::vector const& sllh, std::vector const& s2llh ) const { if (sllh.size() != gsl::narrow(nplist())) @@ -2028,23 +2039,23 @@ void Model::checkLLHBufferSize( ); } -void Model::initializeVectors() { sx0data_.clear(); } +void Model::initialize_vectors() { sx0data_.clear(); } void Model::fy(realtype const t, AmiVector const& x) { if (!ny) return; - auto x_pos = computeX_pos(x); + auto x_pos = compute_x_pos(x); derived_state_.y_.assign(ny, 0.0); fw(t, x_pos, false); - fy(derived_state_.y_.data(), t, x_pos, state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + fy(derived_state_.y_.data(), t, x_pos, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data()); if (always_check_finite_) { - checkFinite( + check_finite( gsl::make_span(derived_state_.y_.data(), ny), ModelQuantity::y, t ); } @@ -2054,7 +2065,7 @@ void Model::fdydp(realtype const t, AmiVector const& x) { if (!ny) return; - auto x_pos = computeX_pos(x); + auto x_pos = compute_x_pos(x); derived_state_.dydp_.assign(ny * nplist(), 0.0); fw(t, x_pos, false); @@ -2064,14 +2075,14 @@ void Model::fdydp(realtype const t, AmiVector const& x) { for (int ip = 0; ip < nplist(); ip++) fdydp( &derived_state_.dydp_.at(ip * ny), t, x_pos, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), plist(ip), derived_state_.w_.data(), state_.total_cl.data(), state_.stotal_cl.data(), derived_state_.spl_.data(), derived_state_.sspl_.data() ); if (always_check_finite_) { - checkFinite(derived_state_.dydp_, ModelQuantity::dydp, nplist()); + check_finite(derived_state_.dydp_, ModelQuantity::dydp, nplist()); } } @@ -2079,19 +2090,19 @@ void Model::fdydx(realtype const t, AmiVector const& x) { if (!ny) return; - auto x_pos = computeX_pos(x); + auto x_pos = compute_x_pos(x); derived_state_.dydx_.assign(ny * nx_solver, 0.0); fw(t, x_pos, false); fdydx( - derived_state_.dydx_.data(), t, x_pos, state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), - derived_state_.w_.data() + derived_state_.dydx_.data(), t, x_pos, + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), + state_.h.data(), derived_state_.w_.data() ); if (always_check_finite_) { - checkFinite(derived_state_.dydx_, ModelQuantity::dydx, ny); + check_finite(derived_state_.dydx_, ModelQuantity::dydx, ny); } } @@ -2102,17 +2113,17 @@ void Model::fsigmay(int const it, ExpData const* edata) { derived_state_.sigmay_.assign(ny, 0.0); fsigmay( - derived_state_.sigmay_.data(), getTimepoint(it), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.sigmay_.data(), get_timepoint(it), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), derived_state_.y_.data() ); if (edata) { - auto sigmay_edata = edata->getObservedDataStdDevPtr(it); + auto sigmay_edata = edata->get_observed_data_std_dev_ptr(it); /* extract the value for the standard deviation from ExpData, * if the data value is NaN, use the parameter value */ for (int iytrue = 0; iytrue < nytrue; iytrue++) { - if (edata->isSetObservedDataStdDev(it, iytrue)) + if (edata->is_set_observed_data_std_dev(it, iytrue)) derived_state_.sigmay_.at(iytrue) = sigmay_edata[iytrue]; /* TODO: when moving second order code to cpp, verify @@ -2121,13 +2132,13 @@ void Model::fsigmay(int const it, ExpData const* edata) { for (int iJ = 1; iJ < nJ; iJ++) derived_state_.sigmay_.at(iytrue + iJ * nytrue) = 0; - if (edata->isSetObservedData(it, iytrue)) { - std::string obs_id = hasObservableIds() - ? getObservableIds().at(iytrue) + if (edata->is_set_observed_data(it, iytrue)) { + std::string obs_id = has_observable_ids() + ? get_observable_ids().at(iytrue) : std::to_string(iytrue); std::stringstream ss; ss << "sigmay (" << obs_id << ", ExpData::id=" << edata->id - << ", t=" << getTimepoint(it) << ")"; + << ", t=" << get_timepoint(it) << ")"; checkSigmaPositivity( derived_state_.sigmay_.at(iytrue), ss.str().c_str() ); @@ -2145,8 +2156,8 @@ void Model::fdsigmaydp(int const it, ExpData const* edata) { for (int ip = 0; ip < nplist(); ip++) // get dsigmaydp slice (ny) for current timepoint and parameter fdsigmaydp( - &derived_state_.dsigmaydp_.at(ip * ny), getTimepoint(it), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + &derived_state_.dsigmaydp_.at(ip * ny), get_timepoint(it), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), derived_state_.y_.data(), plist(ip) ); @@ -2154,7 +2165,7 @@ void Model::fdsigmaydp(int const it, ExpData const* edata) { // to zero if (edata) { for (int iy = 0; iy < nytrue; iy++) { - if (!edata->isSetObservedDataStdDev(it, iy)) + if (!edata->is_set_observed_data_std_dev(it, iy)) continue; for (int ip = 0; ip < nplist(); ip++) { derived_state_.dsigmaydp_.at(ip * ny + iy) = 0.0; @@ -2163,7 +2174,7 @@ void Model::fdsigmaydp(int const it, ExpData const* edata) { } if (always_check_finite_) { - checkFinite( + check_finite( derived_state_.dsigmaydp_, ModelQuantity::dsigmaydp, nplist() ); } @@ -2177,8 +2188,8 @@ void Model::fdsigmaydy(int const it, ExpData const* edata) { // get dsigmaydy slice (ny) for current timepoint fdsigmaydy( - derived_state_.dsigmaydy_.data(), getTimepoint(it), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.dsigmaydy_.data(), get_timepoint(it), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), derived_state_.y_.data() ); @@ -2186,7 +2197,7 @@ void Model::fdsigmaydy(int const it, ExpData const* edata) { // to zero if (edata) { for (int isigmay = 0; isigmay < nytrue; ++isigmay) { - if (!edata->isSetObservedDataStdDev(it, isigmay)) + if (!edata->is_set_observed_data_std_dev(it, isigmay)) continue; for (int iy = 0; iy < nytrue; ++iy) { derived_state_.dsigmaydy_.at(isigmay * ny + iy) = 0.0; @@ -2195,7 +2206,7 @@ void Model::fdsigmaydy(int const it, ExpData const* edata) { } if (always_check_finite_) { - checkFinite(derived_state_.dsigmaydy_, ModelQuantity::dsigmaydy, ny); + check_finite(derived_state_.dsigmaydy_, ModelQuantity::dsigmaydy, ny); } } @@ -2203,7 +2214,7 @@ void Model::fdJydy(int const it, AmiVector const& x, ExpData const& edata) { if (!ny) return; - fy(edata.getTimepoint(it), x); + fy(edata.get_timepoint(it), x); fsigmay(it, &edata); fdJydsigma(it, x, edata); @@ -2218,15 +2229,15 @@ void Model::fdJydy(int const it, AmiVector const& x, ExpData const& edata) { fdJydy_colptrs(derived_state_.dJydy_.at(iyt), iyt); fdJydy_rowvals(derived_state_.dJydy_.at(iyt), iyt); - if (!edata.isSetObservedData(it, iyt)) + if (!edata.is_set_observed_data(it, iyt)) continue; // get dJydy slice (ny) for current timepoint and observable fdJydy( derived_state_.dJydy_.at(iyt).data(), iyt, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), derived_state_.y_.data(), derived_state_.sigmay_.data(), - edata.getObservedDataPtr(it) + edata.get_observed_data_ptr(it) ); // dJydy += dJydsigma * dsigmaydy @@ -2253,7 +2264,7 @@ void Model::fdJydy(int const it, AmiVector const& x, ExpData const& edata) { derived_state_.dJydy_.at(iyt).refresh(); if (always_check_finite_) { - checkFinite( + check_finite( gsl::make_span(derived_state_.dJydy_.at(iyt).get()), ModelQuantity::dJydy, ny ); @@ -2267,20 +2278,20 @@ void Model::fdJydsigma(int const it, AmiVector const& x, ExpData const& edata) { derived_state_.dJydsigma_.assign(nytrue * ny * nJ, 0.0); - fy(edata.getTimepoint(it), x); + fy(edata.get_timepoint(it), x); fsigmay(it, &edata); for (int iyt = 0; iyt < nytrue; iyt++) { - if (edata.isSetObservedData(it, iyt)) { + if (edata.is_set_observed_data(it, iyt)) { // get dJydsigma slice (ny) for current timepoint and observable fdJydsigma( &derived_state_.dJydsigma_.at(iyt * ny * nJ), iyt, - state_.unscaledParameters.data(), state_.fixedParameters.data(), - derived_state_.y_.data(), derived_state_.sigmay_.data(), - edata.getObservedDataPtr(it) + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.y_.data(), + derived_state_.sigmay_.data(), edata.get_observed_data_ptr(it) ); if (always_check_finite_) { - checkFinite( + check_finite( gsl::span( &derived_state_.dJydsigma_.at(iyt * ny * nJ), ny * nJ ), @@ -2301,7 +2312,7 @@ void Model::fdJydp(int const it, AmiVector const& x, ExpData const& edata) { derived_state_.dJydp_.assign(nJ * nplist(), 0.0); fdJydy(it, x, edata); - fdydp(edata.getTimepoint(it), x); + fdydp(edata.get_timepoint(it), x); fdJydsigma(it, x, edata); fdsigmaydp(it, &edata); @@ -2309,7 +2320,7 @@ void Model::fdJydp(int const it, AmiVector const& x, ExpData const& edata) { setNaNtoZero(derived_state_.dJydsigma_); setNaNtoZero(derived_state_.dsigmaydp_); for (int iyt = 0; iyt < nytrue; ++iyt) { - if (!edata.isSetObservedData(it, iyt)) + if (!edata.is_set_observed_data(it, iyt)) continue; // dJydp = 1.0 * dJydp + 1.0 * dJydy * dydp @@ -2339,14 +2350,14 @@ void Model::fdJydx(int const it, AmiVector const& x, ExpData const& edata) { derived_state_.dJydx_.assign(nJ * nx_solver, 0.0); - fdydx(edata.getTimepoint(it), x); + fdydx(edata.get_timepoint(it), x); fdJydy(it, x, edata); // dJydy: nJ, ny x nytrue // dydx : ny x nx_solver // dJydx: nJ x nx_solver x nt for (int iyt = 0; iyt < nytrue; ++iyt) { - if (!edata.isSetObservedData(it, iyt)) + if (!edata.is_set_observed_data(it, iyt)) continue; // dJydy A[nyt,nJ,ny] * dydx B[ny,nx_solver] = dJydx C[it,nJ,nx_solver] // slice slice @@ -2362,7 +2373,7 @@ void Model::fdJydx(int const it, AmiVector const& x, ExpData const& edata) { } if (always_check_finite_) { - checkFinite(derived_state_.dJydx_, ModelQuantity::dJydx, nx_solver); + check_finite(derived_state_.dJydx_, ModelQuantity::dJydx, nx_solver); } } @@ -2370,8 +2381,8 @@ void Model::fz(int const ie, realtype const t, AmiVector const& x) { derived_state_.z_.assign(nz, 0.0); - fz(derived_state_.z_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + fz(derived_state_.z_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data()); } @@ -2383,14 +2394,14 @@ void Model::fdzdp(int const ie, realtype const t, AmiVector const& x) { for (int ip = 0; ip < nplist(); ip++) { fdzdp( - derived_state_.dzdp_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.dzdp_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), plist(ip) ); } if (always_check_finite_) { - checkFinite(derived_state_.dzdp_, ModelQuantity::dzdp, nplist()); + check_finite(derived_state_.dzdp_, ModelQuantity::dzdp, nplist()); } } @@ -2401,13 +2412,13 @@ void Model::fdzdx(int const ie, realtype const t, AmiVector const& x) { derived_state_.dzdx_.assign(nz * nx_solver, 0.0); fdzdx( - derived_state_.dzdx_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.dzdx_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data() ); if (always_check_finite_) { - checkFinite(derived_state_.dzdx_, ModelQuantity::dzdx, nx_solver); + check_finite(derived_state_.dzdx_, ModelQuantity::dzdx, nx_solver); } } @@ -2415,8 +2426,8 @@ void Model::frz(int const ie, realtype const t, AmiVector const& x) { derived_state_.rz_.assign(nz, 0.0); - frz(derived_state_.rz_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + frz(derived_state_.rz_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data()); } @@ -2428,14 +2439,14 @@ void Model::fdrzdp(int const ie, realtype const t, AmiVector const& x) { for (int ip = 0; ip < nplist(); ip++) { fdrzdp( - derived_state_.drzdp_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.drzdp_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), plist(ip) ); } if (always_check_finite_) { - checkFinite(derived_state_.drzdp_, ModelQuantity::drzdp, nplist()); + check_finite(derived_state_.drzdp_, ModelQuantity::drzdp, nplist()); } } @@ -2446,13 +2457,13 @@ void Model::fdrzdx(int const ie, realtype const t, AmiVector const& x) { derived_state_.drzdx_.assign(nz * nx_solver, 0.0); fdrzdx( - derived_state_.drzdx_.data(), ie, t, computeX_pos(x), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + derived_state_.drzdx_.data(), ie, t, compute_x_pos(x), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data() ); if (always_check_finite_) { - checkFinite(derived_state_.drzdx_, ModelQuantity::drzdx, nx_solver); + check_finite(derived_state_.drzdx_, ModelQuantity::drzdx, nx_solver); } } @@ -2464,16 +2475,16 @@ void Model::fsigmaz( derived_state_.sigmaz_.assign(nz, 0.0); fsigmaz( - derived_state_.sigmaz_.data(), t, state_.unscaledParameters.data(), - state_.fixedParameters.data() + derived_state_.sigmaz_.data(), t, state_.unscaled_parameters.data(), + state_.fixed_parameters.data() ); if (edata) { for (int iztrue = 0; iztrue < nztrue; iztrue++) { if (z2event_.at(iztrue) == ie) { - if (edata->isSetObservedEventsStdDev(nroots, iztrue)) { + if (edata->is_set_observed_events_std_dev(nroots, iztrue)) { auto sigmaz_edata - = edata->getObservedEventsStdDevPtr(nroots); + = edata->get_observed_events_std_dev_ptr(nroots); derived_state_.sigmaz_.at(iztrue) = sigmaz_edata[iztrue]; } @@ -2483,7 +2494,7 @@ void Model::fsigmaz( for (int iJ = 1; iJ < nJ; iJ++) derived_state_.sigmaz_.at(iztrue + iJ * nztrue) = 0; - if (edata->isSetObservedEvents(nroots, iztrue)) + if (edata->is_set_observed_events(nroots, iztrue)) checkSigmaPositivity( derived_state_.sigmaz_.at(iztrue), "sigmaz" ); @@ -2504,7 +2515,7 @@ void Model::fdsigmazdp( // get dsigmazdp slice (nz) for current event and parameter fdsigmazdp( &derived_state_.dsigmazdp_.at(ip * nz), t, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), plist(ip) ); } @@ -2514,7 +2525,7 @@ void Model::fdsigmazdp( if (edata) { for (int iz = 0; iz < nztrue; iz++) { if (z2event_.at(iz) == ie - && !edata->isSetObservedEventsStdDev(nroots, iz)) { + && !edata->is_set_observed_events_std_dev(nroots, iz)) { for (int ip = 0; ip < nplist(); ip++) derived_state_.dsigmazdp_.at(iz + nz * ip) = 0; } @@ -2522,7 +2533,7 @@ void Model::fdsigmazdp( } if (always_check_finite_) { - checkFinite( + check_finite( derived_state_.dsigmazdp_, ModelQuantity::dsigmazdp, nplist() ); } @@ -2541,15 +2552,16 @@ void Model::fdJzdz( fsigmaz(ie, nroots, t, &edata); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { fdJzdz( &derived_state_.dJzdz_.at(iztrue * nz * nJ), iztrue, - state_.unscaledParameters.data(), state_.fixedParameters.data(), - derived_state_.z_.data(), derived_state_.sigmaz_.data(), - edata.getObservedEventsPtr(nroots) + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.z_.data(), + derived_state_.sigmaz_.data(), + edata.get_observed_events_ptr(nroots) ); if (always_check_finite_) { - checkFinite( + check_finite( gsl::span( &derived_state_.dJzdz_.at(iztrue * nz * nJ), nz * nJ ), @@ -2573,15 +2585,16 @@ void Model::fdJzdsigma( fsigmaz(ie, nroots, t, &edata); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { fdJzdsigma( &derived_state_.dJzdsigma_.at(iztrue * nz * nJ), iztrue, - state_.unscaledParameters.data(), state_.fixedParameters.data(), - derived_state_.z_.data(), derived_state_.sigmaz_.data(), - edata.getObservedEventsPtr(nroots) + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.z_.data(), + derived_state_.sigmaz_.data(), + edata.get_observed_events_ptr(nroots) ); if (always_check_finite_) { - checkFinite( + check_finite( gsl::span( &derived_state_.dJzdsigma_.at(iztrue * nz * nJ), nz * nJ ), @@ -2619,10 +2632,10 @@ void Model::fdJzdp( setNaNtoZero(derived_state_.dJzdsigma_); setNaNtoZero(derived_state_.dJrzdsigma_); for (int izt = 0; izt < nztrue; ++izt) { - if (!edata.isSetObservedEvents(nroots, izt)) + if (!edata.is_set_observed_events(nroots, izt)) continue; - if (t < edata.getTimepoint(edata.nt() - 1)) { + if (t < edata.get_timepoint(edata.nt() - 1)) { // with z amici_dgemm( BLASLayout::colMajor, BLASTranspose::noTrans, @@ -2683,10 +2696,10 @@ void Model::fdJzdx( setNaNtoZero(derived_state_.drzdx_); for (int izt = 0; izt < nztrue; ++izt) { - if (!edata.isSetObservedEvents(nroots, izt)) + if (!edata.is_set_observed_events(nroots, izt)) continue; - if (t < edata.getTimepoint(edata.nt() - 1)) { + if (t < edata.get_timepoint(edata.nt() - 1)) { // z amici_dgemm( BLASLayout::colMajor, BLASTranspose::noTrans, @@ -2721,14 +2734,15 @@ void Model::fdJrzdz( fsigmaz(ie, nroots, t, &edata); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { fdJrzdz( &derived_state_.dJrzdz_.at(iztrue * nz * nJ), iztrue, - state_.unscaledParameters.data(), state_.fixedParameters.data(), - derived_state_.rz_.data(), derived_state_.sigmaz_.data() + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.rz_.data(), + derived_state_.sigmaz_.data() ); if (always_check_finite_) { - checkFinite( + check_finite( gsl::span( &derived_state_.dJrzdz_.at(iztrue * nz * nJ), nz * nJ ), @@ -2752,14 +2766,15 @@ void Model::fdJrzdsigma( fsigmaz(ie, nroots, t, &edata); for (int iztrue = 0; iztrue < nztrue; iztrue++) { - if (edata.isSetObservedEvents(nroots, iztrue)) { + if (edata.is_set_observed_events(nroots, iztrue)) { fdJrzdsigma( &derived_state_.dJrzdsigma_.at(iztrue * nz * nJ), iztrue, - state_.unscaledParameters.data(), state_.fixedParameters.data(), - derived_state_.rz_.data(), derived_state_.sigmaz_.data() + state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), derived_state_.rz_.data(), + derived_state_.sigmaz_.data() ); if (always_check_finite_) { - checkFinite( + check_finite( gsl::span( &derived_state_.dJrzdsigma_.at(iztrue * nz * nJ), nz * nJ @@ -2792,12 +2807,12 @@ void Model::fw(realtype const t, realtype const* x, bool include_static) { std::ranges::fill(derived_state_.w_, 0.0); } fspl(t); - fw(derived_state_.w_.data(), t, x, state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), state_.total_cl.data(), + fw(derived_state_.w_.data(), t, x, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), state_.total_cl.data(), derived_state_.spl_.data(), include_static); if (always_check_finite_) { - checkFinite(derived_state_.w_, ModelQuantity::w, t); + check_finite(derived_state_.w_, ModelQuantity::w, t); } } @@ -2818,7 +2833,7 @@ void Model::fdwdp(realtype const t, realtype const* x, bool include_static) { } fdwdp( derived_state_.dwdp_hierarchical_.at(0).data(), t, x, - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data(), state_.total_cl.data(), state_.stotal_cl.data(), derived_state_.spl_.data(), derived_state_.sspl_.data(), include_static @@ -2833,7 +2848,7 @@ void Model::fdwdp(realtype const t, realtype const* x, bool include_static) { derived_state_.dwdp_.sparse_sum(derived_state_.dwdp_hierarchical_); if (always_check_finite_) { - checkFinite(derived_state_.dwdp_, ModelQuantity::dwdp, t); + check_finite(derived_state_.dwdp_, ModelQuantity::dwdp, t); } } @@ -2858,8 +2873,8 @@ void Model::fdwdx(realtype const t, realtype const* x, bool include_static) { fdwdx_rowvals(dwdx_hierarchical_0); } fdwdx( - dwdx_hierarchical_0.data(), t, x, state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + dwdx_hierarchical_0.data(), t, x, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data(), state_.total_cl.data(), derived_state_.spl_.data(), include_static ); @@ -2873,7 +2888,7 @@ void Model::fdwdx(realtype const t, realtype const* x, bool include_static) { derived_state_.dwdx_.sparse_sum(derived_state_.dwdx_hierarchical_); if (always_check_finite_) { - checkFinite(derived_state_.dwdx_, ModelQuantity::dwdx, t); + check_finite(derived_state_.dwdx_, ModelQuantity::dwdx, t); } } @@ -2888,13 +2903,13 @@ void Model::fdwdw(realtype const t, realtype const* x, bool include_static) { } fdwdw( - derived_state_.dwdw_.data(), t, x, state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + derived_state_.dwdw_.data(), t, x, state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data(), state_.total_cl.data(), include_static ); if (always_check_finite_) { - checkFinite(derived_state_.dwdw_, ModelQuantity::dwdw, t); + check_finite(derived_state_.dwdw_, ModelQuantity::dwdw, t); } } @@ -3035,7 +3050,7 @@ void Model::set_steadystate_mask(std::vector const& mask) { steadystate_mask_ = mask; } -const_N_Vector Model::computeX_pos(const_N_Vector x) { +const_N_Vector Model::compute_x_pos(const_N_Vector x) { if (any_state_non_negative_) { for (int ix = 0; ix < derived_state_.x_pos_tmp_.size(); ++ix) { derived_state_.x_pos_tmp_.at(ix) @@ -3043,21 +3058,21 @@ const_N_Vector Model::computeX_pos(const_N_Vector x) { ? 0 : NV_Ith_S(x, ix); } - return derived_state_.x_pos_tmp_.getNVector(); + return derived_state_.x_pos_tmp_.get_nvector(); } return x; } -realtype const* Model::computeX_pos(AmiVector const& x) { +realtype const* Model::compute_x_pos(AmiVector const& x) { if (any_state_non_negative_) { - computeX_pos(x.getNVector()); + compute_x_pos(x.get_nvector()); return derived_state_.x_pos_tmp_.data(); } return x.data(); } -void Model::setReinitializationStateIdxs(std::vector const& idxs) { +void Model::set_reinitialization_state_idxs(std::vector const& idxs) { for (auto idx : idxs) { if (idx < 0 || idx >= nx_rdata) throw AmiException("Invalid state index given: %d", idx); @@ -3066,7 +3081,7 @@ void Model::setReinitializationStateIdxs(std::vector const& idxs) { simulation_parameters_.reinitialization_state_idxs_sim = idxs; } -std::vector const& Model::getReinitializationStateIdxs() const { +std::vector const& Model::get_reinitialization_state_idxs() const { return simulation_parameters_.reinitialization_state_idxs_sim; } diff --git a/src/model.template.cpp b/src/model.template.cpp index eb158d1745..8d23113c10 100644 --- a/src/model.template.cpp +++ b/src/model.template.cpp @@ -5,51 +5,51 @@ namespace amici::model_TPL_MODELNAME { // clang-format off -std::array parameterNames = { +std::array parameter_names = { TPL_PARAMETER_NAMES_INITIALIZER_LIST }; -std::array fixedParameterNames = { +std::array fixed_parameter_names = { TPL_FIXED_PARAMETER_NAMES_INITIALIZER_LIST }; -std::array stateNames = { +std::array state_names = { TPL_STATE_NAMES_INITIALIZER_LIST }; -std::array observableNames = { +std::array observable_names = { TPL_OBSERVABLE_NAMES_INITIALIZER_LIST }; -std::array observableScalings = { +std::array observable_scalings = { TPL_OBSERVABLE_TRAFO_INITIALIZER_LIST }; -std::array expressionNames = { +std::array expression_names = { TPL_EXPRESSION_NAMES_INITIALIZER_LIST }; -std::array parameterIds = { +std::array parameter_ids = { TPL_PARAMETER_IDS_INITIALIZER_LIST }; -std::array fixedParameterIds = { +std::array fixed_parameter_ids = { TPL_FIXED_PARAMETER_IDS_INITIALIZER_LIST }; -std::array stateIds = { +std::array state_ids = { TPL_STATE_IDS_INITIALIZER_LIST }; -std::array observableIds = { +std::array observable_ids = { TPL_OBSERVABLE_IDS_INITIALIZER_LIST }; -std::array expressionIds = { +std::array expression_ids = { TPL_EXPRESSION_IDS_INITIALIZER_LIST }; -std::array stateIdxsSolver = { +std::array state_idxs_solver = { TPL_STATE_IDXS_SOLVER_INITIALIZER_LIST }; diff --git a/src/model_dae.cpp b/src/model_dae.cpp index cb0fcd1277..601640d430 100644 --- a/src/model_dae.cpp +++ b/src/model_dae.cpp @@ -7,7 +7,7 @@ void Model_DAE::fJ( realtype const t, realtype const cj, AmiVector const& x, AmiVector const& dx, AmiVector const& xdot, SUNMatrix J ) { - fJ(t, cj, x.getNVector(), dx.getNVector(), xdot.getNVector(), J); + fJ(t, cj, x.get_nvector(), dx.get_nvector(), xdot.get_nvector(), J); } void Model_DAE::fJ( @@ -24,14 +24,14 @@ void Model_DAE::fJSparse( realtype const t, realtype const cj, AmiVector const& x, AmiVector const& dx, AmiVector const& /*xdot*/, SUNMatrix J ) { - fJSparse(t, cj, x.getNVector(), dx.getNVector(), J); + fJSparse(t, cj, x.get_nvector(), dx.get_nvector(), J); } void Model_DAE::fJSparse( realtype const t, realtype const cj, const_N_Vector x, const_N_Vector dx, SUNMatrix J ) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdwdx(t, N_VGetArrayPointerConst(x_pos), false); auto JSparse = SUNMatrixWrapper(J); @@ -43,8 +43,8 @@ void Model_DAE::fJSparse( fdxdotdx_explicit_rowvals(derived_state_.dxdotdx_explicit); fdxdotdx_explicit( derived_state_.dxdotdx_explicit.data(), t, - N_VGetArrayPointerConst(x_pos), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + N_VGetArrayPointerConst(x_pos), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), N_VGetArrayPointerConst(dx), derived_state_.w_.data() ); } @@ -68,7 +68,7 @@ void Model_DAE::fJv( AmiVector const& /*xdot*/, AmiVector const& v, AmiVector& Jv, realtype const cj ) { - fJv(t, x.getNVector(), dx.getNVector(), v.getNVector(), Jv.getNVector(), + fJv(t, x.get_nvector(), dx.get_nvector(), v.get_nvector(), Jv.get_nvector(), cj); } @@ -86,7 +86,7 @@ void Model_DAE::froot( realtype const t, AmiVector const& x, AmiVector const& dx, gsl::span const root ) { - froot(t, x.getNVector(), dx.getNVector(), root); + froot(t, x.get_nvector(), dx.get_nvector(), root); } void Model_DAE::froot( @@ -94,10 +94,10 @@ void Model_DAE::froot( gsl::span root ) { std::ranges::fill(root, 0.0); - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); froot( root.data(), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), N_VGetArrayPointerConst(dx) ); } @@ -105,18 +105,18 @@ void Model_DAE::froot( void Model_DAE::fxdot( realtype const t, AmiVector const& x, AmiVector const& dx, AmiVector& xdot ) { - fxdot(t, x.getNVector(), dx.getNVector(), xdot.getNVector()); + fxdot(t, x.get_nvector(), dx.get_nvector(), xdot.get_nvector()); } void Model_DAE::fxdot( realtype const t, const_N_Vector x, const_N_Vector dx, N_Vector xdot ) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fw(t, N_VGetArrayPointerConst(x), false); N_VConst(0.0, xdot); fxdot( N_VGetArrayPointer(xdot), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), N_VGetArrayPointerConst(dx), derived_state_.w_.data() ); } @@ -125,10 +125,10 @@ void Model_DAE::fJDiag( realtype const t, AmiVector& JDiag, realtype const /*cj*/, AmiVector const& x, AmiVector const& dx ) { - fJSparse(t, 0.0, x.getNVector(), dx.getNVector(), derived_state_.J_); + fJSparse(t, 0.0, x.get_nvector(), dx.get_nvector(), derived_state_.J_); derived_state_.J_.refresh(); - derived_state_.J_.to_diag(JDiag.getNVector()); - if (checkFinite(JDiag.getVector(), ModelQuantity::JDiag, t) + derived_state_.J_.to_diag(JDiag.get_nvector()); + if (check_finite(JDiag.get_vector(), ModelQuantity::JDiag, t) != AMICI_SUCCESS) throw AmiException("Evaluation of fJDiag failed!"); } @@ -138,13 +138,13 @@ void Model_DAE::fdxdotdw( ) { derived_state_.dxdotdw_.zero(); if (nw > 0 && derived_state_.dxdotdw_.capacity()) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdxdotdw_colptrs(derived_state_.dxdotdw_); fdxdotdw_rowvals(derived_state_.dxdotdw_); fdxdotdw( derived_state_.dxdotdw_.data(), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), N_VGetArrayPointerConst(dx), derived_state_.w_.data() ); @@ -154,7 +154,7 @@ void Model_DAE::fdxdotdw( void Model_DAE::fdxdotdp( realtype const t, const_N_Vector const x, const_N_Vector const dx ) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdwdp(t, N_VGetArrayPointerConst(x_pos)); derived_state_.dxdotdp_explicit.zero(); @@ -164,8 +164,8 @@ void Model_DAE::fdxdotdp( fdxdotdp_explicit_rowvals(derived_state_.dxdotdp_explicit); fdxdotdp_explicit( derived_state_.dxdotdp_explicit.data(), t, - N_VGetArrayPointerConst(x_pos), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + N_VGetArrayPointerConst(x_pos), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), N_VGetArrayPointerConst(dx), derived_state_.w_.data() ); } @@ -192,7 +192,7 @@ void Model_DAE::fM(realtype const /*t*/, const_N_Vector /*x*/) { int ndiff = 0; for (int ix = 0; ix < nx_solver; ix++) { derived_state_.MSparse_.set_indexptr(ix, ndiff); - if (this->idlist.at(ix) == 1.0) { + if (get_id_list().at(ix) == 1.0) { derived_state_.MSparse_.set_data(ndiff, 1.0); derived_state_.MSparse_.set_indexval(ndiff, ix); ndiff++; @@ -202,7 +202,7 @@ void Model_DAE::fM(realtype const /*t*/, const_N_Vector /*x*/) { assert(ndiff == derived_state_.MSparse_.capacity()); } -std::unique_ptr Model_DAE::getSolver() { +std::unique_ptr Model_DAE::create_solver() { return std::unique_ptr(new IDASolver()); } @@ -337,8 +337,8 @@ void Model_DAE::fJB( AmiVector const& xB, AmiVector const& /*dxB*/, AmiVector const& /*xBdot*/, SUNMatrix JB ) { - fJB(t, cj, x.getNVector(), dx.getNVector(), xB.getNVector(), - dx.getNVector(), JB); + fJB(t, cj, x.get_nvector(), dx.get_nvector(), xB.get_nvector(), + dx.get_nvector(), JB); } void Model_DAE::fJB( @@ -357,8 +357,8 @@ void Model_DAE::fJSparseB( AmiVector const& /*xBdot*/, SUNMatrix JB ) { fJSparseB( - t, cj, x.getNVector(), dx.getNVector(), xB.getNVector(), - dxB.getNVector(), JB + t, cj, x.get_nvector(), dx.get_nvector(), xB.get_nvector(), + dxB.get_nvector(), JB ); } @@ -420,7 +420,7 @@ void Model_DAE::fxBdot_ss( realtype const t, AmiVector const& xB, AmiVector const& dxB, AmiVector& xBdot ) { - fxBdot_ss(t, xB.getNVector(), dxB.getNVector(), xBdot.getNVector()); + fxBdot_ss(t, xB.get_nvector(), dxB.get_nvector(), xBdot.get_nvector()); } void Model_DAE::fxBdot_ss( @@ -454,8 +454,8 @@ void Model_DAE::writeSteadystateJB( ) { /* Get backward Jacobian */ fJSparseB( - t, cj, x.getNVector(), dx.getNVector(), xB.getNVector(), - dxB.getNVector(), derived_state_.JB_ + t, cj, x.get_nvector(), dx.get_nvector(), xB.get_nvector(), + dxB.get_nvector(), derived_state_.JB_ ); derived_state_.JB_.refresh(); /* Switch sign, as we integrate forward in time, not backward */ @@ -467,8 +467,8 @@ void Model_DAE::fsxdot( AmiVector const& sx, AmiVector const& sdx, AmiVector& sxdot ) { fsxdot( - t, x.getNVector(), dx.getNVector(), ip, sx.getNVector(), - sdx.getNVector(), sxdot.getNVector() + t, x.get_nvector(), dx.get_nvector(), ip, sx.get_nvector(), + sdx.get_nvector(), sxdot.get_nvector() ); } diff --git a/src/model_header.template.h b/src/model_header.template.h index e1b7502181..ca95459a65 100644 --- a/src/model_header.template.h +++ b/src/model_header.template.h @@ -14,18 +14,18 @@ class Solver; namespace model_TPL_MODELNAME { -extern std::array parameterNames; -extern std::array fixedParameterNames; -extern std::array stateNames; -extern std::array observableNames; -extern std::array observableScalings; -extern std::array expressionNames; -extern std::array parameterIds; -extern std::array fixedParameterIds; -extern std::array stateIds; -extern std::array observableIds; -extern std::array expressionIds; -extern std::array stateIdxsSolver; +extern std::array parameter_names; +extern std::array fixed_parameter_names; +extern std::array state_names; +extern std::array observable_names; +extern std::array observable_scalings; +extern std::array expression_names; +extern std::array parameter_ids; +extern std::array fixed_parameter_ids; +extern std::array state_ids; +extern std::array observable_ids; +extern std::array expression_ids; +extern std::array state_idxs_solver; TPL_JY_DEF TPL_DJYDSIGMA_DEF @@ -283,7 +283,7 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { TPL_EXPLICIT_ROOTS_IMPL - std::string getName() const override { + std::string get_name() const override { return "TPL_MODELNAME"; } @@ -291,28 +291,28 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @brief Get names of the model parameters * @return the names */ - std::vector getParameterNames() const override { - return std::vector(parameterNames.begin(), - parameterNames.end()); + std::vector get_parameter_names() const override { + return std::vector(parameter_names.begin(), + parameter_names.end()); } /** * @brief Get names of the model states * @return the names */ - std::vector getStateNames() const override { - return std::vector(stateNames.begin(), stateNames.end()); + std::vector get_state_names() const override { + return std::vector(state_names.begin(), state_names.end()); } /** * @brief Get names of the solver states * @return the names */ - std::vector getStateNamesSolver() const override { + std::vector get_state_names_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto const idx: stateIdxsSolver) { - result.push_back(stateNames[idx]); + result.reserve(state_idxs_solver.size()); + for(auto const idx: state_idxs_solver) { + result.push_back(state_names[idx]); } return result; } @@ -321,55 +321,55 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @brief Get names of the fixed model parameters * @return the names */ - std::vector getFixedParameterNames() const override { - return std::vector(fixedParameterNames.begin(), - fixedParameterNames.end()); + std::vector get_fixed_parameter_names() const override { + return std::vector(fixed_parameter_names.begin(), + fixed_parameter_names.end()); } /** * @brief Get names of the observables * @return the names */ - std::vector getObservableNames() const override { - return std::vector(observableNames.begin(), - observableNames.end()); + std::vector get_observable_names() const override { + return std::vector(observable_names.begin(), + observable_names.end()); } /** * @brief Get names of model expressions * @return Expression names */ - std::vector getExpressionNames() const override { - return std::vector(expressionNames.begin(), - expressionNames.end()); + std::vector get_expression_names() const override { + return std::vector(expression_names.begin(), + expression_names.end()); } /** * @brief Get ids of the model parameters * @return the ids */ - std::vector getParameterIds() const override { - return std::vector(parameterIds.begin(), - parameterIds.end()); + std::vector get_parameter_ids() const override { + return std::vector(parameter_ids.begin(), + parameter_ids.end()); } /** * @brief Get ids of the model states * @return the ids */ - std::vector getStateIds() const override { - return std::vector(stateIds.begin(), stateIds.end()); + std::vector get_state_ids() const override { + return std::vector(state_ids.begin(), state_ids.end()); } /** * @brief Get ids of the solver states * @return the ids */ - std::vector getStateIdsSolver() const override { + std::vector get_state_ids_solver() const override { std::vector result; - result.reserve(stateIdxsSolver.size()); - for(auto idx: stateIdxsSolver) { - result.push_back(stateIds[idx]); + result.reserve(state_idxs_solver.size()); + for(auto idx: state_idxs_solver) { + result.push_back(state_ids[idx]); } return result; } @@ -378,27 +378,27 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @brief Get ids of the fixed model parameters * @return the ids */ - std::vector getFixedParameterIds() const override { - return std::vector(fixedParameterIds.begin(), - fixedParameterIds.end()); + std::vector get_fixed_parameter_ids() const override { + return std::vector(fixed_parameter_ids.begin(), + fixed_parameter_ids.end()); } /** * @brief Get ids of the observables * @return the ids */ - std::vector getObservableIds() const override { - return std::vector(observableIds.begin(), - observableIds.end()); + std::vector get_observable_ids() const override { + return std::vector(observable_ids.begin(), + observable_ids.end()); } /** * @brief Get IDs of model expressions * @return Expression IDs */ - std::vector getExpressionIds() const override { - return std::vector(expressionIds.begin(), - expressionIds.end()); + std::vector get_expression_ids() const override { + return std::vector(expression_ids.begin(), + expression_ids.end()); } /** @@ -407,7 +407,7 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @return flag indicating whether reinitialization of states depending on * fixed parameters is permissible */ - bool isFixedParameterStateReinitializationAllowed() const override { + bool is_fixed_parameter_state_reinitialization_allowed() const override { return TPL_REINIT_FIXPAR_INITCOND; } @@ -415,7 +415,7 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @brief returns the AMICI version that was used to generate the model * @return AMICI version string */ - std::string getAmiciVersion() const override { + std::string get_amici_version() const override { return "TPL_AMICI_VERSION_STRING"; } @@ -423,16 +423,16 @@ class Model_TPL_MODELNAME : public amici::Model_TPL_MODEL_TYPE_UPPER { * @brief returns the amici version that was used to generate the model * @return AMICI git commit hash */ - std::string getAmiciCommit() const override { + std::string get_amici_commit() const override { return "TPL_AMICI_COMMIT_STRING"; } - bool hasQuadraticLLH() const override { + bool has_quadratic_llh() const override { return TPL_QUADRATIC_LLH; } - ObservableScaling getObservableScaling(int iy) const override { - return observableScalings.at(iy); + ObservableScaling get_observable_scaling(int iy) const override { + return observable_scalings.at(iy); } }; diff --git a/src/model_ode.cpp b/src/model_ode.cpp index 7cd01fc454..f4132f5780 100644 --- a/src/model_ode.cpp +++ b/src/model_ode.cpp @@ -8,7 +8,7 @@ void Model_ODE::fJ( realtype const t, realtype const /*cj*/, AmiVector const& x, AmiVector const& /*dx*/, AmiVector const& xdot, SUNMatrix J ) { - fJ(t, x.getNVector(), xdot.getNVector(), J); + fJ(t, x.get_nvector(), xdot.get_nvector(), J); } void Model_ODE::fJ( @@ -24,11 +24,11 @@ void Model_ODE::fJSparse( realtype const t, realtype const /*cj*/, AmiVector const& x, AmiVector const& /*dx*/, AmiVector const& /*xdot*/, SUNMatrix J ) { - fJSparse(t, x.getNVector(), J); + fJSparse(t, x.get_nvector(), J); } void Model_ODE::fJSparse(realtype const t, const_N_Vector x, SUNMatrix J) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdwdx(t, N_VGetArrayPointerConst(x_pos), false); auto JSparse = SUNMatrixWrapper(J); // python generated @@ -39,8 +39,8 @@ void Model_ODE::fJSparse(realtype const t, const_N_Vector x, SUNMatrix J) { fdxdotdx_explicit_rowvals(derived_state_.dxdotdx_explicit); fdxdotdx_explicit( derived_state_.dxdotdx_explicit.data(), t, - N_VGetArrayPointerConst(x_pos), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + N_VGetArrayPointerConst(x_pos), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data() ); } @@ -61,7 +61,7 @@ void Model_ODE:: fJv(realtype const t, AmiVector const& x, AmiVector const& /*dx*/, AmiVector const& /*xdot*/, AmiVector const& v, AmiVector& Jv, realtype const /*cj*/) { - fJv(v.getNVector(), Jv.getNVector(), t, x.getNVector()); + fJv(v.get_nvector(), Jv.get_nvector(), t, x.get_nvector()); } void Model_ODE::fJv( @@ -77,17 +77,17 @@ void Model_ODE::froot( realtype const t, AmiVector const& x, AmiVector const& /*dx*/, gsl::span root ) { - froot(t, x.getNVector(), root); + froot(t, x.get_nvector(), root); } void Model_ODE::froot( realtype const t, const_N_Vector x, gsl::span root ) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); std::ranges::fill(root, 0.0); froot( root.data(), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), state_.total_cl.data() ); } @@ -96,16 +96,16 @@ void Model_ODE::fxdot( realtype const t, AmiVector const& x, AmiVector const& /*dx*/, AmiVector& xdot ) { - fxdot(t, x.getNVector(), xdot.getNVector()); + fxdot(t, x.get_nvector(), xdot.get_nvector()); } void Model_ODE::fxdot(realtype const t, const_N_Vector x, N_Vector xdot) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fw(t, N_VGetArrayPointerConst(x_pos)); N_VConst(0.0, xdot); fxdot( N_VGetArrayPointer(xdot), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data() ); } @@ -114,8 +114,8 @@ void Model_ODE::fJDiag( realtype const t, AmiVector& JDiag, realtype const /*cj*/, AmiVector const& x, AmiVector const& /*dx*/ ) { - fJDiag(t, JDiag.getNVector(), x.getNVector()); - if (checkFinite(JDiag.getVector(), ModelQuantity::JDiag, t) + fJDiag(t, JDiag.get_nvector(), x.get_nvector()); + if (check_finite(JDiag.get_vector(), ModelQuantity::JDiag, t) != AMICI_SUCCESS) throw AmiException("Evaluation of fJDiag failed!"); } @@ -123,20 +123,20 @@ void Model_ODE::fJDiag( void Model_ODE::fdxdotdw(realtype const t, const_N_Vector x) { derived_state_.dxdotdw_.zero(); if (nw > 0 && derived_state_.dxdotdw_.capacity()) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdxdotdw_colptrs(derived_state_.dxdotdw_); fdxdotdw_rowvals(derived_state_.dxdotdw_); fdxdotdw( derived_state_.dxdotdw_.data(), t, N_VGetArrayPointerConst(x_pos), - state_.unscaledParameters.data(), state_.fixedParameters.data(), + state_.unscaled_parameters.data(), state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data() ); } } void Model_ODE::fdxdotdp(realtype const t, const_N_Vector x) { - auto const x_pos = computeX_pos(x); + auto const x_pos = compute_x_pos(x); fdwdp(t, N_VGetArrayPointerConst(x_pos), false); // python generated @@ -147,8 +147,8 @@ void Model_ODE::fdxdotdp(realtype const t, const_N_Vector x) { fdxdotdp_explicit_rowvals(derived_state_.dxdotdp_explicit); fdxdotdp_explicit( derived_state_.dxdotdp_explicit.data(), t, - N_VGetArrayPointerConst(x_pos), state_.unscaledParameters.data(), - state_.fixedParameters.data(), state_.h.data(), + N_VGetArrayPointerConst(x_pos), state_.unscaled_parameters.data(), + state_.fixed_parameters.data(), state_.h.data(), derived_state_.w_.data() ); } @@ -168,10 +168,10 @@ void Model_ODE::fdxdotdp(realtype const t, const_N_Vector x) { void Model_ODE:: fdxdotdp(realtype const t, AmiVector const& x, AmiVector const& /*dx*/) { - fdxdotdp(t, x.getNVector()); + fdxdotdp(t, x.get_nvector()); } -std::unique_ptr Model_ODE::getSolver() { +std::unique_ptr Model_ODE::create_solver() { return std::unique_ptr(new CVodeSolver()); } @@ -304,7 +304,7 @@ void Model_ODE::fJB( AmiVector const& /*dx*/, AmiVector const& xB, AmiVector const& /*dxB*/, AmiVector const& xBdot, SUNMatrix JB ) { - fJB(t, x.getNVector(), xB.getNVector(), xBdot.getNVector(), JB); + fJB(t, x.get_nvector(), xB.get_nvector(), xBdot.get_nvector(), JB); } void Model_ODE::fJB( @@ -322,7 +322,7 @@ void Model_ODE::fJSparseB( AmiVector const& /*dx*/, AmiVector const& xB, AmiVector const& /*dxB*/, AmiVector const& xBdot, SUNMatrix JB ) { - fJSparseB(t, x.getNVector(), xB.getNVector(), xBdot.getNVector(), JB); + fJSparseB(t, x.get_nvector(), xB.get_nvector(), xBdot.get_nvector(), JB); } void Model_ODE::fJSparseB( @@ -374,7 +374,7 @@ void Model_ODE::fxBdot_ss( realtype const t, AmiVector const& xB, AmiVector const& /*dx*/, AmiVector& xBdot ) { - fxBdot_ss(t, xB.getNVector(), xBdot.getNVector()); + fxBdot_ss(t, xB.get_nvector(), xBdot.get_nvector()); } void Model_ODE::fxBdot_ss( @@ -405,7 +405,7 @@ void Model_ODE::writeSteadystateJB( ) { /* Get backward Jacobian */ fJSparseB( - t, x.getNVector(), xB.getNVector(), xBdot.getNVector(), + t, x.get_nvector(), xB.get_nvector(), xBdot.get_nvector(), derived_state_.JB_ ); derived_state_.JB_.refresh(); @@ -417,7 +417,7 @@ void Model_ODE::fsxdot( realtype const t, AmiVector const& x, AmiVector const& /*dx*/, int const ip, AmiVector const& sx, AmiVector const& /*sdx*/, AmiVector& sxdot ) { - fsxdot(t, x.getNVector(), ip, sx.getNVector(), sxdot.getNVector()); + fsxdot(t, x.get_nvector(), ip, sx.get_nvector(), sxdot.get_nvector()); } void Model_ODE::fsxdot( diff --git a/src/newton_solver.cpp b/src/newton_solver.cpp index cca5b6cb35..af226918a5 100644 --- a/src/newton_solver.cpp +++ b/src/newton_solver.cpp @@ -41,23 +41,23 @@ NewtonSolver::NewtonSolver( } } -void NewtonSolver::getStep( +void NewtonSolver::get_step( AmiVector& delta, Model& model, DEStateView const& state ) { - prepareLinearSystem(model, state); + prepare_linear_system(model, state); delta.minus(); - solveLinearSystem(delta); + solve_linear_system(delta); } -void NewtonSolver::computeNewtonSensis( +void NewtonSolver::compute_newton_sensis( AmiVectorArray& sx, Model& model, DEStateView const& state ) { - prepareLinearSystem(model, state); + prepare_linear_system(model, state); model.fdxdotdp(state.t, state.x, state.dx); - if (model.logger && is_singular(model, state)) { - model.logger->log( + if (model.get_logger() && is_singular(model, state)) { + model.get_logger()->log( LogSeverity::warning, "NEWTON_JAC_SINGULAR", "Jacobian is singular at steadystate, " "sensitivities may be inaccurate." @@ -65,17 +65,19 @@ void NewtonSolver::computeNewtonSensis( } for (int ip = 0; ip < model.nplist(); ip++) { - N_VConst(0.0, sx.getNVector(ip)); + N_VConst(0.0, sx.get_nvector(ip)); model.get_dxdotdp_full().scatter( - model.plist(ip), -1.0, nullptr, gsl::make_span(sx.getNVector(ip)), + model.plist(ip), -1.0, nullptr, gsl::make_span(sx.get_nvector(ip)), 0, nullptr, 0 ); - solveLinearSystem(sx[ip]); + solve_linear_system(sx[ip]); } } -void NewtonSolver::prepareLinearSystem(Model& model, DEStateView const& state) { +void NewtonSolver::prepare_linear_system( + Model& model, DEStateView const& state +) { auto& J = linsol_->getMatrix(); if (J.matrix_id() == SUNMATRIX_SPARSE) { model.fJSparse(state.t, 0.0, state.x, state.dx, xdot_, J); @@ -90,7 +92,7 @@ void NewtonSolver::prepareLinearSystem(Model& model, DEStateView const& state) { } } -void NewtonSolver::prepareLinearSystemB( +void NewtonSolver::prepare_linear_system_b( Model& model, DEStateView const& state ) { auto& J = linsol_->getMatrix(); @@ -107,9 +109,9 @@ void NewtonSolver::prepareLinearSystemB( } } -void NewtonSolver::solveLinearSystem(AmiVector& rhs) { +void NewtonSolver::solve_linear_system(AmiVector& rhs) { // last argument is tolerance and does not have any influence on result - auto status = linsol_->solve(rhs.getNVector(), rhs.getNVector(), 0.0); + auto status = linsol_->solve(rhs.get_nvector(), rhs.get_nvector(), 0.0); if (status != SUN_SUCCESS) throw NewtonFailure(status, "SUNLinSolSolve"); } @@ -121,7 +123,7 @@ void NewtonSolver::reinitialize() { } if (auto const s = dynamic_cast(linsol_.get())) { try { - s->reInit(s->getMatrix().capacity(), SUNKLU_REINIT_PARTIAL); + s->reinit(s->getMatrix().capacity(), SUNKLU_REINIT_PARTIAL); return; } catch (AmiException const&) { throw NewtonFailure( @@ -145,7 +147,7 @@ bool NewtonSolver::is_singular(Model& model, DEStateView const& state) const { NewtonSolver sparse_solver( model, LinearSolver::KLU, linsol_->get()->sunctx ); - sparse_solver.prepareLinearSystem(model, state); + sparse_solver.prepare_linear_system(model, state); return sparse_solver.is_singular(model, state); } diff --git a/src/rdata.cpp b/src/rdata.cpp index 6fac090c09..e76cabc88f 100644 --- a/src/rdata.cpp +++ b/src/rdata.cpp @@ -18,13 +18,14 @@ using std::isnan; ReturnData::ReturnData(Solver const& solver, Model const& model) : ReturnData( - model.getTimepoints(), + model.get_timepoints(), ModelDimensions(static_cast(model)), - model.nMaxEvent(), solver.getNewtonMaxSteps(), - model.getParameterList(), model.getParameterScale(), model.o2mode, - solver.getSensitivityOrder(), solver.getSensitivityMethod(), - solver.getReturnDataReportingMode(), model.hasQuadraticLLH(), - model.getAddSigmaResiduals(), model.getMinimumSigmaResiduals() + model.n_max_event(), solver.get_newton_max_steps(), + model.get_parameter_list(), model.get_parameter_scale(), + model.get_second_order_mode(), solver.get_sensitivity_order(), + solver.get_sensitivity_method(), + solver.get_return_data_reporting_mode(), model.has_quadratic_llh(), + model.get_add_sigma_residuals(), model.get_minimum_sigma_residuals() ) {} ReturnData::ReturnData( @@ -54,15 +55,15 @@ ReturnData::ReturnData( switch (rdata_reporting) { case RDataReporting::full: - initializeFullReporting(quadratic_llh_); + initialize_full_reporting(quadratic_llh_); break; case RDataReporting::residuals: - initializeResidualReporting(quadratic_llh_); + initialize_residual_reporting(quadratic_llh_); break; case RDataReporting::likelihood: - initializeLikelihoodReporting(quadratic_llh_); + initialize_likelihood_reporting(quadratic_llh_); break; case RDataReporting::observables_likelihood: @@ -71,14 +72,14 @@ ReturnData::ReturnData( } } -void ReturnData::initializeLikelihoodReporting(bool enable_fim) { - llh = getNaN(); - chi2 = getNaN(); +void ReturnData::initialize_likelihood_reporting(bool enable_fim) { + llh = get_nan(); + chi2 = get_nan(); if (sensi >= SensitivityOrder::first && sensi_meth != SensitivityMethod::none) { - sllh.resize(nplist, getNaN()); + sllh.resize(nplist, get_nan()); if (sensi >= SensitivityOrder::second) - s2llh.resize(nplist * (nJ - 1), getNaN()); + s2llh.resize(nplist * (nJ - 1), get_nan()); if ((sensi_meth == SensitivityMethod::forward || sensi >= SensitivityOrder::second) @@ -88,7 +89,7 @@ void ReturnData::initializeLikelihoodReporting(bool enable_fim) { } void ReturnData::initializeObservablesLikelihoodReporting(bool enable_fim) { - initializeLikelihoodReporting(enable_fim); + initialize_likelihood_reporting(enable_fim); y.resize(nt * ny, 0.0); sigmay.resize(nt * ny, 0.0); @@ -102,7 +103,7 @@ void ReturnData::initializeObservablesLikelihoodReporting(bool enable_fim) { } } -void ReturnData::initializeResidualReporting(bool enable_res) { +void ReturnData::initialize_residual_reporting(bool enable_res) { y.resize(nt * ny, 0.0); sigmay.resize(nt * ny, 0.0); if (enable_res) @@ -119,14 +120,14 @@ void ReturnData::initializeResidualReporting(bool enable_res) { } } -void ReturnData::initializeFullReporting(bool quadratic_llh) { +void ReturnData::initialize_full_reporting(bool quadratic_llh) { - initializeLikelihoodReporting(quadratic_llh); - initializeResidualReporting(quadratic_llh); + initialize_likelihood_reporting(quadratic_llh); + initialize_residual_reporting(quadratic_llh); - xdot.resize(nx_solver, getNaN()); + xdot.resize(nx_solver, get_nan()); - J.resize(nx_solver * nx_solver, getNaN()); + J.resize(nx_solver * nx_solver, get_nan()); // initialize with 0.0, so we only need to write non-zero values z.resize(nmaxevent * nz, 0.0); @@ -143,26 +144,26 @@ void ReturnData::initializeFullReporting(bool quadratic_llh) { if (nt > 0) { numsteps.resize(nt, 0); - numrhsevals.resize(nt, 0); - numerrtestfails.resize(nt, 0); - numnonlinsolvconvfails.resize(nt, 0); + num_rhs_evals.resize(nt, 0); + num_err_test_fails.resize(nt, 0); + num_non_lin_solv_conv_fails.resize(nt, 0); order.resize(nt, 0); if (sensi_meth == SensitivityMethod::adjoint && sensi >= SensitivityOrder::first) { - numstepsB.resize(nt, 0); - numrhsevalsB.resize(nt, 0); - numerrtestfailsB.resize(nt, 0); - numnonlinsolvconvfailsB.resize(nt, 0); + numsteps_b.resize(nt, 0); + num_rhs_evals_b.resize(nt, 0); + num_err_test_fails_b.resize(nt, 0); + num_non_lin_solv_conv_fails_b.resize(nt, 0); } } - x0.resize(nx_rdata, getNaN()); - x_ss.resize(nx_rdata, getNaN()); + x0.resize(nx_rdata, get_nan()); + x_ss.resize(nx_rdata, get_nan()); if (sensi >= SensitivityOrder::first) { - sx0.resize(nx_rdata * nplist, getNaN()); - sx_ss.resize(nx_rdata * nplist, getNaN()); + sx0.resize(nx_rdata * nplist, get_nan()); + sx_ss.resize(nx_rdata * nplist, get_nan()); if (sensi_meth == SensitivityMethod::forward || sensi >= SensitivityOrder::second) { @@ -179,60 +180,60 @@ void ReturnData::initializeFullReporting(bool quadratic_llh) { } } -void ReturnData::processSimulationObjects( +void ReturnData::process_simulation_objects( ForwardProblem const* fwd, BackwardProblem const* bwd, Model& model, Solver const& solver, ExpData const* edata ) { ModelContext mc(&model); - processSolver(solver); + process_solver(solver); - SteadystateProblem const* preeq = nullptr; - SteadystateProblem const* posteq = nullptr; + SteadyStateProblem const* preeq = nullptr; + SteadyStateProblem const* posteq = nullptr; SteadyStateBackwardProblem const* preeq_bwd = nullptr; SteadyStateBackwardProblem const* posteq_bwd = nullptr; if (fwd) { - preeq = fwd->getPreequilibrationProblem(); - posteq = fwd->getPostequilibrationProblem(); + preeq = fwd->get_preeq_problem(); + posteq = fwd->get_posteq_problem(); if (bwd) { - preeq_bwd = bwd->getPreequilibrationBwdProblem(); - posteq_bwd = bwd->getPostequilibrationBwdProblem(); + preeq_bwd = bwd->get_preeq_bwd_problem(); + posteq_bwd = bwd->get_posteq_bwd_problem(); } } if (preeq) - processPreEquilibration(*preeq, preeq_bwd, model); + process_pre_equilibration(*preeq, preeq_bwd, model); if (fwd) - processForwardProblem(*fwd, model, edata); + process_forward_problem(*fwd, model, edata); else invalidate(0); if (posteq) - processPostEquilibration(*posteq, posteq_bwd, model, edata); + process_post_equilibration(*posteq, posteq_bwd, model, edata); - if (edata && !edata->fixedParametersPreequilibration.empty() && fwd + if (edata && !edata->fixed_parameters_pre_equilibration.empty() && fwd && !fwd->was_preequilibrated() && preeq) { // failure during preequilibration - storeJacobianAndDerivativeInReturnData(*preeq, model); + store_jacobian_and_derivative(*preeq, model); } else if (fwd && !posteq) - storeJacobianAndDerivativeInReturnData(*fwd, model); + store_jacobian_and_derivative(*fwd, model); else if (posteq) - storeJacobianAndDerivativeInReturnData(*posteq, model); + store_jacobian_and_derivative(*posteq, model); if (fwd && bwd) - processBackwardProblem(*fwd, *bwd, preeq, preeq_bwd, model); - else if (solver.computingASA()) - invalidateSLLH(); + process_backward_problem(*fwd, *bwd, preeq, preeq_bwd, model); + else if (solver.computing_asa()) + invalidate_sllh(); - applyChainRuleFactorToSimulationResults(model); + apply_chain_rule_factor_to_simulation_results(model); } -void ReturnData::processPreEquilibration( - SteadystateProblem const& preeq, +void ReturnData::process_pre_equilibration( + SteadyStateProblem const& preeq, SteadyStateBackwardProblem const* preeq_bwd, Model& model ) { - auto const simulation_state = preeq.getFinalSimulationState(); - model.setModelState(simulation_state.mod); + auto const simulation_state = preeq.get_final_simulation_state(); + model.set_model_state(simulation_state.mod); if (!x_ss.empty()) { model.fx_rdata(x_ss, simulation_state.sol.x); @@ -241,57 +242,57 @@ void ReturnData::processPreEquilibration( model.fsx_rdata(sx_ss, simulation_state.sol.sx, simulation_state.sol.x); } /* Get cpu time for pre-equilibration in milliseconds */ - preeq_cpu_time = preeq.getCPUTime(); + preeq_cpu_time = preeq.get_cpu_time(); if (preeq_bwd) { - preeq_cpu_timeB = preeq_bwd->getCPUTimeB(); - preeq_numstepsB = preeq_bwd->getNumStepsB(); + preeq_cpu_time_b = preeq_bwd->get_cpu_time_b(); + preeq_numsteps_b = preeq_bwd->get_num_steps_b(); } - preeq_wrms = preeq.getResidualNorm(); - preeq_status = preeq.getSteadyStateStatus(); + preeq_wrms = preeq.get_residual_norm(); + preeq_status = preeq.get_steady_state_status(); if (preeq_status[1] == SteadyStateStatus::success) - preeq_t = preeq.getSteadyStateTime(); + preeq_t = preeq.get_steady_state_time(); if (!preeq_numsteps.empty()) - writeSlice(preeq.getNumSteps(), preeq_numsteps); + write_slice(preeq.get_num_steps(), preeq_numsteps); } -void ReturnData::processPostEquilibration( - SteadystateProblem const& posteq, +void ReturnData::process_post_equilibration( + SteadyStateProblem const& posteq, SteadyStateBackwardProblem const* posteq_bwd, Model& model, ExpData const* edata ) { for (int it = 0; it < nt; it++) { - auto const t = model.getTimepoint(it); + auto const t = model.get_timepoint(it); if (std::isinf(t)) { - auto const& simulation_state = posteq.getFinalSimulationState(); - model.setModelState(simulation_state.mod); - getDataOutput(it, model, simulation_state.sol, edata); + auto const& simulation_state = posteq.get_final_simulation_state(); + model.set_model_state(simulation_state.mod); + get_data_output(it, model, simulation_state.sol, edata); } } /* Get cpu time for Newton solve in milliseconds */ - posteq_cpu_time = posteq.getCPUTime(); + posteq_cpu_time = posteq.get_cpu_time(); if (posteq_bwd) { - posteq_cpu_timeB = posteq_bwd->getCPUTimeB(); - posteq_numstepsB = posteq_bwd->getNumStepsB(); + posteq_cpu_time_b = posteq_bwd->get_cpu_time_b(); + posteq_numsteps_b = posteq_bwd->get_num_steps_b(); } - posteq_wrms = posteq.getResidualNorm(); - posteq_status = posteq.getSteadyStateStatus(); + posteq_wrms = posteq.get_residual_norm(); + posteq_status = posteq.get_steady_state_status(); if (posteq_status[1] == SteadyStateStatus::success) - posteq_t = posteq.getSteadyStateTime(); + posteq_t = posteq.get_steady_state_time(); if (!posteq_numsteps.empty()) - writeSlice(posteq.getNumSteps(), posteq_numsteps); + write_slice(posteq.get_num_steps(), posteq_numsteps); } -void ReturnData::processForwardProblem( +void ReturnData::process_forward_problem( ForwardProblem const& fwd, Model& model, ExpData const* edata ) { if (edata) - initializeObjectiveFunction(model.hasQuadraticLLH()); + initialize_objective_function(model.has_quadratic_llh()); - auto const& initialState = fwd.getInitialSimulationState(); + auto const& initialState = fwd.get_initial_simulation_state(); if (initialState.sol.x.size() == 0 && model.nx_solver > 0) return; // if x wasn't set forward problem failed during initialization - model.setModelState(initialState.mod); + model.set_model_state(initialState.mod); if (!x0.empty()) { model.fx_rdata(x0, initialState.sol.x); @@ -302,30 +303,31 @@ void ReturnData::processForwardProblem( } // process timepoint data - realtype tf = fwd.getFinalTime(); + realtype tf = fwd.get_final_time(); for (int it = 0; it < model.nt(); it++) { - if (model.getTimepoint(it) <= tf) { - auto const simulation_state = fwd.getSimulationStateTimepoint(it); - model.setModelState(simulation_state.mod); - getDataOutput(it, model, simulation_state.sol, edata); + if (model.get_timepoint(it) <= tf) { + auto const simulation_state + = fwd.get_simulation_state_timepoint(it); + model.set_model_state(simulation_state.mod); + get_data_output(it, model, simulation_state.sol, edata); } else { // check for integration failure but consider postequilibration - if (!std::isinf(model.getTimepoint(it))) + if (!std::isinf(model.get_timepoint(it))) invalidate(it); } } // process event data if (nz > 0) { - auto const& discontinuities = fwd.getDiscontinuities(); + auto const& discontinuities = fwd.get_discontinuities(); Expects( static_cast(discontinuities.size()) - == fwd.getEventCounter() + 1 + == fwd.get_event_counter() + 1 ); - for (int iroot = 0; iroot <= fwd.getEventCounter(); iroot++) { - auto const simulation_state = fwd.getSimulationStateEvent(iroot); - model.setModelState(simulation_state.mod); - getEventOutput( + for (int iroot = 0; iroot <= fwd.get_event_counter(); iroot++) { + auto const simulation_state = fwd.get_simulation_state_event(iroot); + model.set_model_state(simulation_state.mod); + get_event_output( discontinuities.at(iroot).root_info, model, simulation_state.sol, edata ); @@ -333,22 +335,22 @@ void ReturnData::processForwardProblem( } } -void ReturnData::getDataOutput( +void ReturnData::get_data_output( int it, Model& model, SolutionState const& sol, ExpData const* edata ) { if (!x.empty()) { model.fx_rdata(slice(x, it, nx_rdata), sol.x); } if (!w.empty()) - model.getExpression(slice(w, it, nw), ts[it], sol.x); + model.get_expression(slice(w, it, nw), ts[it], sol.x); if (!y.empty()) - model.getObservable(slice(y, it, ny), ts[it], sol.x); + model.get_observable(slice(y, it, ny), ts[it], sol.x); if (!sigmay.empty()) - model.getObservableSigma(slice(sigmay, it, ny), it, edata); + model.get_observable_sigma(slice(sigmay, it, ny), it, edata); if (edata) { if (!isnan(llh)) - model.addObservableObjective(llh, it, sol.x, *edata); + model.add_observable_objective(llh, it, sol.x, *edata); fres(it, model, sol, *edata); fchi2(it, *edata); } @@ -356,40 +358,42 @@ void ReturnData::getDataOutput( if (sensi >= SensitivityOrder::first && nplist > 0) { if (sensi_meth == SensitivityMethod::forward) { - getDataSensisFSA(it, model, sol, edata); + get_data_sensis_fsa(it, model, sol, edata); } else if (edata && !sllh.empty()) { - model.addPartialObservableObjectiveSensitivity( + model.add_partial_observable_objective_sensitivity( sllh, s2llh, it, sol.x, *edata ); } if (!ssigmay.empty()) - model.getObservableSigmaSensitivity( + model.get_observable_sigma_sensitivity( slice(ssigmay, it, nplist * ny), slice(sy, it, nplist * ny), it, edata ); } } -void ReturnData::getDataSensisFSA( +void ReturnData::get_data_sensis_fsa( int it, Model& model, SolutionState const& sol, ExpData const* edata ) { if (!sx.empty()) { model.fsx_rdata( - gsl::span(&sx.at(it * nplist * nx_rdata), nplist * nx_rdata), sol.sx, - sol.x + gsl::span( + &sx.at(it * nplist * nx_rdata), nplist * nx_rdata + ), + sol.sx, sol.x ); } if (!sy.empty()) { - model.getObservableSensitivity( + model.get_observable_sensitivity( slice(sy, it, nplist * ny), ts[it], sol.x, sol.sx ); } if (edata) { if (!sllh.empty()) - model.addObservableObjectiveSensitivity( + model.add_observable_objective_sensitivity( sllh, s2llh, it, sol.x, sol.sx, *edata ); fsres(it, model, sol, *edata); @@ -397,7 +401,7 @@ void ReturnData::getDataSensisFSA( } } -void ReturnData::getEventOutput( +void ReturnData::get_event_output( std::vector const& rootidx, Model& model, SolutionState const& sol, ExpData const* edata ) { @@ -408,30 +412,30 @@ void ReturnData::getEventOutput( /* get event output */ if (!z.empty()) - model.getEvent(slice(z, nroots_.at(ie), nz), ie, sol.t, sol.x); + model.get_event(slice(z, nroots_.at(ie), nz), ie, sol.t, sol.x); /* if called from fillEvent at last timepoint, then also get the root function value */ - if (sol.t == model.getTimepoint(nt - 1)) + if (sol.t == model.get_timepoint(nt - 1)) if (!rz.empty()) - model.getEventRegularization( + model.get_event_regularization( slice(rz, nroots_.at(ie), nz), ie, sol.t, sol.x ); if (edata) { if (!sigmaz.empty()) - model.getEventSigma( + model.get_event_sigma( slice(sigmaz, nroots_.at(ie), nz), ie, nroots_.at(ie), sol.t, edata ); if (!isnan(llh)) - model.addEventObjective( + model.add_event_objective( llh, ie, nroots_.at(ie), sol.t, sol.x, *edata ); /* if called from fillEvent at last timepoint, add regularization based on rz */ - if (sol.t == model.getTimepoint(nt - 1) && !isnan(llh)) { - model.addEventObjectiveRegularization( + if (sol.t == model.get_timepoint(nt - 1) && !isnan(llh)) { + model.add_event_objective_regularization( llh, ie, nroots_.at(ie), sol.t, sol.x, *edata ); } @@ -439,9 +443,9 @@ void ReturnData::getEventOutput( if (sensi >= SensitivityOrder::first) { if (sensi_meth == SensitivityMethod::forward) { - getEventSensisFSA(ie, model, sol, edata); + get_event_sensis_fsa(ie, model, sol, edata); } else if (edata && !sllh.empty()) { - model.addPartialEventObjectiveSensitivity( + model.add_partial_event_objective_sensitivity( sllh, s2llh, ie, nroots_.at(ie), sol.t, sol.x, *edata ); } @@ -450,49 +454,49 @@ void ReturnData::getEventOutput( } } -void ReturnData::getEventSensisFSA( +void ReturnData::get_event_sensis_fsa( int ie, Model& model, SolutionState const& sol, ExpData const* edata ) { - if (sol.t == model.getTimepoint(nt - 1)) { + if (sol.t == model.get_timepoint(nt - 1)) { // call from fillEvent at last timepoint if (!sz.empty()) - model.getUnobservedEventSensitivity( + model.get_unobserved_event_sensitivity( slice(sz, nroots_.at(ie), nz * nplist), ie ); if (!srz.empty()) - model.getEventRegularizationSensitivity( + model.get_event_regularization_sensitivity( slice(srz, nroots_.at(ie), nz * nplist), ie, sol.t, sol.x, sol.sx ); } else if (!sz.empty()) { - model.getEventSensitivity( + model.get_event_sensitivity( slice(sz, nroots_.at(ie), nz * nplist), ie, sol.t, sol.x, sol.sx ); } if (edata && !sllh.empty()) { - model.addEventObjectiveSensitivity( + model.add_event_objective_sensitivity( sllh, s2llh, ie, nroots_.at(ie), sol.t, sol.x, sol.sx, *edata ); } } -void ReturnData::processBackwardProblem( +void ReturnData::process_backward_problem( ForwardProblem const& fwd, BackwardProblem const& bwd, - SteadystateProblem const* preeq, + SteadyStateProblem const* preeq, SteadyStateBackwardProblem const* preeq_bwd, Model& model ) { if (sllh.empty()) return; - auto simulation_state = fwd.getInitialSimulationState(); - model.setModelState(simulation_state.mod); + auto simulation_state = fwd.get_initial_simulation_state(); + model.set_model_state(simulation_state.mod); std::vector llhS0(model.nJ * model.nplist(), 0.0); // Adjoint quadratures before pre-equilibration - auto xQB = bwd.getAdjointQuadraturePrePreeq(); + auto xQB = bwd.get_adjoint_quadrature_pre_preeq(); - if (preeq_bwd && preeq_bwd->hasQuadrature()) { + if (preeq_bwd && preeq_bwd->has_quadrature()) { // Pre-equilibration with ASA steady-state shortcuts // If pre-equilibration is run in adjoint mode, the scalar product of @@ -506,29 +510,32 @@ void ReturnData::processBackwardProblem( // (see example notebook on equilibration for further documentation). // Adjoint quadratures after pre-equilibration - auto const& xQB_post_preeq = preeq_bwd->getAdjointQuadrature(); + auto const& xQB_post_preeq = preeq_bwd->get_adjoint_quadrature(); for (int ip = 0; ip < model.nplist(); ++ip) xQB[ip] += xQB_post_preeq.at(ip); - handleSx0Backward( - model, preeq->getStateSensitivity(), bwd.getAdjointState(), llhS0 + handle_sx0_backward( + model, preeq->get_state_sensitivity(), bwd.get_adjoint_state(), + llhS0 ); } else if (preeq - && preeq->getSteadyStateStatus()[1] + && preeq->get_steady_state_status()[1] != SteadyStateStatus::not_run) { // Pre-equilibration with ASA backward simulation // Adjoint quadratures after pre-equilibration - xQB = bwd.getAdjointQuadrature(); + xQB = bwd.get_adjoint_quadrature(); - handleSx0Backward( - model, preeq->getStateSensitivity(), bwd.getAdjointState(), llhS0 + handle_sx0_backward( + model, preeq->get_state_sensitivity(), bwd.get_adjoint_state(), + llhS0 ); } else { // No pre-equilibration, or pre-equilibration with FSA - handleSx0Forward( - model, simulation_state.sol, llhS0, bwd.getAdjointStatePrePreeq() + handle_sx0_forward( + model, simulation_state.sol, llhS0, + bwd.get_adjoint_state_pre_preeq() ); } @@ -545,7 +552,7 @@ void ReturnData::processBackwardProblem( } } -void ReturnData::handleSx0Backward( +void ReturnData::handle_sx0_backward( Model const& model, AmiVectorArray const& sx0, AmiVector const& xB, std::vector& llhS0 ) const { @@ -561,7 +568,7 @@ void ReturnData::handleSx0Backward( } } -void ReturnData::handleSx0Forward( +void ReturnData::handle_sx0_forward( Model const& model, SolutionState const& sol, std::vector& llhS0, AmiVector const& xB ) const { @@ -591,53 +598,55 @@ void ReturnData::handleSx0Forward( } } -void ReturnData::processSolver(Solver const& solver) { +void ReturnData::process_solver(Solver const& solver) { using std::ranges::copy; - cpu_time = solver.getCpuTime(); + cpu_time = solver.get_cpu_time(); if (!numsteps.empty()) { - Expects(numsteps.size() >= solver.getNumSteps().size()); + Expects(numsteps.size() >= solver.get_num_steps().size()); // copy instead of assignment to ensure length `nt` // (vector from solver may be shorter in case of integration errors) - copy(solver.getNumSteps(), numsteps.begin()); + copy(solver.get_num_steps(), numsteps.begin()); } - if (!numrhsevals.empty()) { - copy(solver.getNumRhsEvals(), numrhsevals.begin()); + if (!num_rhs_evals.empty()) { + copy(solver.get_num_rhs_evals(), num_rhs_evals.begin()); } - if (!numerrtestfails.empty()) { - copy(solver.getNumErrTestFails(), numerrtestfails.begin()); + if (!num_err_test_fails.empty()) { + copy(solver.get_num_err_test_fails(), num_err_test_fails.begin()); } - if (!numnonlinsolvconvfails.empty()) { + if (!num_non_lin_solv_conv_fails.empty()) { copy( - solver.getNumNonlinSolvConvFails(), numnonlinsolvconvfails.begin() + solver.get_num_non_lin_solv_conv_fails(), + num_non_lin_solv_conv_fails.begin() ); } if (!order.empty()) { - copy(solver.getLastOrder(), order.begin()); + copy(solver.get_last_order(), order.begin()); } - cpu_timeB = solver.getCpuTimeB(); + cpu_time_b = solver.get_cpu_time_b(); - if (!numstepsB.empty()) { - copy(solver.getNumStepsB(), numstepsB.begin()); + if (!numsteps_b.empty()) { + copy(solver.get_num_steps_b(), numsteps_b.begin()); } - if (!numrhsevalsB.empty()) { - copy(solver.getNumRhsEvalsB(), numrhsevalsB.begin()); + if (!num_rhs_evals_b.empty()) { + copy(solver.get_num_rhs_evals_b(), num_rhs_evals_b.begin()); } - if (!numerrtestfailsB.empty()) { - copy(solver.getNumErrTestFailsB(), numerrtestfailsB.begin()); + if (!num_err_test_fails_b.empty()) { + copy(solver.get_num_err_test_fails_b(), num_err_test_fails_b.begin()); } - if (!numnonlinsolvconvfailsB.empty()) { + if (!num_non_lin_solv_conv_fails_b.empty()) { copy( - solver.getNumNonlinSolvConvFailsB(), numnonlinsolvconvfailsB.begin() + solver.get_num_non_lin_solv_conv_fails_b(), + num_non_lin_solv_conv_fails_b.begin() ); } } @@ -646,35 +655,39 @@ void ReturnData::invalidate(int const it_start) { if (it_start >= nt) return; - invalidateLLH(); - invalidateSLLH(); + invalidate_llh(); + invalidate_sllh(); if (!x.empty()) - std::fill(x.begin() + nx_rdata * it_start, x.end(), getNaN()); + std::fill(x.begin() + nx_rdata * it_start, x.end(), get_nan()); if (!y.empty()) - std::fill(y.begin() + ny * it_start, y.end(), getNaN()); + std::fill(y.begin() + ny * it_start, y.end(), get_nan()); if (!w.empty()) - std::fill(w.begin() + nw * it_start, w.end(), getNaN()); + std::fill(w.begin() + nw * it_start, w.end(), get_nan()); if (!sx.empty()) - std::fill(sx.begin() + nx_rdata * nplist * it_start, sx.end(), getNaN()); + std::fill( + sx.begin() + nx_rdata * nplist * it_start, sx.end(), get_nan() + ); if (!sy.empty()) - std::fill(sy.begin() + ny * nplist * it_start, sy.end(), getNaN()); + std::fill(sy.begin() + ny * nplist * it_start, sy.end(), get_nan()); } -void ReturnData::invalidateLLH() { - llh = getNaN(); - chi2 = getNaN(); +void ReturnData::invalidate_llh() { + llh = get_nan(); + chi2 = get_nan(); } -void ReturnData::invalidateSLLH() { +void ReturnData::invalidate_sllh() { if (!sllh.empty()) { - std::ranges::fill(sllh, getNaN()); - std::ranges::fill(s2llh, getNaN()); + std::ranges::fill(sllh, get_nan()); + std::ranges::fill(s2llh, get_nan()); } } -void ReturnData::applyChainRuleFactorToSimulationResults(Model const& model) { +void ReturnData::apply_chain_rule_factor_to_simulation_results( + Model const& model +) { // chain-rule factor: multiplier for am_p std::vector coefficient(nplist, 1.0); // Only apply `pcoefficient` to non-zero sensitivities. This allows @@ -683,9 +696,9 @@ void ReturnData::applyChainRuleFactorToSimulationResults(Model const& model) { // to such parameters if they are log-scaled. std::vector pcoefficient(nplist, 1.0); - std::vector unscaledParameters = model.getParameters(); - unscaleParameters( - unscaledParameters, model.getParameterScale(), unscaledParameters + std::vector unscaledParameters = model.get_parameters(); + unscale_parameters( + unscaledParameters, model.get_parameter_scale(), unscaledParameters ); std::vector augcoefficient(np, 1.0); @@ -730,7 +743,10 @@ void ReturnData::applyChainRuleFactorToSimulationResults(Model const& model) { for (int ix = 0; ix < nxtrue_rdata; ++ix) for (int it = 0; it < nt; ++it) sx.at(ix + nxtrue_rdata * (ip + it * nplist)) - = x.at(it * nx_rdata + nxtrue_rdata + ip * nxtrue_rdata + ix); + = x.at( + it * nx_rdata + nxtrue_rdata + + ip * nxtrue_rdata + ix + ); if (!sy.empty() && !y.empty()) for (int ip = 0; ip < nplist; ++ip) @@ -890,7 +906,7 @@ void ReturnData::applyChainRuleFactorToSimulationResults(Model const& model) { } } -void ReturnData::initializeObjectiveFunction(bool enable_chi2) { +void ReturnData::initialize_objective_function(bool enable_chi2) { if (rdata_reporting == RDataReporting::likelihood || rdata_reporting == RDataReporting::observables_likelihood || rdata_reporting == RDataReporting::full) { @@ -929,20 +945,20 @@ void ReturnData::fres( return; std::vector y_it(ny, 0.0); - model.getObservable(y_it, ts[it], sol.x); + model.get_observable(y_it, ts[it], sol.x); std::vector sigmay_it(ny, 0.0); - model.getObservableSigma(sigmay_it, it, &edata); + model.get_observable_sigma(sigmay_it, it, &edata); - auto observedData = edata.getObservedDataPtr(it); + auto observedData = edata.get_observed_data_ptr(it); for (int iy = 0; iy < nytrue; ++iy) { int iyt = iy + it * edata.nytrue(); - if (!edata.isSetObservedData(it, iy)) + if (!edata.is_set_observed_data(it, iy)) continue; res.at(iyt) = amici::fres( y_it.at(iy), observedData[iy], sigmay_it.at(iy), - model.getObservableScaling(iy) + model.get_observable_scaling(iy) ); if (sigma_res) @@ -958,7 +974,7 @@ void ReturnData::fchi2(int const it, ExpData const& edata) { for (int iy = 0; iy < nytrue; ++iy) { int iyt_true = iy + it * nytrue; chi2 += pow(res.at(iyt_true), 2); - if (sigma_res && edata.isSetObservedData(it, iy)) + if (sigma_res && edata.is_set_observed_data(it, iy)) chi2 += pow(res.at(iyt_true + nt * nytrue), 2) - sigma_offset; } } @@ -991,18 +1007,18 @@ void ReturnData::fsres( return; std::vector y_it(ny, 0.0); - model.getObservable(y_it, ts[it], sol.x); + model.get_observable(y_it, ts[it], sol.x); std::vector sy_it(ny * nplist, 0.0); - model.getObservableSensitivity(sy_it, ts[it], sol.x, sol.sx); + model.get_observable_sensitivity(sy_it, ts[it], sol.x, sol.sx); std::vector sigmay_it(ny, 0.0); - model.getObservableSigma(sigmay_it, it, &edata); + model.get_observable_sigma(sigmay_it, it, &edata); std::vector ssigmay_it(ny * nplist, 0.0); - model.getObservableSigmaSensitivity(ssigmay_it, sy_it, it, &edata); + model.get_observable_sigma_sensitivity(ssigmay_it, sy_it, it, &edata); - auto observedData = edata.getObservedDataPtr(it); + auto observedData = edata.get_observed_data_ptr(it); for (int iy = 0; iy < nytrue; ++iy) { - if (!edata.isSetObservedData(it, iy)) + if (!edata.is_set_observed_data(it, iy)) continue; for (int ip = 0; ip < nplist; ++ip) { int idx = (iy + it * edata.nytrue()) * nplist + ip; @@ -1010,7 +1026,7 @@ void ReturnData::fsres( sres.at(idx) = amici::fsres( y_it.at(iy), sy_it.at(iy + ny * ip), observedData[iy], sigmay_it.at(iy), ssigmay_it.at(iy + ny * ip), - model.getObservableScaling(iy) + model.get_observable_scaling(iy) ); if (sigma_res) { @@ -1033,14 +1049,14 @@ void ReturnData::fFIM( return; std::vector y_it(ny, 0.0); - model.getObservable(y_it, ts[it], sol.x); + model.get_observable(y_it, ts[it], sol.x); std::vector sy_it(ny * nplist, 0.0); - model.getObservableSensitivity(sy_it, ts[it], sol.x, sol.sx); + model.get_observable_sensitivity(sy_it, ts[it], sol.x, sol.sx); std::vector sigmay_it(ny, 0.0); - model.getObservableSigma(sigmay_it, it, &edata); + model.get_observable_sigma(sigmay_it, it, &edata); std::vector ssigmay_it(ny * nplist, 0.0); - model.getObservableSigmaSensitivity(ssigmay_it, sy_it, it, &edata); + model.get_observable_sigma_sensitivity(ssigmay_it, sy_it, it, &edata); /* * https://www.wolframalpha.com/input/?i=d%2Fdu+d%2Fdv+log%28s%28u%2Cv%29%29+%2B+0.5+*+%28r%28u%2Cv%29%2Fs%28u%2Cv%29%29%5E2 @@ -1095,15 +1111,15 @@ void ReturnData::fFIM( * on the Boehm2014 Benchmark example. */ - auto observedData = edata.getObservedDataPtr(it); + auto observedData = edata.get_observed_data_ptr(it); for (int iy = 0; iy < nytrue; ++iy) { - if (!edata.isSetObservedData(it, iy)) + if (!edata.is_set_observed_data(it, iy)) continue; auto y = y_it.at(iy); auto m = observedData[iy]; auto s = sigmay_it.at(iy); - auto os = model.getObservableScaling(iy); + auto os = model.get_observable_scaling(iy); // auto r = amici::fres(y, m, s); for (int ip = 0; ip < nplist; ++ip) { auto dy_i = sy_it.at(iy + ny * ip); @@ -1129,10 +1145,10 @@ void ReturnData::fFIM( ModelContext::ModelContext(Model* model) : model_(model) - , original_state_(model->getModelState()) {} + , original_state_(model->get_model_state()) {} ModelContext::~ModelContext() noexcept(false) { restore(); } -void ModelContext::restore() { model_->setModelState(original_state_); } +void ModelContext::restore() { model_->set_model_state(original_state_); } } // namespace amici diff --git a/src/simulation_parameters.cpp b/src/simulation_parameters.cpp index c56b2fa3db..65abaaf983 100644 --- a/src/simulation_parameters.cpp +++ b/src/simulation_parameters.cpp @@ -6,26 +6,27 @@ namespace amici { bool operator==(SimulationParameters const& a, SimulationParameters const& b) { - return is_equal(a.fixedParameters, b.fixedParameters) + return is_equal(a.fixed_parameters, b.fixed_parameters) && is_equal( - a.fixedParametersPreequilibration, - b.fixedParametersPreequilibration + a.fixed_parameters_pre_equilibration, + b.fixed_parameters_pre_equilibration ) && is_equal( - a.fixedParametersPresimulation, b.fixedParametersPresimulation + a.fixed_parameters_presimulation, + b.fixed_parameters_presimulation ) && is_equal(a.parameters, b.parameters) && (a.plist == b.plist) && (a.pscale == b.pscale) - && (a.reinitializeFixedParameterInitialStates - == b.reinitializeFixedParameterInitialStates) + && (a.reinitialize_fixed_parameter_initial_states + == b.reinitialize_fixed_parameter_initial_states) && is_equal(a.sx0, b.sx0) && (a.t_presim == b.t_presim) - && (a.tstart_ == b.tstart_) && (a.ts_ == b.ts_) - && ((a.tstart_preeq_ == b.tstart_preeq_) - || (std::isnan(a.tstart_preeq_) && std::isnan(b.tstart_preeq_))); + && (a.t_start == b.t_start) && (a.timepoints == b.timepoints) + && ((a.t_start_preeq == b.t_start_preeq) + || (std::isnan(a.t_start_preeq) && std::isnan(b.t_start_preeq))); } void SimulationParameters:: - reinitializeAllFixedParameterDependentInitialStatesForPresimulation( + reinitialize_all_fixed_parameter_dependent_initial_states_for_presimulation( int const nx_rdata ) { reinitialization_state_idxs_presim.resize(nx_rdata); @@ -36,7 +37,7 @@ void SimulationParameters:: } void SimulationParameters:: - reinitializeAllFixedParameterDependentInitialStatesForSimulation( + reinitialize_all_fixed_parameter_dependent_initial_states_for_simulation( int const nx_rdata ) { reinitialization_state_idxs_sim.resize(nx_rdata); @@ -46,13 +47,16 @@ void SimulationParameters:: ); } -void SimulationParameters::reinitializeAllFixedParameterDependentInitialStates( - int const nx_rdata -) { - reinitializeAllFixedParameterDependentInitialStatesForPresimulation( +void SimulationParameters:: + reinitialize_all_fixed_parameter_dependent_initial_states( + int const nx_rdata + ) { + reinitialize_all_fixed_parameter_dependent_initial_states_for_presimulation( + nx_rdata + ); + reinitialize_all_fixed_parameter_dependent_initial_states_for_simulation( nx_rdata ); - reinitializeAllFixedParameterDependentInitialStatesForSimulation(nx_rdata); } } // namespace amici diff --git a/src/solver.cpp b/src/solver.cpp index 32436d02bd..6608bcc92e 100644 --- a/src/solver.cpp +++ b/src/solver.cpp @@ -52,8 +52,8 @@ void wrapErrHandlerFn( } auto solver = static_cast(err_user_data); - if (solver->logger) - solver->logger->log(LogSeverity::debug, id_buffer, msg_buffer); + if (solver->get_logger()) + solver->get_logger()->log(LogSeverity::debug, id_buffer, msg_buffer); } Solver::Solver(Solver const& other) @@ -101,20 +101,20 @@ Solver::Solver(Solver const& other) constraints_.set_ctx(sunctx_); } -SUNContext Solver::getSunContext() const { return sunctx_; } +SUNContext Solver::get_sun_context() const { return sunctx_; } void Solver::apply_max_num_steps() const { // set remaining steps, setMaxNumSteps only applies to a single call of // solve long int cursteps; - getNumSteps(solver_memory_.get(), &cursteps); + get_num_steps(solver_memory_.get(), &cursteps); if (maxsteps_ <= cursteps) throw AmiException( "Reached maximum number of steps %ld before reaching " "tout at t=%g.", maxsteps_, t_ ); - setMaxNumSteps(maxsteps_ - cursteps); + set_max_num_steps(maxsteps_ - cursteps); } void Solver::apply_max_num_steps_B() const { @@ -124,7 +124,7 @@ void Solver::apply_max_num_steps_B() const { auto maxstepsB = (maxstepsB_ == 0) ? maxsteps_ * 100 : maxstepsB_; for (int i_mem_b = 0; i_mem_b < (int)solver_memory_B_.size(); ++i_mem_b) { if (solver_memory_B_.at(i_mem_b)) { - getNumSteps(solver_memory_B_.at(i_mem_b).get(), &curstepsB); + get_num_steps(solver_memory_B_.at(i_mem_b).get(), &curstepsB); if (maxstepsB <= curstepsB) throw AmiException( "Reached maximum number of steps %ld before " @@ -132,20 +132,20 @@ void Solver::apply_max_num_steps_B() const { "problem %i.", maxstepsB_, t_, i_mem_b ); - setMaxNumStepsB(i_mem_b, maxstepsB - curstepsB); + set_max_num_steps_b(i_mem_b, maxstepsB - curstepsB); } } } int Solver::run(realtype const tout) const { - setStopTime(tout); + set_stop_time(tout); CpuTimer const cpu_timer; int status = AMICI_SUCCESS; apply_max_num_steps(); if (nx() > 0) { - if (getAdjInitDone()) { - status = solveF(tout, AMICI_NORMAL, &ncheckPtr_); + if (get_adj_init_done()) { + status = solve_f(tout, AMICI_NORMAL, &ncheckPtr_); } else { status = solve(tout, AMICI_NORMAL); } @@ -161,8 +161,8 @@ int Solver::step(realtype const tout) const { apply_max_num_steps(); if (nx() > 0) { - if (getAdjInitDone()) { - status = solveF(tout, AMICI_ONE_STEP, &ncheckPtr_); + if (get_adj_init_done()) { + status = solve_f(tout, AMICI_ONE_STEP, &ncheckPtr_); } else { status = solve(tout, AMICI_ONE_STEP); } @@ -172,14 +172,14 @@ int Solver::step(realtype const tout) const { return status; } -void Solver::runB(realtype const tout) const { +void Solver::run_b(realtype const tout) const { CpuTimer cpu_timer; apply_max_num_steps_B(); if (nx() > 0) { - solveB(tout, AMICI_NORMAL); + solve_b(tout, AMICI_NORMAL); } - cpu_timeB_ += cpu_timer.elapsed_milliseconds(); + cpu_time_b_ += cpu_timer.elapsed_milliseconds(); t_ = tout; } @@ -189,12 +189,12 @@ void Solver::setup( ) const { if (nx() != model->nx_solver || nplist() != model->nplist() || nquad() != model->nJ * model->nplist()) { - resetMutableMemory( + reset_mutable_memory( model->nx_solver, model->nplist(), model->nJ * model->nplist() ); } /* Create solver memory object if necessary */ - allocateSolver(); + allocate_solver(); if (!solver_memory_) throw AmiException("Failed to allocated solver memory!"); @@ -202,62 +202,62 @@ void Solver::setup( init(t0, x0, dx0); /* Clear diagnosis storage */ - resetDiagnosis(); + reset_diagnosis(); /* Apply stored tolerances to sundials solver */ - applyTolerances(); + apply_tolerances(); /* Set optional inputs */ - setErrHandlerFn(); + set_err_handler_fn(); /* Attaches userdata */ - user_data = std::make_pair(model, this); - setUserData(); + user_data_ = std::make_pair(model, this); + set_user_data(); /* activates stability limit detection */ - setStabLimDet(stldet_); + set_stab_lim_det(stldet_); - rootInit(model->ne_solver); + root_init(model->ne_solver); if (nx() == 0) return; - initializeLinearSolver(model); - initializeNonLinearSolver(); + initialize_linear_solver(model); + initialize_non_linear_solver(); if (sensi_ >= SensitivityOrder::first && sensi_meth_ > SensitivityMethod::none && model->nx_solver > 0) { - auto const plist = model->getParameterList(); - sensInit1(sx0, sdx0); + auto const plist = model->get_parameter_list(); + sens_init_1(sx0, sdx0); if (sensi_meth_ == SensitivityMethod::forward && !plist.empty()) { /* Set sensitivity analysis optional inputs */ - auto const par = model->getUnscaledParameters(); + auto const par = model->get_unscaled_parameters(); /* Activate sensitivity calculations and apply tolerances */ - initializeNonLinearSolverSens(model); - setSensParams(par.data(), nullptr, plist.data()); - applyTolerancesFSA(); + initialize_non_linear_solver_sens(model); + set_sens_params(par.data(), nullptr, plist.data()); + apply_tolerances_fsa(); } else { /* Allocate space for the adjoint computation */ - adjInit(); + adj_init(); } } - setId(model); - setSuppressAlg(true); + set_id(model); + set_suppress_alg(true); /* calculate consistent DAE initial conditions (no effect for ODE) */ if (model->nt() > 1) - calcIC(model->getTimepoint(1)); + calc_ic(model->get_timepoint(1)); apply_max_nonlin_iters(); apply_max_conv_fails(); apply_max_step_size(); cpu_time_ = 0.0; - cpu_timeB_ = 0.0; + cpu_time_b_ = 0.0; apply_constraints(); } -void Solver::setupB( +void Solver::setup_b( int* which, realtype const tf, Model* model, AmiVector const& xB0, AmiVector const& dxB0, AmiVector const& xQB0 ) const { @@ -267,41 +267,41 @@ void Solver::setupB( ); /* allocate memory for the backward problem */ - allocateSolverB(which); + allocate_solver_b(which); /* initialise states */ - binit(*which, tf, xB0, dxB0); + b_init(*which, tf, xB0, dxB0); /* Attach user data */ - setUserDataB(*which); + set_user_data_b(*which); if (nx() == 0) return; - initializeLinearSolverB(model, *which); - initializeNonLinearSolverB(*which); + initialize_linear_solver_b(model, *which); + initialize_non_linear_solver_b(*which); /* Initialise quadrature calculation */ - qbinit(*which, xQB0); + qb_init(*which, xQB0); - applyTolerancesASA(*which); - applyQuadTolerancesASA(*which); + apply_tolerances_asa(*which); + apply_quad_tolerances_asa(*which); - setStabLimDetB(*which, stldet_); + set_stab_lim_det_b(*which, stldet_); } -void Solver::setupSteadystate( +void Solver::setup_steady_state( realtype const t0, Model* model, AmiVector const& x0, AmiVector const& dx0, AmiVector const& xB0, AmiVector const& dxB0, AmiVector const& xQ0 ) const { /* Initialize CVodes/IDAs solver with steadystate RHS function */ - initSteadystate(t0, x0, dx0); + init_steady_state(t0, x0, dx0); /* Allocate space for forward quadratures */ - quadInit(xQ0); + quad_init(xQ0); /* Apply tolerances */ - applyQuadTolerances(); + apply_quad_tolerances(); /* Check linear solver (works only with KLU atm) */ if (linsol_ != LinearSolver::KLU) @@ -310,23 +310,23 @@ void Solver::setupSteadystate( "is currently only implemented for KLU linear solver" ); /* Set Jacobian function and initialize values */ - setSparseJacFn_ss(); + set_sparse_jac_fn_ss(); model->writeSteadystateJB(t0, 0, x0, dx0, xB0, dxB0, xB0); } -void Solver::updateAndReinitStatesAndSensitivities(Model* model) const { +void Solver::update_and_reinit_states_and_sensitivities(Model* model) const { model->reinitialize( - t_, x_, sx_, getSensitivityOrder() >= SensitivityOrder::first + t_, x_, sx_, get_sensitivity_order() >= SensitivityOrder::first ); - reInit(t_, x_, dx_); - if (getSensitivityOrder() >= SensitivityOrder::first - && getSensitivityMethod() == SensitivityMethod::forward) { - sensReInit(sx_, sdx_); + reinit(t_, x_, dx_); + if (get_sensitivity_order() >= SensitivityOrder::first + && get_sensitivity_method() == SensitivityMethod::forward) { + sens_reinit(sx_, sdx_); } } -void Solver::resetDiagnosis() const { +void Solver::reset_diagnosis() const { ns_.clear(); nrhs_.clear(); netf_.clear(); @@ -339,7 +339,7 @@ void Solver::resetDiagnosis() const { nnlscfB_.clear(); } -void Solver::storeDiagnosis() const { +void Solver::store_diagnosis() const { if (!solver_was_called_F_ || !solver_memory_) { ns_.push_back(0); nrhs_.push_back(0); @@ -350,24 +350,24 @@ void Solver::storeDiagnosis() const { } long int lnumber; - getNumSteps(solver_memory_.get(), &lnumber); + get_num_steps(solver_memory_.get(), &lnumber); ns_.push_back(gsl::narrow(lnumber)); - getNumRhsEvals(solver_memory_.get(), &lnumber); + get_num_rhs_evals(solver_memory_.get(), &lnumber); nrhs_.push_back(gsl::narrow(lnumber)); - getNumErrTestFails(solver_memory_.get(), &lnumber); + get_num_err_test_fails(solver_memory_.get(), &lnumber); netf_.push_back(gsl::narrow(lnumber)); - getNumNonlinSolvConvFails(solver_memory_.get(), &lnumber); + get_num_non_lin_solv_conv_fails(solver_memory_.get(), &lnumber); nnlscf_.push_back(gsl::narrow(lnumber)); int number; - getLastOrder(solver_memory_.get(), &number); + get_last_order(solver_memory_.get(), &number); order_.push_back(number); } -void Solver::storeDiagnosisB(int const which) const { +void Solver::store_diagnosis_b(int const which) const { if (!solver_was_called_B_ || !solver_memory_B_.at(which)) { nsB_.push_back(0); nrhsB_.push_back(0); @@ -377,35 +377,35 @@ void Solver::storeDiagnosisB(int const which) const { } long int number; - getNumSteps(solver_memory_B_.at(which).get(), &number); + get_num_steps(solver_memory_B_.at(which).get(), &number); nsB_.push_back(gsl::narrow(number)); - getNumRhsEvals(solver_memory_B_.at(which).get(), &number); + get_num_rhs_evals(solver_memory_B_.at(which).get(), &number); nrhsB_.push_back(gsl::narrow(number)); - getNumErrTestFails(solver_memory_B_.at(which).get(), &number); + get_num_err_test_fails(solver_memory_B_.at(which).get(), &number); netfB_.push_back(gsl::narrow(number)); - getNumNonlinSolvConvFails(solver_memory_B_.at(which).get(), &number); + get_num_non_lin_solv_conv_fails(solver_memory_B_.at(which).get(), &number); nnlscfB_.push_back(gsl::narrow(number)); } -void Solver::initializeLinearSolver(Model const* model) const { +void Solver::initialize_linear_solver(Model const* model) const { switch (linsol_) { /* DIRECT SOLVERS */ case LinearSolver::dense: linear_solver_ = std::make_unique(x_); - setLinearSolver(); - setDenseJacFn(); + set_linear_solver(); + set_dense_jac_fn(); break; case LinearSolver::band: linear_solver_ = std::make_unique(x_, model->ubw, model->lbw); - setLinearSolver(); - setBandJacFn(); + set_linear_solver(); + set_band_jac_fn(); break; case LinearSolver::LAPACKDense: @@ -414,27 +414,27 @@ void Solver::initializeLinearSolver(Model const* model) const { case LinearSolver::diag: diag(); - setDenseJacFn(); + set_dense_jac_fn(); break; /* ITERATIVE SOLVERS */ case LinearSolver::SPGMR: linear_solver_ = std::make_unique(x_); - setLinearSolver(); - setJacTimesVecFn(); + set_linear_solver(); + set_jac_times_vec_fn(); break; case LinearSolver::SPBCG: linear_solver_ = std::make_unique(x_); - setLinearSolver(); - setJacTimesVecFn(); + set_linear_solver(); + set_jac_times_vec_fn(); break; case LinearSolver::SPTFQMR: linear_solver_ = std::make_unique(x_); - setLinearSolver(); - setJacTimesVecFn(); + set_linear_solver(); + set_jac_times_vec_fn(); break; /* SPARSE SOLVERS */ @@ -442,10 +442,10 @@ void Solver::initializeLinearSolver(Model const* model) const { case LinearSolver::KLU: linear_solver_ = std::make_unique( x_, model->nnz, CSC_MAT, - static_cast(getStateOrdering()) + static_cast(get_state_ordering()) ); - setLinearSolver(); - setSparseJacFn(); + set_linear_solver(); + set_sparse_jac_fn(); break; #ifdef SUNDIALS_SUPERLUMT @@ -467,15 +467,15 @@ void Solver::initializeLinearSolver(Model const* model) const { } } -void Solver::initializeNonLinearSolver() const { +void Solver::initialize_non_linear_solver() const { switch (iter_) { case NonlinearSolverIteration::newton: non_linear_solver_ - = std::make_unique(x_.getNVector()); + = std::make_unique(x_.get_nvector()); break; case NonlinearSolverIteration::fixedpoint: non_linear_solver_ - = std::make_unique(x_.getNVector()); + = std::make_unique(x_.get_nvector()); break; default: throw AmiException( @@ -483,25 +483,25 @@ void Solver::initializeNonLinearSolver() const { ); } - setNonLinearSolver(); + set_non_linear_solver(); } -void Solver::initializeLinearSolverB( +void Solver::initialize_linear_solver_b( Model const* model, int const which ) const { switch (linsol_) { /* DIRECT SOLVERS */ case LinearSolver::dense: linear_solver_B_ = std::make_unique(xB_); - setLinearSolverB(which); - setDenseJacFnB(which); + set_linear_solver_b(which); + set_dense_jac_fn_b(which); break; case LinearSolver::band: linear_solver_B_ = std::make_unique(xB_, model->ubw, model->lbw); - setLinearSolverB(which); - setBandJacFnB(which); + set_linear_solver_b(which); + set_band_jac_fn_b(which); break; case LinearSolver::LAPACKDense: @@ -509,28 +509,28 @@ void Solver::initializeLinearSolverB( throw AmiException("Solver currently not supported!"); case LinearSolver::diag: - diagB(which); - setDenseJacFnB(which); + diag_b(which); + set_dense_jac_fn_b(which); break; /* ITERATIVE SOLVERS */ case LinearSolver::SPGMR: linear_solver_B_ = std::make_unique(xB_); - setLinearSolverB(which); - setJacTimesVecFnB(which); + set_linear_solver_b(which); + set_jac_times_vec_fn_b(which); break; case LinearSolver::SPBCG: linear_solver_B_ = std::make_unique(xB_); - setLinearSolverB(which); - setJacTimesVecFnB(which); + set_linear_solver_b(which); + set_jac_times_vec_fn_b(which); break; case LinearSolver::SPTFQMR: linear_solver_B_ = std::make_unique(xB_); - setLinearSolverB(which); - setJacTimesVecFnB(which); + set_linear_solver_b(which); + set_jac_times_vec_fn_b(which); break; /* SPARSE SOLVERS */ @@ -538,10 +538,10 @@ void Solver::initializeLinearSolverB( case LinearSolver::KLU: linear_solver_B_ = std::make_unique( xB_, model->nnz, CSC_MAT, - static_cast(getStateOrdering()) + static_cast(get_state_ordering()) ); - setLinearSolverB(which); - setSparseJacFnB(which); + set_linear_solver_b(which); + set_sparse_jac_fn_b(which); break; #ifdef SUNDIALS_SUPERLUMT case LinearSolver::SuperLUMT: @@ -560,15 +560,15 @@ void Solver::initializeLinearSolverB( } } -void Solver::initializeNonLinearSolverB(int const which) const { +void Solver::initialize_non_linear_solver_b(int const which) const { switch (iter_) { case NonlinearSolverIteration::newton: non_linear_solver_B_ - = std::make_unique(xB_.getNVector()); + = std::make_unique(xB_.get_nvector()); break; case NonlinearSolverIteration::fixedpoint: non_linear_solver_B_ - = std::make_unique(xB_.getNVector()); + = std::make_unique(xB_.get_nvector()); break; default: throw AmiException( @@ -576,7 +576,7 @@ void Solver::initializeNonLinearSolverB(int const which) const { ); } - setNonLinearSolverB(which); + set_non_linear_solver_b(which); } bool operator==(Solver const& a, Solver const& b) { @@ -595,14 +595,14 @@ bool operator==(Solver const& a, Solver const& b) { && (a.maxsteps_ == b.maxsteps_) && (a.maxstepsB_ == b.maxstepsB_) && (a.quad_atol_ == b.quad_atol_) && (a.quad_rtol_ == b.quad_rtol_) && (a.maxtime_ == b.maxtime_) - && (a.getAbsoluteToleranceSteadyState() - == b.getAbsoluteToleranceSteadyState()) - && (a.getRelativeToleranceSteadyState() - == b.getRelativeToleranceSteadyState()) - && (a.getAbsoluteToleranceSteadyStateSensi() - == b.getAbsoluteToleranceSteadyStateSensi()) - && (a.getRelativeToleranceSteadyStateSensi() - == b.getRelativeToleranceSteadyStateSensi()) + && (a.get_absolute_tolerance_steady_state() + == b.get_absolute_tolerance_steady_state()) + && (a.get_relative_tolerance_steady_state() + == b.get_relative_tolerance_steady_state()) + && (a.get_absolute_tolerance_steady_state_sensi() + == b.get_absolute_tolerance_steady_state_sensi()) + && (a.get_relative_tolerance_steady_state_sensi() + == b.get_relative_tolerance_steady_state_sensi()) && (a.rtol_fsa_ == b.rtol_fsa_ || (isnan(a.rtol_fsa_) && isnan(b.rtol_fsa_))) && (a.atol_fsa_ == b.atol_fsa_ @@ -618,21 +618,21 @@ bool operator==(Solver const& a, Solver const& b) { && (a.max_conv_fails_ == b.max_conv_fails_) && (a.max_nonlin_iters_ == b.max_nonlin_iters_) && (a.max_step_size_ == b.max_step_size_) - && (a.constraints_.getVector() == b.constraints_.getVector()); + && (a.constraints_.get_vector() == b.constraints_.get_vector()); } -void Solver::applyTolerances() const { - if (!getInitDone()) +void Solver::apply_tolerances() const { + if (!get_init_done()) throw AmiException( "Solver instance was not yet set up, the " "tolerances cannot be applied yet!" ); - setSStolerances(rtol_, atol_); + set_ss_tolerances(rtol_, atol_); } -void Solver::applyTolerancesFSA() const { - if (!getInitDone()) +void Solver::apply_tolerances_fsa() const { + if (!get_init_done()) throw AmiException( "Solver instance was not yet set up, the " "tolerances cannot be applied yet!" @@ -642,14 +642,14 @@ void Solver::applyTolerancesFSA() const { return; if (nplist()) { - std::vector atols(nplist(), getAbsoluteToleranceFSA()); - setSensSStolerances(getRelativeToleranceFSA(), atols.data()); - setSensErrCon(true); + std::vector atols(nplist(), get_absolute_tolerance_fsa()); + set_sens_ss_tolerances(get_relative_tolerance_fsa(), atols.data()); + set_sens_err_con(true); } } -void Solver::applyTolerancesASA(int const which) const { - if (!getAdjInitDone()) +void Solver::apply_tolerances_asa(int const which) const { + if (!get_adj_init_done()) throw AmiException( "Adjoint solver instance was not yet set up, the " "tolerances cannot be applied yet!" @@ -659,11 +659,13 @@ void Solver::applyTolerancesASA(int const which) const { return; /* specify integration tolerances for backward problem */ - setSStolerancesB(which, getRelativeToleranceB(), getAbsoluteToleranceB()); + set_ss_tolerances_b( + which, get_relative_tolerance_b(), get_absolute_tolerance_b() + ); } -void Solver::applyQuadTolerancesASA(int const which) const { - if (!getAdjInitDone()) +void Solver::apply_quad_tolerances_asa(int const which) const { + if (!get_adj_init_done()) throw AmiException( "Adjoint solver instance was not yet set up, the " "tolerances cannot be applied yet!" @@ -676,13 +678,13 @@ void Solver::applyQuadTolerancesASA(int const which) const { realtype const quad_atol = isnan(quad_atol_) ? atol_ : quad_atol_; /* Enable Quadrature Error Control */ - setQuadErrConB(which, !std::isinf(quad_atol) && !std::isinf(quad_rtol)); + set_quad_err_con_b(which, !std::isinf(quad_atol) && !std::isinf(quad_rtol)); - quadSStolerancesB(which, quad_rtol, quad_atol); + quad_ss_tolerances_b(which, quad_rtol, quad_atol); } -void Solver::applyQuadTolerances() const { - if (!getQuadInitDone()) +void Solver::apply_quad_tolerances() const { + if (!get_quad_init_done()) throw AmiException( "Quadratures were not initialized, the " "tolerances cannot be applied yet!" @@ -695,20 +697,20 @@ void Solver::applyQuadTolerances() const { realtype quad_atolF = isnan(quad_atol_) ? atol_ : quad_atol_; /* Enable Quadrature Error Control */ - setQuadErrCon(!std::isinf(quad_atolF) && !std::isinf(quad_rtolF)); + set_quad_err_con(!std::isinf(quad_atolF) && !std::isinf(quad_rtolF)); - quadSStolerances(quad_rtolF, quad_atolF); + quad_ss_tolerances(quad_rtolF, quad_atolF); } -void Solver::applySensitivityTolerances() const { +void Solver::apply_sensitivity_tolerances() const { if (sensi_ < SensitivityOrder::first) return; if (sensi_meth_ == SensitivityMethod::forward) - applyTolerancesFSA(); - else if (sensi_meth_ == SensitivityMethod::adjoint && getAdjInitDone()) { + apply_tolerances_fsa(); + else if (sensi_meth_ == SensitivityMethod::adjoint && get_adj_init_done()) { for (int iMem = 0; iMem < (int)solver_memory_B_.size(); ++iMem) - applyTolerancesASA(iMem); + apply_tolerances_asa(iMem); } } @@ -721,25 +723,25 @@ void Solver::apply_constraints() const { } } -SensitivityMethod Solver::getSensitivityMethod() const { return sensi_meth_; } +SensitivityMethod Solver::get_sensitivity_method() const { return sensi_meth_; } -SensitivityMethod Solver::getSensitivityMethodPreequilibration() const { +SensitivityMethod Solver::get_sensitivity_method_pre_equilibration() const { return sensi_meth_preeq_; } -void Solver::setSensitivityMethod(SensitivityMethod const sensi_meth) { - checkSensitivityMethod(sensi_meth, false); +void Solver::set_sensitivity_method(SensitivityMethod const sensi_meth) { + check_sensitivity_method(sensi_meth, false); this->sensi_meth_ = sensi_meth; } -void Solver::setSensitivityMethodPreequilibration( +void Solver::set_sensitivity_method_pre_equilibration( SensitivityMethod const sensi_meth_preeq ) { - checkSensitivityMethod(sensi_meth_preeq, true); + check_sensitivity_method(sensi_meth_preeq, true); sensi_meth_preeq_ = sensi_meth_preeq; } -void Solver::checkSensitivityMethod( +void Solver::check_sensitivity_method( SensitivityMethod const sensi_meth, bool const preequilibration ) const { if (rdata_mode_ == RDataReporting::residuals @@ -749,28 +751,28 @@ void Solver::checkSensitivityMethod( " only reporting residuals!" ); if (!preequilibration && sensi_meth != sensi_meth_) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); } -void Solver::setMaxNonlinIters(int const max_nonlin_iters) { +void Solver::set_max_nonlin_iters(int const max_nonlin_iters) { if (max_nonlin_iters < 0) throw AmiException("max_nonlin_iters must be a non-negative number"); max_nonlin_iters_ = max_nonlin_iters; } -int Solver::getMaxNonlinIters() const { return max_nonlin_iters_; } +int Solver::get_max_nonlin_iters() const { return max_nonlin_iters_; } -void Solver::setMaxConvFails(int const max_conv_fails) { +void Solver::set_max_conv_fails(int const max_conv_fails) { if (max_conv_fails < 0) throw AmiException("max_conv_fails must be a non-negative number"); max_conv_fails_ = max_conv_fails; } -int Solver::getMaxConvFails() const { return max_conv_fails_; } +int Solver::get_max_conv_fails() const { return max_conv_fails_; } -void Solver::setConstraints(std::vector const& constraints) { +void Solver::set_constraints(std::vector const& constraints) { auto any_constraint = std::ranges::any_of(constraints, [](bool x) { return x != 0.0; }); @@ -783,150 +785,150 @@ void Solver::setConstraints(std::vector const& constraints) { constraints_ = AmiVector(constraints, sunctx_); } -void Solver::setMaxStepSize(realtype max_step_size) { +void Solver::set_max_step_size(realtype max_step_size) { if (max_step_size < 0) throw AmiException("max_step_size must be non-negative."); max_step_size_ = max_step_size; } -realtype Solver::getMaxStepSize() const { return max_step_size_; } +realtype Solver::get_max_step_size() const { return max_step_size_; } -int Solver::getNewtonMaxSteps() const { return newton_maxsteps_; } +int Solver::get_newton_max_steps() const { return newton_maxsteps_; } -void Solver::setNewtonMaxSteps(int const newton_maxsteps) { +void Solver::set_newton_max_steps(int const newton_maxsteps) { if (newton_maxsteps < 0) throw AmiException("newton_maxsteps must be a non-negative number"); newton_maxsteps_ = newton_maxsteps; } -NewtonDampingFactorMode Solver::getNewtonDampingFactorMode() const { +NewtonDampingFactorMode Solver::get_newton_damping_factor_mode() const { return newton_damping_factor_mode_; } -void Solver::setNewtonDampingFactorMode( +void Solver::set_newton_damping_factor_mode( NewtonDampingFactorMode dampingFactorMode ) { newton_damping_factor_mode_ = dampingFactorMode; } -double Solver::getNewtonDampingFactorLowerBound() const { +double Solver::get_newton_damping_factor_lower_bound() const { return newton_damping_factor_lower_bound_; } -void Solver::setNewtonDampingFactorLowerBound( +void Solver::set_newton_damping_factor_lower_bound( double const dampingFactorLowerBound ) { newton_damping_factor_lower_bound_ = dampingFactorLowerBound; } -SensitivityOrder Solver::getSensitivityOrder() const { return sensi_; } +SensitivityOrder Solver::get_sensitivity_order() const { return sensi_; } -void Solver::setSensitivityOrder(SensitivityOrder const sensi) { +void Solver::set_sensitivity_order(SensitivityOrder const sensi) { if (sensi_ != sensi) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); sensi_ = sensi; - if (getInitDone()) - applySensitivityTolerances(); + if (get_init_done()) + apply_sensitivity_tolerances(); } -double Solver::getRelativeTolerance() const { +double Solver::get_relative_tolerance() const { return static_cast(rtol_); } -void Solver::setRelativeTolerance(double const rtol) { +void Solver::set_relative_tolerance(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); rtol_ = static_cast(rtol); - if (getInitDone()) { - applyTolerances(); - applySensitivityTolerances(); + if (get_init_done()) { + apply_tolerances(); + apply_sensitivity_tolerances(); } } -double Solver::getAbsoluteTolerance() const { +double Solver::get_absolute_tolerance() const { return static_cast(atol_); } -void Solver::setAbsoluteTolerance(double const atol) { +void Solver::set_absolute_tolerance(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); atol_ = static_cast(atol); - if (getInitDone()) { - applyTolerances(); - applySensitivityTolerances(); + if (get_init_done()) { + apply_tolerances(); + apply_sensitivity_tolerances(); } } -double Solver::getRelativeToleranceFSA() const { +double Solver::get_relative_tolerance_fsa() const { return static_cast(isnan(rtol_fsa_) ? rtol_ : rtol_fsa_); } -void Solver::setRelativeToleranceFSA(double const rtol) { +void Solver::set_relative_tolerance_fsa(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); rtol_fsa_ = static_cast(rtol); - if (getInitDone()) { - applySensitivityTolerances(); + if (get_init_done()) { + apply_sensitivity_tolerances(); } } -double Solver::getAbsoluteToleranceFSA() const { +double Solver::get_absolute_tolerance_fsa() const { return static_cast(isnan(atol_fsa_) ? atol_ : atol_fsa_); } -void Solver::setAbsoluteToleranceFSA(double const atol) { +void Solver::set_absolute_tolerance_fsa(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); atol_fsa_ = static_cast(atol); - if (getInitDone()) { - applySensitivityTolerances(); + if (get_init_done()) { + apply_sensitivity_tolerances(); } } -double Solver::getRelativeToleranceB() const { +double Solver::get_relative_tolerance_b() const { return static_cast(isnan(rtolB_) ? rtol_ : rtolB_); } -void Solver::setRelativeToleranceB(double const rtol) { +void Solver::set_relative_tolerance_b(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); rtolB_ = static_cast(rtol); - if (getInitDone()) { - applySensitivityTolerances(); + if (get_init_done()) { + apply_sensitivity_tolerances(); } } -double Solver::getAbsoluteToleranceB() const { +double Solver::get_absolute_tolerance_b() const { return static_cast(isnan(atolB_) ? atol_ : atolB_); } -void Solver::setAbsoluteToleranceB(double const atol) { +void Solver::set_absolute_tolerance_b(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); atolB_ = static_cast(atol); - if (getInitDone()) { - applySensitivityTolerances(); + if (get_init_done()) { + apply_sensitivity_tolerances(); } } -double Solver::getRelativeToleranceQuadratures() const { +double Solver::get_relative_tolerance_quadratures() const { return static_cast(quad_rtol_); } -void Solver::setRelativeToleranceQuadratures(double const rtol) { +void Solver::set_relative_tolerance_quadratures(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); @@ -937,14 +939,14 @@ void Solver::setRelativeToleranceQuadratures(double const rtol) { for (int iMem = 0; iMem < (int)solver_memory_B_.size(); ++iMem) if (solver_memory_B_.at(iMem)) - applyQuadTolerancesASA(iMem); + apply_quad_tolerances_asa(iMem); } -double Solver::getAbsoluteToleranceQuadratures() const { +double Solver::get_absolute_tolerance_quadratures() const { return static_cast(quad_atol_); } -void Solver::setAbsoluteToleranceQuadratures(double const atol) { +void Solver::set_absolute_tolerance_quadratures(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); @@ -955,51 +957,51 @@ void Solver::setAbsoluteToleranceQuadratures(double const atol) { for (int iMem = 0; iMem < (int)solver_memory_B_.size(); ++iMem) if (solver_memory_B_.at(iMem)) - applyTolerancesASA(iMem); + apply_tolerances_asa(iMem); } -double Solver::getSteadyStateToleranceFactor() const { +double Solver::get_steady_state_tolerance_factor() const { return static_cast(ss_tol_factor_); } -void Solver::setSteadyStateToleranceFactor(double const factor) { +void Solver::set_steady_state_tolerance_factor(double const factor) { if (factor < 0) throw AmiException("ss_tol_factor must be a non-negative number"); ss_tol_factor_ = static_cast(factor); } -double Solver::getRelativeToleranceSteadyState() const { +double Solver::get_relative_tolerance_steady_state() const { return static_cast( isnan(ss_rtol_) ? rtol_ * ss_tol_factor_ : ss_rtol_ ); } -void Solver::setRelativeToleranceSteadyState(double const rtol) { +void Solver::set_relative_tolerance_steady_state(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); ss_rtol_ = static_cast(rtol); } -double Solver::getAbsoluteToleranceSteadyState() const { +double Solver::get_absolute_tolerance_steady_state() const { return static_cast( isnan(ss_atol_) ? atol_ * ss_tol_factor_ : ss_atol_ ); } -void Solver::setAbsoluteToleranceSteadyState(double const atol) { +void Solver::set_absolute_tolerance_steady_state(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); ss_atol_ = static_cast(atol); } -double Solver::getSteadyStateSensiToleranceFactor() const { +double Solver::get_steady_state_sensi_tolerance_factor() const { return static_cast(ss_tol_sensi_factor_); } -void Solver::setSteadyStateSensiToleranceFactor( +void Solver::set_steady_state_sensi_tolerance_factor( double const ss_tol_sensi_factor ) { if (ss_tol_sensi_factor < 0) @@ -1008,43 +1010,43 @@ void Solver::setSteadyStateSensiToleranceFactor( ss_tol_sensi_factor_ = static_cast(ss_tol_sensi_factor); } -double Solver::getRelativeToleranceSteadyStateSensi() const { +double Solver::get_relative_tolerance_steady_state_sensi() const { return static_cast( isnan(ss_rtol_sensi_) ? rtol_ * ss_tol_sensi_factor_ : ss_rtol_sensi_ ); } -void Solver::setRelativeToleranceSteadyStateSensi(double const rtol) { +void Solver::set_relative_tolerance_steady_state_sensi(double const rtol) { if (rtol < 0) throw AmiException("rtol must be a non-negative number"); ss_rtol_sensi_ = static_cast(rtol); } -double Solver::getAbsoluteToleranceSteadyStateSensi() const { +double Solver::get_absolute_tolerance_steady_state_sensi() const { return static_cast( isnan(ss_atol_sensi_) ? atol_ * ss_tol_sensi_factor_ : ss_atol_sensi_ ); } -void Solver::setAbsoluteToleranceSteadyStateSensi(double const atol) { +void Solver::set_absolute_tolerance_steady_state_sensi(double const atol) { if (atol < 0) throw AmiException("atol must be a non-negative number"); ss_atol_sensi_ = static_cast(atol); } -long int Solver::getMaxSteps() const { return maxsteps_; } +long int Solver::get_max_steps() const { return maxsteps_; } -double Solver::getMaxTime() const { return maxtime_.count(); } +double Solver::get_max_time() const { return maxtime_.count(); } -void Solver::setMaxTime(double const maxtime) { +void Solver::set_max_time(double const maxtime) { maxtime_ = std::chrono::duration(maxtime); } -void Solver::startTimer() const { simulation_timer_.reset(); } +void Solver::start_timer() const { simulation_timer_.reset(); } -bool Solver::timeExceeded(int const interval) const { +bool Solver::time_exceeded(int const interval) const { thread_local int eval_counter = 0; // 0 means infinite time @@ -1059,59 +1061,65 @@ bool Solver::timeExceeded(int const interval) const { return std::chrono::duration(elapsed_s) > maxtime_; } -void Solver::setMaxSteps(long int const maxsteps) { +void Solver::set_max_steps(long int const maxsteps) { if (maxsteps <= 0) throw AmiException("maxsteps must be a positive number"); maxsteps_ = maxsteps; - if (getAdjInitDone()) - resetMutableMemory(nx(), nplist(), nquad()); + if (get_adj_init_done()) + reset_mutable_memory(nx(), nplist(), nquad()); } -long int Solver::getMaxStepsBackwardProblem() const { return maxstepsB_; } +long int Solver::get_max_steps_backward_problem() const { return maxstepsB_; } -void Solver::setMaxStepsBackwardProblem(long int const maxsteps) { +void Solver::set_max_steps_backward_problem(long int const maxsteps) { if (maxsteps < 0) throw AmiException("maxsteps must be a non-negative number"); maxstepsB_ = maxsteps; } -LinearMultistepMethod Solver::getLinearMultistepMethod() const { return lmm_; } +LinearMultistepMethod Solver::get_linear_multistep_method() const { + return lmm_; +} -void Solver::setLinearMultistepMethod(LinearMultistepMethod const lmm) { +void Solver::set_linear_multistep_method(LinearMultistepMethod const lmm) { if (solver_memory_) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); lmm_ = lmm; } -NonlinearSolverIteration Solver::getNonlinearSolverIteration() const { +NonlinearSolverIteration Solver::get_non_linear_solver_iteration() const { return iter_; } -void Solver::setNonlinearSolverIteration(NonlinearSolverIteration const iter) { +void Solver::set_non_linear_solver_iteration( + NonlinearSolverIteration const iter +) { if (solver_memory_) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); iter_ = iter; } -InterpolationType Solver::getInterpolationType() const { return interp_type_; } +InterpolationType Solver::get_interpolation_type() const { + return interp_type_; +} -void Solver::setInterpolationType(InterpolationType const interpType) { +void Solver::set_interpolation_type(InterpolationType const interpType) { if (!solver_memory_B_.empty()) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); interp_type_ = interpType; } -int Solver::getStateOrdering() const { return ordering_; } +int Solver::get_state_ordering() const { return ordering_; } -void Solver::setStateOrdering(int ordering) { +void Solver::set_state_ordering(int ordering) { ordering_ = ordering; if (solver_memory_ && linsol_ == LinearSolver::KLU) { auto klu = dynamic_cast(linear_solver_.get()); - klu->setOrdering(static_cast(ordering)); + klu->set_ordering(static_cast(ordering)); klu = dynamic_cast(linear_solver_B_.get()); - klu->setOrdering(static_cast(ordering)); + klu->set_ordering(static_cast(ordering)); } #ifdef SUNDIALS_SUPERLUMT if (solverMemory && linsol == LinearSolver::SuperLUMT) { @@ -1127,41 +1135,43 @@ void Solver::setStateOrdering(int ordering) { #endif } -bool Solver::getStabilityLimitFlag() const { return stldet_; } +bool Solver::get_stability_limit_flag() const { return stldet_; } -void Solver::setStabilityLimitFlag(bool const stldet) { +void Solver::set_stability_limit_flag(bool const stldet) { stldet_ = stldet; if (solver_memory_) { - setStabLimDet(stldet); + set_stab_lim_det(stldet); for (int iMem = 0; iMem < (int)solver_memory_B_.size(); ++iMem) if (solver_memory_B_.at(iMem)) - setStabLimDetB(iMem, stldet); + set_stab_lim_det_b(iMem, stldet); } } -LinearSolver Solver::getLinearSolver() const { return linsol_; } +LinearSolver Solver::get_linear_solver() const { return linsol_; } -void Solver::setLinearSolver(LinearSolver const linsol) { +void Solver::set_linear_solver(LinearSolver const linsol) { if (solver_memory_) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); linsol_ = linsol; } -InternalSensitivityMethod Solver::getInternalSensitivityMethod() const { +InternalSensitivityMethod Solver::get_internal_sensitivity_method() const { return ism_; } -void Solver::setInternalSensitivityMethod(InternalSensitivityMethod const ism) { +void Solver::set_internal_sensitivity_method( + InternalSensitivityMethod const ism +) { if (solver_memory_) - resetMutableMemory(nx(), nplist(), nquad()); + reset_mutable_memory(nx(), nplist(), nquad()); ism_ = ism; } -RDataReporting Solver::getReturnDataReportingMode() const { +RDataReporting Solver::get_return_data_reporting_mode() const { return rdata_mode_; } -void Solver::setReturnDataReportingMode(RDataReporting const rdrm) { +void Solver::set_return_data_reporting_mode(RDataReporting const rdrm) { if (rdrm == RDataReporting::residuals && sensi_meth_ == SensitivityMethod::adjoint) throw AmiException( @@ -1171,19 +1181,19 @@ void Solver::setReturnDataReportingMode(RDataReporting const rdrm) { rdata_mode_ = rdrm; } -void Solver::initializeNonLinearSolverSens(Model const* model) const { +void Solver::initialize_non_linear_solver_sens(Model const* model) const { switch (iter_) { case NonlinearSolverIteration::newton: switch (ism_) { case InternalSensitivityMethod::staggered: case InternalSensitivityMethod::simultaneous: non_linear_solver_sens_ = std::make_unique( - 1 + model->nplist(), x_.getNVector() + 1 + model->nplist(), x_.get_nvector() ); break; case InternalSensitivityMethod::staggered1: non_linear_solver_sens_ - = std::make_unique(x_.getNVector()); + = std::make_unique(x_.get_nvector()); break; default: throw AmiException( @@ -1196,12 +1206,12 @@ void Solver::initializeNonLinearSolverSens(Model const* model) const { case InternalSensitivityMethod::staggered: case InternalSensitivityMethod::simultaneous: non_linear_solver_sens_ = std::make_unique( - 1 + model->nplist(), x_.getNVector() + 1 + model->nplist(), x_.get_nvector() ); break; case InternalSensitivityMethod::staggered1: non_linear_solver_sens_ - = std::make_unique(x_.getNVector()); + = std::make_unique(x_.get_nvector()); break; default: throw AmiException( @@ -1215,10 +1225,10 @@ void Solver::initializeNonLinearSolverSens(Model const* model) const { ); } - setNonLinearSolverSens(); + set_non_linear_solver_sens(); } -void Solver::setErrHandlerFn() const { +void Solver::set_err_handler_fn() const { SUNContext_ClearErrHandlers(sunctx_); auto sunerr = SUNContext_PushErrHandler( sunctx_, wrapErrHandlerFn, @@ -1236,51 +1246,51 @@ int Solver::nx() const { return x_.size(); } int Solver::nquad() const { return xQB_.size(); } -bool Solver::getInitDone() const { return initialized_; } +bool Solver::get_init_done() const { return initialized_; } -bool Solver::getSensInitDone() const { return sens_initialized_; } +bool Solver::get_sens_init_done() const { return sens_initialized_; } -bool Solver::getAdjInitDone() const { return adj_initialized_; } +bool Solver::get_adj_init_done() const { return adj_initialized_; } -bool Solver::getInitDoneB(int const which) const { +bool Solver::get_init_done_b(int const which) const { return static_cast(initializedB_.size()) > which && initializedB_.at(which); } -bool Solver::getQuadInitDoneB(int const which) const { +bool Solver::get_quad_init_done_b(int const which) const { return static_cast(initializedQB_.size()) > which && initializedQB_.at(which); } -bool Solver::getQuadInitDone() const { return quad_initialized_; } +bool Solver::get_quad_init_done() const { return quad_initialized_; } -void Solver::setInitDone() const { initialized_ = true; } +void Solver::set_init_done() const { initialized_ = true; } -void Solver::setSensInitDone() const { sens_initialized_ = true; } +void Solver::set_sens_init_done() const { sens_initialized_ = true; } -void Solver::setAdjInitDone() const { adj_initialized_ = true; } +void Solver::set_adj_init_done() const { adj_initialized_ = true; } -void Solver::setInitDoneB(int const which) const { +void Solver::set_init_done_b(int const which) const { if (which >= static_cast(initializedB_.size())) initializedB_.resize(which + 1, false); initializedB_.at(which) = true; } -void Solver::setQuadInitDoneB(int const which) const { +void Solver::set_quad_init_done_b(int const which) const { if (which >= static_cast(initializedQB_.size())) initializedQB_.resize(which + 1, false); initializedQB_.at(which) = true; } -void Solver::setQuadInitDone() const { quad_initialized_ = true; } +void Solver::set_quad_init_done() const { quad_initialized_ = true; } -void Solver::switchForwardSensisOff() const { sensToggleOff(); } +void Solver::switch_forward_sensis_off() const { sens_toggle_off(); } -realtype Solver::getCpuTime() const { return cpu_time_; } +realtype Solver::get_cpu_time() const { return cpu_time_; } -realtype Solver::getCpuTimeB() const { return cpu_timeB_; } +realtype Solver::get_cpu_time_b() const { return cpu_time_b_; } -void Solver::resetMutableMemory( +void Solver::reset_mutable_memory( int const nx, int const nplist, int const nquad ) const { solver_memory_ = nullptr; @@ -1308,93 +1318,93 @@ void Solver::resetMutableMemory( initializedQB_.clear(); } -void Solver::writeSolution( +void Solver::write_solution( realtype& t, AmiVector& x, AmiVector& dx, AmiVectorArray& sx, AmiVector& xQ ) const { - t = gett(); + t = get_t(); if (quad_initialized_) - xQ.copy(getQuadrature(t)); + xQ.copy(get_quadrature(t)); if (sens_initialized_) - sx.copy(getStateSensitivity(t)); - x.copy(getState(t)); - dx.copy(getDerivativeState(t)); + sx.copy(get_state_sensitivity(t)); + x.copy(get_state(t)); + dx.copy(get_derivative_state(t)); } -void Solver::writeSolution( +void Solver::write_solution( realtype& t, AmiVector& x, AmiVector& dx, AmiVectorArray& sx ) const { - t = gett(); + t = get_t(); if (sens_initialized_) - sx.copy(getStateSensitivity(t)); - x.copy(getState(t)); - dx.copy(getDerivativeState(t)); + sx.copy(get_state_sensitivity(t)); + x.copy(get_state(t)); + dx.copy(get_derivative_state(t)); } -void Solver::writeSolution(SolutionState& sol) const { - sol.t = gett(); +void Solver::write_solution(SolutionState& sol) const { + sol.t = get_t(); if (sens_initialized_) - sol.sx.copy(getStateSensitivity(sol.t)); - sol.x.copy(getState(sol.t)); - sol.dx.copy(getDerivativeState(sol.t)); + sol.sx.copy(get_state_sensitivity(sol.t)); + sol.x.copy(get_state(sol.t)); + sol.dx.copy(get_derivative_state(sol.t)); } -void Solver::writeSolution(realtype const t, SolutionState& sol) const { +void Solver::write_solution(realtype const t, SolutionState& sol) const { sol.t = t; if (sens_initialized_) - sol.sx.copy(getStateSensitivity(sol.t)); - sol.x.copy(getState(sol.t)); - sol.dx.copy(getDerivativeState(sol.t)); + sol.sx.copy(get_state_sensitivity(sol.t)); + sol.x.copy(get_state(sol.t)); + sol.dx.copy(get_derivative_state(sol.t)); } -void Solver::writeSolutionB( +void Solver::write_solution_b( realtype& t, AmiVector& xB, AmiVector& dxB, AmiVector& xQB, int const which ) const { - t = gett(); - xB.copy(getAdjointState(which, t)); - dxB.copy(getAdjointDerivativeState(which, t)); - xQB.copy(getAdjointQuadrature(which, t)); + t = get_t(); + xB.copy(get_adjoint_state(which, t)); + dxB.copy(get_adjoint_derivative_state(which, t)); + xQB.copy(get_adjoint_quadrature(which, t)); } -AmiVector const& Solver::getState(realtype const t) const { +AmiVector const& Solver::get_state(realtype const t) const { if (t == t_) return x_; if (solver_was_called_F_) - getDky(t, 0); + get_dky(t, 0); return dky_; } -AmiVector const& Solver::getDerivativeState(realtype const t) const { +AmiVector const& Solver::get_derivative_state(realtype const t) const { if (t == t_) return dx_; if (solver_was_called_F_) - getDky(t, 1); + get_dky(t, 1); return dky_; } -AmiVectorArray const& Solver::getStateSensitivity(realtype const t) const { +AmiVectorArray const& Solver::get_state_sensitivity(realtype const t) const { if (sens_initialized_ && solver_was_called_F_) { if (t == t_) { - getSens(); + get_sens(); } else { - getSensDky(t, 0); + get_sens_dky(t, 0); } } return sx_; } AmiVector const& -Solver::getAdjointState(int const which, realtype const t) const { +Solver::get_adjoint_state(int const which, realtype const t) const { if (adj_initialized_) { if (solver_was_called_B_) { if (t == t_) { - getB(which); + get_b(which); return xB_; } - getDkyB(t, 0, which); + get_dky_b(t, 0, which); } } else { dky_.zero(); @@ -1403,14 +1413,14 @@ Solver::getAdjointState(int const which, realtype const t) const { } AmiVector const& -Solver::getAdjointDerivativeState(int const which, realtype const t) const { +Solver::get_adjoint_derivative_state(int const which, realtype const t) const { if (adj_initialized_) { if (solver_was_called_B_) { if (t == t_) { - getB(which); + get_b(which); return dxB_; } - getDkyB(t, 1, which); + get_dky_b(t, 1, which); } } else { dky_.zero(); @@ -1419,14 +1429,14 @@ Solver::getAdjointDerivativeState(int const which, realtype const t) const { } AmiVector const& -Solver::getAdjointQuadrature(int const which, realtype const t) const { +Solver::get_adjoint_quadrature(int const which, realtype const t) const { if (adj_initialized_) { if (solver_was_called_B_) { if (t == t_) { - getQuadB(which); + get_quad_b(which); return xQB_; } - getQuadDkyB(t, 0, which); + get_quad_dky_b(t, 0, which); } } else { xQB_.zero(); @@ -1434,14 +1444,14 @@ Solver::getAdjointQuadrature(int const which, realtype const t) const { return xQB_; } -AmiVector const& Solver::getQuadrature(realtype t) const { +AmiVector const& Solver::get_quadrature(realtype t) const { if (quad_initialized_) { if (solver_was_called_F_) { if (t == t_) { - getQuad(t); + get_quad(t); return xQ_; } - getQuadDky(t, 0); + get_quad_dky(t, 0); } } else { xQ_.zero(); @@ -1449,5 +1459,5 @@ AmiVector const& Solver::getQuadrature(realtype t) const { return xQ_; } -realtype Solver::gett() const { return t_; } +realtype Solver::get_t() const { return t_; } } // namespace amici diff --git a/src/solver_cvodes.cpp b/src/solver_cvodes.cpp index baa489baeb..291af6b786 100644 --- a/src/solver_cvodes.cpp +++ b/src/solver_cvodes.cpp @@ -135,17 +135,17 @@ void CVodeSolver::init( t_ = t0; x_ = x0; int status; - if (getInitDone()) { - status = CVodeReInit(solver_memory_.get(), t0, x_.getNVector()); + if (get_init_done()) { + status = CVodeReInit(solver_memory_.get(), t0, x_.get_nvector()); } else { - status = CVodeInit(solver_memory_.get(), fxdot, t0, x_.getNVector()); - setInitDone(); + status = CVodeInit(solver_memory_.get(), fxdot, t0, x_.get_nvector()); + set_init_done(); } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeInit"); } -void CVodeSolver::initSteadystate( +void CVodeSolver::init_steady_state( realtype const /*t0*/, AmiVector const& /*x0*/, AmiVector const& /*dx0*/ ) const { // We need to set the steadystate rhs function. Sundials doesn't have this @@ -160,31 +160,33 @@ void CVodeSolver::initSteadystate( CVodeSetNlsRhsFn(solver_memory_.get(), fxBdot_ss); } -void CVodeSolver:: - sensInit1(AmiVectorArray const& sx0, AmiVectorArray const& /*sdx0*/) const { +void CVodeSolver::sens_init_1( + AmiVectorArray const& sx0, AmiVectorArray const& /*sdx0*/ +) const { int status = CV_SUCCESS; sx_ = sx0; - if (getSensitivityMethod() == SensitivityMethod::forward && nplist() > 0) { - if (getSensInitDone()) { + if (get_sensitivity_method() == SensitivityMethod::forward + && nplist() > 0) { + if (get_sens_init_done()) { status = CVodeSensReInit( solver_memory_.get(), - static_cast(getInternalSensitivityMethod()), - sx_.getNVectorArray() + static_cast(get_internal_sensitivity_method()), + sx_.get_nvector_array() ); } else { status = CVodeSensInit1( solver_memory_.get(), nplist(), - static_cast(getInternalSensitivityMethod()), fsxdot, - sx_.getNVectorArray() + static_cast(get_internal_sensitivity_method()), fsxdot, + sx_.get_nvector_array() ); - setSensInitDone(); + set_sens_init_done(); } } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSensInit1"); } -void CVodeSolver::binit( +void CVodeSolver::b_init( int const which, realtype const tf, AmiVector const& xB0, AmiVector const& /*dxB0*/ ) const { @@ -192,90 +194,90 @@ void CVodeSolver::binit( force_reinit_postprocess_B_ = false; xB_ = xB0; int status; - if (getInitDoneB(which)) { + if (get_init_done_b(which)) { status - = CVodeReInitB(solver_memory_.get(), which, tf, xB_.getNVector()); + = CVodeReInitB(solver_memory_.get(), which, tf, xB_.get_nvector()); } else { status = CVodeInitB( - solver_memory_.get(), which, fxBdot, tf, xB_.getNVector() + solver_memory_.get(), which, fxBdot, tf, xB_.get_nvector() ); - setInitDoneB(which); + set_init_done_b(which); } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeInitB"); } -void CVodeSolver::qbinit(int const which, AmiVector const& xQB0) const { +void CVodeSolver::qb_init(int const which, AmiVector const& xQB0) const { xQB_ = xQB0; int status; - if (getQuadInitDoneB(which)) { + if (get_quad_init_done_b(which)) { status - = CVodeQuadReInitB(solver_memory_.get(), which, xQB_.getNVector()); + = CVodeQuadReInitB(solver_memory_.get(), which, xQB_.get_nvector()); } else { status = CVodeQuadInitB( - solver_memory_.get(), which, fqBdot, xQB_.getNVector() + solver_memory_.get(), which, fqBdot, xQB_.get_nvector() ); - setQuadInitDoneB(which); + set_quad_init_done_b(which); } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeQuadInitB"); } -void CVodeSolver::rootInit(int ne) const { +void CVodeSolver::root_init(int ne) const { int status = CVodeRootInit(solver_memory_.get(), ne, froot); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeRootInit"); } -void CVodeSolver::setDenseJacFn() const { +void CVodeSolver::set_dense_jac_fn() const { int status = CVodeSetJacFn(solver_memory_.get(), fJ); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFn"); } -void CVodeSolver::setSparseJacFn() const { +void CVodeSolver::set_sparse_jac_fn() const { int status = CVodeSetJacFn(solver_memory_.get(), fJSparse); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFn"); } -void CVodeSolver::setBandJacFn() const { +void CVodeSolver::set_band_jac_fn() const { int status = CVodeSetJacFn(solver_memory_.get(), fJBand); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFn"); } -void CVodeSolver::setJacTimesVecFn() const { +void CVodeSolver::set_jac_times_vec_fn() const { int status = CVodeSetJacTimes(solver_memory_.get(), nullptr, fJv); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacTimes"); } -void CVodeSolver::setDenseJacFnB(int which) const { +void CVodeSolver::set_dense_jac_fn_b(int which) const { int status = CVodeSetJacFnB(solver_memory_.get(), which, fJB); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFnB"); } -void CVodeSolver::setSparseJacFnB(int which) const { +void CVodeSolver::set_sparse_jac_fn_b(int which) const { int status = CVodeSetJacFnB(solver_memory_.get(), which, fJSparseB); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFnB"); } -void CVodeSolver::setBandJacFnB(int which) const { +void CVodeSolver::set_band_jac_fn_b(int which) const { int status = CVodeSetJacFnB(solver_memory_.get(), which, fJBandB); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFnB"); } -void CVodeSolver::setJacTimesVecFnB(int which) const { +void CVodeSolver::set_jac_times_vec_fn_b(int which) const { int status = CVodeSetJacTimesB(solver_memory_.get(), which, nullptr, fJvB); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacTimesB"); } -void CVodeSolver::setSparseJacFn_ss() const { +void CVodeSolver::set_sparse_jac_fn_ss() const { int status = CVodeSetJacFn(solver_memory_.get(), fJSparseB_ss); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetJacFn"); @@ -283,13 +285,14 @@ void CVodeSolver::setSparseJacFn_ss() const { void CVodeSolver::apply_max_nonlin_iters() const { int status - = CVodeSetMaxNonlinIters(solver_memory_.get(), getMaxNonlinIters()); + = CVodeSetMaxNonlinIters(solver_memory_.get(), get_max_nonlin_iters()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetMaxNonlinIters"); } void CVodeSolver::apply_max_conv_fails() const { - int status = CVodeSetMaxConvFails(solver_memory_.get(), getMaxConvFails()); + int status + = CVodeSetMaxConvFails(solver_memory_.get(), get_max_conv_fails()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetMaxConvFails"); } @@ -299,7 +302,7 @@ void CVodeSolver::apply_constraints() const { int status = CVodeSetConstraints( solver_memory_.get(), - constraints_.size() > 0 ? constraints_.getNVector() : nullptr + constraints_.size() > 0 ? constraints_.get_nvector() : nullptr ); if (status != CV_SUCCESS) { throw CvodeException(status, "CVodeSetConstraints"); @@ -307,14 +310,14 @@ void CVodeSolver::apply_constraints() const { } void CVodeSolver::apply_max_step_size() const { - int status = CVodeSetMaxStep(solver_memory_.get(), getMaxStepSize()); + int status = CVodeSetMaxStep(solver_memory_.get(), get_max_step_size()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetMaxStep"); } Solver* CVodeSolver::clone() const { return new CVodeSolver(*this); } -void CVodeSolver::allocateSolver() const { +void CVodeSolver::allocate_solver() const { if (!solver_memory_) solver_memory_ = std::unique_ptr>( CVodeCreate(static_cast(lmm_), sunctx_), @@ -322,13 +325,15 @@ void CVodeSolver::allocateSolver() const { ); } -void CVodeSolver::setSStolerances(double const rtol, double const atol) const { +void CVodeSolver::set_ss_tolerances( + double const rtol, double const atol +) const { int status = CVodeSStolerances(solver_memory_.get(), rtol, atol); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSStolerances"); } -void CVodeSolver::setSensSStolerances( +void CVodeSolver::set_sens_ss_tolerances( double const rtol, double const* atol ) const { int status = CVodeSensSStolerances( @@ -338,31 +343,31 @@ void CVodeSolver::setSensSStolerances( throw CvodeException(status, "CVodeSensSStolerances"); } -void CVodeSolver::setSensErrCon(bool const error_corr) const { +void CVodeSolver::set_sens_err_con(bool const error_corr) const { int status = CVodeSetSensErrCon(solver_memory_.get(), error_corr); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetSensErrCon"); } -void CVodeSolver::setQuadErrConB(int const which, bool const flag) const { +void CVodeSolver::set_quad_err_con_b(int const which, bool const flag) const { int status = CVodeSetQuadErrConB(solver_memory_.get(), which, flag); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetQuadErrConB"); } -void CVodeSolver::setQuadErrCon(bool const flag) const { +void CVodeSolver::set_quad_err_con(bool const flag) const { int status = CVodeSetQuadErrCon(solver_memory_.get(), flag); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetQuadErrCon"); } -void CVodeSolver::getRootInfo(int* rootsfound) const { +void CVodeSolver::get_root_info(int* rootsfound) const { int status = CVodeGetRootInfo(solver_memory_.get(), rootsfound); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetRootInfo"); } -void CVodeSolver::setLinearSolver() const { +void CVodeSolver::set_linear_solver() const { int status = CVodeSetLinearSolver( solver_memory_.get(), linear_solver_->get(), linear_solver_->getMatrix() ); @@ -370,7 +375,7 @@ void CVodeSolver::setLinearSolver() const { throw CvodeException(status, "setLinearSolver"); } -void CVodeSolver::setLinearSolverB(int which) const { +void CVodeSolver::set_linear_solver_b(int which) const { int status = CVodeSetLinearSolverB( solver_memory_.get(), which, linear_solver_B_->get(), linear_solver_B_->getMatrix() @@ -379,7 +384,7 @@ void CVodeSolver::setLinearSolverB(int which) const { throw CvodeException(status, "setLinearSolverB"); } -void CVodeSolver::setNonLinearSolver() const { +void CVodeSolver::set_non_linear_solver() const { int status = CVodeSetNonlinearSolver( solver_memory_.get(), non_linear_solver_->get() ); @@ -387,10 +392,10 @@ void CVodeSolver::setNonLinearSolver() const { throw CvodeException(status, "CVodeSetNonlinearSolver"); } -void CVodeSolver::setNonLinearSolverSens() const { - if (getSensitivityOrder() < SensitivityOrder::first) +void CVodeSolver::set_non_linear_solver_sens() const { + if (get_sensitivity_order() < SensitivityOrder::first) return; - if (getSensitivityMethod() != SensitivityMethod::forward) + if (get_sensitivity_method() != SensitivityMethod::forward) return; int status = CV_SUCCESS; @@ -421,7 +426,7 @@ void CVodeSolver::setNonLinearSolverSens() const { throw CvodeException(status, "CVodeSolver::setNonLinearSolverSens"); } -void CVodeSolver::setNonLinearSolverB(int const which) const { +void CVodeSolver::set_non_linear_solver_b(int const which) const { int status = CVodeSetNonlinearSolverB( solver_memory_.get(), which, non_linear_solver_B_->get() ); @@ -429,41 +434,41 @@ void CVodeSolver::setNonLinearSolverB(int const which) const { throw CvodeException(status, "CVodeSetNonlinearSolverB"); } -void CVodeSolver::setUserData() const { - int status = CVodeSetUserData(solver_memory_.get(), &user_data); +void CVodeSolver::set_user_data() const { + int status = CVodeSetUserData(solver_memory_.get(), &user_data_); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetUserData"); } -void CVodeSolver::setUserDataB(int const which) const { - int status = CVodeSetUserDataB(solver_memory_.get(), which, &user_data); +void CVodeSolver::set_user_data_b(int const which) const { + int status = CVodeSetUserDataB(solver_memory_.get(), which, &user_data_); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetUserDataB"); } -void CVodeSolver::setMaxNumSteps(long const mxsteps) const { +void CVodeSolver::set_max_num_steps(long const mxsteps) const { int status = CVodeSetMaxNumSteps(solver_memory_.get(), mxsteps); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetMaxNumSteps"); } -void CVodeSolver::setStabLimDet(int const stldet) const { +void CVodeSolver::set_stab_lim_det(int const stldet) const { int status = CVodeSetStabLimDet(solver_memory_.get(), stldet); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetStabLimDet"); } -void CVodeSolver::setStabLimDetB(int const which, int const stldet) const { +void CVodeSolver::set_stab_lim_det_b(int const which, int const stldet) const { int status = CVodeSetStabLimDetB(solver_memory_.get(), which, stldet); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetStabLimDetB"); } -void CVodeSolver::setId(Model const* /*model*/) const {} +void CVodeSolver::set_id(Model const* /*model*/) const {} -void CVodeSolver::setSuppressAlg(bool const /*flag*/) const {} +void CVodeSolver::set_suppress_alg(bool const /*flag*/) const {} -void CVodeSolver::resetState(void* ami_mem, const_N_Vector y0) const { +void CVodeSolver::reset_state(void* ami_mem, const_N_Vector y0) const { auto cv_mem = static_cast(ami_mem); /* here we force the order in the next step to zero, and update the @@ -499,12 +504,12 @@ void CVodeSolver::resetState(void* ami_mem, const_N_Vector y0) const { N_VScale(ONE, const_cast(y0), cv_mem->cv_zn[0]); } -void CVodeSolver::reInitPostProcessF(realtype const tnext) const { - reInitPostProcess(solver_memory_.get(), &t_, &x_, tnext); +void CVodeSolver::reinit_post_process_f(realtype const tnext) const { + reInit_post_process(solver_memory_.get(), &t_, &x_, tnext); force_reinit_postprocess_F_ = false; } -void CVodeSolver::reInitPostProcessB(realtype const tnext) const { +void CVodeSolver::reinit_post_process_b(realtype const tnext) const { realtype tBret; auto cv_mem = static_cast(solver_memory_.get()); auto ca_mem = cv_mem->cv_adj_mem; @@ -514,7 +519,7 @@ void CVodeSolver::reInitPostProcessB(realtype const tnext) const { // store current backward problem in ca_mem to make it accessible in // adjoint rhs wrapper functions ca_mem->ca_bckpbCrt = cvB_mem; - reInitPostProcess( + reInit_post_process( static_cast(cvB_mem->cv_mem), &tBret, &xB_, tnext ); cvB_mem->cv_tout = tBret; @@ -523,7 +528,7 @@ void CVodeSolver::reInitPostProcessB(realtype const tnext) const { force_reinit_postprocess_B_ = false; } -void CVodeSolver::reInitPostProcess( +void CVodeSolver::reInit_post_process( void* ami_mem, realtype* t, AmiVector* yout, realtype const tout ) const { auto cv_mem = static_cast(ami_mem); @@ -534,7 +539,7 @@ void CVodeSolver::reInitPostProcess( if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetStopTime"); - status = CVode(ami_mem, tout, yout->getNVector(), t, CV_ONE_STEP); + status = CVode(ami_mem, tout, yout->get_nvector(), t, CV_ONE_STEP); if (status == CV_ROOT_RETURN) { auto message @@ -578,7 +583,7 @@ void CVodeSolver::reInitPostProcess( } } -void CVodeSolver::reInit( +void CVodeSolver::reinit( realtype const t0, AmiVector const& yy0, AmiVector const& /*yp0*/ ) const { auto cv_mem = static_cast(solver_memory_.get()); @@ -586,10 +591,10 @@ void CVodeSolver::reInit( if (solver_was_called_F_) force_reinit_postprocess_F_ = true; x_.copy(yy0); - resetState(cv_mem, x_.getNVector()); + reset_state(cv_mem, x_.get_nvector()); } -void CVodeSolver::sensReInit( +void CVodeSolver::sens_reinit( AmiVectorArray const& yyS0, AmiVectorArray const& /*ypS0*/ ) const { if (!sens_initialized_) { @@ -604,13 +609,13 @@ void CVodeSolver::sensReInit( force_reinit_postprocess_F_ = true; sx_.copy(yyS0); int status = N_VScaleVectorArray( - nplist(), cv_mem->cv_cvals, sx_.getNVectorArray(), cv_mem->cv_znS[0] + nplist(), cv_mem->cv_cvals, sx_.get_nvector_array(), cv_mem->cv_znS[0] ); if (status != CV_SUCCESS) throw CvodeException(CV_VECTOROP_ERR, "CVodeSensReInit"); } -void CVodeSolver::reInitB( +void CVodeSolver::reinit_b( int const which, realtype const tB0, AmiVector const& yyB0, AmiVector const& /*ypB0*/ ) const { @@ -621,10 +626,10 @@ void CVodeSolver::reInitB( force_reinit_postprocess_B_ = true; cv_memB->cv_tn = tB0; xB_.copy(yyB0); - resetState(cv_memB, xB_.getNVector()); + reset_state(cv_memB, xB_.get_nvector()); } -void CVodeSolver::sensToggleOff() const { +void CVodeSolver::sens_toggle_off() const { auto status = CVodeSensToggleOff(solver_memory_.get()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSensToggleOff"); @@ -633,17 +638,17 @@ void CVodeSolver::sensToggleOff() const { sens_initialized_ = false; } -void CVodeSolver::quadReInitB(int which, AmiVector const& yQB0) const { +void CVodeSolver::reinit_quad_b(int which, AmiVector const& yQB0) const { auto cv_memB = static_cast( CVodeGetAdjCVodeBmem(solver_memory_.get(), which) ); if (solver_was_called_B_) force_reinit_postprocess_B_ = true; xQB_.copy(yQB0); - N_VScale(ONE, xQB_.getNVector(), cv_memB->cv_znQ[0]); + N_VScale(ONE, xQB_.get_nvector(), cv_memB->cv_znQ[0]); } -void CVodeSolver::setSensParams( +void CVodeSolver::set_sens_params( realtype const* p, realtype const* pbar, int const* plist ) const { int status = CVodeSetSensParams( @@ -654,100 +659,102 @@ void CVodeSolver::setSensParams( throw CvodeException(status, "CVodeSetSensParams"); } -void CVodeSolver::getDky(realtype t, int k) const { - int status = CVodeGetDky(solver_memory_.get(), t, k, dky_.getNVector()); +void CVodeSolver::get_dky(realtype t, int k) const { + int status = CVodeGetDky(solver_memory_.get(), t, k, dky_.get_nvector()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetDky"); } -void CVodeSolver::getSens() const { +void CVodeSolver::get_sens() const { realtype tDummy = 0; int status - = CVodeGetSens(solver_memory_.get(), &tDummy, sx_.getNVectorArray()); + = CVodeGetSens(solver_memory_.get(), &tDummy, sx_.get_nvector_array()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetSens"); } -void CVodeSolver::getSensDky(realtype const t, int const k) const { +void CVodeSolver::get_sens_dky(realtype const t, int const k) const { int status - = CVodeGetSensDky(solver_memory_.get(), t, k, sx_.getNVectorArray()); + = CVodeGetSensDky(solver_memory_.get(), t, k, sx_.get_nvector_array()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetSensDky"); } -void CVodeSolver::getDkyB( +void CVodeSolver::get_dky_b( realtype const t, int const k, int const which ) const { int status = CVodeGetDky( CVodeGetAdjCVodeBmem(solver_memory_.get(), which), t, k, - dky_.getNVector() + dky_.get_nvector() ); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetDkyB"); } -void CVodeSolver::getQuadB(int which) const { +void CVodeSolver::get_quad_b(int which) const { realtype tDummy = 0; int status = CVodeGetQuadB( - solver_memory_.get(), which, &tDummy, xQB_.getNVector() + solver_memory_.get(), which, &tDummy, xQB_.get_nvector() ); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetQuadB"); } -void CVodeSolver::getQuad(realtype& t) const { - int status = CVodeGetQuad(solver_memory_.get(), &t, xQ_.getNVector()); +void CVodeSolver::get_quad(realtype& t) const { + int status = CVodeGetQuad(solver_memory_.get(), &t, xQ_.get_nvector()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetQuad"); } -void CVodeSolver::getQuadDkyB(realtype const t, int const k, int which) const { +void CVodeSolver::get_quad_dky_b( + realtype const t, int const k, int which +) const { int status = CVodeGetQuadDky( CVodeGetAdjCVodeBmem(solver_memory_.get(), which), t, k, - xQB_.getNVector() + xQB_.get_nvector() ); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetQuadDkyB"); } -void CVodeSolver::getQuadDky(realtype const t, int const k) const { - int status = CVodeGetQuadDky(solver_memory_.get(), t, k, xQ_.getNVector()); +void CVodeSolver::get_quad_dky(realtype const t, int const k) const { + int status = CVodeGetQuadDky(solver_memory_.get(), t, k, xQ_.get_nvector()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetQuadDky"); } -void CVodeSolver::adjInit() const { +void CVodeSolver::adj_init() const { int status; - if (getAdjInitDone()) { + if (get_adj_init_done()) { status = CVodeAdjReInit(solver_memory_.get()); } else { status = CVodeAdjInit( solver_memory_.get(), static_cast(maxsteps_ + 1), static_cast(interp_type_) ); - setAdjInitDone(); + set_adj_init_done(); } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeAdjInit"); } -void CVodeSolver::quadInit(AmiVector const& xQ0) const { +void CVodeSolver::quad_init(AmiVector const& xQ0) const { int status; xQ_.copy(xQ0); - if (getQuadInitDone()) { + if (get_quad_init_done()) { status = CVodeQuadReInit( - solver_memory_.get(), const_cast(xQ0.getNVector()) + solver_memory_.get(), const_cast(xQ0.get_nvector()) ); } else { status - = CVodeQuadInit(solver_memory_.get(), fqBdot_ss, xQ_.getNVector()); - setQuadInitDone(); + = CVodeQuadInit(solver_memory_.get(), fqBdot_ss, xQ_.get_nvector()); + set_quad_init_done(); } if (status != CV_SUCCESS) throw CvodeException(status, "CVodeQuadInit"); } -void CVodeSolver::allocateSolverB(int* which) const { +void CVodeSolver::allocate_solver_b(int* which) const { if (!solver_memory_B_.empty()) { *which = 0; return; @@ -758,13 +765,13 @@ void CVodeSolver::allocateSolverB(int* which) const { solver_memory_B_.resize(*which + 1); solver_memory_B_.at(*which) = std::unique_ptr>( - getAdjBmem(solver_memory_.get(), *which), [](void* /*ptr*/) {} + get_adj_b_mem(solver_memory_.get(), *which), [](void* /*ptr*/) {} ); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeCreateB"); } -void CVodeSolver::setSStolerancesB( +void CVodeSolver::set_ss_tolerances_b( int const which, realtype const relTolB, realtype const absTolB ) const { int status @@ -773,7 +780,7 @@ void CVodeSolver::setSStolerancesB( throw CvodeException(status, "CVodeSStolerancesB"); } -void CVodeSolver::quadSStolerancesB( +void CVodeSolver::quad_ss_tolerances_b( int const which, realtype const reltolQB, realtype const abstolQB ) const { int status = CVodeQuadSStolerancesB( @@ -783,7 +790,7 @@ void CVodeSolver::quadSStolerancesB( throw CvodeException(status, "CVodeQuadSStolerancesB"); } -void CVodeSolver::quadSStolerances( +void CVodeSolver::quad_ss_tolerances( realtype const reltolQB, realtype const abstolQB ) const { int status @@ -792,31 +799,32 @@ void CVodeSolver::quadSStolerances( throw CvodeException(status, "CVodeQuadSStolerances"); } -void CVodeSolver::getB(int const which) const { +void CVodeSolver::get_b(int const which) const { realtype tDummy = 0; int status - = CVodeGetB(solver_memory_.get(), which, &tDummy, xB_.getNVector()); + = CVodeGetB(solver_memory_.get(), which, &tDummy, xB_.get_nvector()); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetB"); } int CVodeSolver::solve(realtype const tout, int const itask) const { if (force_reinit_postprocess_F_) - reInitPostProcessF(tout); - int status = CVode(solver_memory_.get(), tout, x_.getNVector(), &t_, itask); + reinit_post_process_f(tout); + int status + = CVode(solver_memory_.get(), tout, x_.get_nvector(), &t_, itask); if (status < 0) // status > 0 is okay and is used for e.g. root return throw IntegrationFailure(status, t_); solver_was_called_F_ = true; return status; } -int CVodeSolver::solveF( +int CVodeSolver::solve_f( realtype const tout, int const itask, int* ncheckPtr ) const { if (force_reinit_postprocess_F_) - reInitPostProcessF(tout); + reinit_post_process_f(tout); int status = CVodeF( - solver_memory_.get(), tout, x_.getNVector(), &t_, itask, ncheckPtr + solver_memory_.get(), tout, x_.get_nvector(), &t_, itask, ncheckPtr ); if (status < 0) // status > 0 is okay and is used for e.g. root return throw IntegrationFailure(status, t_); @@ -824,9 +832,9 @@ int CVodeSolver::solveF( return status; } -void CVodeSolver::solveB(realtype const tBout, int const itaskB) const { +void CVodeSolver::solve_b(realtype const tBout, int const itaskB) const { if (force_reinit_postprocess_B_) - reInitPostProcessB(tBout); + reinit_post_process_b(tBout); int status = CVodeB(solver_memory_.get(), tBout, itaskB); // This does not seem to be documented, but CVodeB may also return // CV_TSTOP_RETURN @@ -838,7 +846,9 @@ void CVodeSolver::solveB(realtype const tBout, int const itaskB) const { solver_was_called_B_ = true; } -void CVodeSolver::setMaxNumStepsB(int const which, long const mxstepsB) const { +void CVodeSolver::set_max_num_steps_b( + int const which, long const mxstepsB +) const { int status = CVodeSetMaxNumStepsB(solver_memory_.get(), which, mxstepsB); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetMaxNumStepsB"); @@ -850,19 +860,19 @@ void CVodeSolver::diag() const { throw CvodeException(status, "CVDiag"); } -void CVodeSolver::diagB(int const which) const { +void CVodeSolver::diag_b(int const which) const { int status = CVDiagB(solver_memory_.get(), which); if (status != CV_SUCCESS) throw CvodeException(status, "CVDiagB"); } -void CVodeSolver::getNumSteps(void const* ami_mem, long int* numsteps) const { +void CVodeSolver::get_num_steps(void const* ami_mem, long int* numsteps) const { int status = CVodeGetNumSteps(const_cast(ami_mem), numsteps); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetNumSteps"); } -void CVodeSolver::getNumRhsEvals( +void CVodeSolver::get_num_rhs_evals( void const* ami_mem, long int* numrhsevals ) const { int status = CVodeGetNumRhsEvals(const_cast(ami_mem), numrhsevals); @@ -870,7 +880,7 @@ void CVodeSolver::getNumRhsEvals( throw CvodeException(status, "CVodeGetNumRhsEvals"); } -void CVodeSolver::getNumErrTestFails( +void CVodeSolver::get_num_err_test_fails( void const* ami_mem, long int* numerrtestfails ) const { int status @@ -879,7 +889,7 @@ void CVodeSolver::getNumErrTestFails( throw CvodeException(status, "CVodeGetNumErrTestFails"); } -void CVodeSolver::getNumNonlinSolvConvFails( +void CVodeSolver::get_num_non_lin_solv_conv_fails( void const* ami_mem, long int* numnonlinsolvconvfails ) const { int status = CVodeGetNumNonlinSolvConvFails( @@ -889,34 +899,34 @@ void CVodeSolver::getNumNonlinSolvConvFails( throw CvodeException(status, "CVodeGetNumNonlinSolvConvFails"); } -void CVodeSolver::getLastOrder(void const* ami_mem, int* order) const { +void CVodeSolver::get_last_order(void const* ami_mem, int* order) const { int status = CVodeGetLastOrder(const_cast(ami_mem), order); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeGetLastOrder"); } -void* CVodeSolver::getAdjBmem(void* ami_mem, int which) const { +void* CVodeSolver::get_adj_b_mem(void* ami_mem, int which) const { return CVodeGetAdjCVodeBmem(ami_mem, which); } -void CVodeSolver::calcIC(realtype const /*tout1*/) const {}; +void CVodeSolver::calc_ic(realtype const /*tout1*/) const {}; -void CVodeSolver::calcICB(int const /*which*/, realtype const /*tout1*/) const { -}; +void CVodeSolver:: + calc_ic_b(int const /*which*/, realtype const /*tout1*/) const {}; -void CVodeSolver::setStopTime(realtype const tstop) const { +void CVodeSolver::set_stop_time(realtype const tstop) const { int status = CVodeSetStopTime(solver_memory_.get(), tstop); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeSetStopTime"); } -void CVodeSolver::turnOffRootFinding() const { +void CVodeSolver::turn_off_root_finding() const { int status = CVodeRootInit(solver_memory_.get(), 0, nullptr); if (status != CV_SUCCESS) throw CvodeException(status, "CVodeRootInit"); } -Model const* CVodeSolver::getModel() const { +Model const* CVodeSolver::get_model() const { if (!solver_memory_) throw AmiException( "Solver has not been allocated, information is not " @@ -950,7 +960,7 @@ fJ(realtype t, N_Vector x, N_Vector xdot, SUNMatrix J, void* user_data, Expects(model); model->fJ(t, x, xdot, J); - return model->checkFinite(J, ModelQuantity::J, t); + return model->check_finite(J, ModelQuantity::J, t); } /** @@ -976,7 +986,7 @@ fJB(realtype t, N_Vector x, N_Vector xB, N_Vector xBdot, SUNMatrix JB, Expects(model); model->fJB(t, x, xB, xBdot, JB); - return model->checkFinite(gsl::make_span(JB), ModelQuantity::JB, t); + return model->check_finite(gsl::make_span(JB), ModelQuantity::JB, t); } /** @@ -1001,7 +1011,7 @@ static int fJSparse( Expects(model); model->fJSparse(t, x, J); - return model->checkFinite(J, ModelQuantity::J, t); + return model->check_finite(J, ModelQuantity::J, t); } /** @@ -1027,7 +1037,7 @@ static int fJSparseB( Expects(model); model->fJSparseB(t, x, xB, xBdot, JB); - return model->checkFinite(gsl::make_span(JB), ModelQuantity::JB, t); + return model->check_finite(gsl::make_span(JB), ModelQuantity::JB, t); } /** @@ -1090,7 +1100,7 @@ fJv(N_Vector v, N_Vector Jv, realtype t, N_Vector x, N_Vector /*xdot*/, Expects(model); model->fJv(v, Jv, t, x); - return model->checkFinite(gsl::make_span(Jv), ModelQuantity::Jv, t); + return model->check_finite(gsl::make_span(Jv), ModelQuantity::Jv, t); } /** @@ -1116,7 +1126,7 @@ static int fJvB( Expects(model); model->fJvB(vB, JvB, t, x, xB); - return model->checkFinite(gsl::make_span(JvB), ModelQuantity::JvB, t); + return model->check_finite(gsl::make_span(JvB), ModelQuantity::JvB, t); } /** @@ -1143,7 +1153,7 @@ static int froot(realtype t, N_Vector x, realtype* root, void* user_data) { } else { model->froot(t, x, gsl::make_span(root, model->ne_solver)); } - return model->checkFinite( + return model->check_finite( gsl::make_span(root, model->ne_solver), ModelQuantity::root, t ); } @@ -1164,12 +1174,12 @@ static int fxdot(realtype t, N_Vector x, N_Vector xdot, void* user_data) { auto solver = dynamic_cast(typed_udata->second); Expects(model); - if (solver->timeExceeded(500)) { + if (solver->time_exceeded(500)) { return AMICI_MAX_TIME_EXCEEDED; } if (t > 1e200 - && !model->checkFinite(gsl::make_span(x), ModelQuantity::xdot, t)) { + && !model->check_finite(gsl::make_span(x), ModelQuantity::xdot, t)) { /* when t is large (typically ~1e300), CVODES may pass all NaN x to fxdot from which we typically cannot recover. To save time on normal execution, we do not always want to check finiteness @@ -1178,7 +1188,7 @@ static int fxdot(realtype t, N_Vector x, N_Vector xdot, void* user_data) { } model->fxdot(t, x, xdot); - return model->checkFinite(gsl::make_span(xdot), ModelQuantity::xdot, t); + return model->check_finite(gsl::make_span(xdot), ModelQuantity::xdot, t); } /** @@ -1199,12 +1209,12 @@ fxBdot(realtype t, N_Vector x, N_Vector xB, N_Vector xBdot, void* user_data) { auto solver = dynamic_cast(typed_udata->second); Expects(model); - if (solver->timeExceeded(500)) { + if (solver->time_exceeded(500)) { return AMICI_MAX_TIME_EXCEEDED; } model->fxBdot(t, x, xB, xBdot); - return model->checkFinite(gsl::make_span(xBdot), ModelQuantity::xBdot, t); + return model->check_finite(gsl::make_span(xBdot), ModelQuantity::xBdot, t); } /** @@ -1224,7 +1234,7 @@ fqBdot(realtype t, N_Vector x, N_Vector xB, N_Vector qBdot, void* user_data) { Expects(model); model->fqBdot(t, x, xB, qBdot); - return model->checkFinite(gsl::make_span(qBdot), ModelQuantity::qBdot, t); + return model->check_finite(gsl::make_span(qBdot), ModelQuantity::qBdot, t); } /** @@ -1243,7 +1253,7 @@ static int fxBdot_ss(realtype t, N_Vector xB, N_Vector xBdot, void* user_data) { Expects(model); model->fxBdot_ss(t, xB, xBdot); - return model->checkFinite( + return model->check_finite( gsl::make_span(xBdot), ModelQuantity::xBdot_ss, t ); } @@ -1264,7 +1274,7 @@ static int fqBdot_ss(realtype t, N_Vector xB, N_Vector qBdot, void* user_data) { Expects(model); model->fqBdot_ss(t, xB, qBdot); - return model->checkFinite( + return model->check_finite( gsl::make_span(qBdot), ModelQuantity::qBdot_ss, t ); } @@ -1291,7 +1301,7 @@ static int fJSparseB_ss( Expects(model); model->fJSparseB_ss(JB); - return model->checkFinite( + return model->check_finite( gsl::make_span(xBdot), ModelQuantity::JSparseB_ss, t ); } @@ -1321,7 +1331,7 @@ static int fsxdot( Expects(model); model->fsxdot(t, x, ip, sx, sxdot); - return model->checkFinite(gsl::make_span(sxdot), ModelQuantity::sxdot, t); + return model->check_finite(gsl::make_span(sxdot), ModelQuantity::sxdot, t); } bool operator==(CVodeSolver const& a, CVodeSolver const& b) { diff --git a/src/solver_idas.cpp b/src/solver_idas.cpp index 616f2df829..d87a2b17b8 100644 --- a/src/solver_idas.cpp +++ b/src/solver_idas.cpp @@ -135,21 +135,21 @@ void IDASolver::init( t_ = t0; x_ = x0; dx_ = dx0; - if (getInitDone()) { + if (get_init_done()) { status = IDAReInit( - solver_memory_.get(), t_, x_.getNVector(), dx_.getNVector() + solver_memory_.get(), t_, x_.get_nvector(), dx_.get_nvector() ); } else { status = IDAInit( - solver_memory_.get(), fxdot, t_, x_.getNVector(), dx_.getNVector() + solver_memory_.get(), fxdot, t_, x_.get_nvector(), dx_.get_nvector() ); - setInitDone(); + set_init_done(); } if (status != IDA_SUCCESS) throw IDAException(status, "IDAInit"); } -void IDASolver::initSteadystate( +void IDASolver::init_steady_state( realtype const /*t0*/, AmiVector const& /*x0*/, AmiVector const& /*dx0*/ ) const { /* We need to set the steadystate rhs function. SUndials doesn't have this @@ -159,125 +159,128 @@ void IDASolver::initSteadystate( ida_mem->ida_res = fxBdot_ss; } -void IDASolver::sensInit1( +void IDASolver::sens_init_1( AmiVectorArray const& sx0, AmiVectorArray const& sdx0 ) const { int status = IDA_SUCCESS; sx_ = sx0; sdx_ = sdx0; - if (getSensitivityMethod() == SensitivityMethod::forward && nplist() > 0) { - if (getSensInitDone()) { + if (get_sensitivity_method() == SensitivityMethod::forward + && nplist() > 0) { + if (get_sens_init_done()) { status = IDASensReInit( solver_memory_.get(), - static_cast(getInternalSensitivityMethod()), - sx_.getNVectorArray(), sdx_.getNVectorArray() + static_cast(get_internal_sensitivity_method()), + sx_.get_nvector_array(), sdx_.get_nvector_array() ); } else { status = IDASensInit( solver_memory_.get(), nplist(), - static_cast(getInternalSensitivityMethod()), fsxdot, - sx_.getNVectorArray(), sdx_.getNVectorArray() + static_cast(get_internal_sensitivity_method()), fsxdot, + sx_.get_nvector_array(), sdx_.get_nvector_array() ); - setSensInitDone(); + set_sens_init_done(); } } if (status != IDA_SUCCESS) throw IDAException(status, "IDASensInit"); } -void IDASolver::binit( +void IDASolver::b_init( int const which, realtype const tf, AmiVector const& xB0, AmiVector const& dxB0 ) const { int status; xB_ = xB0; dxB_ = dxB0; - if (getInitDoneB(which)) + if (get_init_done_b(which)) status = IDAReInitB( - solver_memory_.get(), which, tf, xB_.getNVector(), dxB_.getNVector() + solver_memory_.get(), which, tf, xB_.get_nvector(), + dxB_.get_nvector() ); else { status = IDAInitB( - solver_memory_.get(), which, fxBdot, tf, xB_.getNVector(), - dxB_.getNVector() + solver_memory_.get(), which, fxBdot, tf, xB_.get_nvector(), + dxB_.get_nvector() ); - setInitDoneB(which); + set_init_done_b(which); } if (status != IDA_SUCCESS) throw IDAException(status, "IDAInitB"); } -void IDASolver::qbinit(int const which, AmiVector const& xQB0) const { +void IDASolver::qb_init(int const which, AmiVector const& xQB0) const { int status; xQB_.copy(xQB0); - if (getQuadInitDoneB(which)) - status = IDAQuadReInitB(solver_memory_.get(), which, xQB_.getNVector()); + if (get_quad_init_done_b(which)) + status + = IDAQuadReInitB(solver_memory_.get(), which, xQB_.get_nvector()); else { status = IDAQuadInitB( - solver_memory_.get(), which, fqBdot, xQB_.getNVector() + solver_memory_.get(), which, fqBdot, xQB_.get_nvector() ); - setQuadInitDoneB(which); + set_quad_init_done_b(which); } if (status != IDA_SUCCESS) throw IDAException(status, "IDAQuadInitB"); } -void IDASolver::rootInit(int const ne) const { +void IDASolver::root_init(int const ne) const { int status = IDARootInit(solver_memory_.get(), ne, froot); if (status != IDA_SUCCESS) throw IDAException(status, "IDARootInit"); } -void IDASolver::setDenseJacFn() const { +void IDASolver::set_dense_jac_fn() const { int status = IDASetJacFn(solver_memory_.get(), fJ); if (status != IDA_SUCCESS) throw IDAException(status, "IDADlsSetDenseJacFn"); } -void IDASolver::setSparseJacFn() const { +void IDASolver::set_sparse_jac_fn() const { int status = IDASetJacFn(solver_memory_.get(), fJSparse); if (status != IDA_SUCCESS) throw IDAException(status, "IDASlsSetSparseJacFn"); } -void IDASolver::setBandJacFn() const { +void IDASolver::set_band_jac_fn() const { int status = IDASetJacFn(solver_memory_.get(), fJBand); if (status != IDA_SUCCESS) throw IDAException(status, "IDADlsSetBandJacFn"); } -void IDASolver::setJacTimesVecFn() const { +void IDASolver::set_jac_times_vec_fn() const { int status = IDASetJacTimes(solver_memory_.get(), nullptr, fJv); if (status != IDA_SUCCESS) throw IDAException(status, "IDASpilsSetJacTimesVecFn"); } -void IDASolver::setDenseJacFnB(int const which) const { +void IDASolver::set_dense_jac_fn_b(int const which) const { int status = IDASetJacFnB(solver_memory_.get(), which, fJB); if (status != IDA_SUCCESS) throw IDAException(status, "IDADlsSetDenseJacFnB"); } -void IDASolver::setSparseJacFnB(int const which) const { +void IDASolver::set_sparse_jac_fn_b(int const which) const { int status = IDASetJacFnB(solver_memory_.get(), which, fJSparseB); if (status != IDA_SUCCESS) throw IDAException(status, "IDASlsSetSparseJacFnB"); } -void IDASolver::setBandJacFnB(int const which) const { +void IDASolver::set_band_jac_fn_b(int const which) const { int status = IDASetJacFnB(solver_memory_.get(), which, fJBandB); if (status != IDA_SUCCESS) throw IDAException(status, "IDADlsSetBandJacFnB"); } -void IDASolver::setJacTimesVecFnB(int const which) const { +void IDASolver::set_jac_times_vec_fn_b(int const which) const { int status = IDASetJacTimesB(solver_memory_.get(), which, nullptr, fJvB); if (status != IDA_SUCCESS) throw IDAException(status, "IDASpilsSetJacTimesVecFnB"); } -void IDASolver::setSparseJacFn_ss() const { +void IDASolver::set_sparse_jac_fn_ss() const { int status = IDASetJacFn(solver_memory_.get(), fJSparseB_ss); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetJacFn"); @@ -285,13 +288,13 @@ void IDASolver::setSparseJacFn_ss() const { void IDASolver::apply_max_nonlin_iters() const { int status - = IDASetMaxNonlinIters(solver_memory_.get(), getMaxNonlinIters()); + = IDASetMaxNonlinIters(solver_memory_.get(), get_max_nonlin_iters()); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetMaxNonlinIters"); } void IDASolver::apply_max_conv_fails() const { - int status = IDASetMaxConvFails(solver_memory_.get(), getMaxConvFails()); + int status = IDASetMaxConvFails(solver_memory_.get(), get_max_conv_fails()); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetMaxConvFails"); } @@ -301,7 +304,7 @@ void IDASolver::apply_constraints() const { int status = IDASetConstraints( solver_memory_.get(), - constraints_.size() > 0 ? constraints_.getNVector() : nullptr + constraints_.size() > 0 ? constraints_.get_nvector() : nullptr ); if (status != IDA_SUCCESS) { throw IDAException(status, "IDASetConstraints"); @@ -309,28 +312,28 @@ void IDASolver::apply_constraints() const { } void IDASolver::apply_max_step_size() const { - int status = IDASetMaxStep(solver_memory_.get(), getMaxStepSize()); + int status = IDASetMaxStep(solver_memory_.get(), get_max_step_size()); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetMaxStep"); } Solver* IDASolver::clone() const { return new IDASolver(*this); } -void IDASolver::allocateSolver() const { +void IDASolver::allocate_solver() const { if (!solver_memory_) solver_memory_ = std::unique_ptr>( IDACreate(sunctx_), [](void* ptr) { IDAFree(&ptr); } ); } -void IDASolver::setSStolerances( +void IDASolver::set_ss_tolerances( realtype const rtol, realtype const atol ) const { int status = IDASStolerances(solver_memory_.get(), rtol, atol); if (status != IDA_SUCCESS) throw IDAException(status, "IDASStolerances"); } -void IDASolver::setSensSStolerances( +void IDASolver::set_sens_ss_tolerances( realtype const rtol, realtype const* atol ) const { int status = IDASensSStolerances( @@ -340,57 +343,58 @@ void IDASolver::setSensSStolerances( throw IDAException(status, "IDASensEEtolerances"); } -void IDASolver::setSensErrCon(bool const error_corr) const { +void IDASolver::set_sens_err_con(bool const error_corr) const { int status = IDASetSensErrCon(solver_memory_.get(), error_corr); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetSensErrCon"); } -void IDASolver::setQuadErrConB(int const which, bool const flag) const { +void IDASolver::set_quad_err_con_b(int const which, bool const flag) const { int status = IDASetQuadErrConB(solver_memory_.get(), which, flag); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetQuadErrConB"); } -void IDASolver::setQuadErrCon(bool const flag) const { +void IDASolver::set_quad_err_con(bool const flag) const { int status = IDASetQuadErrCon(solver_memory_.get(), flag); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetQuadErrCon"); } -void IDASolver::getRootInfo(int* rootsfound) const { +void IDASolver::get_root_info(int* rootsfound) const { int status = IDAGetRootInfo(solver_memory_.get(), rootsfound); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetRootInfo"); } -void IDASolver::setUserData() const { - int status = IDASetUserData(solver_memory_.get(), &user_data); +void IDASolver::set_user_data() const { + int status = IDASetUserData(solver_memory_.get(), &user_data_); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetUserData"); } -void IDASolver::setUserDataB(int const which) const { - int status = IDASetUserDataB(solver_memory_.get(), which, &user_data); +void IDASolver::set_user_data_b(int const which) const { + int status = IDASetUserDataB(solver_memory_.get(), which, &user_data_); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetUserDataB"); } -void IDASolver::setMaxNumSteps(long int const mxsteps) const { +void IDASolver::set_max_num_steps(long int const mxsteps) const { int status = IDASetMaxNumSteps(solver_memory_.get(), mxsteps); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetMaxNumSteps"); } -void IDASolver::setStabLimDet(int const /*stldet*/) const {} +void IDASolver::set_stab_lim_det(int const /*stldet*/) const {} void IDASolver:: - setStabLimDetB(int const /*which*/, int const /*stldet*/) const {} + set_stab_lim_det_b(int const /*which*/, int const /*stldet*/) const {} -void IDASolver::setId(Model const* model) const { +void IDASolver::set_id(Model const* model) const { N_Vector id = N_VMake_Serial( - model->nx_solver, const_cast(model->idlist.data()), sunctx_ + model->nx_solver, const_cast(model->get_id_list().data()), + sunctx_ ); int status = IDASetId(solver_memory_.get(), id); @@ -400,13 +404,13 @@ void IDASolver::setId(Model const* model) const { N_VDestroy_Serial(id); } -void IDASolver::setSuppressAlg(bool const flag) const { +void IDASolver::set_suppress_alg(bool const flag) const { int status = IDASetSuppressAlg(solver_memory_.get(), flag); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetSuppressAlg"); } -void IDASolver::resetState( +void IDASolver::reset_state( void* ami_mem, const_N_Vector yy0, const_N_Vector yp0 ) const { @@ -427,11 +431,11 @@ void IDASolver::resetState( ida_mem->ida_kk = 0; } -void IDASolver::reInitPostProcessF(realtype const tnext) const { - reInitPostProcess(solver_memory_.get(), &t_, &x_, &dx_, tnext); +void IDASolver::reinit_post_process_f(realtype const tnext) const { + reinit_post_process(solver_memory_.get(), &t_, &x_, &dx_, tnext); } -void IDASolver::reInitPostProcessB(realtype const tnext) const { +void IDASolver::reinit_post_process_b(realtype const tnext) const { realtype tBret; auto ida_mem = static_cast(solver_memory_.get()); auto idaadj_mem = ida_mem->ida_adj_mem; @@ -441,7 +445,7 @@ void IDASolver::reInitPostProcessB(realtype const tnext) const { // store current backward problem in ca_mem to make it accessible in // adjoint rhs wrapper functions idaadj_mem->ia_bckpbCrt = idaB_mem; - reInitPostProcess( + reinit_post_process( static_cast(idaB_mem->IDA_mem), &tBret, &xB_, &dxB_, tnext ); // idaB_mem->ida_tout = tBret; @@ -450,7 +454,7 @@ void IDASolver::reInitPostProcessB(realtype const tnext) const { force_reinit_postprocess_B_ = false; } -void IDASolver::reInitPostProcess( +void IDASolver::reinit_post_process( void* ami_mem, realtype* t, AmiVector* yout, AmiVector* ypout, realtype tout ) const { auto ida_mem = static_cast(ami_mem); @@ -462,7 +466,8 @@ void IDASolver::reInitPostProcess( throw IDAException(status, "IDASetStopTime"); status = IDASolve( - ami_mem, tout, t, yout->getNVector(), ypout->getNVector(), IDA_ONE_STEP + ami_mem, tout, t, yout->get_nvector(), ypout->get_nvector(), + IDA_ONE_STEP ); if (status != IDA_SUCCESS) @@ -497,7 +502,7 @@ void IDASolver::reInitPostProcess( } } -void IDASolver::reInit( +void IDASolver::reinit( realtype const t0, AmiVector const& yy0, AmiVector const& yp0 ) const { @@ -507,10 +512,10 @@ void IDASolver::reInit( force_reinit_postprocess_F_ = true; x_.copy(yy0); dx_.copy(yp0); - resetState(ida_mem, x_.getNVector(), xB_.getNVector()); + reset_state(ida_mem, x_.get_nvector(), xB_.get_nvector()); } -void IDASolver::sensReInit( +void IDASolver::sens_reinit( AmiVectorArray const& yyS0, AmiVectorArray const& ypS0 ) const { auto ida_mem = static_cast(solver_memory_.get()); @@ -522,20 +527,20 @@ void IDASolver::sensReInit( sx_.copy(yyS0); sdx_.copy(ypS0); auto status = N_VScaleVectorArray( - nplist(), ida_mem->ida_cvals, sx_.getNVectorArray(), + nplist(), ida_mem->ida_cvals, sx_.get_nvector_array(), ida_mem->ida_phiS[0] ); if (status != IDA_SUCCESS) throw IDAException(IDA_VECTOROP_ERR, "IDASensReInit"); status = N_VScaleVectorArray( - nplist(), ida_mem->ida_cvals, sdx_.getNVectorArray(), + nplist(), ida_mem->ida_cvals, sdx_.get_nvector_array(), ida_mem->ida_phiS[1] ); if (status != IDA_SUCCESS) throw IDAException(IDA_VECTOROP_ERR, "IDASensReInit"); } -void IDASolver::sensToggleOff() const { +void IDASolver::sens_toggle_off() const { auto status = IDASensToggleOff(solver_memory_.get()); if (status != IDA_SUCCESS) throw IDAException(status, "IDASensToggleOff"); @@ -544,7 +549,7 @@ void IDASolver::sensToggleOff() const { sens_initialized_ = false; } -void IDASolver::reInitB( +void IDASolver::reinit_b( int const which, realtype const tB0, AmiVector const& yyB0, AmiVector const& ypB0 ) const { @@ -556,19 +561,19 @@ void IDASolver::reInitB( ida_memB->ida_tn = tB0; xB_.copy(yyB0); dxB_.copy(ypB0); - resetState(ida_memB, xB_.getNVector(), dxB_.getNVector()); + reset_state(ida_memB, xB_.get_nvector(), dxB_.get_nvector()); } -void IDASolver::quadReInitB(int const which, AmiVector const& yQB0) const { +void IDASolver::reinit_quad_b(int const which, AmiVector const& yQB0) const { auto ida_memB = static_cast(IDAGetAdjIDABmem(solver_memory_.get(), which)); if (solver_was_called_B_) force_reinit_postprocess_B_ = true; xQB_.copy(yQB0); - N_VScale(ONE, xQB_.getNVector(), ida_memB->ida_phiQ[0]); + N_VScale(ONE, xQB_.get_nvector(), ida_memB->ida_phiQ[0]); } -void IDASolver::setSensParams( +void IDASolver::set_sens_params( realtype const* p, realtype const* pbar, int const* plist ) const { int status = IDASetSensParams( @@ -579,105 +584,108 @@ void IDASolver::setSensParams( throw IDAException(status, "IDASetSensParams"); } -void IDASolver::getDky(realtype const t, int const k) const { - int status = IDAGetDky(solver_memory_.get(), t, k, dky_.getNVector()); +void IDASolver::get_dky(realtype const t, int const k) const { + int status = IDAGetDky(solver_memory_.get(), t, k, dky_.get_nvector()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetDky"); } -void IDASolver::getSens() const { +void IDASolver::get_sens() const { realtype tDummy = 0; int status - = IDAGetSens(solver_memory_.get(), &tDummy, sx_.getNVectorArray()); + = IDAGetSens(solver_memory_.get(), &tDummy, sx_.get_nvector_array()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetSens"); } -void IDASolver::getSensDky(realtype const t, int const k) const { +void IDASolver::get_sens_dky(realtype const t, int const k) const { int status - = IDAGetSensDky(solver_memory_.get(), t, k, sx_.getNVectorArray()); + = IDAGetSensDky(solver_memory_.get(), t, k, sx_.get_nvector_array()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetSens"); } -void IDASolver::getB(int const which) const { +void IDASolver::get_b(int const which) const { realtype tDummy = 0; int status = IDAGetB( - solver_memory_.get(), which, &tDummy, xB_.getNVector(), - dxB_.getNVector() + solver_memory_.get(), which, &tDummy, xB_.get_nvector(), + dxB_.get_nvector() ); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetB"); } -void IDASolver::getDkyB(realtype const t, int const k, int const which) const { +void IDASolver::get_dky_b( + realtype const t, int const k, int const which +) const { int status = IDAGetDky( - IDAGetAdjIDABmem(solver_memory_.get(), which), t, k, dky_.getNVector() + IDAGetAdjIDABmem(solver_memory_.get(), which), t, k, dky_.get_nvector() ); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetB"); } -void IDASolver::getQuadB(int const which) const { +void IDASolver::get_quad_b(int const which) const { realtype tDummy = 0; int status - = IDAGetQuadB(solver_memory_.get(), which, &tDummy, xQB_.getNVector()); + = IDAGetQuadB(solver_memory_.get(), which, &tDummy, xQB_.get_nvector()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetQuadB"); } -void IDASolver::getQuad(realtype& t) const { - int status = IDAGetQuad(solver_memory_.get(), &t, xQ_.getNVector()); +void IDASolver::get_quad(realtype& t) const { + int status = IDAGetQuad(solver_memory_.get(), &t, xQ_.get_nvector()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetQuad"); } -void IDASolver::getQuadDkyB( +void IDASolver::get_quad_dky_b( realtype const t, int const k, int const which ) const { int status = IDAGetQuadDky( - IDAGetAdjIDABmem(solver_memory_.get(), which), t, k, xQB_.getNVector() + IDAGetAdjIDABmem(solver_memory_.get(), which), t, k, xQB_.get_nvector() ); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetB"); } -void IDASolver::getQuadDky(realtype const t, int const k) const { - int status = IDAGetQuadDky(solver_memory_.get(), t, k, xQ_.getNVector()); +void IDASolver::get_quad_dky(realtype const t, int const k) const { + int status = IDAGetQuadDky(solver_memory_.get(), t, k, xQ_.get_nvector()); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetQuadDky"); } -void IDASolver::adjInit() const { +void IDASolver::adj_init() const { int status; - if (getAdjInitDone()) { + if (get_adj_init_done()) { status = IDAAdjReInit(solver_memory_.get()); } else { status = IDAAdjInit( solver_memory_.get(), static_cast(maxsteps_), static_cast(interp_type_) ); - setAdjInitDone(); + set_adj_init_done(); } if (status != IDA_SUCCESS) throw IDAException(status, "IDAAdjInit"); } -void IDASolver::quadInit(AmiVector const& xQ0) const { +void IDASolver::quad_init(AmiVector const& xQ0) const { int status; xQ_.copy(xQ0); - if (getQuadInitDone()) { + if (get_quad_init_done()) { status = IDAQuadReInit( - solver_memory_.get(), const_cast(xQ0.getNVector()) + solver_memory_.get(), const_cast(xQ0.get_nvector()) ); } else { - status = IDAQuadInit(solver_memory_.get(), fqBdot_ss, xQ_.getNVector()); - setQuadInitDone(); + status + = IDAQuadInit(solver_memory_.get(), fqBdot_ss, xQ_.get_nvector()); + set_quad_init_done(); } if (status != IDA_SUCCESS) throw IDAException(status, "IDAQuadInit"); } -void IDASolver::allocateSolverB(int* which) const { +void IDASolver::allocate_solver_b(int* which) const { if (!solver_memory_B_.empty()) { *which = 0; return; @@ -687,13 +695,13 @@ void IDASolver::allocateSolverB(int* which) const { solver_memory_B_.resize(*which + 1); solver_memory_B_.at(*which) = std::unique_ptr>( - getAdjBmem(solver_memory_.get(), *which), [](void* /*ptr*/) {} + get_adj_b_mem(solver_memory_.get(), *which), [](void* /*ptr*/) {} ); if (status != IDA_SUCCESS) throw IDAException(status, "IDACreateB"); } -void IDASolver::setSStolerancesB( +void IDASolver::set_ss_tolerances_b( int const which, realtype const relTolB, realtype const absTolB ) const { int status @@ -702,7 +710,7 @@ void IDASolver::setSStolerancesB( throw IDAException(status, "IDASStolerancesB"); } -void IDASolver::quadSStolerancesB( +void IDASolver::quad_ss_tolerances_b( int const which, realtype const reltolQB, realtype const abstolQB ) const { int status @@ -711,7 +719,7 @@ void IDASolver::quadSStolerancesB( throw IDAException(status, "IDAQuadSStolerancesB"); } -void IDASolver::quadSStolerances( +void IDASolver::quad_ss_tolerances( realtype const reltolQ, realtype const abstolQ ) const { int status = IDAQuadSStolerances(solver_memory_.get(), reltolQ, abstolQ); @@ -721,9 +729,9 @@ void IDASolver::quadSStolerances( int IDASolver::solve(realtype const tout, int const itask) const { if (force_reinit_postprocess_F_) - reInitPostProcessF(tout); + reinit_post_process_f(tout); int status = IDASolve( - solver_memory_.get(), tout, &t_, x_.getNVector(), dx_.getNVector(), + solver_memory_.get(), tout, &t_, x_.get_nvector(), dx_.get_nvector(), itask ); solver_was_called_F_ = true; @@ -732,13 +740,13 @@ int IDASolver::solve(realtype const tout, int const itask) const { return status; } -int IDASolver::solveF( +int IDASolver::solve_f( realtype const tout, int const itask, int* ncheckPtr ) const { if (force_reinit_postprocess_F_) - reInitPostProcessF(tout); + reinit_post_process_f(tout); int status = IDASolveF( - solver_memory_.get(), tout, &t_, x_.getNVector(), xB_.getNVector(), + solver_memory_.get(), tout, &t_, x_.get_nvector(), xB_.get_nvector(), itask, ncheckPtr ); solver_was_called_F_ = true; @@ -747,9 +755,9 @@ int IDASolver::solveF( return status; } -void IDASolver::solveB(realtype const tBout, int const itaskB) const { +void IDASolver::solve_b(realtype const tBout, int const itaskB) const { if (force_reinit_postprocess_B_) - reInitPostProcessB(tBout); + reinit_post_process_b(tBout); int status = IDASolveB(solver_memory_.get(), tBout, itaskB); solver_was_called_B_ = true; // This does not seem to be documented, but IDASolveB may also return @@ -761,7 +769,7 @@ void IDASolver::solveB(realtype const tBout, int const itaskB) const { } } -void IDASolver::setMaxNumStepsB( +void IDASolver::set_max_num_steps_b( int const which, long int const mxstepsB ) const { int status = IDASetMaxNumStepsB(solver_memory_.get(), which, mxstepsB); @@ -773,17 +781,17 @@ void IDASolver::diag() const { throw AmiException("Diag Solver was not implemented for DAEs"); } -void IDASolver::diagB(int const /*which*/) const { +void IDASolver::diag_b(int const /*which*/) const { throw AmiException("Diag Solver was not implemented for DAEs"); } -void IDASolver::getNumSteps(void const* ami_mem, long int* numsteps) const { +void IDASolver::get_num_steps(void const* ami_mem, long int* numsteps) const { int status = IDAGetNumSteps(const_cast(ami_mem), numsteps); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetNumSteps"); } -void IDASolver::getNumRhsEvals( +void IDASolver::get_num_rhs_evals( void const* ami_mem, long int* numrhsevals ) const { int status = IDAGetNumResEvals(const_cast(ami_mem), numrhsevals); @@ -791,7 +799,7 @@ void IDASolver::getNumRhsEvals( throw IDAException(status, "IDAGetNumResEvals"); } -void IDASolver::getNumErrTestFails( +void IDASolver::get_num_err_test_fails( void const* ami_mem, long int* numerrtestfails ) const { int status @@ -800,7 +808,7 @@ void IDASolver::getNumErrTestFails( throw IDAException(status, "IDAGetNumErrTestFails"); } -void IDASolver::getNumNonlinSolvConvFails( +void IDASolver::get_num_non_lin_solv_conv_fails( void const* ami_mem, long int* numnonlinsolvconvfails ) const { int status = IDAGetNumNonlinSolvConvFails( @@ -810,48 +818,49 @@ void IDASolver::getNumNonlinSolvConvFails( throw IDAException(status, "IDAGetNumNonlinSolvConvFails"); } -void IDASolver::getLastOrder(void const* ami_mem, int* order) const { +void IDASolver::get_last_order(void const* ami_mem, int* order) const { int status = IDAGetLastOrder(const_cast(ami_mem), order); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetLastOrder"); } -void* IDASolver::getAdjBmem(void* ami_mem, int which) const { +void* IDASolver::get_adj_b_mem(void* ami_mem, int which) const { return IDAGetAdjIDABmem(ami_mem, which); } -void IDASolver::calcIC(realtype tout1) const { +void IDASolver::calc_ic(realtype tout1) const { int status = IDACalcIC(solver_memory_.get(), IDA_YA_YDP_INIT, tout1); if (status != IDA_SUCCESS) throw IDAException(status, "IDACalcIC"); status = IDAGetConsistentIC( - solver_memory_.get(), x_.getNVector(), dx_.getNVector() + solver_memory_.get(), x_.get_nvector(), dx_.get_nvector() ); if (status != IDA_SUCCESS) throw IDAException(status, "IDAGetConsistentIC"); } -void IDASolver::calcICB(int const which, realtype const tout1) const { +void IDASolver::calc_ic_b(int const which, realtype const tout1) const { int status = IDACalcICB( - solver_memory_.get(), which, tout1, xB_.getNVector(), dxB_.getNVector() + solver_memory_.get(), which, tout1, xB_.get_nvector(), + dxB_.get_nvector() ); if (status != IDA_SUCCESS) throw IDAException(status, "IDACalcICB"); } -void IDASolver::setStopTime(realtype const tstop) const { +void IDASolver::set_stop_time(realtype const tstop) const { int status = IDASetStopTime(solver_memory_.get(), tstop); if (status != IDA_SUCCESS) throw IDAException(status, "IDASetStopTime"); } -void IDASolver::turnOffRootFinding() const { +void IDASolver::turn_off_root_finding() const { int status = IDARootInit(solver_memory_.get(), 0, nullptr); if (status != IDA_SUCCESS) throw IDAException(status, "IDARootInit"); } -Model const* IDASolver::getModel() const { +Model const* IDASolver::get_model() const { if (!solver_memory_) throw AmiException( "Solver has not been allocated, information is not available" @@ -862,7 +871,7 @@ Model const* IDASolver::getModel() const { return nullptr; } -void IDASolver::setLinearSolver() const { +void IDASolver::set_linear_solver() const { int status = IDASetLinearSolver( solver_memory_.get(), linear_solver_->get(), linear_solver_->getMatrix() ); @@ -870,7 +879,7 @@ void IDASolver::setLinearSolver() const { throw IDAException(status, "setLinearSolver"); } -void IDASolver::setLinearSolverB(int const which) const { +void IDASolver::set_linear_solver_b(int const which) const { int status = IDASetLinearSolverB( solver_memory_B_[which].get(), which, linear_solver_B_->get(), linear_solver_B_->getMatrix() @@ -879,7 +888,7 @@ void IDASolver::setLinearSolverB(int const which) const { throw IDAException(status, "setLinearSolverB"); } -void IDASolver::setNonLinearSolver() const { +void IDASolver::set_non_linear_solver() const { int status = IDASetNonlinearSolver( solver_memory_.get(), non_linear_solver_->get() ); @@ -887,10 +896,10 @@ void IDASolver::setNonLinearSolver() const { throw IDAException(status, "IDASetNonlinearSolver"); } -void IDASolver::setNonLinearSolverSens() const { - if (getSensitivityOrder() < SensitivityOrder::first) +void IDASolver::set_non_linear_solver_sens() const { + if (get_sensitivity_order() < SensitivityOrder::first) return; - if (getSensitivityMethod() != SensitivityMethod::forward) + if (get_sensitivity_method() != SensitivityMethod::forward) return; int status = IDA_SUCCESS; @@ -917,7 +926,7 @@ void IDASolver::setNonLinearSolverSens() const { throw IDAException(status, "IDASolver::setNonLinearSolverSens"); } -void IDASolver::setNonLinearSolverB(int which) const { +void IDASolver::set_non_linear_solver_b(int which) const { int status = IDASetNonlinearSolverB( solver_memory_.get(), which, non_linear_solver_B_->get() ); @@ -950,7 +959,7 @@ int fJ( auto model = dynamic_cast(typed_udata->first); Expects(model); model->fJ(t, cj, x, dx, xdot, J); - return model->checkFinite(J, ModelQuantity::J, t); + return model->check_finite(J, ModelQuantity::J, t); } /** @@ -980,7 +989,7 @@ int fJB( Expects(model); model->fJB(t, cj, x, dx, xB, dxB, JB); - return model->checkFinite(JB, ModelQuantity::JB, t); + return model->check_finite(JB, ModelQuantity::JB, t); } /** @@ -1008,7 +1017,7 @@ int fJSparse( Expects(model); model->fJSparse(t, cj, x, dx, J); - return model->checkFinite(J, ModelQuantity::J, t); + return model->check_finite(J, ModelQuantity::J, t); } /** @@ -1038,7 +1047,7 @@ int fJSparseB( Expects(model); model->fJSparseB(t, cj, x, dx, xB, dxB, JB); - return model->checkFinite(JB, ModelQuantity::JB, t); + return model->check_finite(JB, ModelQuantity::JB, t); } /** @@ -1114,7 +1123,7 @@ int fJv( Expects(model); model->fJv(t, x, dx, v, Jv, cj); - return model->checkFinite(gsl::make_span(Jv), ModelQuantity::Jv, t); + return model->check_finite(gsl::make_span(Jv), ModelQuantity::Jv, t); } /** @@ -1145,7 +1154,7 @@ int fJvB( Expects(model); model->fJvB(t, x, dx, xB, dxB, vB, JvB, cj); - return model->checkFinite(gsl::make_span(JvB), ModelQuantity::JvB, t); + return model->check_finite(gsl::make_span(JvB), ModelQuantity::JvB, t); } /** @@ -1166,7 +1175,7 @@ int froot( Expects(model); model->froot(t, x, dx, gsl::make_span(root, model->ne)); - return model->checkFinite( + return model->check_finite( gsl::make_span(root, model->ne), ModelQuantity::root, t ); } @@ -1188,12 +1197,12 @@ int fxdot(realtype t, N_Vector x, N_Vector dx, N_Vector xdot, void* user_data) { auto const solver = dynamic_cast(typed_udata->second); Expects(model); - if (solver->timeExceeded(500)) { + if (solver->time_exceeded(500)) { return AMICI_MAX_TIME_EXCEEDED; } if (t > 1e200 - && !model->checkFinite(gsl::make_span(x), ModelQuantity::xdot, t)) { + && !model->check_finite(gsl::make_span(x), ModelQuantity::xdot, t)) { /* when t is large (typically ~1e300), CVODES may pass all NaN x to fxdot from which we typically cannot recover. To save time on normal execution, we do not always want to check finiteness @@ -1202,7 +1211,7 @@ int fxdot(realtype t, N_Vector x, N_Vector dx, N_Vector xdot, void* user_data) { } model->fxdot(t, x, dx, xdot); - return model->checkFinite(gsl::make_span(xdot), ModelQuantity::xdot, t); + return model->check_finite(gsl::make_span(xdot), ModelQuantity::xdot, t); } /** @@ -1227,12 +1236,12 @@ int fxBdot( auto const solver = dynamic_cast(typed_udata->second); Expects(model); - if (solver->timeExceeded(500)) { + if (solver->time_exceeded(500)) { return AMICI_MAX_TIME_EXCEEDED; } model->fxBdot(t, x, dx, xB, dxB, xBdot); - return model->checkFinite(gsl::make_span(xBdot), ModelQuantity::xBdot, t); + return model->check_finite(gsl::make_span(xBdot), ModelQuantity::xBdot, t); } /** @@ -1257,7 +1266,7 @@ int fqBdot( Expects(model); model->fqBdot(t, x, dx, xB, dxB, qBdot); - return model->checkFinite(gsl::make_span(qBdot), ModelQuantity::qBdot, t); + return model->check_finite(gsl::make_span(qBdot), ModelQuantity::qBdot, t); } /** @@ -1279,7 +1288,7 @@ static int fxBdot_ss( Expects(model); model->fxBdot_ss(t, xB, dxB, xBdot); - return model->checkFinite( + return model->check_finite( gsl::make_span(xBdot), ModelQuantity::xBdot_ss, t ); } @@ -1303,7 +1312,7 @@ static int fqBdot_ss( Expects(model); model->fqBdot_ss(t, xB, dxB, qBdot); - return model->checkFinite( + return model->check_finite( gsl::make_span(qBdot), ModelQuantity::qBdot_ss, t ); } @@ -1333,7 +1342,7 @@ static int fJSparseB_ss( Expects(model); model->fJSparseB_ss(JB); - return model->checkFinite( + return model->check_finite( gsl::make_span(xBdot), ModelQuantity::JSparseB_ss, t ); } @@ -1367,7 +1376,7 @@ int fsxdot( for (int ip = 0; ip < model->nplist(); ip++) { model->fsxdot(t, x, dx, ip, sx[ip], sdx[ip], sxdot[ip]); - if (model->checkFinite( + if (model->check_finite( gsl::make_span(sxdot[ip]), ModelQuantity::sxdot, t ) != AMICI_SUCCESS) diff --git a/src/steadystateproblem.cpp b/src/steadystateproblem.cpp index 5b320a9725..8e0cbfb08f 100644 --- a/src/steadystateproblem.cpp +++ b/src/steadystateproblem.cpp @@ -31,23 +31,23 @@ realtype getWrmsNorm( realtype atol, realtype rtol, AmiVector& ewt ) { // ewt = x - N_VAbs(const_cast(x.getNVector()), ewt.getNVector()); + N_VAbs(const_cast(x.get_nvector()), ewt.get_nvector()); // ewt *= rtol - N_VScale(rtol, ewt.getNVector(), ewt.getNVector()); + N_VScale(rtol, ewt.get_nvector(), ewt.get_nvector()); // ewt += atol - N_VAddConst(ewt.getNVector(), atol, ewt.getNVector()); + N_VAddConst(ewt.get_nvector(), atol, ewt.get_nvector()); // ewt = 1/ewt (ewt = 1/(rtol*x+atol)) - N_VInv(ewt.getNVector(), ewt.getNVector()); + N_VInv(ewt.get_nvector(), ewt.get_nvector()); // wrms = sqrt(sum((xdot/ewt)**2)/n) where n = size of state vector if (mask.size()) { return N_VWrmsNormMask( - const_cast(xdot.getNVector()), ewt.getNVector(), - const_cast(mask.getNVector()) + const_cast(xdot.get_nvector()), ewt.get_nvector(), + const_cast(mask.get_nvector()) ); } return N_VWrmsNorm( - const_cast(xdot.getNVector()), ewt.getNVector() + const_cast(xdot.get_nvector()), ewt.get_nvector() ); } @@ -74,7 +74,7 @@ NewtonsMethod::NewtonsMethod( void NewtonsMethod::run( AmiVector& xdot, DEStateView const& state, WRMSComputer& wrms_computer ) { - i_step = 0; + i_step_ = 0; if (model_->nx_solver == 0) { wrms_ = 0.0; @@ -94,7 +94,7 @@ void NewtonsMethod::run( // Whether the step was successful bool step_successful = true; - while (!converged && i_step < max_steps_) { + while (!converged && i_step_ < max_steps_) { if (step_successful) { // If new residuals are smaller than the old ones, update state x_old_.copy(state.x); @@ -114,7 +114,7 @@ void NewtonsMethod::run( // Try step with new gamma_/delta_, evaluate rhs // x = x_old + delta_[old_] * gamma - linearSum( + linear_sum( 1.0, x_old_, gamma, update_direction ? delta_ : delta_old_, state.x ); model_->fxdot(state.t, state.x, state.dx, xdot); @@ -127,7 +127,7 @@ void NewtonsMethod::run( } update_direction = update_damping_factor(step_successful, gamma); - ++i_step; + ++i_step_; } if (!converged) @@ -138,7 +138,7 @@ void NewtonsMethod::compute_step( AmiVector const& xdot, DEStateView const& state ) { delta_.copy(xdot); - solver_->getStep(delta_, *model_, state); + solver_->get_step(delta_, *model_, state); } bool NewtonsMethod::update_damping_factor(bool step_successful, double& gamma) { @@ -186,8 +186,8 @@ bool NewtonsMethod::has_converged( // Ensure state positivity if requested, // and repeat the convergence check if necessary - auto nonnegative = model_->getStateIsNonNegative(); - Expects(nonnegative.size() == state.x.getVector().size()); + auto nonnegative = model_->get_state_is_non_negative(); + Expects(nonnegative.size() == state.x.get_vector().size()); auto state_modified = false; for (int ix = 0; ix < state.x.size(); ix++) { if (state.x[ix] < 0.0 && nonnegative[ix]) { diff --git a/src/sundials_linsol_wrapper.cpp b/src/sundials_linsol_wrapper.cpp index c3eb1fbba9..089cecc746 100644 --- a/src/sundials_linsol_wrapper.cpp +++ b/src/sundials_linsol_wrapper.cpp @@ -43,7 +43,7 @@ SUNLinSolWrapper& SUNLinSolWrapper::operator=(SUNLinSolWrapper&& other SUNLinearSolver SUNLinSolWrapper::get() const { return solver_; } -SUNLinearSolver_Type SUNLinSolWrapper::getType() const { +SUNLinearSolver_Type SUNLinSolWrapper::get_type() const { return SUNLinSolGetType(solver_); } @@ -66,7 +66,7 @@ int SUNLinSolWrapper::solve(N_Vector x, N_Vector b, realtype tol) const { return SUNLinSolSolve(solver_, A_.get(), x, b, tol); } -long SUNLinSolWrapper::getLastFlag() const { +long SUNLinSolWrapper::get_last_flag() const { return gsl::narrow(SUNLinSolLastFlag(solver_)); } @@ -96,7 +96,7 @@ SUNNonLinSolWrapper& SUNNonLinSolWrapper::operator=(SUNNonLinSolWrapper&& other SUNNonlinearSolver SUNNonLinSolWrapper::get() const { return solver; } -SUNNonlinearSolver_Type SUNNonLinSolWrapper::getType() const { +SUNNonlinearSolver_Type SUNNonLinSolWrapper::get_type() const { return SUNNonlinSolGetType(solver); } @@ -107,36 +107,36 @@ int SUNNonLinSolWrapper::setup(N_Vector y, void* mem) { return res; } -int SUNNonLinSolWrapper::Solve( +int SUNNonLinSolWrapper::solve( N_Vector y0, N_Vector y, N_Vector w, realtype tol, bool callLSetup, void* mem ) { return SUNNonlinSolSolve(solver, y0, y, w, tol, callLSetup, mem); } -int SUNNonLinSolWrapper::setSysFn(SUNNonlinSolSysFn SysFn) { +int SUNNonLinSolWrapper::set_sys_fn(SUNNonlinSolSysFn SysFn) { return SUNNonlinSolSetSysFn(solver, SysFn); } -int SUNNonLinSolWrapper::setLSetupFn(SUNNonlinSolLSetupFn SetupFn) { +int SUNNonLinSolWrapper::set_l_setup_fn(SUNNonlinSolLSetupFn SetupFn) { return SUNNonlinSolSetLSetupFn(solver, SetupFn); } -int SUNNonLinSolWrapper::setLSolveFn(SUNNonlinSolLSolveFn SolveFn) { +int SUNNonLinSolWrapper::set_l_solve_fn(SUNNonlinSolLSolveFn SolveFn) { return SUNNonlinSolSetLSolveFn(solver, SolveFn); } -int SUNNonLinSolWrapper::setConvTestFn( +int SUNNonLinSolWrapper::set_conv_test_fn( SUNNonlinSolConvTestFn CTestFn, void* ctest_data ) { return SUNNonlinSolSetConvTestFn(solver, CTestFn, ctest_data); } -int SUNNonLinSolWrapper::setMaxIters(int maxiters) { +int SUNNonLinSolWrapper::set_max_iters(int maxiters) { return SUNNonlinSolSetMaxIters(solver, maxiters); } -long SUNNonLinSolWrapper::getNumIters() const { +long SUNNonLinSolWrapper::get_num_iters() const { long int niters = -1; auto res = SUNNonlinSolGetNumIters(solver, &niters); if (res != SUN_SUCCESS) { @@ -145,7 +145,7 @@ long SUNNonLinSolWrapper::getNumIters() const { return niters; } -int SUNNonLinSolWrapper::getCurIter() const { +int SUNNonLinSolWrapper::get_cur_iter() const { int iter = -1; auto res = SUNNonlinSolGetCurIter(solver, &iter); if (res != SUN_SUCCESS) { @@ -154,7 +154,7 @@ int SUNNonLinSolWrapper::getCurIter() const { return iter; } -long SUNNonLinSolWrapper::getNumConvFails() const { +long SUNNonLinSolWrapper::get_num_conv_fails() const { long int nconvfails = -1; auto res = SUNNonlinSolGetNumConvFails(solver, &nconvfails); if (res != SUN_SUCCESS) { @@ -183,8 +183,9 @@ SUNLinSolBand::SUNLinSolBand(AmiVector const& x, int ubw, int lbw) : SUNLinSolWrapper( nullptr, SUNMatrixWrapper(x.size(), ubw, lbw, x.get_ctx()) ) { - solver_ - = SUNLinSol_Band(const_cast(x.getNVector()), A_, x.get_ctx()); + solver_ = SUNLinSol_Band( + const_cast(x.get_nvector()), A_, x.get_ctx() + ); if (!solver_) throw AmiException("Failed to create solver."); } @@ -194,7 +195,7 @@ SUNLinSolDense::SUNLinSolDense(AmiVector const& x) nullptr, SUNMatrixWrapper(x.size(), x.size(), x.get_ctx()) ) { solver_ = SUNLinSol_Dense( - const_cast(x.getNVector()), A_, x.get_ctx() + const_cast(x.get_nvector()), A_, x.get_ctx() ); if (!solver_) throw AmiException("Failed to create solver."); @@ -211,25 +212,23 @@ SUNLinSolKLU::SUNLinSolKLU( ) : SUNLinSolWrapper( nullptr, - SUNMatrixWrapper( - x.size(), x.size(), nnz, sparsetype, x.get_ctx() - ) + SUNMatrixWrapper(x.size(), x.size(), nnz, sparsetype, x.get_ctx()) ) { solver_ - = SUNLinSol_KLU(const_cast(x.getNVector()), A_, x.get_ctx()); + = SUNLinSol_KLU(const_cast(x.get_nvector()), A_, x.get_ctx()); if (!solver_) throw AmiException("Failed to create solver."); - setOrdering(ordering); + set_ordering(ordering); } -void SUNLinSolKLU::reInit(int nnz, int reinit_type) { +void SUNLinSolKLU::reinit(int nnz, int reinit_type) { int status = SUNLinSol_KLUReInit(solver_, A_, nnz, reinit_type); if (status != SUN_SUCCESS) throw AmiException("SUNLinSol_KLUReInit failed with %d", status); } -void SUNLinSolKLU::setOrdering(StateOrdering ordering) { +void SUNLinSolKLU::set_ordering(StateOrdering ordering) { auto status = SUNLinSol_KLUSetOrdering(solver_, static_cast(ordering)); if (status != SUN_SUCCESS) throw AmiException("SUNLinSol_KLUSetOrdering failed with %d", status); @@ -265,27 +264,29 @@ SUNLinSolPCG::SUNLinSolPCG(N_Vector y, int pretype, int maxl) throw AmiException("Failed to create solver."); } -int SUNLinSolPCG::setATimes(void* A_data, SUNATimesFn ATimes) { +int SUNLinSolPCG::set_a_times(void* A_data, SUNATimesFn ATimes) { return SUNLinSolSetATimes_PCG(solver_, A_data, ATimes); } -int SUNLinSolPCG::setPreconditioner( +int SUNLinSolPCG::set_preconditioner( void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol ) { return SUNLinSolSetPreconditioner_PCG(solver_, P_data, Pset, Psol); } -int SUNLinSolPCG::setScalingVectors(N_Vector s, N_Vector nul) { +int SUNLinSolPCG::set_scaling_vectors(N_Vector s, N_Vector nul) { return SUNLinSolSetScalingVectors_PCG(solver_, s, nul); } -int SUNLinSolPCG::getNumIters() const { return SUNLinSolNumIters_PCG(solver_); } +int SUNLinSolPCG::get_num_iters() const { + return SUNLinSolNumIters_PCG(solver_); +} -realtype SUNLinSolPCG::getResNorm() const { +realtype SUNLinSolPCG::get_res_norm() const { return SUNLinSolResNorm_PCG(solver_); } -N_Vector SUNLinSolPCG::getResid() const { return SUNLinSolResid_PCG(solver_); } +N_Vector SUNLinSolPCG::get_resid() const { return SUNLinSolResid_PCG(solver_); } SUNLinSolSPBCGS::SUNLinSolSPBCGS(N_Vector x, int pretype, int maxl) : SUNLinSolWrapper(SUNLinSol_SPBCGS(x, pretype, maxl, x->sunctx)) { @@ -295,103 +296,103 @@ SUNLinSolSPBCGS::SUNLinSolSPBCGS(N_Vector x, int pretype, int maxl) SUNLinSolSPBCGS::SUNLinSolSPBCGS(AmiVector const& x, int pretype, int maxl) { solver_ = SUNLinSol_SPBCGS( - const_cast(x.getNVector()), pretype, maxl, x.get_ctx() + const_cast(x.get_nvector()), pretype, maxl, x.get_ctx() ); if (!solver_) throw AmiException("Failed to create solver."); } -int SUNLinSolSPBCGS::setATimes(void* A_data, SUNATimesFn ATimes) { +int SUNLinSolSPBCGS::set_a_times(void* A_data, SUNATimesFn ATimes) { return SUNLinSolSetATimes_SPBCGS(solver_, A_data, ATimes); } -int SUNLinSolSPBCGS::setPreconditioner( +int SUNLinSolSPBCGS::set_preconditioner( void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol ) { return SUNLinSolSetPreconditioner_SPBCGS(solver_, P_data, Pset, Psol); } -int SUNLinSolSPBCGS::setScalingVectors(N_Vector s, N_Vector nul) { +int SUNLinSolSPBCGS::set_scaling_vectors(N_Vector s, N_Vector nul) { return SUNLinSolSetScalingVectors_SPBCGS(solver_, s, nul); } -int SUNLinSolSPBCGS::getNumIters() const { +int SUNLinSolSPBCGS::get_num_iters() const { return SUNLinSolNumIters_SPBCGS(solver_); } -realtype SUNLinSolSPBCGS::getResNorm() const { +realtype SUNLinSolSPBCGS::get_res_norm() const { return SUNLinSolResNorm_SPBCGS(solver_); } -N_Vector SUNLinSolSPBCGS::getResid() const { +N_Vector SUNLinSolSPBCGS::get_resid() const { return SUNLinSolResid_SPBCGS(solver_); } SUNLinSolSPFGMR::SUNLinSolSPFGMR(AmiVector const& x, int pretype, int maxl) : SUNLinSolWrapper(SUNLinSol_SPFGMR( - const_cast(x.getNVector()), pretype, maxl, x.get_ctx() + const_cast(x.get_nvector()), pretype, maxl, x.get_ctx() )) { if (!solver_) throw AmiException("Failed to create solver."); } -int SUNLinSolSPFGMR::setATimes(void* A_data, SUNATimesFn ATimes) { +int SUNLinSolSPFGMR::set_a_times(void* A_data, SUNATimesFn ATimes) { return SUNLinSolSetATimes_SPFGMR(solver_, A_data, ATimes); } -int SUNLinSolSPFGMR::setPreconditioner( +int SUNLinSolSPFGMR::set_preconditioner( void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol ) { return SUNLinSolSetPreconditioner_SPFGMR(solver_, P_data, Pset, Psol); } -int SUNLinSolSPFGMR::setScalingVectors(N_Vector s, N_Vector nul) { +int SUNLinSolSPFGMR::set_scaling_vectors(N_Vector s, N_Vector nul) { return SUNLinSolSetScalingVectors_SPFGMR(solver_, s, nul); } -int SUNLinSolSPFGMR::getNumIters() const { +int SUNLinSolSPFGMR::get_num_iters() const { return SUNLinSolNumIters_SPFGMR(solver_); } -realtype SUNLinSolSPFGMR::getResNorm() const { +realtype SUNLinSolSPFGMR::get_res_norm() const { return SUNLinSolResNorm_SPFGMR(solver_); } -N_Vector SUNLinSolSPFGMR::getResid() const { +N_Vector SUNLinSolSPFGMR::get_resid() const { return SUNLinSolResid_SPFGMR(solver_); } SUNLinSolSPGMR::SUNLinSolSPGMR(AmiVector const& x, int pretype, int maxl) : SUNLinSolWrapper(SUNLinSol_SPGMR( - const_cast(x.getNVector()), pretype, maxl, x.get_ctx() + const_cast(x.get_nvector()), pretype, maxl, x.get_ctx() )) { if (!solver_) throw AmiException("Failed to create solver."); } -int SUNLinSolSPGMR::setATimes(void* A_data, SUNATimesFn ATimes) { +int SUNLinSolSPGMR::set_a_times(void* A_data, SUNATimesFn ATimes) { return SUNLinSolSetATimes_SPGMR(solver_, A_data, ATimes); } -int SUNLinSolSPGMR::setPreconditioner( +int SUNLinSolSPGMR::set_preconditioner( void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol ) { return SUNLinSolSetPreconditioner_SPGMR(solver_, P_data, Pset, Psol); } -int SUNLinSolSPGMR::setScalingVectors(N_Vector s, N_Vector nul) { +int SUNLinSolSPGMR::set_scaling_vectors(N_Vector s, N_Vector nul) { return SUNLinSolSetScalingVectors_SPGMR(solver_, s, nul); } -int SUNLinSolSPGMR::getNumIters() const { +int SUNLinSolSPGMR::get_num_iters() const { return SUNLinSolNumIters_SPGMR(solver_); } -realtype SUNLinSolSPGMR::getResNorm() const { +realtype SUNLinSolSPGMR::get_res_norm() const { return SUNLinSolResNorm_SPGMR(solver_); } -N_Vector SUNLinSolSPGMR::getResid() const { +N_Vector SUNLinSolSPGMR::get_resid() const { return SUNLinSolResid_SPGMR(solver_); } @@ -403,35 +404,35 @@ SUNLinSolSPTFQMR::SUNLinSolSPTFQMR(N_Vector x, int pretype, int maxl) SUNLinSolSPTFQMR::SUNLinSolSPTFQMR(AmiVector const& x, int pretype, int maxl) { solver_ = SUNLinSol_SPTFQMR( - const_cast(x.getNVector()), pretype, maxl, x.get_ctx() + const_cast(x.get_nvector()), pretype, maxl, x.get_ctx() ); if (!solver_) throw AmiException("Failed to create solver."); } -int SUNLinSolSPTFQMR::setATimes(void* A_data, SUNATimesFn ATimes) { +int SUNLinSolSPTFQMR::set_a_times(void* A_data, SUNATimesFn ATimes) { return SUNLinSolSetATimes_SPTFQMR(solver_, A_data, ATimes); } -int SUNLinSolSPTFQMR::setPreconditioner( +int SUNLinSolSPTFQMR::set_preconditioner( void* P_data, SUNPSetupFn Pset, SUNPSolveFn Psol ) { return SUNLinSolSetPreconditioner_SPTFQMR(solver_, P_data, Pset, Psol); } -int SUNLinSolSPTFQMR::setScalingVectors(N_Vector s, N_Vector nul) { +int SUNLinSolSPTFQMR::set_scaling_vectors(N_Vector s, N_Vector nul) { return SUNLinSolSetScalingVectors_SPTFQMR(solver_, s, nul); } -int SUNLinSolSPTFQMR::getNumIters() const { +int SUNLinSolSPTFQMR::get_num_iters() const { return SUNLinSolNumIters_SPTFQMR(solver_); } -realtype SUNLinSolSPTFQMR::getResNorm() const { +realtype SUNLinSolSPTFQMR::get_res_norm() const { return SUNLinSolResNorm_SPTFQMR(solver_); } -N_Vector SUNLinSolSPTFQMR::getResid() const { +N_Vector SUNLinSolSPTFQMR::get_resid() const { return SUNLinSolResid_SPTFQMR(solver_); } @@ -444,7 +445,7 @@ SUNNonLinSolNewton::SUNNonLinSolNewton(int count, N_Vector x) throw(AmiException("SUNNonlinSol_NewtonSens failed")); } -int SUNNonLinSolNewton::getSysFn(SUNNonlinSolSysFn* SysFn) const { +int SUNNonLinSolNewton::get_sys_fn(SUNNonlinSolSysFn* SysFn) const { return SUNNonlinSolGetSysFn_Newton(solver, SysFn); } @@ -460,7 +461,7 @@ SUNNonLinSolFixedPoint::SUNNonLinSolFixedPoint( count, const_cast(x), m, x->sunctx )) {} -int SUNNonLinSolFixedPoint::getSysFn(SUNNonlinSolSysFn* SysFn) const { +int SUNNonLinSolFixedPoint::get_sys_fn(SUNNonlinSolSysFn* SysFn) const { return SUNNonlinSolGetSysFn_FixedPoint(solver, SysFn); } @@ -509,7 +510,7 @@ SUNLinSolSuperLUMT::SUNLinSolSuperLUMT( setOrdering(ordering); } -void SUNLinSolSuperLUMT::setOrdering(StateOrdering ordering) { +void SUNLinSolSuperLUMT::set_ordering(StateOrdering ordering) { auto status = SUNLinSol_SuperLUMTSetOrdering(solver, static_cast(ordering)); if (status != SUNLS_SUCCESS) diff --git a/src/sundials_matrix_wrapper.cpp b/src/sundials_matrix_wrapper.cpp index 74689bd5e1..a532f57e8f 100644 --- a/src/sundials_matrix_wrapper.cpp +++ b/src/sundials_matrix_wrapper.cpp @@ -104,12 +104,12 @@ SUNMatrixWrapper::SUNMatrixWrapper(SUNMatrix mat) : matrix_(mat) , id_(get_sparse_id_w_default(mat)) , sparsetype_(get_sparse_type_w_default(mat)) - , ownmat(false) { + , ownmat_(false) { finish_init(); } SUNMatrixWrapper::~SUNMatrixWrapper() { - if (matrix_ && ownmat) + if (matrix_ && ownmat_) SUNMatDestroy(matrix_); } diff --git a/src/symbolic_functions.cpp b/src/symbolic_functions.cpp index bd6d68662b..a80706c799 100644 --- a/src/symbolic_functions.cpp +++ b/src/symbolic_functions.cpp @@ -13,7 +13,7 @@ namespace amici { -double getNaN() { return std::numeric_limits::quiet_NaN(); } +double get_nan() { return std::numeric_limits::quiet_NaN(); } double log(double x) { if (x <= 0) { diff --git a/src/vector.cpp b/src/vector.cpp index 2ccde593e1..20cb357938 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -7,7 +7,7 @@ namespace amici { AmiVector& AmiVector::operator=(AmiVector const& other) { vec_ = other.vec_; - synchroniseNVector(other.get_ctx()); + synchronise_nvector(other.get_ctx()); return *this; } @@ -15,11 +15,11 @@ realtype* AmiVector::data() { return vec_.data(); } realtype const* AmiVector::data() const { return vec_.data(); } -N_Vector AmiVector::getNVector() { return nvec_; } +N_Vector AmiVector::get_nvector() { return nvec_; } -const_N_Vector AmiVector::getNVector() const { return nvec_; } +const_N_Vector AmiVector::get_nvector() const { return nvec_; } -std::vector const& AmiVector::getVector() const { return vec_; } +std::vector const& AmiVector::get_vector() const { return vec_; } int AmiVector::size() const { return gsl::narrow(vec_.size()); } @@ -57,7 +57,7 @@ void AmiVector::copy(AmiVector const& other) { std::ranges::copy(other.vec_, vec_.begin()); } -void AmiVector::synchroniseNVector(SUNContext const sunctx) { +void AmiVector::synchronise_nvector(SUNContext const sunctx) { if (nvec_) N_VDestroy_Serial(nvec_); if (sunctx) { @@ -79,7 +79,7 @@ AmiVectorArray::AmiVectorArray( : vec_array_(length_outer, AmiVector(length_inner, sunctx)) { nvec_array_.resize(length_outer); for (int idx = 0; idx < length_outer; idx++) { - nvec_array_.at(idx) = vec_array_.at(idx).getNVector(); + nvec_array_.at(idx) = vec_array_.at(idx).get_nvector(); } } @@ -87,7 +87,7 @@ AmiVectorArray& AmiVectorArray::operator=(AmiVectorArray const& other) { vec_array_ = other.vec_array_; nvec_array_.resize(other.size()); for (int idx = 0; idx < other.size(); idx++) { - nvec_array_.at(idx) = vec_array_.at(idx).getNVector(); + nvec_array_.at(idx) = vec_array_.at(idx).get_nvector(); } return *this; } @@ -96,7 +96,7 @@ AmiVectorArray::AmiVectorArray(AmiVectorArray const& vaold) : vec_array_(vaold.vec_array_) { nvec_array_.resize(vaold.size()); for (int idx = 0; idx < vaold.size(); idx++) { - nvec_array_.at(idx) = vec_array_.at(idx).getNVector(); + nvec_array_.at(idx) = vec_array_.at(idx).get_nvector(); } } @@ -114,13 +114,13 @@ realtype const& AmiVectorArray::at(int const ipos, int const jpos) const { return vec_array_.at(jpos).at(ipos); } -N_Vector* AmiVectorArray::getNVectorArray() { return nvec_array_.data(); } +N_Vector* AmiVectorArray::get_nvector_array() { return nvec_array_.data(); } -N_Vector AmiVectorArray::getNVector(int const pos) { +N_Vector AmiVectorArray::get_nvector(int const pos) { return nvec_array_.at(pos); } -const_N_Vector AmiVectorArray::getNVector(int const pos) const { +const_N_Vector AmiVectorArray::get_nvector(int const pos) const { return nvec_array_.at(pos); } @@ -132,9 +132,7 @@ AmiVector const& AmiVectorArray::operator[](int const pos) const { return vec_array_.at(pos); } -int AmiVectorArray::size() const { - return gsl::narrow(vec_array_.size()); -} +int AmiVectorArray::size() const { return gsl::narrow(vec_array_.size()); } void AmiVectorArray::zero() { for (auto& v : vec_array_) @@ -171,7 +169,7 @@ void AmiVectorArray::copy(AmiVectorArray const& other) { for (int iv = 0; iv < size(); ++iv) { vec_array_.at(iv).copy(other.vec_array_.at(iv)); - nvec_array_[iv] = vec_array_.at(iv).getNVector(); + nvec_array_[iv] = vec_array_.at(iv).get_nvector(); } } diff --git a/src/wrapfunctions.template.cpp b/src/wrapfunctions.template.cpp index e7ab71ddbe..0d0bd31a20 100644 --- a/src/wrapfunctions.template.cpp +++ b/src/wrapfunctions.template.cpp @@ -5,7 +5,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { +std::unique_ptr get_model() { return std::unique_ptr( new amici::model_TPL_MODELNAME::Model_TPL_MODELNAME() ); diff --git a/src/wrapfunctions.template.h b/src/wrapfunctions.template.h index e7ba14ce79..e85a763625 100644 --- a/src/wrapfunctions.template.h +++ b/src/wrapfunctions.template.h @@ -12,7 +12,7 @@ namespace amici::generic_model { * the name at compile time. * @return Model instance */ -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace amici::generic_model diff --git a/swig/abstract_model.i b/swig/abstract_model.i index 47a0dfb99d..7189a23dfa 100644 --- a/swig/abstract_model.i +++ b/swig/abstract_model.i @@ -69,4 +69,14 @@ %ignore fdtotal_cldx_rdata_colptrs; %ignore fdtotal_cldx_rdata_rowvals; %ignore fcreate_splines; +%ignore fdsigmaydy; +%ignore fdx_rdatadx_solver; +%ignore fdx_rdatadp; +%ignore fdx_rdatadtcl; +%ignore fdtotal_cldp; +%ignore fdtotal_cldx_rdata; +%ignore fdspline_valuesdp; +%ignore fdspline_slopesdp; +%ignore fexplicit_roots; + %include "amici/abstract_model.h" diff --git a/swig/amici.i b/swig/amici.i index 67d4db4f2d..a956033045 100644 --- a/swig/amici.i +++ b/swig/amici.i @@ -149,9 +149,9 @@ wrap_unique_ptr(ExpDataPtr, amici::ExpData) %naturalvar amici::SimulationParameters::parameters; %naturalvar amici::SimulationParameters::pscale; %naturalvar amici::SimulationParameters::plist; -%naturalvar amici::SimulationParameters::fixedParameters; -%naturalvar amici::SimulationParameters::fixedParametersPreequilibration; -%naturalvar amici::SimulationParameters::fixedParametersPresimulation; +%naturalvar amici::SimulationParameters::fixed_parameters; +%naturalvar amici::SimulationParameters::fixed_parameters_pre_equilibration; +%naturalvar amici::SimulationParameters::fixed_parameters_presimulation; %naturalvar amici::SimulationParameters::reinitialization_state_idxs_sim; %naturalvar amici::SimulationParameters::reinitialization_state_idxs_presim; @@ -250,34 +250,34 @@ def __repr__(self): // Convert integer values to enum class // defeats the purpose of enum class, but didn't find a better way to allow for // vectors of enum class types in python -%feature("docstring") parameterScalingFromIntVector +%feature("docstring") parameter_scaling_from_int_vector "Swig-Generated class, which, in contrast to other Vector classes, does not allow for simple interoperability with common Python types, but must be created using -:func:`amici.amici.parameterScalingFromIntVector`"; +:func:`amici.amici.parameter_scaling_from_int_vector`"; %{ namespace amici { -std::vector parameterScalingFromIntVector(std::vector const& intVec) { - std::vector result(intVec.size()); +std::vector parameter_scaling_from_int_vector(std::vector const& int_vec) { + std::vector result(int_vec.size()); for (int i = 0; i < (int) result.size(); ++i) { - result[i] = static_cast(intVec[i]); + result[i] = static_cast(int_vec[i]); } return result; } }; // namespace amici %} %extend amici::Model { - void setParameterScale(std::vector const& intVec) { - std::vector result(intVec.size()); + void set_parameter_scale(std::vector const& int_vec) { + std::vector result(int_vec.size()); for (int i = 0; i < (int) result.size(); ++i) { - result[i] = static_cast(intVec[i]); + result[i] = static_cast(int_vec[i]); } - $self->setParameterScale(result); + $self->set_parameter_scale(result); } } namespace amici { - std::vector parameterScalingFromIntVector(std::vector const& intVec); - void Model::setParameterScale(std::vector const& intVec); + std::vector parameter_scaling_from_int_vector(std::vector const& int_vec); + void Model::set_parameter_scale(std::vector const& int_vec); } %template(ParameterScalingVector) std::vector; %extend std::vector { @@ -290,12 +290,12 @@ def __repr__(self): // Add function to check if amici was compiled with OpenMP -%feature("docstring") compiledWithOpenMP +%feature("docstring") compiled_with_openmp "AMICI extension was compiled with OpenMP?"; %{ namespace amici { /** AMICI extension was compiled with OpenMP? */ -bool compiledWithOpenMP() { +bool compiled_with_openmp() { #if defined(_OPENMP) return true; #else @@ -305,7 +305,7 @@ bool compiledWithOpenMP() { }; %} namespace amici { -bool compiledWithOpenMP(); +bool compiled_with_openmp(); } %pythoncode %{ @@ -331,6 +331,7 @@ NewtonDampingFactorMode = enum('NewtonDampingFactorMode') FixedParameterContext = enum('FixedParameterContext') RDataReporting = enum('RDataReporting') Constraint = enum('Constraint') +LogSeverity = enum('LogSeverity') %} %template(SteadyStateStatusVector) std::vector; diff --git a/swig/edata.i b/swig/edata.i index 0a8a01e3c9..276d1bc911 100644 --- a/swig/edata.i +++ b/swig/edata.i @@ -7,6 +7,8 @@ using namespace amici; %} %ignore ConditionContext; +%ignore get_observed_data_ptr; +%ignore get_observed_data_std_dev_ptr; %feature("pythonprepend") amici::ExpData::ExpData %{ """ @@ -30,22 +32,22 @@ using namespace amici; %pythoncode %{ def _edata_repr(self: "ExpData"): n_data_y = sum( - self.isSetObservedData(it, iy) + self.is_set_observed_data(it, iy) for it in range(self.nt()) for iy in range(self.nytrue()) ) n_sigma_y = sum( - self.isSetObservedDataStdDev(it, iy) + self.is_set_observed_data_std_dev(it, iy) for it in range(self.nt()) for iy in range(self.nytrue()) ) n_data_z = sum( - self.isSetObservedEvents(ie, iz) + self.is_set_observed_events(ie, iz) for ie in range(self.nmaxevent()) for iz in range(self.nztrue()) ) n_sigma_z = sum( - self.isSetObservedEventsStdDev(ie, iz) + self.is_set_observed_events_std_dev(ie, iz) for ie in range(self.nmaxevent()) for iz in range(self.nztrue()) ) @@ -53,18 +55,18 @@ def _edata_repr(self: "ExpData"): custom_simulation_settings = [] if self.pscale: custom_simulation_settings.append(f"parameter scales") - if self.fixedParameters: + if self.fixed_parameters: custom_simulation_settings.append(f"constants") - if self.fixedParametersPreequilibration: + if self.fixed_parameters_pre_equilibration: custom_simulation_settings.append(f"pre-equilibration condition") if self.t_presim: tmp = f"pre-simulation condition (t={self.t_presim})" - if self.fixedParametersPresimulation: + if self.fixed_parameters_presimulation: tmp += " with custom constants" custom_simulation_settings.append(tmp) - if self.reinitializeFixedParameterInitialStates and self.reinitialization_state_idxs_sim: + if self.reinitialize_fixed_parameter_initial_states and self.reinitialization_state_idxs_sim: custom_simulation_settings.append(f"{len(self.reinitialization_state_idxs_sim)} reinitialized states (simulation)") - if self.reinitializeFixedParameterInitialStates and self.reinitialization_state_idxs_presim: + if self.reinitialize_fixed_parameter_initial_states and self.reinitialization_state_idxs_presim: custom_simulation_settings.append(f"{len(self.reinitialization_state_idxs_presim)} reinitialized states (presimulation)") if self.parameters: custom_simulation_settings.append(f"parameters") @@ -80,7 +82,7 @@ def _edata_repr(self: "ExpData"): return "\n".join([ self.this.__repr__()[:-1], - f" condition '{self.id}' starting at t={self.tstart_}" + custom_simulation_settings, + f" condition '{self.id}' starting at t={self.t_start}" + custom_simulation_settings, f" {self.nt()}x{self.nytrue()} time-resolved datapoints", f" ({n_data_y}/{self.nt()*self.nytrue()} measurements & {n_sigma_y}/{self.nt()*self.nytrue()} sigmas set)", f" {self.nmaxevent()}x{self.nztrue()} event-resolved datapoints", diff --git a/swig/hdf5.i b/swig/hdf5.i index beadab77aa..ac6fd19184 100644 --- a/swig/hdf5.i +++ b/swig/hdf5.i @@ -1,12 +1,12 @@ %module hdf5 %rename("$ignore", regextarget=1, fullname=1) "amici::hdf5::.*$"; -%rename("%s") amici::hdf5::readModelDataFromHDF5; -%rename("%s") amici::hdf5::readSimulationExpData; -%rename("%s") amici::hdf5::readSolverSettingsFromHDF5; -%rename("%s") amici::hdf5::writeReturnData; -%rename("%s") amici::hdf5::writeSimulationExpData; -%rename("%s") amici::hdf5::writeSolverSettingsToHDF5; +%rename("%s") amici::hdf5::read_model_data_from_hdf5; +%rename("%s") amici::hdf5::read_exp_data_from_hdf5; +%rename("%s") amici::hdf5::read_solver_settings_from_hdf5; +%rename("%s") amici::hdf5::write_return_data_to_hdf5; +%rename("%s") amici::hdf5::write_exp_data_to_hdf5; +%rename("%s") amici::hdf5::write_solver_settings_to_hdf5; // Add necessary symbols to generated header %{ diff --git a/swig/misc.i b/swig/misc.i index af166b48ed..4fa54693f8 100644 --- a/swig/misc.i +++ b/swig/misc.i @@ -1,11 +1,11 @@ %module misc -%ignore amici::printfToString; -%ignore amici::regexErrorToString; -%ignore amici::writeSlice; +%ignore amici::printf_to_string; +%ignore amici::regex_error_to_string; +%ignore amici::write_slice; %ignore ContextManager; -%ignore amici::scaleParameters; -%ignore amici::unscaleParameters; +%ignore amici::scale_parameters; +%ignore amici::unscale_parameters; // Add necessary symbols to generated header %{ diff --git a/swig/model.i b/swig/model.i index 1bb04763fc..4a7436e0ec 100644 --- a/swig/model.i +++ b/swig/model.i @@ -8,48 +8,49 @@ using namespace amici; // remove functions that use AmiVector(Array) since that class anyways cannot // be exposed in swig -%ignore addAdjointQuadratureEventUpdate; -%ignore addAdjointStateEventUpdate; -%ignore addEventObjective; -%ignore addEventObjectiveRegularization; -%ignore addEventObjectiveSensitivity; -%ignore addObservableObjective; -%ignore addObservableObjectiveSensitivity; -%ignore addPartialEventObjectiveSensitivity; -%ignore addPartialObservableObjectiveSensitivity; -%ignore addStateEventUpdate; -%ignore addStateSensitivityEventUpdate; +%ignore add_adjoint_quadrature_eventUpdate; +%ignore add_adjoint_state_event_update; +%ignore add_event_objective; +%ignore add_event_objective_regularization; +%ignore add_event_objective_sensitivity; +%ignore add_observable_objective; +%ignore add_observable_objective_sensitivity; +%ignore add_partial_event_objective_sensitivity; +%ignore add_partial_observable_objective_sensitivity; +%ignore add_state_event_update; +%ignore add_state_sensitivity_event_update; %ignore fsx_rdata; %ignore fx_rdata; -%ignore getAdjointStateEventUpdate; -%ignore getEventTimeSensitivity; -%ignore getAdjointStateObservableUpdate; +%ignore get_adjoint_state_event_update; +%ignore get_event_time_sensitivity; +%ignore get_adjoint_state_observable_update; %ignore get_event; -%ignore getEvent; -%ignore getEventRegularization; -%ignore getEventRegularizationSensitivity; -%ignore getEventSensitivity; -%ignore getEventTimeSensitivity; -%ignore getObservable; -%ignore getObservableSensitivity; -%ignore getExpression; -%ignore initEvents; +%ignore get_events; +%ignore get_event_regularization; +%ignore get_event_regularization_sensitivity; +%ignore get_event_sensitivity; +%ignore get_event_time_sensitivity; +%ignore get_explicit_roots; +%ignore get_observable; +%ignore get_observable_sensitivity; +%ignore get_expression; +%ignore init_events; %ignore reinit_events; %ignore initialize; -%ignore initializeB; -%ignore initializeStateSensitivities; -%ignore initializeStates; +%ignore initialize_b; +%ignore initialize_state_sensitivities; +%ignore initialize_state; %ignore reinitialize; %ignore ModelState; -%ignore getModelState; -%ignore setModelState; +%ignore get_model_state; +%ignore set_model_state; %ignore fx0; %ignore fx0_fixedParameters; %ignore fsx0; %ignore fsx0_fixedParameters; %ignore get_dxdotdp; %ignore get_dxdotdp_full; -%ignore checkFinite; +%ignore check_inite; %ignore fJrz; %ignore fJy; %ignore fJz; @@ -80,13 +81,13 @@ using namespace amici; %ignore fw; %ignore fy; %ignore fz; -%ignore updateHeaviside; -%ignore updateHeavisideB; -%ignore getEventSigma; -%ignore getEventSigmaSensitivity; -%ignore getObservableSigma; -%ignore getObservableSigmaSensitivity; -%ignore getUnobservedEventSensitivity; +%ignore update_heaviside; +%ignore update_heaviside_b; +%ignore get_event_sigma; +%ignore get_event_sigma_sensitivity; +%ignore get_observable_sigma; +%ignore get_observable_sigma_sensitivity; +%ignore get_unobserved_event_sensitivity; %ignore fdsigmaydy; %ignore fdspline_slopesdp; %ignore fdspline_valuesdp; @@ -97,10 +98,16 @@ using namespace amici; %ignore fdx_rdatadx_solver; %ignore fdsigmaydy; %ignore get_steadystate_mask_av; +%ignore initialize_splines; +%ignore initialize_spline_sensitivities; +%ignore initialize_events; +%ignore reinit_explicit_roots; +%ignore add_adjoint_quadrature_event_update; +%ignore check_finite; %newobject amici::Model::clone; -%rename(create_solver) amici::Model::getSolver; +%rename(create_solver) amici::Model::get_solver; %extend amici::Model { %pythoncode %{ diff --git a/swig/modelname.template.i b/swig/modelname.template.i index db857348b4..f0a701e9cc 100644 --- a/swig/modelname.template.i +++ b/swig/modelname.template.i @@ -72,7 +72,7 @@ static double _get_import_time(); // Make model module accessible from the model -%feature("pythonappend") amici::generic_model::getModel %{ +%feature("pythonappend") amici::generic_model::get_model %{ if '.' in __name__: val.module = _model_module %} diff --git a/swig/rdata.i b/swig/rdata.i index 17eea5afe9..2b744ae4f3 100644 --- a/swig/rdata.i +++ b/swig/rdata.i @@ -6,7 +6,7 @@ using namespace amici; %} -%ignore processSimulationObjects; +%ignore process_simulation_objects; %ignore ModelContext; // Process symbols in header diff --git a/swig/solver.i b/swig/solver.i index a9085b515e..cec99e31f7 100644 --- a/swig/solver.i +++ b/swig/solver.i @@ -10,51 +10,57 @@ using namespace amici; // remove functions that use AmiVector(Array) since that class anyways cannot // be exposed in swig -%ignore getAdjointDerivativeState; -%ignore getAdjointQuadrature; -%ignore getQuadrature; -%ignore getAdjointState; -%ignore getDerivativeState; -%ignore getState; -%ignore getStateSensitivity; -%ignore quadReInitB; -%ignore reInit; -%ignore reInitB; -%ignore sensReInit; +%ignore get_adjoit_derivative_state; +%ignore get_adjoint_quadrature; +%ignore get_quadrature; +%ignore get_adjointState; +%ignore get_derivative_state; +%ignore get_state; +%ignore get_state_sensitivity; +%ignore quad_reinit_b; +%ignore reinit; +%ignore reinit_b; +%ignore sens_reinit; %ignore setup; -%ignore setupB; -%ignore setupSteadystate; -%ignore writeSolution; -%ignore writeSolutionB; -%ignore calcIC; -%ignore calcICB; -%ignore sensToggleOff; -%ignore solveB; +%ignore setup_b; +%ignore setup_steady_state; +%ignore write_solution; +%ignore write_solution_b; +%ignore calc_ic; +%ignore calc_ic_b; +%ignore sens_toggle_off; +%ignore solve_b; %ignore step; %ignore run; -%ignore runB; -%ignore resetDiagnosis; -%ignore storeDiagnosis; -%ignore storeDiagnosisB; -%ignore turnOffRootFinding; -%ignore getRootInfo; -%ignore updateAndReinitStatesAndSensitivities; -%ignore getCpuTime; -%ignore getCpuTimeB; -%ignore getLastOrder; -%ignore getNumErrTestFails; -%ignore getNumErrTestFailsB; -%ignore getNumNonlinSolvConvFails; -%ignore getNumNonlinSolvConvFailsB; -%ignore getNumRhsEvals; -%ignore getNumRhsEvalsB; -%ignore getNumSteps; -%ignore getNumStepsB; +%ignore run_b; +%ignore reset_diagnosis; +%ignore store_diagnosis; +%ignore store_diagnosis_b; +%ignore turn_off_root_finding; +%ignore get_root_info; +%ignore update_and_reinit_states_and_sensitivities; +%ignore get_cpu_time; +%ignore get_cpu_time_b; +%ignore get_last_order; +%ignore get_num_err_test_fails; +%ignore get_num_err_test_fails_b; +%ignore get_num_non_lin_solv_conv_fails; +%ignore get_num_non_lin_solv_conv_fails_b; +%ignore get_num_rhs_evals; +%ignore get_num_rhs_evals_b; +%ignore get_num_steps; +%ignore get_num_steps_b; %ignore gett; %ignore startTimer; %ignore switchForwardSensisOff; %ignore timeExceeded; %ignore getSunContext; +%ignore get_adjoint_state; +%ignore get_adjoint_derivative_state; +%ignore reinit_quad_b; +%ignore get_logger; +%ignore set_logger; +%ignore get_sun_context; // Solver.__repr__ %pythoncode %{ @@ -62,38 +68,37 @@ def _solver_repr(self: "Solver"): return "\n".join([ self.this.__repr__()[:-1], " reporting_mode: " - f"{RDataReporting(self.getReturnDataReportingMode())!r}", - f" sens_meth: {SensitivityMethod(self.getSensitivityMethod())!r}", - f" sens_order: {SensitivityOrder(self.getSensitivityOrder())!r}", - f" sens_meth_preeq: {SensitivityMethod(self.getSensitivityMethodPreequilibration())!r}", - f" maxsteps: {self.getMaxSteps()}", - f" maxtime: {self.getMaxTime()}s", - f" abs_tol: {self.getAbsoluteTolerance()}", - f" rel_tol: {self.getRelativeTolerance()}", - f" abs_tol_b: {self.getAbsoluteToleranceB()}", - f" rel_tol_b: {self.getRelativeToleranceB()}", - f" abs_tol_fsa: {self.getAbsoluteToleranceFSA()}", - f" rel_tol_fsa: {self.getRelativeToleranceFSA()}", - f" abs_tol_quad: {self.getAbsoluteToleranceQuadratures()}", - f" rel_tol_quad: {self.getRelativeToleranceQuadratures()}", - f" abs_tol_ss: {self.getAbsoluteToleranceSteadyState()}", - f" rel_tol_ss: {self.getRelativeToleranceSteadyState()}", - f" abs_tol_sss: {self.getAbsoluteToleranceSteadyStateSensi()}", - f" rel_tol_sss: {self.getRelativeToleranceSteadyStateSensi()}", - f" int_sens_meth: {InternalSensitivityMethod(self.getInternalSensitivityMethod())!r}", - f" int_type: {InterpolationType(self.getInterpolationType())!r}", - f" linsol: {LinearSolver(self.getLinearSolver())!r}", - f" lmm: {LinearMultistepMethod(self.getLinearMultistepMethod())!r}", - f" newton_damp_mode: {NewtonDampingFactorMode(self.getNewtonDampingFactorMode())!r}", - f" newton_damp_lb: {self.getNewtonDampingFactorLowerBound()}", - f" newton_maxsteps: {self.getNewtonMaxSteps()}", - f" newton_ss_check: {self.getNewtonStepSteadyStateCheck()}", - f" sens_ss_check: {self.getSensiSteadyStateCheck()}", - f" interpolation_type: {InterpolationType(self.getInterpolationType())!r}", - f" ism: {InternalSensitivityMethod(self.getInternalSensitivityMethod())!r}", - f" nlsol_iter: {NonlinearSolverIteration(self.getNonlinearSolverIteration())!r}", - f" stability_limit: {self.getStabilityLimitFlag()}", - f" state_ordering: {self.getStateOrdering()}", + f"{RDataReporting(self.get_return_data_reporting_mode())!r}", + f" sens_meth: {SensitivityMethod(self.get_sensitivity_method())!r}", + f" sens_order: {SensitivityOrder(self.get_sensitivity_order())!r}", + f" sens_meth_preeq: {SensitivityMethod(self.get_sensitivity_method_pre_equilibration())!r}", + f" maxsteps: {self.get_max_steps()}", + f" maxtime: {self.get_max_time()}s", + f" abs_tol: {self.get_absolute_tolerance()}", + f" rel_tol: {self.get_relative_tolerance()}", + f" abs_tol_b: {self.get_absolute_tolerance_b()}", + f" rel_tol_b: {self.get_relative_tolerance_b()}", + f" abs_tol_fsa: {self.get_absolute_tolerance_fsa()}", + f" rel_tol_fsa: {self.get_relative_tolerance_fsa()}", + f" abs_tol_quad: {self.get_absolute_tolerance_quadratures()}", + f" rel_tol_quad: {self.get_relative_tolerance_quadratures()}", + f" abs_tol_ss: {self.get_absolute_tolerance_steady_state()}", + f" rel_tol_ss: {self.get_relative_tolerance_steady_state()}", + f" abs_tol_sss: {self.get_absolute_tolerance_steady_state_sensi()}", + f" rel_tol_sss: {self.get_relative_tolerance_steady_state_sensi()}", + f" int_sens_meth: {InternalSensitivityMethod(self.get_internal_sensitivity_method())!r}", + f" int_type: {InterpolationType(self.get_interpolation_type())!r}", + f" linsol: {LinearSolver(self.get_linear_solver())!r}", + f" lmm: {LinearMultistepMethod(self.get_linear_multistep_method())!r}", + f" newton_damp_mode: {NewtonDampingFactorMode(self.get_newton_damping_factor_mode())!r}", + f" newton_damp_lb: {self.get_newton_damping_factor_lower_bound()}", + f" newton_maxsteps: {self.get_newton_max_steps()}", + f" newton_ss_check: {self.get_newton_step_steady_state_check()}", + f" sens_ss_check: {self.get_sensi_steady_state_check()}", + f" interpolation_type: {InterpolationType(self.get_interpolation_type())!r}", + f" nlsol_iter: {NonlinearSolverIteration(self.get_non_linear_solver_iteration())!r}", + f" stability_limit: {self.get_stability_limit_flag()}", + f" state_ordering: {self.get_state_ordering()}", ">" ]) %} diff --git a/swig/solver_cvodes.i b/swig/solver_cvodes.i index 7e2c28a17e..1da8b95812 100644 --- a/swig/solver_cvodes.i +++ b/swig/solver_cvodes.i @@ -6,6 +6,23 @@ using namespace amici; %} +%ignore reinit_post_process_f; +%ignore reinit_post_process_b; +%ignore reinit_quad_b; +%ignore quad_ss_tolerances_b; +%ignore quad_ss_tolerances; +%ignore solve; +%ignore solve_f; +%ignore get_dky; +%ignore get_sens; +%ignore get_sens_dky; +%ignore get_b; +%ignore get_dky_b; +%ignore get_quad_b; +%ignore get_quad_dky_b; +%ignore get_quad; +%ignore get_quad_dky; + %newobject amici::CVodeSolver::clone; %feature("notabstract") amici::CVodeSolver; diff --git a/swig/solver_idas.i b/swig/solver_idas.i index 7ec9f663bb..6f6b07d7ea 100644 --- a/swig/solver_idas.i +++ b/swig/solver_idas.i @@ -6,6 +6,23 @@ using namespace amici; %} +%ignore reinit_post_process_f; +%ignore reinit_post_process_b; +%ignore reinit_quad_b; +%ignore quad_ss_tolerances_b; +%ignore quad_ss_tolerances; +%ignore solve; +%ignore solve_f; +%ignore get_dky; +%ignore get_sens; +%ignore get_sens_dky; +%ignore get_b; +%ignore get_dky_b; +%ignore get_quad_b; +%ignore get_quad_dky_b; +%ignore get_quad; +%ignore get_quad_dky; + %newobject amici::IDASolver::clone; %feature("notabstract") amici::IDASolver; diff --git a/tests/benchmark_models/test_petab_benchmark.py b/tests/benchmark_models/test_petab_benchmark.py index 1385aefb68..0c490d2ee3 100644 --- a/tests/benchmark_models/test_petab_benchmark.py +++ b/tests/benchmark_models/test_petab_benchmark.py @@ -254,12 +254,12 @@ def test_nominal_parameters_llh(benchmark_problem): if problem_id not in problems_for_llh_check: pytest.skip("Excluded from log-likelihood check.") - amici_solver = amici_model.getSolver() - amici_solver.setAbsoluteTolerance(1e-8) - amici_solver.setRelativeTolerance(1e-8) - amici_solver.setMaxSteps(10_000) + amici_solver = amici_model.create_solver() + amici_solver.set_absolute_tolerance(1e-8) + amici_solver.set_relative_tolerance(1e-8) + amici_solver.set_max_steps(10_000) if problem_id in ("Brannmark_JBC2010", "Isensee_JCB2018"): - amici_model.setSteadyStateSensitivityMode( + amici_model.set_steady_state_sensitivity_mode( amici.SteadyStateSensitivityMode.integrationOnly ) @@ -270,11 +270,11 @@ def test_nominal_parameters_llh(benchmark_problem): "t_fwd": amici.SensitivityMethod.forward, "t_adj": amici.SensitivityMethod.adjoint, }.items(): - amici_solver.setSensitivityMethod(sensi_mode) + amici_solver.set_sensitivity_method(sensi_mode) if sensi_mode == amici.SensitivityMethod.none: - amici_solver.setSensitivityOrder(amici.SensitivityOrder.none) + amici_solver.set_sensitivity_order(amici.SensitivityOrder.none) else: - amici_solver.setSensitivityOrder(amici.SensitivityOrder.first) + amici_solver.set_sensitivity_order(amici.SensitivityOrder.first) res_repeats = [ simulate_petab( @@ -289,7 +289,7 @@ def test_nominal_parameters_llh(benchmark_problem): times[label] = np.min( [ - sum(r.cpu_time + r.cpu_timeB for r in res[RDATAS]) / 1000 + sum(r.cpu_time + r.cpu_time_b for r in res[RDATAS]) / 1000 # only forwards/backwards simulation for res in res_repeats ] @@ -436,13 +436,15 @@ def test_benchmark_gradient( petab_problem, model_output_dir=benchmark_outdir / problem_id, ) - amici_solver = amici_model.getSolver() - amici_solver.setAbsoluteTolerance(cur_settings.atol_sim) - amici_solver.setRelativeTolerance(cur_settings.rtol_sim) - amici_solver.setMaxSteps(2 * 10**5) - amici_solver.setSensitivityMethod(sensitivity_method) + amici_solver = amici_model.create_solver() + amici_solver.set_absolute_tolerance(cur_settings.atol_sim) + amici_solver.set_relative_tolerance(cur_settings.rtol_sim) + amici_solver.set_max_steps(2 * 10**5) + amici_solver.set_sensitivity_method(sensitivity_method) # TODO: we should probably test all sensitivity modes - amici_model.setSteadyStateSensitivityMode(cur_settings.ss_sensitivity_mode) + amici_model.set_steady_state_sensitivity_mode( + cur_settings.ss_sensitivity_mode + ) amici_function, amici_derivative = simulate_petab_to_cached_functions( petab_problem=petab_problem, @@ -522,8 +524,8 @@ def test_benchmark_gradient( def assert_gradient_check_success( derivative: fiddy.Derivative, - expected_derivative: np.array, - point: np.array, + expected_derivative: np.ndarray, + point: np.ndarray, atol: float, rtol: float, always_print: bool = False, diff --git a/tests/benchmark_models/test_petab_benchmark_jax.py b/tests/benchmark_models/test_petab_benchmark_jax.py index 243e7f93da..42ea56a0c4 100644 --- a/tests/benchmark_models/test_petab_benchmark_jax.py +++ b/tests/benchmark_models/test_petab_benchmark_jax.py @@ -35,11 +35,11 @@ def test_jax_llh(benchmark_problem): "Skipping Smith_BMCSystBiol2013 due to non-supported events in JAX." ) - amici_solver = amici_model.getSolver() + amici_solver = amici_model.create_solver() cur_settings = settings[problem_id] - amici_solver.setAbsoluteTolerance(1e-8) - amici_solver.setRelativeTolerance(1e-8) - amici_solver.setMaxSteps(10_000) + amici_solver.set_absolute_tolerance(1e-8) + amici_solver.set_relative_tolerance(1e-8) + amici_solver.set_max_steps(10_000) simulate_amici = partial( simulate_petab, @@ -57,9 +57,11 @@ def test_jax_llh(benchmark_problem): if problem_id in problems_for_gradient_check: point = flat_petab_problem.x_nominal_free_scaled for _ in range(20): - amici_solver.setSensitivityMethod(amici.SensitivityMethod.forward) - amici_solver.setSensitivityOrder(amici.SensitivityOrder.first) - amici_model.setSteadyStateSensitivityMode( + amici_solver.set_sensitivity_method( + amici.SensitivityMethod.forward + ) + amici_solver.set_sensitivity_order(amici.SensitivityOrder.first) + amici_model.set_steady_state_sensitivity_mode( cur_settings.ss_sensitivity_mode ) point_noise = ( diff --git a/tests/cpp/jakstat_adjoint/tests1.cpp b/tests/cpp/jakstat_adjoint/tests1.cpp index a6337eb41f..5e94ccfdd1 100644 --- a/tests/cpp/jakstat_adjoint/tests1.cpp +++ b/tests/cpp/jakstat_adjoint/tests1.cpp @@ -40,31 +40,31 @@ TEST(ExampleJakstatAdjoint, SensitivityAdjointEmptySensInd) TEST(ExampleJakstatAdjoint, SensitivityAdjointUnusedNanOutputs) { /* UN-IGNORE ONCE THIS MODEL HAS BEEN IMPORTED VIA PYTHON INTERFACE */ - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); - amici::hdf5::readModelDataFromHDF5( + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_jakstat_adjoint/sensiadjoint/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_jakstat_adjoint/sensiadjoint/options"); - auto edata = amici::hdf5::readSimulationExpData( + auto edata = amici::hdf5::read_exp_data_from_hdf5( NEW_OPTION_FILE, "/model_jakstat_adjoint/sensiadjoint/data", *model); // Set output parameter p[10] to NaN and remove respective measurements // -> gradient should still be finite - auto p = model->getParameters(); + auto p = model->get_parameters(); p[10] = NAN; - model->setParameterById("offset_tSTAT", NAN); + model->set_parameter_by_id("offset_tSTAT", NAN); auto iy = 1; - Expects(model->getObservableIds()[iy] == "obs_tSTAT"); - auto d = edata->getObservedData(); + Expects(model->get_observable_ids()[iy] == "obs_tSTAT"); + auto d = edata->get_observed_data(); for (int it = 0; it < edata->nt(); ++it) { d[it * edata->nytrue() + iy] = NAN; } - edata->setObservedData(d); + edata->set_observed_data(d); - auto rdata = runAmiciSimulation(*solver, edata.get(), *model); + auto rdata = run_simulation(*solver, edata.get(), *model); for (int i = 0; i < model->nplist(); ++i) ASSERT_FALSE(std::isnan(rdata->sllh[i])); @@ -74,17 +74,17 @@ TEST(ExampleJakstatAdjoint, SensitivityReplicates) { // Check that we can handle replicates correctly - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); - amici::hdf5::readModelDataFromHDF5( + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_jakstat_adjoint/sensiadjoint/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_jakstat_adjoint/sensiadjoint/options"); amici::ExpData edata(*model); // No replicate, no sensi - edata.setTimepoints({ 10.0 }); - auto d = edata.getObservedData(); + edata.set_timepoints({ 10.0 }); + auto d = edata.get_observed_data(); for (int it = 0; it < edata.nt(); ++it) { for (int iy = 0; iy < edata.nytrue(); ++iy) { if (iy == 0) { @@ -94,16 +94,16 @@ TEST(ExampleJakstatAdjoint, SensitivityReplicates) } } } - edata.setObservedData(d); - edata.setObservedDataStdDev(1.0); + edata.set_observed_data(d); + edata.set_observed_data_std_dev(1.0); - solver->setSensitivityOrder(amici::SensitivityOrder::none); - auto rdata1 = runAmiciSimulation(*solver, &edata, *model); + solver->set_sensitivity_order(amici::SensitivityOrder::none); + auto rdata1 = run_simulation(*solver, &edata, *model); auto llh1 = rdata1->llh; // forward + replicates - edata.setTimepoints({ 10.0, 10.0 }); - d = edata.getObservedData(); + edata.set_timepoints({ 10.0, 10.0 }); + d = edata.get_observed_data(); for (int it = 0; it < edata.nt(); ++it) { for (int iy = 0; iy < edata.nytrue(); ++iy) { if (iy == 0) { @@ -113,18 +113,18 @@ TEST(ExampleJakstatAdjoint, SensitivityReplicates) } } } - edata.setObservedData(d); - edata.setObservedDataStdDev(1.0); + edata.set_observed_data(d); + edata.set_observed_data_std_dev(1.0); - solver->setSensitivityOrder(amici::SensitivityOrder::first); - solver->setSensitivityMethod(amici::SensitivityMethod::forward); - auto rdata2 = runAmiciSimulation(*solver, &edata, *model); + solver->set_sensitivity_order(amici::SensitivityOrder::first); + solver->set_sensitivity_method(amici::SensitivityMethod::forward); + auto rdata2 = run_simulation(*solver, &edata, *model); auto llh2 = rdata2->llh; ASSERT_NEAR(2.0 * llh1, llh2, 1e-6); // adjoint + replicates - solver->setSensitivityMethod(amici::SensitivityMethod::adjoint); - auto rdata3 = runAmiciSimulation(*solver, &edata, *model); + solver->set_sensitivity_method(amici::SensitivityMethod::adjoint); + auto rdata3 = run_simulation(*solver, &edata, *model); auto llh3 = rdata3->llh; ASSERT_NEAR(llh2, llh3, 1e-6); } diff --git a/tests/cpp/steadystate/tests1.cpp b/tests/cpp/steadystate/tests1.cpp index 59739a7112..92d56b1d28 100644 --- a/tests/cpp/steadystate/tests1.cpp +++ b/tests/cpp/steadystate/tests1.cpp @@ -16,26 +16,26 @@ TEST(ExampleSteadystate, ModelFromHDF5) std::vector pExp{ 1, 0.5, 0.4, 2, 0.1 }; std::vector kExp{ 0.1, 0.4, 0.7, 1.0 }; - auto model = amici::generic_model::getModel(); - amici::hdf5::readModelDataFromHDF5( + auto model = amici::generic_model::get_model(); + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_steadystate/nosensi/options"); amici::checkEqualArray( - kExp, model->getFixedParameters(), TEST_ATOL, TEST_RTOL, "k"); + kExp, model->get_fixed_parameters(), TEST_ATOL, TEST_RTOL, "k"); ASSERT_EQ(51, model->nt()); - ASSERT_EQ(0.0, model->getTimepoint(0)); - ASSERT_EQ(100.0, model->getTimepoint(model->nt() - 2)); - ASSERT_EQ(INFINITY, model->getTimepoint(model->nt() - 1)); + ASSERT_EQ(0.0, model->get_timepoint(0)); + ASSERT_EQ(100.0, model->get_timepoint(model->nt() - 2)); + ASSERT_EQ(INFINITY, model->get_timepoint(model->nt() - 1)); for (int i = 0; i < model->np(); ++i) { - ASSERT_EQ(pExp[i], model->getUnscaledParameters()[i]); - ASSERT_EQ(log10(pExp[i]), model->getParameters()[i]); + ASSERT_EQ(pExp[i], model->get_unscaled_parameters()[i]); + ASSERT_EQ(log10(pExp[i]), model->get_parameters()[i]); } } TEST(ExampleSteadystate, Inequality) { - auto modelA = amici::generic_model::getModel(); + auto modelA = amici::generic_model::get_model(); auto modelB = std::make_unique(); ASSERT_FALSE(*modelA == *modelB); @@ -43,7 +43,7 @@ TEST(ExampleSteadystate, Inequality) TEST(ExampleSteadystate, CopyModel) { - auto modelA = amici::generic_model::getModel(); + auto modelA = amici::generic_model::get_model(); auto modelB = std::unique_ptr(modelA->clone()); ASSERT_EQ(*modelA, *modelB); @@ -51,7 +51,7 @@ TEST(ExampleSteadystate, CopyModel) TEST(ExampleSteadystate, CloneModel) { - auto modelA = amici::generic_model::getModel(); + auto modelA = amici::generic_model::get_model(); auto modelB = std::make_unique< amici::model_model_steadystate_py::Model_model_steadystate_py>(); @@ -60,91 +60,91 @@ TEST(ExampleSteadystate, CloneModel) TEST(ExampleSteadystate, ExpDataFromReturnData) { - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); - amici::hdf5::readModelDataFromHDF5( + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_steadystate/nosensi/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_steadystate/nosensi/options"); - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); auto edata = amici::ExpData(*rdata, 0.1, 0.1); - runAmiciSimulation(*solver, &edata, *model); + run_simulation(*solver, &edata, *model); } TEST(ExampleSteadystate, ReuseSolver) { - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); - amici::hdf5::readModelDataFromHDF5( + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_steadystate/nosensi/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_steadystate/nosensi/options"); - runAmiciSimulation(*solver, nullptr, *model); - runAmiciSimulation(*solver, nullptr, *model); + run_simulation(*solver, nullptr, *model); + run_simulation(*solver, nullptr, *model); } TEST(ExampleSteadystate, Rethrow) { - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); - amici::hdf5::readModelDataFromHDF5( + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_steadystate/nosensi/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_steadystate/nosensi/options"); // p = NaN will raise amici::IntegrationFailure - auto p = model->getParameters(); + auto p = model->get_parameters(); std::fill(p.begin(), p.end(), std::nan("")); - model->setParameters(p); + model->set_parameters(p); // must not throw - runAmiciSimulation(*solver, nullptr, *model); + run_simulation(*solver, nullptr, *model); // must throw - ASSERT_THROW(runAmiciSimulation(*solver, nullptr, *model, true), + ASSERT_THROW(run_simulation(*solver, nullptr, *model, true), amici::IntegrationFailure); } TEST(ExampleSteadystate, Maxtime) { - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); - amici::hdf5::readModelDataFromHDF5( + amici::hdf5::read_model_data_from_hdf5( NEW_OPTION_FILE, *model, "/model_steadystate/nosensi/options"); - amici::hdf5::readSolverSettingsFromHDF5( + amici::hdf5::read_solver_settings_from_hdf5( NEW_OPTION_FILE, *solver, "/model_steadystate/nosensi/options"); // Ensure the solver needs sufficiently many steps that time is checked // at least once during integration - solver->setRelativeTolerance(1e-14); + solver->set_relative_tolerance(1e-14); - auto rdata = runAmiciSimulation(*solver, nullptr, *model); + auto rdata = run_simulation(*solver, nullptr, *model); ASSERT_EQ(amici::AMICI_SUCCESS, rdata->status); - solver->setMaxTime(0.000001); + solver->set_max_time(0.000001); // must throw - rdata = runAmiciSimulation(*solver, nullptr, *model); + rdata = run_simulation(*solver, nullptr, *model); ASSERT_EQ(amici::AMICI_MAX_TIME_EXCEEDED, rdata->status); } TEST(ExampleSteadystate, InitialStatesNonEmpty) { - auto model = amici::generic_model::getModel(); - ASSERT_FALSE(model->getInitialStates().empty()); + auto model = amici::generic_model::get_model(); + ASSERT_FALSE(model->get_initial_state().empty()); } TEST(ExampleSteadystate, InitialStateSensitivitiesNonEmpty) { - auto model = amici::generic_model::getModel(); - ASSERT_FALSE(model->getInitialStateSensitivities().empty()); + auto model = amici::generic_model::get_model(); + ASSERT_FALSE(model->get_initial_state_sensitivities().empty()); } TEST(ExampleSteadystate, Simulation) diff --git a/tests/cpp/testfunctions.cpp b/tests/cpp/testfunctions.cpp index 220f89f56b..86a41aedc5 100644 --- a/tests/cpp/testfunctions.cpp +++ b/tests/cpp/testfunctions.cpp @@ -16,7 +16,7 @@ namespace amici { namespace generic_model { -extern std::unique_ptr getModel(); +extern std::unique_ptr get_model(); } // namespace generic_model @@ -41,10 +41,10 @@ void simulateVerifyWrite(const std::string &path, double atol, double rtol) void simulateWithDefaultOptions() { using namespace amici; - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); std::unique_ptr edata; - auto rdata = runAmiciSimulation(*solver, edata.get(), *model); + auto rdata = run_simulation(*solver, edata.get(), *model); } void simulateVerifyWrite(const std::string& hdffileOptions, const std::string& hdffileResults, const std::string& hdffilewrite, const std::string& path, double atol, double rtol) @@ -52,38 +52,38 @@ void simulateVerifyWrite(const std::string& hdffileOptions, const std::string& h using namespace amici; // read options from file std::string optionsPath = path + "/options"; - auto model = amici::generic_model::getModel(); - auto solver = model->getSolver(); - hdf5::readModelDataFromHDF5(hdffileOptions, *model, optionsPath); - hdf5::readSolverSettingsFromHDF5(hdffileOptions, *solver, optionsPath); + auto model = amici::generic_model::get_model(); + auto solver = model->create_solver(); + hdf5::read_model_data_from_hdf5(hdffileOptions, *model, optionsPath); + hdf5::read_solver_settings_from_hdf5(hdffileOptions, *solver, optionsPath); // read measurements from file std::string measurementPath = path + "/data"; std::unique_ptr edata; - if(hdf5::locationExists(hdffileOptions, measurementPath)) - edata = hdf5::readSimulationExpData(hdffileOptions, measurementPath, *model); + if(hdf5::location_exists(hdffileOptions, measurementPath)) + edata = hdf5::read_exp_data_from_hdf5(hdffileOptions, measurementPath, *model); // simulate & verify - auto rdata = runAmiciSimulation(*solver, edata.get(), *model); + auto rdata = run_simulation(*solver, edata.get(), *model); // perform second simulation to check reuse of solver and model object - auto rdata_resimulation = runAmiciSimulation(*solver, edata.get(), *model); + auto rdata_resimulation = run_simulation(*solver, edata.get(), *model); std::string resultPath = path + "/results"; // write // delete destination group H5::H5File in(hdffileOptions.c_str(), H5F_ACC_RDONLY); - auto out = amici::hdf5::createOrOpenForWriting(hdffilewrite); - if(hdf5::locationExists(out, path)) + auto out = amici::hdf5::create_or_open_for_writing(hdffilewrite); + if(hdf5::location_exists(out, path)) H5Ldelete(out.getId(), path.c_str(), H5P_DEFAULT); - hdf5::createGroup(out, path); + hdf5::create_group(out, path); std::string writePath = path + "/options"; H5Ocopy(in.getId(), writePath.c_str(), out.getId(), writePath.c_str(), H5P_DEFAULT, H5P_DEFAULT); writePath = path + "/data"; if(edata) - hdf5::writeSimulationExpData(*edata, out, writePath); + hdf5::write_exp_data_to_hdf5(*edata, out, writePath); writePath = path + "/results"; - hdf5::writeReturnData(*rdata, out, writePath); + hdf5::write_return_data_to_hdf5(*rdata, out, writePath); // verify simulated results verifyReturnData(hdffileResults, resultPath, rdata.get(), model.get(), atol, rtol); @@ -168,7 +168,7 @@ void verifyReturnData(std::string const& hdffile, std::string const& resultPath, ASSERT_FALSE(rdata == nullptr); - if(!hdf5::locationExists(hdffile, resultPath)) { + if(!hdf5::location_exists(hdffile, resultPath)) { fprintf(stderr, "ERROR: No results available for %s!\n", resultPath.c_str()); return; @@ -181,7 +181,7 @@ void verifyReturnData(std::string const& hdffile, std::string const& resultPath, std::vector expected; - auto statusExp = hdf5::getIntScalarAttribute(file, resultPath, "status"); + auto statusExp = hdf5::get_int_scalar_attribute(file, resultPath, "status"); if(rdata->status != statusExp && !rdata->messages.empty()) { std::cerr<<"Messages:"<messages) { @@ -190,14 +190,14 @@ void verifyReturnData(std::string const& hdffile, std::string const& resultPath, } ASSERT_EQ(statusExp, rdata->status); - double llhExp = hdf5::getDoubleScalarAttribute(file, resultPath, "llh"); + double llhExp = hdf5::get_double_scalar_attribute(file, resultPath, "llh"); ASSERT_TRUE(withinTolerance(llhExp, rdata->llh, atol, rtol, 1, "llh")); - double chi2Exp = hdf5::getDoubleScalarAttribute(file, resultPath, "chi2"); + double chi2Exp = hdf5::get_double_scalar_attribute(file, resultPath, "chi2"); ASSERT_TRUE(withinTolerance(chi2Exp, rdata->chi2, atol, rtol, 1, "chi2")); - if(hdf5::locationExists(file, resultPath + "/x")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/x", m, n); + if(hdf5::location_exists(file, resultPath + "/x")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/x", m, n); checkEqualArray(expected, rdata->x, atol, rtol, "x"); } else { ASSERT_TRUE(rdata->x.empty()); @@ -205,52 +205,52 @@ void verifyReturnData(std::string const& hdffile, std::string const& resultPath, // CHECK_EQUAL(AMICI_O2MODE_FULL, udata->o2mode); - if(hdf5::locationExists(file, resultPath + "/y")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/y", m, n); + if(hdf5::location_exists(file, resultPath + "/y")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/y", m, n); checkEqualArray(expected, rdata->y, atol, rtol, "y"); } else { ASSERT_TRUE(rdata->y.empty()); } - if(hdf5::locationExists(file, resultPath + "/res")) { - expected = hdf5::getDoubleDataset1D(file, resultPath + "/res"); + if(hdf5::location_exists(file, resultPath + "/res")) { + expected = hdf5::get_double_1d_dataset(file, resultPath + "/res"); checkEqualArray(expected, rdata->res, atol, rtol, "res"); } else { ASSERT_TRUE(rdata->res.empty()); } - if(hdf5::locationExists(file, resultPath + "/z")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/z", m, n); + if(hdf5::location_exists(file, resultPath + "/z")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/z", m, n); checkEqualArray(expected, rdata->z, atol, rtol, "z"); } else { ASSERT_TRUE(rdata->z.empty()); } - if(hdf5::locationExists(file, resultPath + "/rz")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/rz", m, n); + if(hdf5::location_exists(file, resultPath + "/rz")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/rz", m, n); checkEqualArray(expected, rdata->rz, atol, rtol, "rz"); } else { ASSERT_TRUE(rdata->rz.empty()); } - if(hdf5::locationExists(file, resultPath + "/sigmaz")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/sigmaz", m, n); + if(hdf5::location_exists(file, resultPath + "/sigmaz")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/sigmaz", m, n); checkEqualArray(expected, rdata->sigmaz, atol, rtol, "sigmaz"); } else { ASSERT_TRUE(rdata->sigmaz.empty()); } - expected = hdf5::getDoubleDataset1D(file, resultPath + "/x0"); + expected = hdf5::get_double_1d_dataset(file, resultPath + "/x0"); checkEqualArray(expected, rdata->x0, atol, rtol, "x0"); if(rdata->status == AMICI_SUCCESS) { // for the failed cases, the stored results don't match // since https://github.com/AMICI-dev/AMICI/pull/2349 - expected = hdf5::getDoubleDataset1D(file, resultPath + "/diagnosis/xdot"); + expected = hdf5::get_double_1d_dataset(file, resultPath + "/diagnosis/xdot"); checkEqualArray(expected, rdata->xdot, atol, rtol, "xdot"); - if(hdf5::locationExists(file, resultPath + "/diagnosis/J")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/diagnosis/J", m, n); + if(hdf5::location_exists(file, resultPath + "/diagnosis/J")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/diagnosis/J", m, n); checkEqualArray(expected, rdata->J, atol, rtol, "J"); } else { ASSERT_TRUE(rdata->J.empty()); @@ -268,8 +268,8 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re const ReturnData *rdata, const Model *model, double atol, double rtol) { hsize_t m, n, o; std::vector expected; - if(hdf5::locationExists(file, resultPath + "/sllh")) { - expected = hdf5::getDoubleDataset1D(file, resultPath + "/sllh"); + if(hdf5::location_exists(file, resultPath + "/sllh")) { + expected = hdf5::get_double_1d_dataset(file, resultPath + "/sllh"); checkEqualArray(expected, rdata->sllh, atol, rtol, "sllh"); } else { ASSERT_TRUE(rdata->sllh.empty()); @@ -277,22 +277,22 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re if(rdata->sensi_meth == SensitivityMethod::forward) { - if(hdf5::locationExists(file, resultPath + "/sx0")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/sx0", m, n); + if(hdf5::location_exists(file, resultPath + "/sx0")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/sx0", m, n); checkEqualArray(expected, rdata->sx0, atol, rtol, "sx0"); } else { ASSERT_TRUE(rdata->sx0.empty()); } - if(hdf5::locationExists(file, resultPath + "/sres")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/sres", m, n); + if(hdf5::location_exists(file, resultPath + "/sres")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/sres", m, n); checkEqualArray(expected, rdata->sres, atol, rtol, "sres"); } else { ASSERT_TRUE(rdata->sres.empty()); } - if(hdf5::locationExists(file, resultPath + "/FIM")) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/FIM", m, n); + if(hdf5::location_exists(file, resultPath + "/FIM")) { + expected = hdf5::get_double_2d_dataset(file, resultPath + "/FIM", m, n); checkEqualArray(expected, rdata->FIM, atol, rtol, "FIM"); } else { ASSERT_TRUE(rdata->FIM.empty()); @@ -303,8 +303,8 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re if(rdata->sensi < SensitivityOrder::second) { /* /TODO REMOVE ASAP */ - if(hdf5::locationExists(file, resultPath + "/sx")) { - expected = hdf5::getDoubleDataset3D(file, resultPath + "/sx", m, n, o); + if(hdf5::location_exists(file, resultPath + "/sx")) { + expected = hdf5::get_double_3d_dataset(file, resultPath + "/sx", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) checkEqualArray(&expected[ip * model->nt() * model->nxtrue_rdata], &rdata->sx[ip * model->nt() * rdata->nx_rdata], @@ -313,8 +313,8 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re ASSERT_TRUE(rdata->sx.empty()); } - if(hdf5::locationExists(file, resultPath + "/sy")) { - expected = hdf5::getDoubleDataset3D(file, resultPath + "/sy", m, n, o); + if(hdf5::location_exists(file, resultPath + "/sy")) { + expected = hdf5::get_double_3d_dataset(file, resultPath + "/sy", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) checkEqualArray(&expected[ip * model->nt() * model->nytrue], &rdata->sy[ip * model->nt() * model->ny], @@ -325,33 +325,33 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re if(model->nz>0) { - expected = hdf5::getDoubleDataset3D(file, resultPath + "/sz", m, n, o); + expected = hdf5::get_double_3d_dataset(file, resultPath + "/sz", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) - checkEqualArray(&expected[ip * model->nMaxEvent() * model->nztrue], - &rdata->sz[ip * model->nMaxEvent() * model->nz], - model->nMaxEvent() * model->nztrue, atol, rtol, "sz"); + checkEqualArray(&expected[ip * model->n_max_event() * model->nztrue], + &rdata->sz[ip * model->n_max_event() * model->nz], + model->n_max_event() * model->nztrue, atol, rtol, "sz"); - expected = hdf5::getDoubleDataset3D(file, resultPath + "/srz", m, n, o); + expected = hdf5::get_double_3d_dataset(file, resultPath + "/srz", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) - checkEqualArray(&expected[ip * model->nMaxEvent() * model->nztrue], - &rdata->srz[ip * model->nMaxEvent() * model->nz], - model->nMaxEvent() * model->nztrue, atol, rtol, "srz"); + checkEqualArray(&expected[ip * model->n_max_event() * model->nztrue], + &rdata->srz[ip * model->n_max_event() * model->nz], + model->n_max_event() * model->nztrue, atol, rtol, "srz"); } - if(hdf5::locationExists(file, resultPath + "/ssigmay") || !rdata->ssigmay.empty()) { - expected = hdf5::getDoubleDataset3D(file, resultPath + "/ssigmay", m, n, o); + if(hdf5::location_exists(file, resultPath + "/ssigmay") || !rdata->ssigmay.empty()) { + expected = hdf5::get_double_3d_dataset(file, resultPath + "/ssigmay", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) checkEqualArray(&expected[ip * model->nt() * model->nytrue], &rdata->ssigmay[ip * model->nt() * model->ny], model->nt() * model->nytrue, atol, rtol, "ssigmay"); } - if(hdf5::locationExists(file, resultPath + "/ssigmaz") || !rdata->ssigmaz.empty()) { + if(hdf5::location_exists(file, resultPath + "/ssigmaz") || !rdata->ssigmaz.empty()) { if(model->nz>0) { - expected = hdf5::getDoubleDataset3D(file, resultPath + "/ssigmaz", m, n, o); + expected = hdf5::get_double_3d_dataset(file, resultPath + "/ssigmaz", m, n, o); for(int ip = 0; ip < model->nplist(); ++ip) - checkEqualArray(&expected[ip * model->nMaxEvent() * model->nztrue], - &rdata->ssigmaz[ip * model->nMaxEvent() * model->nz], - model->nMaxEvent() * model->nztrue, atol, rtol, "ssigmaz"); + checkEqualArray(&expected[ip * model->n_max_event() * model->nztrue], + &rdata->ssigmaz[ip * model->n_max_event() * model->nz], + model->n_max_event() * model->nztrue, atol, rtol, "ssigmaz"); } } /* TODO REMOVE ASAP */ @@ -361,7 +361,7 @@ void verifyReturnDataSensitivities(H5::H5File const& file, std::string const& re } if(rdata->sensi >= SensitivityOrder::second) { - expected = hdf5::getDoubleDataset2D(file, resultPath + "/s2llh", m, n); + expected = hdf5::get_double_2d_dataset(file, resultPath + "/s2llh", m, n); checkEqualArray(expected, rdata->s2llh, atol, rtol, "s2llh"); } else { ASSERT_EQ(0, rdata->s2llh.size()); diff --git a/tests/cpp/testfunctions.h b/tests/cpp/testfunctions.h index fa369fc496..ece3249d0f 100644 --- a/tests/cpp/testfunctions.h +++ b/tests/cpp/testfunctions.h @@ -62,7 +62,7 @@ class Model_Test : public Model { Model* clone() const override { return new Model_Test(*this); } - std::unique_ptr getSolver() override { + std::unique_ptr create_solver() override { throw AmiException("not implemented"); } void froot( @@ -147,35 +147,35 @@ class Model_Test : public Model { throw AmiException("not implemented"); } - std::vector getParameterNames() const override { + std::vector get_parameter_names() const override { return getVariableNames("p", np()); } - std::vector getStateNames() const override { + std::vector get_state_names() const override { return getVariableNames("x", nx_rdata); } - std::vector getFixedParameterNames() const override { + std::vector get_fixed_parameter_names() const override { return getVariableNames("k", nk()); } - std::vector getObservableNames() const override { + std::vector get_observable_names() const override { return getVariableNames("y", ny); } - std::vector getParameterIds() const override { + std::vector get_parameter_ids() const override { return getVariableNames("p", np()); } - std::vector getStateIds() const override { + std::vector get_state_ids() const override { return getVariableNames("x", nx_rdata); } - std::vector getFixedParameterIds() const override { + std::vector get_fixed_parameter_ids() const override { return getVariableNames("k", nk()); } - std::vector getObservableIds() const override { + std::vector get_observable_ids() const override { return getVariableNames("y", ny); } }; diff --git a/tests/cpp/unittests/testExpData.cpp b/tests/cpp/unittests/testExpData.cpp index 373214c9c3..5f484662e4 100644 --- a/tests/cpp/unittests/testExpData.cpp +++ b/tests/cpp/unittests/testExpData.cpp @@ -12,7 +12,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel(); +std::unique_ptr get_model(); } // namespace generic_model } // namespace amici @@ -23,16 +23,16 @@ namespace { class ExpDataTest : public ::testing::Test { protected: void SetUp() override { - model->setTimepoints(timepoints); - model->setNMaxEvent(nmaxevent); - testModel.setTimepoints(timepoints); - testModel.setNMaxEvent(nmaxevent); + model->set_timepoints(timepoints); + model->set_n_max_event(nmaxevent); + testModel.set_timepoints(timepoints); + testModel.set_n_max_event(nmaxevent); } int nx = 1, ny = 2, nz = 3, nmaxevent = 4; std::vector timepoints = {1, 2, 3, 4}; - std::unique_ptr model = generic_model::getModel(); + std::unique_ptr model = generic_model::get_model(); Model_Test testModel = Model_Test( ModelDimensions{ @@ -85,20 +85,22 @@ TEST_F(ExpDataTest, DefaultConstructable) { ASSERT_EQ(edata.nmaxevent(), 0); } TEST_F(ExpDataTest, ModelCtor) { - ExpData edata(model->nytrue, model->nztrue, model->nMaxEvent()); + ExpData edata(model->nytrue, model->nztrue, model->n_max_event()); ASSERT_EQ(edata.nytrue(), model->nytrue); ASSERT_EQ(edata.nztrue(), model->nztrue); - ASSERT_EQ(edata.nmaxevent(), model->nMaxEvent()); + ASSERT_EQ(edata.nmaxevent(), model->n_max_event()); } TEST_F(ExpDataTest, DimensionCtor) { - ExpData edata(model->nytrue, model->nztrue, model->nMaxEvent(), timepoints); + ExpData edata( + model->nytrue, model->nztrue, model->n_max_event(), timepoints + ); ASSERT_EQ(edata.nytrue(), model->nytrue); ASSERT_EQ(edata.nztrue(), model->nztrue); - ASSERT_EQ(edata.nmaxevent(), model->nMaxEvent()); + ASSERT_EQ(edata.nmaxevent(), model->n_max_event()); ASSERT_EQ(edata.nt(), model->nt()); checkEqualArray( - timepoints, edata.getTimepoints(), TEST_ATOL, TEST_RTOL, "ts" + timepoints, edata.get_timepoints(), TEST_ATOL, TEST_RTOL, "ts" ); } @@ -109,28 +111,28 @@ TEST_F(ExpDataTest, MeasurementCtor) { std::vector z_std(nz * nmaxevent, 0.1); ExpData edata( - testModel.nytrue, testModel.nztrue, testModel.nMaxEvent(), timepoints, + testModel.nytrue, testModel.nztrue, testModel.n_max_event(), timepoints, y, y_std, z, z_std ); ASSERT_EQ(edata.nytrue(), testModel.nytrue); ASSERT_EQ(edata.nztrue(), testModel.nztrue); - ASSERT_EQ(edata.nmaxevent(), testModel.nMaxEvent()); + ASSERT_EQ(edata.nmaxevent(), testModel.n_max_event()); ASSERT_EQ(edata.nt(), testModel.nt()); checkEqualArray( - timepoints, edata.getTimepoints(), TEST_ATOL, TEST_RTOL, "ts" + timepoints, edata.get_timepoints(), TEST_ATOL, TEST_RTOL, "ts" ); checkEqualArray( - y, edata.getObservedData(), TEST_ATOL, TEST_RTOL, "observedData" + y, edata.get_observed_data(), TEST_ATOL, TEST_RTOL, "observedData" ); checkEqualArray( - y_std, edata.getObservedDataStdDev(), TEST_ATOL, TEST_RTOL, + y_std, edata.get_observed_data_std_dev(), TEST_ATOL, TEST_RTOL, "observedDataStdDev" ); checkEqualArray( - z, edata.getObservedEvents(), TEST_ATOL, TEST_RTOL, "observedEvents" + z, edata.get_observed_events(), TEST_ATOL, TEST_RTOL, "observedEvents" ); checkEqualArray( - z_std, edata.getObservedEventsStdDev(), TEST_ATOL, TEST_RTOL, + z_std, edata.get_observed_events_std_dev(), TEST_ATOL, TEST_RTOL, "observedEventsStdDev" ); @@ -140,37 +142,39 @@ TEST_F(ExpDataTest, MeasurementCtor) { ASSERT_EQ(edata.nmaxevent(), edata_copy.nmaxevent()); ASSERT_EQ(edata.nt(), edata_copy.nt()); checkEqualArray( - edata_copy.getTimepoints(), edata.getTimepoints(), TEST_ATOL, TEST_RTOL, - "ts" + edata_copy.get_timepoints(), edata.get_timepoints(), TEST_ATOL, + TEST_RTOL, "ts" ); checkEqualArray( - edata_copy.getObservedData(), edata.getObservedData(), TEST_ATOL, + edata_copy.get_observed_data(), edata.get_observed_data(), TEST_ATOL, TEST_RTOL, "observedData" ); checkEqualArray( - edata_copy.getObservedDataStdDev(), edata.getObservedDataStdDev(), - TEST_ATOL, TEST_RTOL, "observedDataStdDev" + edata_copy.get_observed_data_std_dev(), + edata.get_observed_data_std_dev(), TEST_ATOL, TEST_RTOL, + "observedDataStdDev" ); checkEqualArray( - edata_copy.getObservedEvents(), edata.getObservedEvents(), TEST_ATOL, - TEST_RTOL, "observedEvents" + edata_copy.get_observed_events(), edata.get_observed_events(), + TEST_ATOL, TEST_RTOL, "observedEvents" ); checkEqualArray( - edata_copy.getObservedEventsStdDev(), edata.getObservedEventsStdDev(), - TEST_ATOL, TEST_RTOL, "observedEventsStdDev" + edata_copy.get_observed_events_std_dev(), + edata.get_observed_events_std_dev(), TEST_ATOL, TEST_RTOL, + "observedEventsStdDev" ); } TEST_F(ExpDataTest, CopyConstructable) { - testModel.setTimepoints(timepoints); + testModel.set_timepoints(timepoints); auto edata = ExpData(testModel); ASSERT_EQ(edata.nytrue(), testModel.nytrue); ASSERT_EQ(edata.nztrue(), testModel.nztrue); - ASSERT_EQ(edata.nmaxevent(), testModel.nMaxEvent()); + ASSERT_EQ(edata.nmaxevent(), testModel.n_max_event()); ASSERT_EQ(edata.nt(), testModel.nt()); checkEqualArray( - testModel.getTimepoints(), edata.getTimepoints(), TEST_ATOL, TEST_RTOL, - "ts" + testModel.get_timepoints(), edata.get_timepoints(), TEST_ATOL, + TEST_RTOL, "ts" ); } @@ -192,7 +196,7 @@ TEST_F(ExpDataTest, DimensionChecks) { ASSERT_THROW( ExpData( - testModel.nytrue, testModel.nztrue, testModel.nMaxEvent(), + testModel.nytrue, testModel.nztrue, testModel.n_max_event(), timepoints, z, z_std, z, z_std ), AmiException @@ -200,7 +204,7 @@ TEST_F(ExpDataTest, DimensionChecks) { ASSERT_THROW( ExpData( - testModel.nytrue, testModel.nztrue, testModel.nMaxEvent(), + testModel.nytrue, testModel.nztrue, testModel.n_max_event(), timepoints, z, bad_std, z, z_std ), AmiException @@ -213,27 +217,27 @@ TEST_F(ExpDataTest, DimensionChecks) { std::vector bad_z(nz * nmaxevent + 1, 0.0); std::vector bad_z_std(nz * nmaxevent + 1, 0.1); - ASSERT_THROW(edata.setObservedData(bad_y), AmiException); - ASSERT_THROW(edata.setObservedDataStdDev(bad_y_std), AmiException); - ASSERT_THROW(edata.setObservedEvents(bad_z), AmiException); - ASSERT_THROW(edata.setObservedEventsStdDev(bad_y_std), AmiException); + ASSERT_THROW(edata.set_observed_data(bad_y), AmiException); + ASSERT_THROW(edata.set_observed_data_std_dev(bad_y_std), AmiException); + ASSERT_THROW(edata.set_observed_events(bad_z), AmiException); + ASSERT_THROW(edata.set_observed_events_std_dev(bad_y_std), AmiException); std::vector bad_single_y(edata.nt() + 1, 0.0); std::vector bad_single_y_std(edata.nt() + 1, 0.1); std::vector bad_single_z(edata.nmaxevent() + 1, 0.0); std::vector bad_single_z_std(edata.nmaxevent() + 1, 0.1); - ASSERT_THROW(edata.setObservedData(bad_single_y, 0), AmiException); + ASSERT_THROW(edata.set_observed_data(bad_single_y, 0), AmiException); ASSERT_THROW( - edata.setObservedDataStdDev(bad_single_y_std, 0), AmiException + edata.set_observed_data_std_dev(bad_single_y_std, 0), AmiException ); - ASSERT_THROW(edata.setObservedEvents(bad_single_z, 0), AmiException); + ASSERT_THROW(edata.set_observed_events(bad_single_z, 0), AmiException); ASSERT_THROW( - edata.setObservedEventsStdDev(bad_single_y_std, 0), AmiException + edata.set_observed_events_std_dev(bad_single_y_std, 0), AmiException ); ASSERT_THROW( - edata.setTimepoints(std::vector{0.0, 1.0, 0.5}), AmiException + edata.set_timepoints(std::vector{0.0, 1.0, 0.5}), AmiException ); } @@ -245,22 +249,22 @@ TEST_F(ExpDataTest, SettersGetters) { std::vector z(nz * nmaxevent, 0.0); std::vector z_std(nz * nmaxevent, 0.1); - edata.setObservedData(y); + edata.set_observed_data(y); checkEqualArray( - edata.getObservedData(), y, TEST_ATOL, TEST_RTOL, "ObservedData" + edata.get_observed_data(), y, TEST_ATOL, TEST_RTOL, "ObservedData" ); - edata.setObservedDataStdDev(y_std); + edata.set_observed_data_std_dev(y_std); checkEqualArray( - edata.getObservedDataStdDev(), y_std, TEST_ATOL, TEST_RTOL, + edata.get_observed_data_std_dev(), y_std, TEST_ATOL, TEST_RTOL, "ObservedDataStdDev" ); - edata.setObservedEvents(z); + edata.set_observed_events(z); checkEqualArray( - edata.getObservedEvents(), z, TEST_ATOL, TEST_RTOL, "ObservedEvents" + edata.get_observed_events(), z, TEST_ATOL, TEST_RTOL, "ObservedEvents" ); - edata.setObservedEventsStdDev(z_std); + edata.set_observed_events_std_dev(z_std); checkEqualArray( - edata.getObservedEventsStdDev(), z_std, TEST_ATOL, TEST_RTOL, + edata.get_observed_events_std_dev(), z_std, TEST_ATOL, TEST_RTOL, "ObservedEventsStdDev" ); @@ -268,60 +272,65 @@ TEST_F(ExpDataTest, SettersGetters) { std::vector single_y_std(edata.nt(), 0.1); for (int iy = 0; iy < ny; ++iy) { - edata.setObservedData(single_y, iy); - edata.setObservedDataStdDev(single_y_std, iy); + edata.set_observed_data(single_y, iy); + edata.set_observed_data_std_dev(single_y_std, iy); } - ASSERT_THROW(edata.setObservedData(single_y, ny), std::exception); - ASSERT_THROW(edata.setObservedData(single_y, -1), std::exception); - ASSERT_THROW(edata.setObservedDataStdDev(single_y_std, ny), std::exception); - ASSERT_THROW(edata.setObservedDataStdDev(single_y_std, -1), std::exception); + ASSERT_THROW(edata.set_observed_data(single_y, ny), std::exception); + ASSERT_THROW(edata.set_observed_data(single_y, -1), std::exception); + ASSERT_THROW( + edata.set_observed_data_std_dev(single_y_std, ny), std::exception + ); + ASSERT_THROW( + edata.set_observed_data_std_dev(single_y_std, -1), std::exception + ); std::vector single_z(edata.nmaxevent(), 0.0); std::vector single_z_std(edata.nmaxevent(), 0.1); for (int iz = 0; iz < nz; ++iz) { - edata.setObservedEvents(single_z, iz); - edata.setObservedEventsStdDev(single_z_std, iz); + edata.set_observed_events(single_z, iz); + edata.set_observed_events_std_dev(single_z_std, iz); } - ASSERT_THROW(edata.setObservedEvents(single_z, nz), std::exception); - ASSERT_THROW(edata.setObservedEvents(single_z, -1), std::exception); + ASSERT_THROW(edata.set_observed_events(single_z, nz), std::exception); + ASSERT_THROW(edata.set_observed_events(single_z, -1), std::exception); ASSERT_THROW( - edata.setObservedEventsStdDev(single_z_std, nz), std::exception + edata.set_observed_events_std_dev(single_z_std, nz), std::exception ); ASSERT_THROW( - edata.setObservedEventsStdDev(single_z_std, -1), std::exception + edata.set_observed_events_std_dev(single_z_std, -1), std::exception ); - ASSERT_TRUE(edata.getObservedDataPtr(0)); - ASSERT_TRUE(edata.getObservedDataStdDevPtr(0)); - ASSERT_TRUE(edata.getObservedEventsPtr(0)); - ASSERT_TRUE(edata.getObservedEventsStdDevPtr(0)); + ASSERT_TRUE(edata.get_observed_data_ptr(0)); + ASSERT_TRUE(edata.get_observed_data_std_dev_ptr(0)); + ASSERT_TRUE(edata.get_observed_events_ptr(0)); + ASSERT_TRUE(edata.get_observed_events_std_dev_ptr(0)); std::vector empty(0, 0.0); - edata.setObservedData(empty); - edata.setObservedDataStdDev(empty); - edata.setObservedEvents(empty); - edata.setObservedEventsStdDev(empty); + edata.set_observed_data(empty); + edata.set_observed_data_std_dev(empty); + edata.set_observed_events(empty); + edata.set_observed_events_std_dev(empty); - ASSERT_TRUE(!edata.getObservedDataPtr(0)); - ASSERT_TRUE(!edata.getObservedDataStdDevPtr(0)); - ASSERT_TRUE(!edata.getObservedEventsPtr(0)); - ASSERT_TRUE(!edata.getObservedEventsStdDevPtr(0)); + ASSERT_TRUE(!edata.get_observed_data_ptr(0)); + ASSERT_TRUE(!edata.get_observed_data_std_dev_ptr(0)); + ASSERT_TRUE(!edata.get_observed_events_ptr(0)); + ASSERT_TRUE(!edata.get_observed_events_std_dev_ptr(0)); checkEqualArray( - edata.getObservedData(), empty, TEST_ATOL, TEST_RTOL, "ObservedData" + edata.get_observed_data(), empty, TEST_ATOL, TEST_RTOL, "ObservedData" ); checkEqualArray( - edata.getObservedDataStdDev(), empty, TEST_ATOL, TEST_RTOL, + edata.get_observed_data_std_dev(), empty, TEST_ATOL, TEST_RTOL, "ObservedDataStdDev" ); checkEqualArray( - edata.getObservedEvents(), empty, TEST_ATOL, TEST_RTOL, "ObservedEvents" + edata.get_observed_events(), empty, TEST_ATOL, TEST_RTOL, + "ObservedEvents" ); checkEqualArray( - edata.getObservedEventsStdDev(), empty, TEST_ATOL, TEST_RTOL, + edata.get_observed_events_std_dev(), empty, TEST_ATOL, TEST_RTOL, "ObservedEventsStdDev" ); } @@ -329,21 +338,21 @@ TEST_F(ExpDataTest, SettersGetters) { TEST_F(ExpDataTest, RngSeed) { ReturnData rdata(CVodeSolver(), testModel); rdata.y.assign(testModel.ny * testModel.nt(), 1.0); - rdata.z.assign(testModel.nz * testModel.nMaxEvent(), 1.0); + rdata.z.assign(testModel.nz * testModel.n_max_event(), 1.0); // random RNG seed ExpData edata1(rdata, 1, 1, -1); - ASSERT_TRUE(edata1.getObservedData() != rdata.y); + ASSERT_TRUE(edata1.get_observed_data() != rdata.y); // fixed RNG seed ExpData edata2(rdata, 1, 1, 1); - ASSERT_TRUE(edata2.getObservedData() != rdata.y); - ASSERT_TRUE(edata2.getObservedData() != edata1.getObservedData()); + ASSERT_TRUE(edata2.get_observed_data() != rdata.y); + ASSERT_TRUE(edata2.get_observed_data() != edata1.get_observed_data()); ExpData edata3(rdata, 1, 1, 1); - ASSERT_TRUE(edata3.getObservedData() == edata2.getObservedData()); + ASSERT_TRUE(edata3.get_observed_data() == edata2.get_observed_data()); } } // namespace diff --git a/tests/cpp/unittests/testMisc.cpp b/tests/cpp/unittests/testMisc.cpp index 131c3c9ff5..b8891257b7 100644 --- a/tests/cpp/unittests/testMisc.cpp +++ b/tests/cpp/unittests/testMisc.cpp @@ -17,7 +17,7 @@ namespace amici { namespace generic_model { -std::unique_ptr getModel() { return std::make_unique(); } +std::unique_ptr get_model() { return std::make_unique(); } } // namespace generic_model } // namespace amici @@ -78,89 +78,97 @@ class ModelTest : public ::testing::Test { }; TEST_F(ModelTest, LinScaledParameterIsNotTransformed) { - model.setParameterScale(ParameterScaling::none); + model.set_parameter_scale(ParameterScaling::none); - ASSERT_EQ(p[0], model.getParameters()[0]); + ASSERT_EQ(p[0], model.get_parameters()[0]); } TEST_F(ModelTest, LogScaledParameterIsTransformed) { - model.setParameterScale(ParameterScaling::ln); + model.set_parameter_scale(ParameterScaling::ln); - ASSERT_NEAR(std::log(p[0]), model.getParameters()[0], 1e-16); + ASSERT_NEAR(std::log(p[0]), model.get_parameters()[0], 1e-16); } TEST_F(ModelTest, Log10ScaledParameterIsTransformed) { - model.setParameterScale(ParameterScaling::log10); + model.set_parameter_scale(ParameterScaling::log10); - ASSERT_NEAR(std::log10(p[0]), model.getParameters()[0], 1e-16); + ASSERT_NEAR(std::log10(p[0]), model.get_parameters()[0], 1e-16); } TEST_F(ModelTest, ParameterScaleTooShort) { std::vector pscale(p.size() - 1, ParameterScaling::log10); - ASSERT_THROW(model.setParameterScale(pscale), AmiException); + ASSERT_THROW(model.set_parameter_scale(pscale), AmiException); } TEST_F(ModelTest, ParameterScaleTooLong) { std::vector pscale(p.size() + 1, ParameterScaling::log10); - ASSERT_THROW(model.setParameterScale(pscale), AmiException); + ASSERT_THROW(model.set_parameter_scale(pscale), AmiException); } TEST_F(ModelTest, UnsortedTimepointsThrow) { ASSERT_THROW( - model.setTimepoints(std::vector{0.0, 1.0, 0.5}), AmiException + model.set_timepoints(std::vector{0.0, 1.0, 0.5}), AmiException ); } TEST_F(ModelTest, ParameterNameIdGetterSetter) { - model.setParameterById("p0", 3.0); - ASSERT_NEAR(model.getParameterById("p0"), 3.0, 1e-16); - ASSERT_THROW(model.getParameterById("p1"), AmiException); - ASSERT_NEAR(model.setParametersByIdRegex("p[\\d]+", 5.0), p.size(), 1e-16); - for (auto const& ip : model.getParameters()) + model.set_parameter_by_id("p0", 3.0); + ASSERT_NEAR(model.get_parameter_by_id("p0"), 3.0, 1e-16); + ASSERT_THROW(model.get_parameter_by_id("p1"), AmiException); + ASSERT_NEAR( + model.set_parameters_by_id_regex("p[\\d]+", 5.0), p.size(), 1e-16 + ); + for (auto const& ip : model.get_parameters()) ASSERT_NEAR(ip, 5.0, 1e-16); - ASSERT_THROW(model.setParametersByIdRegex("k[\\d]+", 5.0), AmiException); + ASSERT_THROW( + model.set_parameters_by_id_regex("k[\\d]+", 5.0), AmiException + ); - model.setParameterByName("p0", 3.0); - ASSERT_NEAR(model.getParameterByName("p0"), 3.0, 1e-16); - ASSERT_THROW(model.getParameterByName("p1"), AmiException); + model.set_parameter_by_name("p0", 3.0); + ASSERT_NEAR(model.get_parameter_by_name("p0"), 3.0, 1e-16); + ASSERT_THROW(model.get_parameter_by_name("p1"), AmiException); ASSERT_NEAR( - model.setParametersByNameRegex("p[\\d]+", 5.0), p.size(), 1e-16 + model.set_parameters_by_name_regex("p[\\d]+", 5.0), p.size(), 1e-16 ); - for (auto const& ip : model.getParameters()) + for (auto const& ip : model.get_parameters()) ASSERT_NEAR(ip, 5.0, 1e-16); - ASSERT_THROW(model.setParametersByNameRegex("k[\\d]+", 5.0), AmiException); + ASSERT_THROW( + model.set_parameters_by_name_regex("k[\\d]+", 5.0), AmiException + ); - model.setFixedParameterById("k0", 3.0); - ASSERT_NEAR(model.getFixedParameterById("k0"), 3.0, 1e-16); - ASSERT_THROW(model.getFixedParameterById("k4"), AmiException); + model.set_fixed_parameter_by_id("k0", 3.0); + ASSERT_NEAR(model.get_fixed_parameter_by_id("k0"), 3.0, 1e-16); + ASSERT_THROW(model.get_fixed_parameter_by_id("k4"), AmiException); ASSERT_NEAR( - model.setFixedParametersByIdRegex("k[\\d]+", 5.0), k.size(), 1e-16 + model.set_fixed_parameters_by_id_regex("k[\\d]+", 5.0), k.size(), 1e-16 ); - for (auto const& ik : model.getFixedParameters()) + for (auto const& ik : model.get_fixed_parameters()) ASSERT_NEAR(ik, 5.0, 1e-16); ASSERT_THROW( - model.setFixedParametersByIdRegex("p[\\d]+", 5.0), AmiException + model.set_fixed_parameters_by_id_regex("p[\\d]+", 5.0), AmiException ); - model.setFixedParameterByName("k0", 3.0); - ASSERT_NEAR(model.getFixedParameterByName("k0"), 3.0, 1e-16); - ASSERT_THROW(model.getFixedParameterByName("k4"), AmiException); + model.set_fixed_parameter_by_name("k0", 3.0); + ASSERT_NEAR(model.get_fixed_parameter_by_name("k0"), 3.0, 1e-16); + ASSERT_THROW(model.get_fixed_parameter_by_name("k4"), AmiException); ASSERT_NEAR( - model.setFixedParametersByNameRegex("k[\\d]+", 5.0), k.size(), 1e-16 + model.set_fixed_parameters_by_name_regex("k[\\d]+", 5.0), k.size(), + 1e-16 ); - for (auto const& ik : model.getFixedParameters()) + for (auto const& ik : model.get_fixed_parameters()) ASSERT_NEAR(ik, 5.0, 1e-16); ASSERT_THROW( - model.setFixedParametersByNameRegex("p[\\d]+", 5.0), AmiException + model.set_fixed_parameters_by_name_regex("p[\\d]+", 5.0), AmiException ); } TEST_F(ModelTest, ReinitializeFixedParameterInitialStates) { ASSERT_THROW( - model.setReinitializeFixedParameterInitialStates(true), AmiException + model.set_reinitialize_fixed_parameter_initial_states(true), + AmiException ); - model.setReinitializeFixedParameterInitialStates(false); - ASSERT_TRUE(!model.getReinitializeFixedParameterInitialStates()); + model.set_reinitialize_fixed_parameter_initial_states(false); + ASSERT_TRUE(!model.get_reinitialize_fixed_parameter_initial_states()); sundials::Context sunctx; AmiVector x(nx, sunctx); AmiVectorArray sx(model.np(), nx, sunctx); @@ -229,7 +237,7 @@ class SolverTest : public ::testing::Test { double tol, badtol; std::vector timepoints = {1, 2, 3, 4}; - std::unique_ptr model = generic_model::getModel(); + std::unique_ptr model = generic_model::get_model(); SensitivityMethod sensi_meth; SensitivityOrder sensi; int steps, badsteps; @@ -288,18 +296,18 @@ TEST_F(SolverTest, SettersGettersNoSetup) { } TEST_F(SolverTest, SettersGettersWithSetup) { - solver.setSensitivityMethod(sensi_meth); + solver.set_sensitivity_method(sensi_meth); ASSERT_EQ( - static_cast(solver.getSensitivityMethod()), + static_cast(solver.get_sensitivity_method()), static_cast(sensi_meth) ); auto rdata = std::make_unique(solver, testModel); - AmiVector x(nx, solver.getSunContext()), dx(nx, solver.getSunContext()); - AmiVectorArray sx(nx, 1, solver.getSunContext()), - sdx(nx, 1, solver.getSunContext()); + AmiVector x(nx, solver.get_sun_context()), dx(nx, solver.get_sun_context()); + AmiVectorArray sx(nx, 1, solver.get_sun_context()), + sdx(nx, 1, solver.get_sun_context()); - testModel.setInitialStates(std::vector{0}); + testModel.set_initial_state(std::vector{0}); solver.setup(0, &testModel, x, dx, sx, sdx); @@ -316,146 +324,155 @@ void testSolverGetterSetters( int badsteps, double tol, double badtol ) { - solver.setSensitivityMethod(sensi_meth); + solver.set_sensitivity_method(sensi_meth); ASSERT_EQ( - static_cast(solver.getSensitivityMethod()), + static_cast(solver.get_sensitivity_method()), static_cast(sensi_meth) ); - solver.setSensitivityOrder(sensi); + solver.set_sensitivity_order(sensi); ASSERT_EQ( - static_cast(solver.getSensitivityOrder()), static_cast(sensi) + static_cast(solver.get_sensitivity_order()), + static_cast(sensi) ); - solver.setInternalSensitivityMethod(ism); + solver.set_internal_sensitivity_method(ism); ASSERT_EQ( - static_cast(solver.getInternalSensitivityMethod()), + static_cast(solver.get_internal_sensitivity_method()), static_cast(ism) ); - solver.setInterpolationType(interp); + solver.set_interpolation_type(interp); ASSERT_EQ( - static_cast(solver.getInterpolationType()), + static_cast(solver.get_interpolation_type()), static_cast(interp) ); - solver.setNonlinearSolverIteration(iter); + solver.set_non_linear_solver_iteration(iter); ASSERT_EQ( - static_cast(solver.getNonlinearSolverIteration()), + static_cast(solver.get_non_linear_solver_iteration()), static_cast(iter) ); - solver.setLinearMultistepMethod(lmm); + solver.set_linear_multistep_method(lmm); ASSERT_EQ( - static_cast(solver.getLinearMultistepMethod()), + static_cast(solver.get_linear_multistep_method()), static_cast(lmm) ); - solver.setStabilityLimitFlag(true); - ASSERT_EQ(solver.getStabilityLimitFlag(), true); + solver.set_stability_limit_flag(true); + ASSERT_EQ(solver.get_stability_limit_flag(), true); - ASSERT_THROW(solver.setNewtonMaxSteps(badsteps), AmiException); - solver.setNewtonMaxSteps(steps); - ASSERT_EQ(solver.getNewtonMaxSteps(), steps); + ASSERT_THROW(solver.set_newton_max_steps(badsteps), AmiException); + solver.set_newton_max_steps(steps); + ASSERT_EQ(solver.get_newton_max_steps(), steps); - ASSERT_THROW(solver.setMaxSteps(badsteps), AmiException); - solver.setMaxSteps(steps); - ASSERT_EQ(solver.getMaxSteps(), steps); + ASSERT_THROW(solver.set_max_steps(badsteps), AmiException); + solver.set_max_steps(steps); + ASSERT_EQ(solver.get_max_steps(), steps); - ASSERT_THROW(solver.setMaxStepsBackwardProblem(badsteps), AmiException); - solver.setMaxStepsBackwardProblem(steps); - ASSERT_EQ(solver.getMaxStepsBackwardProblem(), steps); + ASSERT_THROW(solver.set_max_steps_backward_problem(badsteps), AmiException); + solver.set_max_steps_backward_problem(steps); + ASSERT_EQ(solver.get_max_steps_backward_problem(), steps); - ASSERT_THROW(solver.setRelativeTolerance(badtol), AmiException); - solver.setRelativeTolerance(tol); - ASSERT_EQ(solver.getRelativeTolerance(), tol); + ASSERT_THROW(solver.set_relative_tolerance(badtol), AmiException); + solver.set_relative_tolerance(tol); + ASSERT_EQ(solver.get_relative_tolerance(), tol); - ASSERT_THROW(solver.setAbsoluteTolerance(badtol), AmiException); - solver.setAbsoluteTolerance(tol); - ASSERT_EQ(solver.getAbsoluteTolerance(), tol); + ASSERT_THROW(solver.set_absolute_tolerance(badtol), AmiException); + solver.set_absolute_tolerance(tol); + ASSERT_EQ(solver.get_absolute_tolerance(), tol); - ASSERT_THROW(solver.setRelativeToleranceQuadratures(badtol), AmiException); - solver.setRelativeToleranceQuadratures(tol); - ASSERT_EQ(solver.getRelativeToleranceQuadratures(), tol); + ASSERT_THROW( + solver.set_relative_tolerance_quadratures(badtol), AmiException + ); + solver.set_relative_tolerance_quadratures(tol); + ASSERT_EQ(solver.get_relative_tolerance_quadratures(), tol); - ASSERT_THROW(solver.setAbsoluteToleranceQuadratures(badtol), AmiException); - solver.setAbsoluteToleranceQuadratures(tol); - ASSERT_EQ(solver.getAbsoluteToleranceQuadratures(), tol); + ASSERT_THROW( + solver.set_absolute_tolerance_quadratures(badtol), AmiException + ); + solver.set_absolute_tolerance_quadratures(tol); + ASSERT_EQ(solver.get_absolute_tolerance_quadratures(), tol); - ASSERT_THROW(solver.setRelativeToleranceSteadyState(badtol), AmiException); - solver.setRelativeToleranceSteadyState(tol); - ASSERT_EQ(solver.getRelativeToleranceSteadyState(), tol); + ASSERT_THROW( + solver.set_relative_tolerance_steady_state(badtol), AmiException + ); + solver.set_relative_tolerance_steady_state(tol); + ASSERT_EQ(solver.get_relative_tolerance_steady_state(), tol); - ASSERT_THROW(solver.setAbsoluteToleranceSteadyState(badtol), AmiException); - solver.setAbsoluteToleranceSteadyState(tol); - ASSERT_EQ(solver.getAbsoluteToleranceSteadyState(), tol); + ASSERT_THROW( + solver.set_absolute_tolerance_steady_state(badtol), AmiException + ); + solver.set_absolute_tolerance_steady_state(tol); + ASSERT_EQ(solver.get_absolute_tolerance_steady_state(), tol); } TEST_F(SolverTest, SteadyStateToleranceFactor) { CVodeSolver s; // test with unset steadystate tolerances ASSERT_DOUBLE_EQ( - s.getRelativeToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_relative_tolerance() ); ASSERT_DOUBLE_EQ( - s.getAbsoluteToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_absolute_tolerance() ); ASSERT_DOUBLE_EQ( - s.getRelativeToleranceSteadyStateSensi(), - s.getSteadyStateSensiToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state_sensi(), + s.get_steady_state_sensi_tolerance_factor() * s.get_relative_tolerance() ); ASSERT_DOUBLE_EQ( - s.getAbsoluteToleranceSteadyState(), - s.getSteadyStateSensiToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state(), + s.get_steady_state_sensi_tolerance_factor() * s.get_absolute_tolerance() ); // test with changed steadystate tolerance factor - s.setSteadyStateToleranceFactor(5); + s.set_steady_state_tolerance_factor(5); ASSERT_DOUBLE_EQ( - s.getRelativeToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_relative_tolerance() ); ASSERT_DOUBLE_EQ( - s.getAbsoluteToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_absolute_tolerance() ); - s.setSteadyStateSensiToleranceFactor(5); + s.set_steady_state_sensi_tolerance_factor(5); ASSERT_DOUBLE_EQ( - s.getRelativeToleranceSteadyStateSensi(), - s.getSteadyStateSensiToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state_sensi(), + s.get_steady_state_sensi_tolerance_factor() * s.get_relative_tolerance() ); ASSERT_DOUBLE_EQ( - s.getAbsoluteToleranceSteadyState(), - s.getSteadyStateSensiToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state(), + s.get_steady_state_sensi_tolerance_factor() * s.get_absolute_tolerance() ); // test with steadystate tolerance override tolerance factor - s.setRelativeToleranceSteadyState(2); + s.set_relative_tolerance_steady_state(2); ASSERT_NE( - s.getRelativeToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_relative_tolerance() ); - ASSERT_EQ(s.getRelativeToleranceSteadyState(), 2); - s.setAbsoluteToleranceSteadyState(3); + ASSERT_EQ(s.get_relative_tolerance_steady_state(), 2); + s.set_absolute_tolerance_steady_state(3); ASSERT_NE( - s.getAbsoluteToleranceSteadyState(), - s.getSteadyStateToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state(), + s.get_steady_state_tolerance_factor() * s.get_absolute_tolerance() ); - ASSERT_EQ(s.getAbsoluteToleranceSteadyState(), 3); - s.setRelativeToleranceSteadyStateSensi(4); + ASSERT_EQ(s.get_absolute_tolerance_steady_state(), 3); + s.set_relative_tolerance_steady_state_sensi(4); ASSERT_NE( - s.getRelativeToleranceSteadyStateSensi(), - s.getSteadyStateSensiToleranceFactor() * s.getRelativeTolerance() + s.get_relative_tolerance_steady_state_sensi(), + s.get_steady_state_sensi_tolerance_factor() * s.get_relative_tolerance() ); - ASSERT_EQ(s.getRelativeToleranceSteadyStateSensi(), 4); - s.setAbsoluteToleranceSteadyStateSensi(5); + ASSERT_EQ(s.get_relative_tolerance_steady_state_sensi(), 4); + s.set_absolute_tolerance_steady_state_sensi(5); ASSERT_NE( - s.getAbsoluteToleranceSteadyStateSensi(), - s.getSteadyStateSensiToleranceFactor() * s.getAbsoluteTolerance() + s.get_absolute_tolerance_steady_state_sensi(), + s.get_steady_state_sensi_tolerance_factor() * s.get_absolute_tolerance() ); - ASSERT_EQ(s.getAbsoluteToleranceSteadyStateSensi(), 5); + ASSERT_EQ(s.get_absolute_tolerance_steady_state_sensi(), 5); } class AmiVectorTest : public ::testing::Test { @@ -468,7 +485,7 @@ class AmiVectorTest : public ::testing::Test { TEST_F(AmiVectorTest, Vector) { sundials::Context sunctx; AmiVector av(vec1, sunctx); - N_Vector nvec = av.getNVector(); + N_Vector nvec = av.get_nvector(); AmiVector av2(nvec); ASSERT_NE(av.data(), av2.data()); diff --git a/tests/cpp/unittests/testSerialization.cpp b/tests/cpp/unittests/testSerialization.cpp index de4f0491dd..c6d0ae0d8f 100644 --- a/tests/cpp/unittests/testSerialization.cpp +++ b/tests/cpp/unittests/testSerialization.cpp @@ -53,16 +53,16 @@ void checkReturnDataEqual( checkEqualArray(r.ssigmay, s.ssigmay, 1e-16, 1e-16, "ssigmay"); ASSERT_EQ(r.numsteps, s.numsteps); - ASSERT_EQ(r.numstepsB, s.numstepsB); - ASSERT_EQ(r.numrhsevals, s.numrhsevals); - ASSERT_EQ(r.numrhsevalsB, s.numrhsevalsB); - ASSERT_EQ(r.numerrtestfails, s.numerrtestfails); - ASSERT_EQ(r.numerrtestfailsB, s.numerrtestfailsB); - ASSERT_EQ(r.numnonlinsolvconvfails, s.numnonlinsolvconvfails); - ASSERT_EQ(r.numnonlinsolvconvfailsB, s.numnonlinsolvconvfailsB); + ASSERT_EQ(r.numsteps_b, s.numsteps_b); + ASSERT_EQ(r.num_rhs_evals, s.num_rhs_evals); + ASSERT_EQ(r.num_rhs_evals_b, s.num_rhs_evals_b); + ASSERT_EQ(r.num_err_test_fails, s.num_err_test_fails); + ASSERT_EQ(r.num_err_test_fails_b, s.num_err_test_fails_b); + ASSERT_EQ(r.num_non_lin_solv_conv_fails, s.num_non_lin_solv_conv_fails); + ASSERT_EQ(r.num_non_lin_solv_conv_fails_b, s.num_non_lin_solv_conv_fails_b); ASSERT_EQ(r.order, s.order); ASSERT_EQ(r.cpu_time, s.cpu_time); - ASSERT_EQ(r.cpu_timeB, s.cpu_timeB); + ASSERT_EQ(r.cpu_time_b, s.cpu_time_b); ASSERT_EQ(r.preeq_status, s.preeq_status); ASSERT_TRUE( @@ -103,31 +103,33 @@ class SolverSerializationTest : public ::testing::Test { protected: void SetUp() override { // set non-default values for all members - solver.setAbsoluteTolerance(1e-4); - solver.setRelativeTolerance(1e-5); - solver.setAbsoluteToleranceQuadratures(1e-6); - solver.setRelativeToleranceQuadratures(1e-7); - solver.setAbsoluteToleranceSteadyState(1e-8); - solver.setRelativeToleranceSteadyState(1e-9); - solver.setSensitivityMethod(amici::SensitivityMethod::adjoint); - solver.setSensitivityOrder(amici::SensitivityOrder::second); - solver.setMaxSteps(1e1); - solver.setMaxStepsBackwardProblem(1e2); - solver.setNewtonMaxSteps(1e3); - solver.setStateOrdering( + solver.set_absolute_tolerance(1e-4); + solver.set_relative_tolerance(1e-5); + solver.set_absolute_tolerance_quadratures(1e-6); + solver.set_relative_tolerance_quadratures(1e-7); + solver.set_absolute_tolerance_steady_state(1e-8); + solver.set_relative_tolerance_steady_state(1e-9); + solver.set_sensitivity_method(amici::SensitivityMethod::adjoint); + solver.set_sensitivity_order(amici::SensitivityOrder::second); + solver.set_max_steps(1e1); + solver.set_max_steps_backward_problem(1e2); + solver.set_newton_max_steps(1e3); + solver.set_state_ordering( static_cast(amici::SUNLinSolKLU::StateOrdering::COLAMD) ); - solver.setInterpolationType(amici::InterpolationType::polynomial); - solver.setStabilityLimitFlag(false); - solver.setLinearSolver(amici::LinearSolver::dense); - solver.setLinearMultistepMethod(amici::LinearMultistepMethod::adams); - solver.setNonlinearSolverIteration( + solver.set_interpolation_type(amici::InterpolationType::polynomial); + solver.set_stability_limit_flag(false); + solver.set_linear_solver(amici::LinearSolver::dense); + solver.set_linear_multistep_method(amici::LinearMultistepMethod::adams); + solver.set_non_linear_solver_iteration( amici::NonlinearSolverIteration::newton ); - solver.setInternalSensitivityMethod( + solver.set_internal_sensitivity_method( amici::InternalSensitivityMethod::staggered ); - solver.setReturnDataReportingMode(amici::RDataReporting::likelihood); + solver.set_return_data_reporting_mode( + amici::RDataReporting::likelihood + ); } amici::CVodeSolver solver; @@ -265,19 +267,19 @@ TEST(ReturnDataSerializationTest, ToString) { amici::ReturnData r(solver, m); r.id = "some_id"; - std::string serialized = amici::serializeToString(r); + std::string serialized = amici::serialize_to_string(r); checkReturnDataEqual( - r, amici::deserializeFromString(serialized) + r, amici::deserialize_from_string(serialized) ); } TEST_F(SolverSerializationTest, ToChar) { int length; - char* buf = amici::serializeToChar(solver, &length); + char* buf = amici::serialize_to_char(solver, &length); amici::CVodeSolver v - = amici::deserializeFromChar(buf, length); + = amici::deserialize_from_char(buf, length); delete[] buf; ASSERT_EQ(solver, v); @@ -285,8 +287,8 @@ TEST_F(SolverSerializationTest, ToChar) { TEST_F(SolverSerializationTest, ToStdVec) { - auto buf = amici::serializeToStdVec(solver); - amici::CVodeSolver v = amici::deserializeFromChar( + auto buf = amici::serialize_to_std_vec(solver); + amici::CVodeSolver v = amici::deserialize_from_char( buf.data(), buf.size() ); diff --git a/tests/petab_test_suite/test_petab_suite.py b/tests/petab_test_suite/test_petab_suite.py index b99415401b..1a761e0a26 100755 --- a/tests/petab_test_suite/test_petab_suite.py +++ b/tests/petab_test_suite/test_petab_suite.py @@ -85,8 +85,8 @@ def _test_case(case, model_type, version, jax): columns={petab.SIMULATION: petab.MEASUREMENT}, inplace=True ) else: - solver = model.getSolver() - solver.setSteadyStateToleranceFactor(1.0) + solver = model.create_solver() + solver.set_steady_state_tolerance_factor(1.0) problem_parameters = dict( zip(problem.x_free_ids, problem.x_nominal_free, strict=True) ) @@ -146,7 +146,7 @@ def _test_case(case, model_type, version, jax): ): logger.log( logging.DEBUG, - f"x_ss: {model.getStateIds()} " + f"x_ss: {model.get_state_ids()} " f"{[rdata.x_ss for rdata in rdatas]}", ) logger.log( @@ -191,11 +191,11 @@ def check_derivatives( solver: AMICI solver problem_parameters: Dictionary of problem parameters """ - solver.setSensitivityMethod(amici.SensitivityMethod.forward) - solver.setSensitivityOrder(amici.SensitivityOrder.first) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) + solver.set_sensitivity_order(amici.SensitivityOrder.first) # Required for case 9 to not fail in # amici::NewtonSolver::computeNewtonSensis - model.setSteadyStateSensitivityMode( + model.set_steady_state_sensitivity_mode( SteadyStateSensitivityMode.integrateIfNewtonFails ) @@ -206,10 +206,10 @@ def check_derivatives( ): # check_derivatives does currently not support parameters in ExpData # set parameter scales before setting parameter values! - model.setParameterScale(edata.pscale) - model.setParameters(edata.parameters) + model.set_parameter_scale(edata.pscale) + model.set_parameters(edata.parameters) edata.parameters = [] - edata.pscale = amici.parameterScalingFromIntVector([]) + edata.pscale = amici.parameter_scaling_from_int_vector([]) amici_check_derivatives(model, solver, edata) diff --git a/tests/sbml/testSBMLSuite.py b/tests/sbml/testSBMLSuite.py index 163696fee2..5ee8e7199d 100755 --- a/tests/sbml/testSBMLSuite.py +++ b/tests/sbml/testSBMLSuite.py @@ -10,6 +10,7 @@ specific test cases. If `--cases` is omitted, all cases are run. """ +from __future__ import annotations import shutil from pathlib import Path @@ -77,16 +78,16 @@ def test_sbml_testsuite_case(test_id, result_path, sbml_semantic_cases_dir): atol, rtol = apply_settings(settings, solver, model, test_id) - solver.setSensitivityOrder(amici.SensitivityOrder.first) - solver.setSensitivityMethod(amici.SensitivityMethod.forward) + solver.set_sensitivity_order(amici.SensitivityOrder.first) + solver.set_sensitivity_method(amici.SensitivityMethod.forward) if test_id == "00885": # 00885: root-after-reinitialization with FSA with default settings - solver.setAbsoluteTolerance(1e-16) - solver.setRelativeTolerance(1e-15) + solver.set_absolute_tolerance(1e-16) + solver.set_relative_tolerance(1e-15) # simulate model - rdata = amici.runAmiciSimulation(model, solver) + rdata = amici.run_simulation(model, solver) if rdata["status"] != amici.AMICI_SUCCESS: if test_id in ("00748", "00374", "00369"): pytest.skip("Simulation Failed expectedly") @@ -125,7 +126,7 @@ def compile_model( test_id: str, model_dir: Path, generate_sensitivity_code: bool = False, -): +) -> tuple[amici.Model, amici.Solver, amici.SbmlImporter]: """Import the given test model to AMICI""" model_dir.mkdir(parents=True, exist_ok=True) @@ -142,8 +143,8 @@ def compile_model( # settings model_module = amici.import_model_module(model_name, model_dir) - model = model_module.getModel() - solver = model.getSolver() + model = model_module.get_model() + solver = model.create_solver() return model, solver, sbml_importer @@ -163,7 +164,7 @@ def compile_model_jax(sbml_dir: Path, test_id: str, model_dir: Path): def jax_sensitivity_check( sbml_dir: Path, test_id: str, - amici_model: "amici.Model", + amici_model: amici.Model, rdata: dict, atol: float, rtol: float, @@ -240,15 +241,17 @@ def simulate(pars): sx = jax.jacfwd(simulate)(p) par_idx = [ jax_model.parameter_ids.index(pid) - for pid in amici_model.getParameterIds() + for pid in amici_model.get_parameter_ids() ] sx = jnp.transpose(sx[:, :, par_idx], (0, 2, 1)) if rdata["sx"] is None: - solver_amici = amici_model.getSolver() - solver_amici.setSensitivityOrder(amici.SensitivityOrder.first) - solver_amici.setSensitivityMethod(amici.SensitivityMethod.forward) - rdata = amici.runAmiciSimulation(amici_model, solver_amici) + solver_amici = amici_model.create_solver() + solver_amici.set_sensitivity_order(amici.SensitivityOrder.first) + solver_amici.set_sensitivity_method( + amici.SensitivityMethod.forward + ) + rdata = amici.run_simulation(amici_model, solver_amici) np.testing.assert_allclose(x, rdata["x"], rtol=rtol, atol=atol) np.testing.assert_allclose(sx, rdata["sx"], rtol=rtol, atol=atol) diff --git a/tests/sbml/utils.py b/tests/sbml/utils.py index cdc8153921..e4169da386 100644 --- a/tests/sbml/utils.py +++ b/tests/sbml/utils.py @@ -1,13 +1,24 @@ +from __future__ import annotations from pathlib import Path import libsbml as sbml import numpy as np import pandas as pd + +import amici from amici.constants import SymbolId from numpy.testing import assert_allclose -def verify_results(settings, rdata, expected, wrapper, model, atol, rtol): +def verify_results( + settings, + rdata: amici.ReturnData, + expected, + wrapper, + model: amici.Model, + atol, + rtol, +): """Verify test results""" amount_species, variables = get_amount_and_variables(settings) @@ -24,12 +35,12 @@ def verify_results(settings, rdata, expected, wrapper, model, atol, rtol): parameter_data = {} # collect parameters - for par in model.getParameterIds(): - parameter_data[par] = rdata["ts"] * 0 + model.getParameterById(par) + for par in model.get_parameter_ids(): + parameter_data[par] = rdata["ts"] * 0 + model.get_parameter_by_id(par) expression_data = {} - for expr_idx, expr_id in enumerate(model.getExpressionIds()): + for expr_idx, expr_id in enumerate(model.get_expression_ids()): if expr_id.startswith("flux_"): new_key = expr_id.removeprefix("flux_") else: @@ -187,7 +198,9 @@ def get_amount_and_variables(settings): return amount_species, variables -def apply_settings(settings, solver, model, test_id: str): +def apply_settings( + settings, solver: amici.Solver, model: amici.Model, test_id: str +): """Apply model and solver settings as specified in the test case""" # start/duration/steps may be empty ts = np.linspace( @@ -198,14 +211,14 @@ def apply_settings(settings, solver, model, test_id: str): atol = float(settings["absolute"]) rtol = float(settings["relative"]) - model.setTimepoints(ts) - solver.setMaxSteps(int(1e6)) - solver.setRelativeTolerance(rtol / 1e4) + model.set_timepoints(ts) + solver.set_max_steps(int(1e6)) + solver.set_relative_tolerance(rtol / 1e4) if test_id == "01148": - solver.setAbsoluteTolerance(atol / 1e6) + solver.set_absolute_tolerance(atol / 1e6) else: - solver.setAbsoluteTolerance(atol / 1e4) + solver.set_absolute_tolerance(atol / 1e4) return atol, rtol