Sha256: 1dd213f0aa5ca1385fe9237a1689701bbdba48afcdc4e40d4f0ef17edc03623a
Contents?: true
Size: 1017 Bytes
Versions: 39
Compression:
Stored size: 1017 Bytes
Contents
#encoding: utf-8 # Simulation mixin providing access to the marking clamps. # class YPetri::Simulation::MarkingClamps module Access # Without arguments, acts as a getter of the @marking_clamp hash. If # arguments are supplied, they must identify clamped places, and are mapped # to their clamp values. # def marking_clamps ids=nil if ids.nil? then @marking_clamps or fail TypeError, "MarkingClamps object not instantiated yet!" else clamped_places( ids ).map { |p| marking_clamp of: p } end end alias clamps marking_clamps # Marking clamp identification. # def marking_clamp( of: (fail ArgumentError) ) marking_clamps.clamp_of( of ) end # Sets the marking clamp of a place (frontend of +InitialMarking#set+). # def set_marking_clamp( of: (fail ArgumentError), to: (fail ArgumentError) ) marking_clamps.set( of, to: to ) end end # module Access end # class YPetri::Simulation::MarkingClamps
Version data entries
39 entries across 39 versions & 1 rubygems