Skip to content

simulation.calculation

Module for performing all the Calculations.

Parameter

Parameter(sid, value, unit=None, name=None)

Bases: BaseObjectSIdRequired

Parameter class.

The Parameter class (Figure 2.4) is used to create named pars with a constant value. A Parameter can be used wherever a mathematical expression to compute a value is defined, e.g., in ComputeChange, FunctionalRange or DataGenerator. The Parameter definitions are local to the particular class defining them.

Construct Parameter.

AppliedDimension

AppliedDimension(
    target=None, dimension_target=None, sid=None, name=None
)

Bases: BaseObject

AppliedDimension class.

A AppliedDimension object is used when the term of the Variable is a function that reduces the dimen- sionality of the data.

Dimension reducing functions can be applied in two contexts: First to reduce data from RepeatedTasks and nested RepeatedTasks which requires the taskReference of the variable to be set and to be a reference to a RepeatedTask. All AppliedDimensions must have the target set and reference either one of the possibly nested RepeatedTask Sids or the Task within the RepeatedTask. Second to reduce data from a multi-dimensional DataSource in a DataGenerator which requires the target of the variable to be set to reference the respective DataSource. The AppliedDimensions must have the dimensionTarget set to a NuMLIdRef referencing a dimension of the data." "If the listOfAppliedDimensions contains 2 or more AppliedDimensions the reducing function is applied on an element-by-element basis."

Construct Parameter.

Variable

Variable(
    sid,
    model_reference,
    task_reference,
    target=None,
    symbol=None,
    unit=None,
    name=None,
    term=None,
    applied_dimensions=None,
)

Bases: BaseObjectSIdRequired

Variable class.

A Variable is a reference to an already existing entity, either explicitly created in the SED-ML Document, or to an implicitly defined symbol.

Construct Variable.

DependentVariable

DependentVariable(
    sid,
    model_reference,
    task_reference,
    target=None,
    symbol=None,
    target2=None,
    symbol2=None,
    unit=None,
    name=None,
    term=None,
    applied_dimensions=None,
)

Bases: Variable

DependentVariable class.

A dependent variable is necessary when the desired variable is a composite of two other variables, such as ‘the rate of change of S1 with respect to time’.

Construct DependentVariable.

Calculation

Calculation(sid, variables, parameters, math, name=None)

Bases: BaseObjectSIdRequired

Calculation class.

Used by ComputeChange, DataGenerator and FunctionalRange.

Construct Calculation.

values

values()

Access to values.

ComputeChange

ComputeChange(sid, variables, parameters, math, name=None)

Bases: Calculation

ComputeChange class.

DataGenerator

DataGenerator(sid, variables, parameters, math, name=None)

Bases: Calculation

DataGenerator class.

FunctionalRange

FunctionalRange(
    sid, variables, parameters, math, name=None
)

Bases: Calculation

FunctionalRange class.