newCompartment creates a new compartment.

newCompartment(
  name,
  type = c("fixed", "assignment", "ode"),
  dimensionality = NULL,
  initial_size = NULL,
  initial_expression = NULL,
  expression = NULL,
  model = getCurrentModel()
)

Arguments

name

string

type

string

dimensionality

Dimensionality of the compartment (0D, 1D, 2D, 3D), as number.

initial_size

number

initial_expression

Initial expression to set, as string, finite numeric, or logical.

expression

Expression to set, as string, finite numeric, or logical.

model

a model object

Details

Arguments priority from lowest to highest is initial_size, initial_expression.

The online article on model building provides some further context.