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

Instance Method Details

#initializeObject

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

#netsObject

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

#placesObject

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

#transitionsObject

Transition instances.



40
41
42
# File 'lib/y_petri/world/petri_net_aspect.rb', line 40

def transitions
  Transition().instances
end