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]
ocpn: ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet
class ocpa.objects.oc_petri_net.obj.Marking

Bases: collections.Counter

Representing a Marking of an Object-Centric Petri Net.

Attributes

class ocpa.objects.oc_petri_net.obj.ObjectCentricPetriNet(name=None, places=None, transitions=None, arcs=None, properties=None, nets=None, place_mapping=None, transition_mapping=None, arc_mapping=None)

Bases: object

Storing an Object-Centric Petri Net.

class Arc(source, target, variable=False, weight=1, properties=None)

Bases: object

property properties
property source
property target
to_dict()
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
to_dict()
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
to_dict()
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)

ancestor_places(t, ot)
ancestor_transitions(t, ot)
property arc_mapping
property arcs

Arcs of the object-centric Petri net.

Returns

Set of Arcs

Return type

set(Arc)

descendant_places(t, ot)
descendant_transitions(t, ot)
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
Returns

Return type

Arc or None

find_place(name)

finds a transition by name of the transition. :param name: :type name: string

Returns

Return type

None

find_transition(label)

finds a transition by the label of the transition. :param name: :type name: string

Returns

Return type

None

property name
property nets
property object_types
property place_mapping
property places

Places of the object-centric Petri net.

Returns

Set of Places

Return type

set(Place)

property properties
remove_arc(arc)

Removes an already existing arc.

Parameters

arc (Arc) –

Returns

Return type

None

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

subnet(source_t, target_t, ot)
to_dict()
property transition_mapping
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]

ocpa.objects.oc_petri_net.properties module

ocpa.objects.oc_petri_net.semantics module

Module contents