# Struct ModelDimensions¶

## Struct Documentation¶

struct amici::ModelDimensions

Container for model dimensions.

Holds number of states, observables, etc.

Subclassed by ,

Public Functions

ModelDimensions() = default

Default ctor

ModelDimensions(const int nx_rdata, const int nxtrue_rdata, const int nx_solver, const int nxtrue_solver, const int nx_solver_reinit, const int np, const int nk, const int ny, const int nytrue, const int nz, const int nztrue, const int ne, const int nJ, const int nw, const int ndwdx, const int ndwdp, const int ndwdw, const int ndxdotdw, std::vector<int> ndJydy, const int nnz, const int ubw, const int lbw)

Constructor with model dimensions.

Parameters
• nx_rdata: Number of state variables

• nxtrue_rdata: Number of state variables of the non-augmented model

• nx_solver: Number of state variables with conservation laws applied

• nxtrue_solver: Number of state variables of the non-augmented model with conservation laws applied

• nx_solver_reinit: Number of state variables with conservation laws subject to reinitialization

• np: Number of parameters

• nk: Number of constants

• ny: Number of observables

• nytrue: Number of observables of the non-augmented model

• nz: Number of event observables

• nztrue: Number of event observables of the non-augmented model

• ne: Number of events

• nJ: Number of objective functions

• nw: Number of repeating elements

• ndwdx: Number of nonzero elements in the x derivative of the repeating elements

• 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

• ndxdotdw: Number of nonzero elements in the $$w$$ derivative of $$xdot$$

• ndJydy: Number of nonzero elements in the $$y$$ derivative of $$dJy$$ (shape nytrue)

• nnz: Number of nonzero elements in Jacobian

• ubw: Upper matrix bandwidth in the Jacobian

• lbw: Lower matrix bandwidth in the Jacobian

Public Members

int nx_rdata = {0}

Number of states

int nxtrue_rdata = {0}

Number of states in the unaugmented system

int nx_solver = {0}

Number of states with conservation laws applied

int nxtrue_solver = {0}

Number of states in the unaugmented system with conservation laws applied

int nx_solver_reinit = {0}

Number of solver states subject to reinitialization

int np = {0}

Number of parameters

int nk = {0}

Number of constants

int ny = {0}

Number of observables

int nytrue = {0}

Number of observables in the unaugmented system

int nz = {0}

Number of event outputs

int nztrue = {0}

Number of event outputs in the unaugmented system

int ne = {0}

Number of events

int nw = {0}

Number of common expressions

int ndwdx = {0}

Number of nonzero elements in the x derivative of the repeating elements

int ndwdp = {0}

Number of nonzero elements in the p derivative of the repeating elements

int ndwdw = {0}

Number of nonzero elements in the w derivative of the repeating elements

int ndxdotdw = {0}

Number of nonzero elements in the $$w$$ derivative of $$xdot$$

std::vector<int> ndJydy

Number of nonzero elements in the $$y$$ derivative of $$dJy$$ (dimension nytrue)

int nnz = {0}

Number of nonzero entries in Jacobian

int nJ = {0}

Dimension of the augmented objective function for 2nd order ASA

int ubw = {0}

Upper bandwidth of the Jacobian

int lbw = {0}

Lower bandwidth of the Jacobian