ocpa.objects.oc_petri_net package
Submodules
ocpa.objects.oc_petri_net.obj module
- class ocpa.objects.oc_petri_net.obj.EnhancedObjectCentricPetriNet(ocpn: ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet, behavior: List[str], diagnostics: Dict[str, Any])
Bases:
object- behavior: List[str]
- diagnostics: Dict[str, Any]
- class ocpa.objects.oc_petri_net.obj.Marking(_tokens: Set[Tuple[ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet.Place, str]] = <factory>)
Bases:
objectRepresenting a Marking of an Object-Centric Petri Net.
…
Attributes tokens: set(Tuple)
- add_token(pl, obj):
adds an object obj to a place pl
- add_token(pl, obj)
Add a token to a place in a marking. :param pl: :type pl: Place :param obj: :type obj: string
- Returns
- Return type
None
- property tokens: Set[Tuple[ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet.Place, str]]
- class ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet(name=None, places=None, transitions=None, arcs=None, properties=None, nets=None)
Bases:
objectStoring an Object-Centric Petri Net.
- class Arc(source, target, variable=False, weight=1, properties=None)
Bases:
object- property properties
- property source
- property target
- property variable
- property weight
- class Place(name, object_type, out_arcs=None, in_arcs=None, initial=False, final=False)
Bases:
object- property final
- property in_arcs
- property initial
- property name
- property object_type
- property out_arcs
- property postset
- property preset
- class Transition(name, label=None, in_arcs=None, out_arcs=None, properties=None, silent=False)
Bases:
object- property in_arcs
- property label
- property name
- property out_arcs
- property postset
- property postset_object_type
- property preset
- property preset_object_type
- property properties
- property silent
- add_arc(arc)
Adds an arc to the object-centric Petri net. :param arc: :type arc: Arc
- Returns
- Return type
None
- add_arcs(arcs)
Adds arcs to the object-centric Petri net. :param arcs: :type arcs: list(Arc)
- find_arc(source, target)
Returns an arc object if source and target are connected. Soruce and target can not both be transition or both be place.
- Parameters
source (Place or Transition) –
target (Place or Transition) –
- Returns
- Return type
Arc or None
- find_transition(name)
finds a transition by name of the transition. :param name: :type name: string
- Returns
- Return type
None
- property name
- property nets
- property object_types
- property places
Places of the object-centric Petri net.
- Returns
Set of Places
- Return type
set(Place)
- property properties
- remove_arcs(arcs)
Removes multiple already existing arcs.
- Parameters
arcs (list(Arc)) –
- Returns
- Return type
None
- remove_place(pl)
Removes an already existing place.
- Parameters
pl (Place) –
- Returns
- Return type
None
- remove_transition(t)
Removes an already existing transition from the net. :param t: :type t: Transition
- Returns
- Return type
None
- property transitions
Transitions of the object-centric Petri net.
- Returns
Set of Transitions
- Return type
set(Transition)
- class ocpa.objects.oc_petri_net.obj.Subprocess(_ocpn: ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet, _object_types: Set[str] = <factory>, _activities: Set[str] = <factory>, _transitions: Set[ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet.Transition] = <factory>, _sound: Any = False)
Bases:
object- property object_types: Set[str]
- property sound
- property transitions: Set[ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet.Transition]