class YPetri::Simulation::NodeRepresentation
Representation of a YPetri
node inside a YPetri::Simulation
instance. An instance of YPetri::Simulation
does is constructed based on an instance of YPetri::Net
, but not directly work with Petri net nodes (that is, it does not work with instances of YPetri::Place
or YPetri::Transition
). Instead, it creates its own internal representations of the nodes of the Petri net it is constructed from – instances of NodeRepresentation
.
Attributes
source[R]
Public Class Methods
new(net_node_id)
click to toggle source
Expect a single YPetri
node (place or transition) as an argument.
# File lib/y_petri/simulation/node_representation.rb, line 20 def initialize net_node_id @source = net.node( net_node_id ) end
Public Instance Methods
to_s()
click to toggle source
Tweak the to_s
method to give the node representations the inspect string of type #<Name>.
# File lib/y_petri/simulation/node_representation.rb, line 27 def to_s "#<#{super}>" end