nineml.abstraction_layer.component.ComponentClassMixinFlatStructure

class nineml.abstraction_layer.component.ComponentClassMixinFlatStructure(name, parameters=None, analog_ports=None, event_ports=None, dynamics=None)

Mixin Class that provides the infrastructure for local component definitions - i.e. the interface and the dynamics

__init__(name, parameters=None, analog_ports=None, event_ports=None, dynamics=None)

Constructor - For parameter descriptions, see the ComponentClass.__init__() method

Methods

__init__(name[, parameters, analog_ports, ...]) Constructor - For parameter descriptions, see the
backsub_all() Expand all alias definitions in local equations.
write(file[, flatten]) Export this model to an XML file.

Attributes

aliases Forwarding function to self.dynamics.aliases
aliases_map Forwarding function to self.dynamics.alias_map
analog_ports Returns an iterator over the local AnalogPort objects
dynamics Returns the local Dynamics object
event_ports Returns an iterator over the local EventPort objects
name Returns the name of the component
parameters Returns an iterator over the local Parameter objects
regimes Forwarding function to self.dynamics.regimes
regimes_map Forwarding function to self.dynamics.regimes_map
state_variables Forwarding function to self.dynamics.state_variables
state_variables_map Forwarding function to self.dynamics.state_variables_map
transitions Forwarding function to self.dynamics.transitions
backsub_all()

Expand all alias definitions in local equations.

This function finds Aliases, TimeDerivatives, send AnalogPorts, StateAssignments and Conditions which are defined in terms of other Aliases, and expands them, such that each only has Parameters, StateVariables and recv/reduce AnalogPorts on the RHS.

write(file, flatten=True)

Export this model to an XML file.

Params file:A filename or fileobject
Params flatten:Boolean specifying whether the component should be flattened before saving
aliases

Forwarding function to self.dynamics.aliases

aliases_map

Forwarding function to self.dynamics.alias_map

analog_ports

Returns an iterator over the local AnalogPort objects

dynamics

Returns the local Dynamics object

event_ports

Returns an iterator over the local EventPort objects

name

Returns the name of the component

parameters

Returns an iterator over the local Parameter objects

regimes

Forwarding function to self.dynamics.regimes

regimes_map

Forwarding function to self.dynamics.regimes_map

state_variables

Forwarding function to self.dynamics.state_variables

state_variables_map

Forwarding function to self.dynamics.state_variables_map

transitions

Forwarding function to self.dynamics.transitions