Base class for composite simulations.
Concrete subclasses must implement the currentSimulation getter, the currentIntervalOffset getter, and the step function to select the appropriate simulation at a given time interval. This class implements the x, dx, and isDone functions by calling the step method if necessary and then deferring to the currentSimulation's methods with a time offset by currentIntervalOffset.
The tolerance of this simulation is pushed to the simulations that are used by this group as they become active. This mean simulations should not be shared among different groups that are active at the same time.
- Inheritance
- Object
- Simulation
- SimulationGroup
- Implemented by
Constructors
Properties
- currentIntervalOffset → double
-
The time offset applied to the currently active simulation when deferring
x
,dx
, andisDone
to it.read-only - currentSimulation → Simulation
-
The currently active simulation.
read-only - tolerance → Tolerance
-
write-only
- hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
dx(
double time) → double -
The velocity of the object in the simulation at the given time.
-
isDone(
double time) → bool -
Whether the simulation is "done" at the given time.
-
step(
double time) → bool -
Called when a significant change in the interval is detected. Subclasses must decide if the current simulation must be switched (or updated).
-
x(
double time) → double -
The position of the object in the simulation at the given time.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited