Module: YPetri::World::PetriNetAspect
- Defined in:
- lib/y_petri/world/petri_net_aspect.rb
Overview
Workspace instance methods related to the Petri net aspect of YPetri (places, transitions, net instances).
Instance Method Summary collapse
-
#initialize ⇒ Object
Instance initialization.
-
#net(id) ⇒ Object
Returns a net instance identified by the argument.
-
#nets ⇒ Object
Net instances.
-
#place(id) ⇒ Object
Returns a place instance identified by the argument.
-
#places ⇒ Object
Place instances.
-
#transition(id) ⇒ Object
Returns a transition instance identified by the argument.
-
#transitions ⇒ Object
Transition instances.
Instance Method Details
#initialize ⇒ Object
Instance initialization.
9 10 11 12 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 9 def initialize set_up_Top_net # Sets up :Top net encompassing all places and transitions. super end |
#net(id) ⇒ Object
Returns a net instance identified by the argument.
28 29 30 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 28 def net( id ) Net().instance( id ) end |
#nets ⇒ Object
Net instances.
46 47 48 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 46 def nets Net().instances end |
#place(id) ⇒ Object
Returns a place instance identified by the argument.
16 17 18 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 16 def place( id ) Place().instance( id ) end |
#places ⇒ Object
Place instances.
34 35 36 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 34 def places Place().instances end |
#transition(id) ⇒ Object
Returns a transition instance identified by the argument.
22 23 24 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 22 def transition( id ) Transition().instance( id ) end |
#transitions ⇒ Object
Transition instances.
40 41 42 |
# File 'lib/y_petri/world/petri_net_aspect.rb', line 40 def transitions Transition().instances end |