libmuscle.manager.topology_store module

class libmuscle.manager.topology_store.TopologyStore(config: Configuration)[source]

Bases: object

Holds a description of how the simulation is wired together.

This class contains the list of conduits through which the submodels are connected.

conduits

A list of conduits.

Type:

List[Conduit]

get_conduits(component: Reference) List[Conduit][source]

Returns the list of conduits that attach to the given component.

Parameters:

component – Name of the component.

Returns:

All conduits that this component is a sender or receiver of.

get_peer_dimensions(component: Reference) Dict[Reference, List[int]][source]

Returns the dimensions of peer components.

For each component that the given component shares a conduit with, the returned dictionary has an entry containing its dimensions.

Parameters:

component – Name of the component for which to get peers.

Returns:

A dict of peer components and their dimensions.

get_peer_instances(instance: Reference) List[Reference][source]

Generates the names of all peer instances of an instance.

Parameters:

instance – The instance whose peers to generate.

Returns:

All peer instance identifiers.

get_ports(component: Reference) Ports[source]

Returns the port declaration (from the yMMSL) for a component.

Parameters:

component – The component to request the ports from.

Returns:

The port declaration in the yMMSL (from the model/components section).

has_component(component: Reference) bool[source]

Returns True iff the given component is in the model.

Parameters:

component – The component to check for.