Networks#
Automata can be composed to an automaton network.
We recommend constructing networks via the method create_network()
of the respective modeling context:
from momba import model
# creates a *Probabilistic Timed Automata* (PTA) modeling context
ctx = model.Context(model.ModelType.PTA)
# let's create an automaton network named *network*
network = ctx.create_network(name="network")
network
<momba.model.networks.Network at 0x7f6c54d11e80>
A network comprises a set of automaton instances connected via links.
- class momba.model.Network(ctx, *, name=None)[source]#
Represents an automaton network.
- name#
The optional name of the network.
- property links#
The set of links of the network.
- property instances#
The set of instances of the network.
- property initial_restriction#
An optional restriction to be satisfied by initial states.
This property can be set only once on a network. The expression has to be boolean.
Raises
ModelingError
when set twice or to a non-boolean expression.
- add_instance(instance)[source]#
Adds an instance to the network.
The instance and network are required to be in the same modeling context.
- create_link(vector, *, result=None, condition=None)[source]#
Creates a synchronization link between automata instances.
The parameter vector is a mapping from the instances participating in the synchronization to action patterns with which they participate.
The parameter result is the action pattern resulting from synchronizing.