search

Interface myphysicslab.lab.model.Simulation

Provided By
All Extended Interfaces
All Known Subinterfaces
All Known Implementations

The mathematical model of a simulation.

To communicate its state to the outside world, a Simulation contains a SimList to which are added SimObjects like PointMass, Spring, etc.

An AdvanceStrategy moves the Simulation forward in time, by solving the mathematical model for the next small increment in time. The method #modifyObjects is called separately to ensure the SimObjects match the new Simulation state.

A Simulation usually keeps track of the current time, see #getTime. There are no explicit units for the time, so you can regard a time unit as seconds or years as desired. See About Units Of Measurement. Changing the Simulation time by a large amount can affect synchronization with the Clock used to advance the Simulation; see myphysicslab.lab.app.SimRunner section How Simulation Advances with Clock.

A Simulation can store its initial state with #saveInitialState and return to that initial state with #reset. The current time is saved with the initial state.

Instance Methods

Properties