Skip to content

Commit 76162df

Browse files
authored
Merge pull request #835 from ICB-DCM/develop
Release 0.10.13 * BREAKING CHANGE: Renaming {get|set}tNewtonPreequilibration to {get|set}Preequilibration (Closes #720) * Make wurlitzer non-optional requirement for AMICI python package (Fixes missing AMICI errors when running from jupyter notebooks) * Compute initial state for Model::getInitialStates if not already set (Fixes #818) * Make swig generate pydoc comments from doxygen comments #830 (Closes #745) to provide Python docstrings for C++ wrapper functions * feature(cmake) Add option to disable compiler optimizations for wrapfunctions.cpp (Fixes #828) (#829) * Change SBML test suite to pytest to allow for parallel test execution… (#824) * Fix(cmake): -E option is not available in all sed versions. Neither is the equivalent -r. Use --regexp-extended instead (Closes #826) * Refactor(python) Move PEtab import code from command line script… (#825) * Fix(core) Fix regular expressions for intel compiler (Closes #754) (#822) * Update workflow figure to include PySB (Closes #799) * Fix compiler warnings
2 parents 8875a64 + de70862 commit 76162df

36 files changed

+761
-514
lines changed

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
find_package(Git)
22
if(Git_FOUND)
3-
execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags | cut -c 2- | tr -d '\n' | sed -E s/-/./"
3+
execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags | cut -c 2- | tr -d '\n' | sed --regexp-extended s/-/./"
44
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
55
OUTPUT_VARIABLE PROJECT_VERSION_GIT
66
)
-143 Bytes
Loading

documentation/gfx/amici_workflow.svg

Lines changed: 17 additions & 9 deletions
Loading

include/amici/amici.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
namespace amici {
1414

1515
/*!
16-
* @brief printErrMsgIdAndTxt prints a specified error message associated to the
17-
* specified identifier
16+
* @brief Prints a specified error message associated to the specified
17+
* identifier
1818
*
19-
* @param[in] identifier error identifier @type char
20-
* @param[in] format string with error message printf-style format
19+
* @param identifier error identifier
20+
* @param format string with error message printf-style format
2121
* @param ... arguments to be formatted
2222
*/
2323
void
2424
printErrMsgIdAndTxt(const char* identifier, const char* format, ...);
2525

2626
/*!
27-
* @brief printErrMsgIdAndTxt prints a specified warning message associated to
28-
* the specified identifier
27+
* @brief Prints a specified warning message associated to the specified
28+
* identifier
2929
*
30-
* @param[in] identifier warning identifier @type char
31-
* @param[in] format string with error message printf-style format
30+
* @param identifier warning identifier
31+
* @param format string with error message printf-style format
3232
* @param ... arguments to be formatted
3333
*/
3434
void

include/amici/misc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <algorithm>
88
#include <vector>
99
#include <memory>
10+
#include <regex>
1011

1112
#include <gsl/gsl-lite.hpp>
1213

@@ -84,6 +85,12 @@ void scaleParameters(gsl::span<const realtype> bufferUnscaled,
8485
*/
8586
std::string backtraceString(int maxFrames);
8687

88+
/**
89+
* @brief Convert std::regex_constants::error_type to string
90+
* @param err_type error type
91+
* @return Error type as string
92+
*/
93+
std::string regexErrorToString(std::regex_constants::error_type err_type);
8794

8895
} // namespace amici
8996

include/amici/model.h

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,19 +588,25 @@ class Model : public AbstractModel {
588588
* @brief Get the initial states
589589
* @return initial state vector
590590
*/
591-
std::vector<realtype> const &getInitialStates() const;
591+
std::vector<realtype> getInitialStates();
592592

593593
/**
594594
* @brief Set the initial states
595595
* @param x0 initial state vector
596596
*/
597597
void setInitialStates(std::vector<realtype> const &x0);
598598

599+
/**
600+
* @brief Returns whether custom initial states have been set
601+
* @return True if has custom initial states, otherwise false
602+
*/
603+
bool hasCustomInitialStates() const;
604+
599605
/**
600606
* @brief Get the initial states sensitivities
601607
* @return vector of initial state sensitivities
602608
*/
603-
std::vector<realtype> const &getInitialStateSensitivities() const;
609+
std::vector<realtype> getInitialStateSensitivities();
604610

605611
/**
606612
* @brief Set the initial state sensitivities
@@ -609,6 +615,12 @@ class Model : public AbstractModel {
609615
*/
610616
void setInitialStateSensitivities(std::vector<realtype> const &sx0);
611617

618+
/**
619+
* @brief Returns whether custom initial state sensitivitiess have been set
620+
* @return True if has custom initial state sensitivitiess, otherwise false
621+
*/
622+
bool hasCustomInitialStateSensitivities() const;
623+
612624
/**
613625
* @brief Set the initial state sensitivities
614626
* @param sx0 vector of initial state sensitivities without chainrule
@@ -1046,7 +1058,7 @@ class Model : public AbstractModel {
10461058

10471059
/**
10481060
* @brief Sets only those initial states sensitivities that are affected
1049-
*from fx0 fixedParmeters
1061+
* from fx0 fixedParmeters
10501062
* @param sx pointer to state sensitivity variables
10511063
* @param x pointer to state variables
10521064
**/

include/amici/model_dae.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Model_DAE : public Model {
147147
realtype cj) override;
148148

149149
/** Matrix vector product of J with a vector v (for iterative solvers)
150-
* @param t timepoint @type realtype
150+
* @param t timepoint
151151
* @param cj scaling factor, inverse of the step size
152152
* @param x Vector with the states
153153
* @param dx Vector with the derivative states

include/amici/serialization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void serialize(Archive &ar, amici::Solver &u, const unsigned int version) {
5454
ar &u.ss_rtol_sensi;
5555
ar &u.maxsteps;
5656
ar &u.maxstepsB;
57-
ar &u.newton_preeq;
57+
ar &u.requires_preequilibration;
5858
ar &u.newton_maxsteps;
5959
ar &u.newton_maxlinsteps;
6060
ar &u.ism;

include/amici/solver.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ class Solver {
194194
void setNewtonMaxSteps(int newton_maxsteps);
195195

196196
/**
197-
* @brief Get if preequilibration of model via Newton solver is enabled
197+
* @brief Get if model preequilibration is enabled
198198
* @return
199199
*/
200-
bool getNewtonPreequilibration() const;
200+
bool getPreequilibration() const;
201201

202202
/**
203-
* @brief Enable/disable preequilibration of model via Newton solver
204-
* @param newton_preeq
203+
* @brief Enable/disable model preequilibration
204+
* @param require_preequilibration
205205
*/
206-
void setNewtonPreequilibration(bool newton_preeq);
206+
void setPreequilibration(bool require_preequilibration);
207207

208208
/**
209209
* @brief Get maximum number of allowed linear steps per Newton step for
@@ -1381,8 +1381,8 @@ class Solver {
13811381
* computation */
13821382
long int newton_maxlinsteps = 0;
13831383

1384-
/** Preequilibration of model via Newton solver? */
1385-
bool newton_preeq = false;
1384+
/** Enable model preequilibration */
1385+
bool requires_preequilibration = false;
13861386

13871387
/** linear solver specification */
13881388
LinearSolver linsol = LinearSolver::KLU;
@@ -1464,8 +1464,7 @@ bool operator==(const Solver &a, const Solver &b);
14641464
*
14651465
* @param error_code error identifier
14661466
* @param module name of the module in which the error occured
1467-
* @param function name of the function in which the error occured @type
1468-
* char
1467+
* @param function name of the function in which the error occured
14691468
* @param msg error message
14701469
* @param eh_data unused input
14711470
*/

0 commit comments

Comments
 (0)