Quartz::CoupledModel
Inherits Quartz::Observable / Quartz::Coupler / Quartz::Coupleable / Quartz::Transferable / Quartz::Model / Reference / Object
This class represent a PDEVS coupled model.
Class methods
Instance methods
Macros
Defines the preferred event set for this particular class of coupled models. Specified event set will be used to coordinate childrens in all instances of this coupled model.
Writing:
class MyCoupled < CoupledModel
event_set ladder_queue
end
Is the same as writing:
class MyCoupled < CoupledModel
self.preferred_event_set = :ladder_queue
end
Or the same as:
class MyCoupled < CoupledModel; end
MyCoupled.preferred_event_set = :ladder_queue
The argument can be a string literal, a symbol literal or a plain name.
Defines default input ports for each of the given arguments. Those default input ports will be available in all instances, including instances of subclasses (meaning that ports are inherited).
Writing:
class MyModel < AtomicModel
input port_name
end
Is the same as writing:
class MyModel < AtomicModel
def initialize(name)
super(name)
add_input_port :port_name
end
end
The arguments can be string literals, symbol literals or plain names. However, they will be converted to symbol literals when the model is instantiated.
class MyModel < AtomicModel
input :in1, "in2", in3
end
Defines default output ports for each of the given arguments. Those default output ports will be available in all instances, including instances of subclasses (meaning that ports are inherited).
Writing:
class MyModel < AtomicModel
output port_name
end
Is the same as writing:
class MyModel < AtomicModel
def initialize(name)
super(name)
add_output_port :port_name
end
end
The arguments can be string literals, symbol literals or plain names. However, they will be converted to symbols literals when the model is instantiated.
class MyModel < AtomicModel
output :out1, "out2", out3
end