Skip to content

Commit d220128

Browse files
authored
Merge pull request #1159 from ICB-DCM/release_0_11_12
Release 0.11.2
2 parents ffb5f33 + 40575bc commit d220128

File tree

98 files changed

+4864
-1386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4864
-1386
lines changed

.github/workflows/deploy_sdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
cd python/sdist && /usr/bin/python3 setup.py sdist
2828
29-
- name: Archive sdist
29+
- name: "Upload artifact: sdist"
3030
uses: actions/upload-artifact@v1
3131
with:
3232
name: sdist

.github/workflows/sbml-semantic-test-suite.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ on:
66
- master
77
pull_request:
88
paths:
9-
- python/amici/sbml_import.py
9+
- .github/workflows/sbml-semantic-test-suite.yml
1010
- python/amici/ode_export.py
11+
- python/amici/sbml_import.py
1112
- scripts/run-SBMLTestsuite.sh
1213
- tests/testSBMLSuite.py
1314
check_suite:
@@ -30,3 +31,9 @@ jobs:
3031
&& sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
3132
- run: AMICI_PARALLEL_COMPILE=2 ./scripts/installAmiciSource.sh
3233
- run: AMICI_PARALLEL_COMPILE=2 ./scripts/run-SBMLTestsuite.sh
34+
35+
- name: "Upload artifact: SBML semantic test suite results"
36+
uses: actions/upload-artifact@v1
37+
with:
38+
name: amici-semantic-results
39+
path: tests/amici-semantic-results

.github/workflows/test-large-model.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
branches:
55
- develop
66
- master
7-
- fix_sx0_zeros
87

98
pull_request:
109
branches:
@@ -59,6 +58,12 @@ jobs:
5958
-y 'FroehlichKes2018/PEtab/FroehlichKes2018.yaml' \
6059
--no-compile
6160
61+
- name: "Upload artifact: CS_Signalling_ERBB_RAS_AKT_petab"
62+
uses: actions/upload-artifact@v1
63+
with:
64+
name: CS_Signalling_ERBB_RAS_AKT
65+
path: CS_Signalling_ERBB_RAS_AKT/CS_Signalling_ERBB_RAS_AKT_petab
66+
6267
# install model package
6368
- name: Install test model
6469
run: |
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: C++ testsuite / OSX
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
name: tests_osx
7+
8+
runs-on: macos-latest
9+
10+
env:
11+
ENABLE_GCOV_COVERAGE: FALSE
12+
CI_SONARCLOUD: FALSE
13+
14+
steps:
15+
- uses: actions/checkout@master
16+
- run: git fetch --prune --unshallow
17+
18+
- run: echo "::set-env name=AMICI_DIR::$(pwd)"
19+
- run: echo "::set-env name=BNGPATH::${AMICI_DIR}/ThirdParty/BioNetGen-2.3.2"
20+
21+
# install amici dependencies
22+
- name: homebrew
23+
run: |
24+
brew install hdf5 swig gcc cppcheck libomp
25+
26+
- name: Build suitesparse
27+
run: |
28+
scripts/buildSuiteSparse.sh
29+
30+
- name: Build sundials
31+
run: |
32+
scripts/buildSundials.sh
33+
34+
- name: Build cpputest
35+
run: |
36+
scripts/buildCpputest.sh
37+
38+
- name: Build cpputest
39+
run: |
40+
scripts/buildBNGL.sh
41+
42+
- name: Build AMICI
43+
run: |
44+
scripts/buildAmici.sh
45+
46+
- name: Install python archive
47+
run: |
48+
scripts/installAmiciArchive.sh
49+
50+
- name: Install python package
51+
run: |
52+
scripts/installAmiciSource.sh
53+
54+
- name: cppcheck
55+
run: |
56+
scripts/run-cppcheck.sh
57+
58+
- name: notebooks
59+
run: |
60+
scripts/runNotebook.sh python/examples/example_*/
61+
62+
- name: Python tests
63+
run: |
64+
scripts/run-python-tests.sh
65+
66+
- name: C++ tests
67+
run: |
68+
scripts/run-cpputest.sh
69+
70+
- name: sphinx
71+
run: |
72+
scripts/run-sphinx.sh

.github/workflows/test_cplusplus_valgrind.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
branches:
55
- develop
66
- master
7-
- feature_1053_sonarcloud
8-
97

108
jobs:
119
build:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ petab_test_suite
144144
python/examples/example_steadystate/model_steadystate_scaled/*
145145
python/examples/example_presimulation/model_presimulation/*
146146
python/examples/example_presimulation/model_presimulation_re/*
147+
python/examples/example_constant_species/model_constant_species_reduced/*
148+
python/examples/example_constant_species/model_constant_species/*
147149

148150
python/sdist/amici.egg-info/*
149151
python/sdist/amici/version.txt

.travis.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,6 @@ matrix:
6969
- CI_PYTHON=TRUE
7070
- CI_NOTEBOOK=TRUE
7171

72-
- os: osx
73-
osx_image: xcode11
74-
language: minimal
75-
compiler: clang
76-
env:
77-
- CI_BUILD=TRUE
78-
- CI_CPPUTEST=TRUE
79-
- CI_ARCHIVE=TRUE
80-
- CI_CPPCHECK=TRUE
81-
- CI_PYTHON=TRUE
82-
- CI_NOTEBOOK=TRUE
83-
addons:
84-
homebrew:
85-
packages:
86-
- hdf5
87-
- swig
88-
- gcc
89-
- cppcheck
90-
update: true
91-
before_install:
92-
- travis_wait brew link --overwrite gcc # fix linker warning regarding /usr/local/include/c++
93-
- brew link --overwrite python # https://github.com/ICB-DCM/AMICI/issues/894
94-
- export -f travis_fold travis_nanoseconds travis_time_start travis_time_finish
95-
after_success:
96-
- cd $BASE_DIR # cd to base dir for correct relative path in deploy
97-
9872
- os: osx
9973
osx_image: xcode11
10074
language: minimal
257 KB
Loading

include/amici/abstract_model.h

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,39 @@ class AbstractModel {
6868
const AmiVector &dx, int ip, const AmiVector &sx,
6969
const AmiVector &sdx, AmiVector &sxdot) = 0;
7070

71+
/**
72+
* @brief Residual function backward when running in steady state mode
73+
* @param t time
74+
* @param xB adjoint state
75+
* @param dxB time derivative of state (DAE only)
76+
* @param xBdot array to which values of the residual function will be
77+
* written
78+
*/
79+
virtual void fxBdot_ss(const realtype t, const AmiVector &xB,
80+
const AmiVector &dxB, AmiVector &xBdot) = 0;
81+
82+
/**
83+
* @brief Sparse Jacobian function backward, steady state case
84+
* @param JB sparse matrix to which values of the Jacobian will be written
85+
*/
86+
virtual void fJSparseB_ss(SUNMatrix JB) = 0;
87+
88+
/**
89+
* @brief Computes the sparse backward Jacobian for steadystate integration
90+
* and writes it to the model member
91+
* @param t timepoint
92+
* @param cj scalar in Jacobian
93+
* @param x Vector with the states
94+
* @param dx Vector with the derivative states
95+
* @param xB Vector with the adjoint states
96+
* @param dxB Vector with the adjoint derivative states
97+
* @param xBdot Vector with the adjoint state right hand side
98+
*/
99+
virtual void writeSteadystateJB(const realtype t, realtype cj,
100+
const AmiVector &x, const AmiVector &dx,
101+
const AmiVector &xB, const AmiVector &dxB,
102+
const AmiVector &xBdot) = 0;
103+
71104
/**
72105
* @brief Dense Jacobian function
73106
* @param t time
@@ -81,6 +114,22 @@ class AbstractModel {
81114
const AmiVector &dx, const AmiVector &xdot,
82115
SUNMatrix J) = 0;
83116

117+
/**
118+
* @brief Dense Jacobian function
119+
* @param t time
120+
* @param cj scaling factor (inverse of timestep, DAE only)
121+
* @param x state
122+
* @param dx time derivative of state (DAE only)
123+
* @param xB Vector with the adjoint states
124+
* @param dxB Vector with the adjoint derivative states
125+
* @param xBdot Vector with the adjoint right hand side (unused)
126+
* @param JB dense matrix to which values of the jacobian will be written
127+
*/
128+
virtual void fJB(const realtype t, realtype cj, const AmiVector &x,
129+
const AmiVector &dx, const AmiVector &xB,
130+
const AmiVector &dxB, const AmiVector &xBdot,
131+
SUNMatrix JB) = 0;
132+
84133
/**
85134
* @brief Sparse Jacobian function
86135
* @param t time
@@ -94,6 +143,22 @@ class AbstractModel {
94143
const AmiVector &dx, const AmiVector &xdot,
95144
SUNMatrix J) = 0;
96145

146+
/**
147+
* @brief Sparse Jacobian function
148+
* @param t time
149+
* @param cj scaling factor (inverse of timestep, DAE only)
150+
* @param x state
151+
* @param dx time derivative of state (DAE only)
152+
* @param xB Vector with the adjoint states
153+
* @param dxB Vector with the adjoint derivative states
154+
* @param xBdot Vector with the adjoint right hand side (unused)
155+
* @param JB dense matrix to which values of the jacobian will be written
156+
*/
157+
virtual void fJSparseB(const realtype t, realtype cj, const AmiVector &x,
158+
const AmiVector &dx, const AmiVector &xB,
159+
const AmiVector &dxB, const AmiVector &xBdot,
160+
SUNMatrix JB) = 0;
161+
97162
/**
98163
* @brief Diagonal Jacobian function
99164
* @param t time

include/amici/amici.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ class AmiciApplication {
8787
* @param format string with warning message printf-style format
8888
* @param ... arguments to be formatted
8989
*/
90-
void warningF(const char *identifier, const char *format, ...);
90+
void warningF(const char *identifier, const char *format, ...) const;
9191

9292
/**
9393
* @brief printf interface to error()
9494
* @param identifier warning identifier
9595
* @param format string with error message printf-style format
9696
* @param ... arguments to be formatted
9797
*/
98-
void errorF(const char *identifier, const char *format, ...);
98+
void errorF(const char *identifier, const char *format, ...) const;
9999

100100
/**
101101
* @brief Checks the values in an array for NaNs and Infs

0 commit comments

Comments
 (0)