umontreal.iro.lecuyer.simevents
Class ContinuousState
- java.lang.Object
-
- umontreal.iro.lecuyer.simevents.ContinuousState
-
public class ContinuousState extends java.lang.ObjectRepresents the portion of the simulator's state associated with continuous-time simulation. Any simulator, including the default static one, can have an associate continuous state which is obtained using the continuousState() method of theSimulatorclass. This state includes all active integration variables as well as the current integration method.One of the methods
selectEuler,selectRungeKutta2orselectRungeKutta4must be called before starting any integration. These methods permit one to select the numerical integration method and the step size h (in time units) that will be used for all continuous-time variables linked to the simulator. For all the methods, an integration step at time t changes the values of the variables from their old values at time t - h to their new values at time t.Each integration step is scheduled as an event and added to the event list.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classContinuousState.IntegMethod
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.List<Continuous>getContinuousVariables()Returns the list of continuous-time variables currently integrated by the simulator.ContinuousState.IntegMethodintegMethod()Return an integer that represent the integration method in use.voidselectEuler(double h)Selects the Euler method as the integration method, with the integration step size h, in time units.voidselectRungeKutta2(double h)Selects a Runge-Kutta method of order 2 as the integration method to be used, with step size h.voidselectRungeKutta4(double h)Selects a Runge-Kutta method of order 4 as the integration method to be used, with step size h.
-
-
-
Method Detail
-
getContinuousVariables
public java.util.List<Continuous> getContinuousVariables()
Returns the list of continuous-time variables currently integrated by the simulator. The returned list is updated automatically as variables are added or removed, but it cannot be modified directly. One must instead use startInteg or stopInteg in classContinuousto add or remove variables.
-
integMethod
public ContinuousState.IntegMethod integMethod()
Return an integer that represent the integration method in use.- Returns:
- Interger that represent the integration method in use.
-
selectEuler
public void selectEuler(double h)
Selects the Euler method as the integration method, with the integration step size h, in time units.- Parameters:
h- integration step, in simulation time units
-
selectRungeKutta2
public void selectRungeKutta2(double h)
Selects a Runge-Kutta method of order 2 as the integration method to be used, with step size h.- Parameters:
h- integration step, in simulation time units
-
selectRungeKutta4
public void selectRungeKutta4(double h)
Selects a Runge-Kutta method of order 4 as the integration method to be used, with step size h.- Parameters:
h- integration step, in simulation time units
-
-
DMelt 3.0 © DataMelt by jWork.ORG