sbmlsim.simulation.calculation

Module for performing all the Calculations.

Module Contents

Classes

Parameter

Parameter class.

AppliedDimension

AppliedDimension class.

Variable

Variable class.

DependentVariable

DependentVariable class.

Calculation

Calculation class.

ComputeChange

ComputeChange class.

DataGenerator

DataGenerator class.

FunctionalRange

FunctionalRange class.

Attributes

pars

class sbmlsim.simulation.calculation.Parameter(sid, value, unit=None, name=None)[source]

Bases: sbmlsim.simulation.base.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.

Parameters:
  • sid (str) –

  • value (float) –

  • unit (Optional[str]) –

  • name (Optional[str]) –

__repr__()[source]

Get string representation.

Return type:

str

class sbmlsim.simulation.calculation.AppliedDimension(target=None, dimension_target=None, sid=None, name=None)[source]

Bases: sbmlsim.simulation.base.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.”

Parameters:
  • target (Optional[str]) –

  • dimension_target (Optional[str]) –

  • sid (Optional[str]) –

  • name (Optional[str]) –

__repr__()[source]

Get string representation.

Return type:

str

class sbmlsim.simulation.calculation.Variable(sid, model_reference, task_reference, target=None, symbol=None, unit=None, name=None, term=None, applied_dimensions=None)[source]

Bases: sbmlsim.simulation.base.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.

Parameters:
__repr__()[source]

Get string representation.

Return type:

str

class sbmlsim.simulation.calculation.DependentVariable(sid, model_reference, task_reference, target=None, symbol=None, target2=None, symbol2=None, unit=None, name=None, term=None, applied_dimensions=None)[source]

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’.

Parameters:
class sbmlsim.simulation.calculation.Calculation(sid, variables, parameters, math, name=None)[source]

Bases: sbmlsim.simulation.base.BaseObjectSIdRequired

Calculation class.

Used by ComputeChange, DataGenerator and FunctionalRange.

Parameters:
  • sid (str) –

  • variables (List[Variable]) –

  • parameters (List[Parameter]) –

  • math (str) –

  • name (Optional[str]) –

values()[source]

Access to values.

__repr__()[source]

Get string representation.

Return type:

str

class sbmlsim.simulation.calculation.ComputeChange(sid, variables, parameters, math, name=None)[source]

Bases: Calculation

ComputeChange class.

Parameters:
  • sid (str) –

  • variables (List[Variable]) –

  • parameters (List[Parameter]) –

  • math (str) –

  • name (Optional[str]) –

class sbmlsim.simulation.calculation.DataGenerator(sid, variables, parameters, math, name=None)[source]

Bases: Calculation

DataGenerator class.

Parameters:
  • sid (str) –

  • variables (List[Variable]) –

  • parameters (List[Parameter]) –

  • math (str) –

  • name (Optional[str]) –

class sbmlsim.simulation.calculation.FunctionalRange(sid, variables, parameters, math, name=None)[source]

Bases: Calculation

FunctionalRange class.

Parameters:
  • sid (str) –

  • variables (List[Variable]) –

  • parameters (List[Parameter]) –

  • math (str) –

  • name (Optional[str]) –

sbmlsim.simulation.calculation.pars: List[Parameter][source]