class Quartz::Coordinator

Overview

This class represent a simulator associated with an CoupledModel, responsible to route events to proper children

Included Modules

Direct Known Subclasses

Defined in:

quartz/coordinator.cr

Constructors

Instance Method Summary

Instance methods inherited from module Quartz::Schedulable

imaginary_phase : Duration imaginary_phase, imaginary_phase=(imaginary_phase : Duration) imaginary_phase=, imaginary_precision : Scale imaginary_precision, imaginary_precision=(imaginary_precision : Scale) imaginary_precision=, inspect(io) inspect, planned_phase : Duration planned_phase, planned_phase=(planned_phase : Duration) planned_phase=, planned_precision : Scale planned_precision, planned_precision=(planned_precision : Scale) planned_precision=

Instance methods inherited from class Quartz::Processor

bag : Hash(InputPort, Array(Any)) bag, bag? : Hash(InputPort, Array(Any))? bag?, collect_outputs(elapsed : Duration) : Hash(OutputPort, Array(Any)) collect_outputs, initialize_processor(time : TimePoint) : ::Tuple(Duration, Duration) initialize_processor, inspect(io) inspect, model : Model model, parent : Coordinator? parent, parent=(parent : Coordinator?) parent=, perform_transitions(time : TimePoint, elapsed : Duration) : Duration perform_transitions, sync : Bool sync, sync=(sync : Bool) sync=, to_s(io) to_s

Constructor methods inherited from class Quartz::Processor

new(model : Model) new

Instance methods inherited from class Reference

==(other : Quartz::Any) ==

Instance methods inherited from class Object

===(other : Quartz::Any) ===

Constructor Detail

def self.new(model : Model, simulation : Simulation) #

Returns a new instance of Coordinator


[View source]

Instance Method Detail

def <<(child : Processor) #

Append given child to #children list, ensuring that the child now has self as parent.


[View source]
def add_child(child) #

[View source]
def children : Array(Quartz::Processor) #

[View source]
def collect_outputs(elapsed : Duration) : Hash(OutputPort, Array(Any)) #

[View source]
def initialize_processor(time : TimePoint) : ::Tuple(Duration, Duration) #

[View source]
def inspect(io) #

[View source]
def perform_transitions(time : TimePoint, elapsed : Duration) : Duration #

[View source]
def remove_child(child) #

Deletes the specified child from #children list


[View source]