amici.amici.Model
- class amici.amici.Model(*args, **kwargs)[source]
The Model class represents an AMICI ODE/DAE model.
The model can compute various model related quantities based on symbolically generated code.
- __init__(*args, **kwargs)[source]
- Overload 1:
Default ctor
Overload 2:
Constructor with model dimensions
- Parameters
nx_rdata (int) – Number of state variables
nxtrue_rdata (int) – Number of state variables of the non-augmented model
nx_solver (int) – Number of state variables with conservation laws applied
nxtrue_solver (int) – Number of state variables of the non-augmented model with conservation laws applied
nx_solver_reinit (int) – Number of state variables with conservation laws subject to reinitialization
np (int) – Number of parameters
nk (int) – Number of constants
ny (int) – Number of observables
nytrue (int) – Number of observables of the non-augmented model
nz (int) – Number of event observables
nztrue (int) – Number of event observables of the non-augmented model
ne (int) – Number of events
nJ (int) – Number of objective functions
nw (int) – Number of repeating elements
ndwdx (int) – Number of nonzero elements in the x derivative of the repeating elements
ndwdp (int) – Number of nonzero elements in the p derivative of the repeating elements
ndwdw (int) – Number of nonzero elements in the w derivative of the repeating elements
ndxdotdw (int) – Number of nonzero elements in the \(w\) derivative of \(xdot\)
ndJydy (IntVector) – Number of nonzero elements in the \(y\) derivative of \(dJy\) (shape nytrue)
ndxrdatadxsolver (int) – Number of nonzero elements in the \(x\) derivative of \(x_rdata\)
ndxrdatadtcl (int) – Number of nonzero elements in the \(tcl\) derivative of \(x_rdata\)
ndtotal_cldx_rdata (int) – Number of nonzero elements in the \(x_rdata\) derivative of \(total_cl\)
nnz (int) – Number of nonzero elements in Jacobian
ubw (int) – Upper matrix bandwidth in the Jacobian
lbw (int) – Lower matrix bandwidth in the Jacobian
Methods Summary
__init__
(*args, **kwargs)Overload 1:
clone
()Clone this instance.
fdsigmaydy
(dsigmaydy, t, p, k, y)Model-specific implementation of fsigmay
fdtotal_cldp
(dtotal_cldp, x_rdata, p, k, ip)Compute dtotal_cl / dp
fdtotal_cldx_rdata
(dtotal_cldx_rdata, ...)Compute dtotal_cl / dx_rdata
fdx_rdatadp
(dx_rdatadp, x, tcl, p, k, ip)Compute dx_rdata / dp
fdx_rdatadtcl
(dx_rdatadtcl, x, tcl, p, k)Compute dx_rdata / dtcl
fdx_rdatadx_solver
(dx_rdatadx_solver, x, ...)Compute dx_rdata / dx_solver
Checks whether residuals should be added to account for parameter dependent sigma.
Get setting of whether the result of every call to Model::f* should be checked for finiteness.
Returns the AMICI commit that was used to generate the model
Returns the AMICI version that was used to generate the model
Get IDs of the expression.
Get names of the expressions.
getFixedParameterById
(par_id)Get value of fixed parameter with the specified ID.
getFixedParameterByName
(par_name)Get value of fixed parameter with the specified name.
Get IDs of the fixed model parameters.
Get names of the fixed model parameters.
Get values of fixed parameters.
Get the initial states sensitivities.
Get the initial states.
Gets the specified estimated lower boundary for sigma_y.
getName
()Get the model name.
Get IDs of the observables.
Get names of the observables.
Get scaling type for observable
getParameterById
(par_id)Get value of first model parameter with the specified ID.
getParameterByName
(par_name)Get value of first model parameter with the specified name.
Get IDs of the model parameters.
Get the list of parameters for which sensitivities are computed.
Get names of the model parameters.
Get parameter scale for each parameter.
Get parameter vector.
Return indices of states to be reinitialized based on provided constants / fixed parameters
Get whether initial states depending on fixedParameters are to be reinitialized after preequilibration and presimulation.
Retrieves the solver object
Get IDs of the model states.
Get IDs of the solver states.
Get flags indicating whether states should be treated as non-negative.
Get names of the model states.
Get names of the solver states.
Gets the mode how sensitivities are computed in the steadystate simulation.
getTimepoint
(it)Get simulation timepoint for time index it.
Get the timepoint vector.
Get parameters with transformation according to parameter scale applied.
Return whether custom initial state sensitivities have been set.
Return whether custom initial states have been set.
Report whether the model has expression IDs set.
Report whether the model has expression names set.
Report whether the model has fixed parameter IDs set.
Report whether the model has fixed parameter names set.
Report whether the model has observable IDs set.
Report whether the model has observable names set.
Report whether the model has parameter IDs set.
Report whether the model has parameter names set.
Checks whether the defined noise model is gaussian, i.e., the nllh is quadratic
Report whether the model has state IDs set.
Report whether the model has state names set.
Function indicating whether reinitialization of states depending on fixed parameters is permissible
k
()Get fixed parameters.
Get maximum number of events that may occur for each type.
ncl
()Get number of conservation laws.
nk
()Get number of constants
np
()Get total number of model parameters.
nplist
()Get number of parameters wrt to which sensitivities are computed.
nt
()Get number of timepoints.
Get number of solver states subject to reinitialization.
plist
(pos)Get entry in parameter list by index.
Require computation of sensitivities for all parameters p [0..np[ in natural order.
setAddSigmaResiduals
(sigma_res)Specifies whether residuals should be added to account for parameter dependent sigma.
Set flags indicating that all states should be treated as non-negative.
setAlwaysCheckFinite
(alwaysCheck)Set whether the result of every call to Model::f* should be checked for finiteness.
setFixedParameterById
(par_id, value)Set value of first fixed parameter with the specified ID.
setFixedParameterByName
(par_name, value)Set value of first fixed parameter with the specified name.
Set values for constants.
setFixedParametersByIdRegex
(par_id_regex, value)Set values of all fixed parameters with the ID matching the specified regex.
Set value of all fixed parameters with name matching the specified regex.
Set the initial state sensitivities.
setInitialStates
(x0)Set the initial states.
setMinimumSigmaResiduals
(min_sigma)Sets the estimated lower boundary for sigma_y.
setNMaxEvent
(nmaxevent)Set maximum number of events that may occur for each type.
setParameterById
(*args)Overload 1:
setParameterByName
(*args)Overload 1:
setParameterList
(plist)Set the list of parameters for which sensitivities are to be computed.
setParameterScale
(*args)- rtype
Set the parameter vector.
setParametersByIdRegex
(par_id_regex, value)Set all values of model parameters with IDs matching the specified regular expression.
setParametersByNameRegex
(par_name_regex, value)Set all values of all model parameters with names matching the specified regex.
Set indices of states to be reinitialized based on provided constants / fixed parameters
Set whether initial states depending on fixed parameters are to be reinitialized after preequilibration and presimulation.
setStateIsNonNegative
(stateIsNonNegative)Set flags indicating whether states should be treated as non-negative.
Set the mode how sensitivities are computed in the steadystate simulation.
setT0
(t0)Set simulation start time.
setTimepoints
(ts)Set the timepoint vector.
Set the initial state sensitivities.
t0
()Get simulation start time.
Attributes
app
AMICI application context
idlist
Flag array for DAE equations
lbw
Lower bandwidth of the Jacobian
nJ
Dimension of the augmented objective function for 2nd order ASA
ndJydy
Number of nonzero elements in the \(y\) derivative of \(dJy\) (dimension nytrue)
ndtotal_cldx_rdata
Number of nonzero elements in the \(x_rdata\) derivative of \(total_cl\)
ndwdp
Number of nonzero elements in the p derivative of the repeating elements
ndwdw
Number of nonzero elements in the w derivative of the repeating elements
ndwdx
Number of nonzero elements in the x derivative of the repeating elements
ndxdotdw
Number of nonzero elements in the \(w\) derivative of \(xdot\)
ndxrdatadtcl
Number of nonzero elements in the \(tcl\) derivative of \(x_rdata\)
ndxrdatadxsolver
Number of nonzero elements in the \(x\) derivative of \(x_rdata\)
ne
Number of events
nnz
Number of nonzero entries in Jacobian
nw
Number of common expressions
nx_rdata
Number of states
nx_solver
Number of states with conservation laws applied
nx_solver_reinit
Number of solver states subject to reinitialization
nxtrue_rdata
Number of states in the unaugmented system
nxtrue_solver
Number of states in the unaugmented system with conservation laws applied
ny
Number of observables
nytrue
Number of observables in the unaugmented system
nz
Number of event outputs
nztrue
Number of event outputs in the unaugmented system
o2mode
Flag indicating whether for amici::Solver::sensi_ == amici::SensitivityOrder::second directional or full second order derivative will be computed
pythonGenerated
Flag indicating Matlab- or Python-based model generation
ubw
Upper bandwidth of the Jacobian
Methods
- __init__(*args, **kwargs)[source]
- Overload 1:
Default ctor
Overload 2:
Constructor with model dimensions
- Parameters
nx_rdata (int) – Number of state variables
nxtrue_rdata (int) – Number of state variables of the non-augmented model
nx_solver (int) – Number of state variables with conservation laws applied
nxtrue_solver (int) – Number of state variables of the non-augmented model with conservation laws applied
nx_solver_reinit (int) – Number of state variables with conservation laws subject to reinitialization
np (int) – Number of parameters
nk (int) – Number of constants
ny (int) – Number of observables
nytrue (int) – Number of observables of the non-augmented model
nz (int) – Number of event observables
nztrue (int) – Number of event observables of the non-augmented model
ne (int) – Number of events
nJ (int) – Number of objective functions
nw (int) – Number of repeating elements
ndwdx (int) – Number of nonzero elements in the x derivative of the repeating elements
ndwdp (int) – Number of nonzero elements in the p derivative of the repeating elements
ndwdw (int) – Number of nonzero elements in the w derivative of the repeating elements
ndxdotdw (int) – Number of nonzero elements in the \(w\) derivative of \(xdot\)
ndJydy (IntVector) – Number of nonzero elements in the \(y\) derivative of \(dJy\) (shape nytrue)
ndxrdatadxsolver (int) – Number of nonzero elements in the \(x\) derivative of \(x_rdata\)
ndxrdatadtcl (int) – Number of nonzero elements in the \(tcl\) derivative of \(x_rdata\)
ndtotal_cldx_rdata (int) – Number of nonzero elements in the \(x_rdata\) derivative of \(total_cl\)
nnz (int) – Number of nonzero elements in Jacobian
ubw (int) – Upper matrix bandwidth in the Jacobian
lbw (int) – Lower matrix bandwidth in the Jacobian
- clone() Iterable[amici.amici.Model] [source]
Clone this instance.
- Return type
- Returns
The clone
- fdsigmaydy(dsigmaydy: Iterable[float], t: float, p: Iterable[float], k: Iterable[float], y: Iterable[float]) None [source]
Model-specific implementation of fsigmay
- Parameters
dsigmaydy (
typing.Iterable
[float
]) – partial derivative of standard deviation of measurements w.r.t. model outputst (
float
) – current timep (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectory (
typing.Iterable
[float
]) – model output at timepoint t
- Return type
- fdtotal_cldp(dtotal_cldp: Iterable[float], x_rdata: Iterable[float], p: Iterable[float], k: Iterable[float], ip: int) None [source]
Compute dtotal_cl / dp
- Parameters
dtotal_cldp (
typing.Iterable
[float
]) – dtotal_cl / dpx_rdata (
typing.Iterable
[float
]) – State variables with conservation laws appliedp (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectorip (
int
) – Sensitivity index
- Return type
- fdtotal_cldx_rdata(dtotal_cldx_rdata: Iterable[float], x_rdata: Iterable[float], p: Iterable[float], k: Iterable[float], tcl: Iterable[float]) None [source]
Compute dtotal_cl / dx_rdata
- Parameters
dtotal_cldx_rdata (
typing.Iterable
[float
]) – dtotal_cl / dx_rdatax_rdata (
typing.Iterable
[float
]) – State variables with conservation laws appliedp (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectortcl (
typing.Iterable
[float
]) – Total abundances for conservation laws
- Return type
- fdx_rdatadp(dx_rdatadp: Iterable[float], x: Iterable[float], tcl: Iterable[float], p: Iterable[float], k: Iterable[float], ip: int) None [source]
Compute dx_rdata / dp
- Parameters
dx_rdatadp (
typing.Iterable
[float
]) – dx_rdata / dpp (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectorx (
typing.Iterable
[float
]) – State variables with conservation laws appliedtcl (
typing.Iterable
[float
]) – Total abundances for conservation lawsip (
int
) – Sensitivity index
- Return type
- fdx_rdatadtcl(dx_rdatadtcl: Iterable[float], x: Iterable[float], tcl: Iterable[float], p: Iterable[float], k: Iterable[float]) None [source]
Compute dx_rdata / dtcl
- Parameters
dx_rdatadtcl (
typing.Iterable
[float
]) – dx_rdata / dtclp (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectorx (
typing.Iterable
[float
]) – State variables with conservation laws appliedtcl (
typing.Iterable
[float
]) – Total abundances for conservation laws
- Return type
- fdx_rdatadx_solver(dx_rdatadx_solver: Iterable[float], x: Iterable[float], tcl: Iterable[float], p: Iterable[float], k: Iterable[float]) None [source]
Compute dx_rdata / dx_solver
- Parameters
dx_rdatadx_solver (
typing.Iterable
[float
]) – dx_rdata / dx_solverp (
typing.Iterable
[float
]) – parameter vectork (
typing.Iterable
[float
]) – constant vectorx (
typing.Iterable
[float
]) – State variables with conservation laws appliedtcl (
typing.Iterable
[float
]) – Total abundances for conservation laws
- Return type
- getAddSigmaResiduals() bool [source]
Checks whether residuals should be added to account for parameter dependent sigma.
- Return type
boolean
- Returns
sigma_res
- getAlwaysCheckFinite() bool [source]
Get setting of whether the result of every call to Model::f* should be checked for finiteness.
- Return type
boolean
- Returns
that
- getAmiciCommit() str
Returns the AMICI commit that was used to generate the model
- Return type
- Returns
AMICI commit string
- getAmiciVersion() str
Returns the AMICI version that was used to generate the model
- Return type
- Returns
AMICI version string
- getExpressionIds() amici.amici.StringVector [source]
Get IDs of the expression.
- Return type
- Returns
Expression IDs
- getExpressionNames() amici.amici.StringVector [source]
Get names of the expressions.
- Return type
- Returns
Expression names
- getFixedParameterById(par_id: str) float [source]
Get value of fixed parameter with the specified ID.
- getFixedParameterByName(par_name: str) float [source]
Get value of fixed parameter with the specified name.
If multiple parameters have the same name, the first parameter with matching name is returned.
- getFixedParameterIds() amici.amici.StringVector [source]
Get IDs of the fixed model parameters.
- Return type
- Returns
Fixed parameter IDs
- getFixedParameterNames() amici.amici.StringVector [source]
Get names of the fixed model parameters.
- Return type
- Returns
Fixed parameter names
- getFixedParameters() amici.amici.DoubleVector [source]
Get values of fixed parameters.
- Return type
- Returns
Vector of fixed parameters with same ordering as in Model::getFixedParameterIds
- getInitialStateSensitivities() amici.amici.DoubleVector [source]
Get the initial states sensitivities.
- Return type
- Returns
vector of initial state sensitivities
- getInitialStates() amici.amici.DoubleVector [source]
Get the initial states.
- Return type
- Returns
Initial state vector
- getMinimumSigmaResiduals() float [source]
Gets the specified estimated lower boundary for sigma_y.
- Return type
- Returns
lower boundary
- getObservableIds() amici.amici.StringVector [source]
Get IDs of the observables.
- Return type
- Returns
Observable IDs
- getObservableNames() amici.amici.StringVector [source]
Get names of the observables.
- Return type
- Returns
Observable names
- getObservableScaling(iy: int) amici.amici.ObservableScaling [source]
Get scaling type for observable
- getParameterById(par_id: str) float [source]
Get value of first model parameter with the specified ID.
- getParameterByName(par_name: str) float [source]
Get value of first model parameter with the specified name.
- getParameterIds() amici.amici.StringVector [source]
Get IDs of the model parameters.
- Return type
- Returns
Parameter IDs
- getParameterList() amici.amici.IntVector [source]
Get the list of parameters for which sensitivities are computed.
- Return type
- Returns
List of parameter indices
- getParameterNames() amici.amici.StringVector [source]
Get names of the model parameters.
- Return type
- Returns
The parameter names
- getParameterScale() amici.amici.ParameterScalingVector [source]
Get parameter scale for each parameter.
- Return type
- Returns
Vector of parameter scales
- getParameters() amici.amici.DoubleVector [source]
Get parameter vector.
- Return type
- Returns
The user-set parameters (see also Model::getUnscaledParameters)
- getReinitializationStateIdxs() amici.amici.IntVector [source]
Return indices of states to be reinitialized based on provided constants / fixed parameters
- Return type
- Returns
Those indices.
- getReinitializeFixedParameterInitialStates() bool [source]
Get whether initial states depending on fixedParameters are to be reinitialized after preequilibration and presimulation.
- Return type
boolean
- Returns
flag true / false
- getSolver() amici.amici.Solver
Retrieves the solver object
- Return type
- Returns
The Solver instance
- getStateIds() amici.amici.StringVector [source]
Get IDs of the model states.
- Return type
- Returns
State IDs
- getStateIdsSolver() amici.amici.StringVector [source]
Get IDs of the solver states.
- Return type
- Returns
State IDs
- getStateIsNonNegative() amici.amici.BoolVector [source]
Get flags indicating whether states should be treated as non-negative.
- Return type
- Returns
Vector of flags
- getStateNames() amici.amici.StringVector [source]
Get names of the model states.
- Return type
- Returns
State names
- getStateNamesSolver() amici.amici.StringVector [source]
Get names of the solver states.
- Return type
- Returns
State names
- getSteadyStateSensitivityMode() amici.amici.SteadyStateSensitivityMode [source]
Gets the mode how sensitivities are computed in the steadystate simulation.
- Return type
- Returns
Mode
- getTimepoints() amici.amici.DoubleVector [source]
Get the timepoint vector.
- Return type
- Returns
Timepoint vector
- getUnscaledParameters() amici.amici.DoubleVector [source]
Get parameters with transformation according to parameter scale applied.
- Return type
- Returns
Unscaled parameters
- hasCustomInitialStateSensitivities() bool [source]
Return whether custom initial state sensitivities have been set.
- Return type
boolean
- Returns
true if has custom initial state sensitivities, otherwise false.
- hasCustomInitialStates() bool [source]
Return whether custom initial states have been set.
- Return type
boolean
- Returns
true if has custom initial states, otherwise false
- hasExpressionIds() bool [source]
Report whether the model has expression IDs set.
- Return type
boolean
- Returns
Boolean indicating whether expression ids were set. Also returns true if the number of corresponding variables is just zero.
- hasExpressionNames() bool [source]
Report whether the model has expression names set.
- Return type
boolean
- Returns
Boolean indicating whether expression names were set. Also returns true if the number of corresponding variables is just zero.
- hasFixedParameterIds() bool [source]
Report whether the model has fixed parameter IDs set.
- Return type
boolean
- Returns
Boolean indicating whether fixed parameter IDs were set. Also returns true if the number of corresponding variables is just zero.
- hasFixedParameterNames() bool [source]
Report whether the model has fixed parameter names set.
- Return type
boolean
- Returns
Boolean indicating whether fixed parameter names were set. Also returns true if the number of corresponding variables is just zero.
- hasObservableIds() bool [source]
Report whether the model has observable IDs set.
- Return type
boolean
- Returns
Boolean indicating whether observable ids were set. Also returns true if the number of corresponding variables is just zero.
- hasObservableNames() bool [source]
Report whether the model has observable names set.
- Return type
boolean
- Returns
Boolean indicating whether observable names were set. Also returns true if the number of corresponding variables is just zero.
- hasParameterIds() bool [source]
Report whether the model has parameter IDs set.
- Return type
boolean
- Returns
Boolean indicating whether parameter IDs were set. Also returns true if the number of corresponding variables is just zero.
- hasParameterNames() bool [source]
Report whether the model has parameter names set.
- Return type
boolean
- Returns
Boolean indicating whether parameter names were set. Also returns true if the number of corresponding variables is just zero.
- hasQuadraticLLH() bool [source]
Checks whether the defined noise model is gaussian, i.e., the nllh is quadratic
- Return type
boolean
- Returns
boolean flag
- hasStateIds() bool [source]
Report whether the model has state IDs set.
- Return type
boolean
- Returns
Boolean indicating whether state IDs were set. Also returns true if the number of corresponding variables is just zero.
- hasStateNames() bool [source]
Report whether the model has state names set.
- Return type
boolean
- Returns
Boolean indicating whether state names were set. Also returns true if the number of corresponding variables is just zero.
- isFixedParameterStateReinitializationAllowed() bool
Function indicating whether reinitialization of states depending on fixed parameters is permissible
- Return type
boolean
- Returns
flag indicating whether reinitialization of states depending on fixed parameters is permissible
- nMaxEvent() int [source]
Get maximum number of events that may occur for each type.
- Return type
- Returns
Maximum number of events that may occur for each type
- ncl() int [source]
Get number of conservation laws.
- Return type
- Returns
Number of conservation laws (i.e., difference between nx_rdata and nx_solver).
- np() int [source]
Get total number of model parameters.
- Return type
- Returns
Length of parameter vector
- nplist() int [source]
Get number of parameters wrt to which sensitivities are computed.
- Return type
- Returns
Length of sensitivity index vector
- nx_reinit() int [source]
Get number of solver states subject to reinitialization.
- Return type
- Returns
Model member nx_solver_reinit
- requireSensitivitiesForAllParameters() None [source]
Require computation of sensitivities for all parameters p [0..np[ in natural order.
NOTE: Resets initial state sensitivities.
- Return type
- setAddSigmaResiduals(sigma_res: bool) None [source]
Specifies whether residuals should be added to account for parameter dependent sigma.
If set to true, additional residuals of the form \(\sqrt{\log(\sigma) + C}\) will be added. This enables least-squares optimization for variables with Gaussian noise assumption and parameter dependent standard deviation sigma. The constant \(C\) can be set via
setMinimumSigmaResiduals()
.
- setAllStatesNonNegative() None [source]
Set flags indicating that all states should be treated as non-negative.
- Return type
- setAlwaysCheckFinite(alwaysCheck: bool) None [source]
Set whether the result of every call to Model::f* should be checked for finiteness.
- setFixedParameterById(par_id: str, value: float) None [source]
Set value of first fixed parameter with the specified ID.
- setFixedParameterByName(par_name: str, value: float) None [source]
Set value of first fixed parameter with the specified name.
- setFixedParameters(k: amici.amici.DoubleVector) None [source]
Set values for constants.
- Parameters
k (
amici.amici.DoubleVector
) – Vector of fixed parameters- Return type
- setFixedParametersByIdRegex(par_id_regex: str, value: float) int [source]
Set values of all fixed parameters with the ID matching the specified regex.
- setFixedParametersByNameRegex(par_name_regex: str, value: float) int [source]
Set value of all fixed parameters with name matching the specified regex.
- setInitialStateSensitivities(sx0: amici.amici.DoubleVector) None [source]
Set the initial state sensitivities.
- Parameters
sx0 (
amici.amici.DoubleVector
) – vector of initial state sensitivities with chainrule applied. This could be a slice of ReturnData::sx or ReturnData::sx0- Return type
- setInitialStates(x0: amici.amici.DoubleVector) None [source]
Set the initial states.
- Parameters
x0 (
amici.amici.DoubleVector
) – Initial state vector- Return type
- setMinimumSigmaResiduals(min_sigma: float) None [source]
Sets the estimated lower boundary for sigma_y. When
setAddSigmaResiduals()
is activated, this lower boundary must ensure that log(sigma) + min_sigma > 0.
- setNMaxEvent(nmaxevent: int) None [source]
Set maximum number of events that may occur for each type.
- setParameterById(*args) None [source]
Overload 1:
Set model parameters according to the parameter IDs and mapped values.
- Parameters
p (StringDoubleMap) – Map of parameters IDs and values
ignoreErrors (boolean, optional) – Ignore errors such as parameter IDs in p which are not model parameters
Overload 2:
Set value of first model parameter with the specified ID.
- setParameterByName(*args) None [source]
Overload 1:
Set value of first model parameter with the specified name.
Overload 2:
Set model parameters according to the parameter name and mapped values.
- Parameters
p (StringDoubleMap) – Map of parameters names and values
ignoreErrors (boolean, optional) – Ignore errors such as parameter names in p which are not model parameters
Overload 3:
Set model parameters according to the parameter name and mapped values.
- Parameters
p (StringDoubleMap) – Map of parameters names and values
ignoreErrors – Ignore errors such as parameter names in p which are not model parameters
- Return type
- setParameterList(plist: amici.amici.IntVector) None [source]
Set the list of parameters for which sensitivities are to be computed.
NOTE: Resets initial state sensitivities.
- Parameters
plist (
amici.amici.IntVector
) – List of parameter indices- Return type
- setParameters(p: amici.amici.DoubleVector) None [source]
Set the parameter vector.
- Parameters
p (
amici.amici.DoubleVector
) – Vector of parameters- Return type
- setParametersByIdRegex(par_id_regex: str, value: float) int [source]
Set all values of model parameters with IDs matching the specified regular expression.
- setParametersByNameRegex(par_name_regex: str, value: float) int [source]
Set all values of all model parameters with names matching the specified regex.
- setReinitializationStateIdxs(idxs: amici.amici.IntVector) None [source]
Set indices of states to be reinitialized based on provided constants / fixed parameters
- Parameters
idxs (
amici.amici.IntVector
) – Array of state indices- Return type
- setReinitializeFixedParameterInitialStates(flag: bool) None [source]
Set whether initial states depending on fixed parameters are to be reinitialized after preequilibration and presimulation.
- setStateIsNonNegative(stateIsNonNegative: amici.amici.BoolVector) None [source]
Set flags indicating whether states should be treated as non-negative.
- Parameters
stateIsNonNegative (
amici.amici.BoolVector
) – Vector of flags- Return type
- setSteadyStateSensitivityMode(mode: amici.amici.SteadyStateSensitivityMode) None [source]
Set the mode how sensitivities are computed in the steadystate simulation.
- Parameters
mode (
amici.amici.SteadyStateSensitivityMode
) – Steadystate sensitivity mode- Return type
- setTimepoints(ts: amici.amici.DoubleVector) None [source]
Set the timepoint vector.
- Parameters
ts (
amici.amici.DoubleVector
) – New timepoint vector- Return type
- setUnscaledInitialStateSensitivities(sx0: amici.amici.DoubleVector) None [source]
Set the initial state sensitivities.
- Parameters
sx0 (
amici.amici.DoubleVector
) – Vector of initial state sensitivities without chainrule applied. This could be the readin from a model.sx0data saved to HDF5.- Return type