sbmlsim.simulation.range

Range classes.

Module Contents

Classes

Range

Range class.

VectorRange

VectorRange class.

UniformRangeType

UniformRangeType.

UniformRange

UniformRange class.

DataRange

DataRange class.

FunctionalRange

FunctionalRange class.

Dimension

Define dimension for a scan.

Attributes

vrange1

class sbmlsim.simulation.range.Range(sid, name=None)[source]

Bases: sbmlsim.simulation.base.BaseObject

Range class.

The Range class is the base class for the different types of ranges, i.e. UniformRange, VectorRange, FunctionalRange, and DataRange.

Parameters
  • sid (str) –

  • name (str) –

__repr__(self)[source]

Get string representation.

Return type

str

property values(self)[source]

Get values of the range.

Return type

numpy.ndarray

class sbmlsim.simulation.range.VectorRange(sid, values, name=None)[source]

Bases: Range

VectorRange class.

The VectorRange describes an ordered collection of real values, listing them explicitly within child value elements.

Parameters
  • sid (str) –

  • values (Union[List, Tuple, numpy.ndarray]) –

  • name (str) –

__repr__(self)[source]

Get string representation.

Return type

str

class sbmlsim.simulation.range.UniformRangeType[source]

Bases: enum.Enum

UniformRangeType.

Attribute type that can take the values linear or log. Determines whether to draw the values logarithmically (with a base of 10) or linearly.

linear[source]
log[source]
class sbmlsim.simulation.range.UniformRange(sid, start, end, steps, range_type, name=None)[source]

Bases: Range

UniformRange class.

The UniformRange on the preceding page) allows the definition of a Range with uniformly spaced values. The range_type determines whether to draw the values logarithmically (with a base of 10) or linearly.

Parameters
  • sid (str) –

  • start (float) –

  • end (float) –

  • steps (int) –

  • range_type (UniformRangeType) –

  • name (str) –

__repr__(self)[source]

Get string representation.

Return type

str

class sbmlsim.simulation.range.DataRange(sid, source_ref, name=None)[source]

Bases: Range

DataRange class.

The DataRange constructs a range by reference to external data. The sourceRef must point to a DataDescription with a single dimension, whose values are used as the values of the range.

Parameters
  • sid (str) –

  • source_ref (str) –

  • name (str) –

__repr__(self)[source]

Get string representation.

Return type

str

property values(self)[source]

Resolve data from data generator.

Return type

numpy.ndarray

class sbmlsim.simulation.range.FunctionalRange(sid, range, name=None)[source]

Bases: Range

FunctionalRange class.

The FunctionalRange constructs a range through calculations that determine the next value based on the value(s) of other range(s) or model variables. In this it is similar to the ComputeChange element, and shares some of the same child elements (but is not a subclass of ComputeChange).

Parameters
  • sid (str) –

  • range (str) –

  • name (str) –

__repr__(self)[source]

Get string representation.

Return type

str

property values(self)[source]

Resolve data from data generator.

Return type

numpy.ndarray

class sbmlsim.simulation.range.Dimension(dimension, index=None, changes=None)[source]

Define dimension for a scan.

The dimension defines how the dimension is called, the index is the corresponding index of the dimension.

Parameters
  • dimension (str) –

  • index (numpy.ndarray) –

  • changes (Dict) –

__repr__(self)[source]

Get representation.

Return type

str

__len__(self)[source]

Get length.

Return type

int

static indices_from_dimensions(dimensions)[source]

Get indices of all combinations of dimensions.

Parameters

dimensions (List[Dimension]) –

sbmlsim.simulation.range.vrange1[source]