|
From: Alexander V. <a.v...@tu...> - 2006-03-27 09:13:12
|
Dear Roy,
The implementation exactly follows the suggested implementation for the
DEV&DESS formalism as described in B.P. Zeigler, H. Praehofer & T.G. Kim,
Theory of Modeling and Simulation, 2nd Edition, Academic Press, 2000. In
section 9.6 (pp. 222-227), the algorithm is described. With a clear reason
for integrating in-between. Figure 11 on page 221 of Zeigler's book is also
interesting.
I will post a separate document on the DSOL website on the implementation of
the DEV&DESS simulator later, as this often leads to questions and
confusion.
There is, by the way, one small mistake in the implementation of the
Animator that extends the DEVDESSSimulator, which relates to the
implementation of the start() and stop() methods. This will be corrected in
the next version of DSOL.
Kind regards,
Alexander Verbraeck
> -----Original Message-----
> From: dso...@li... [mailto:dsol-
> dev...@li...] On Behalf Of R.T.H.Chin
> Sent: 27 March 2006 11:01
> To: dso...@li...
> Subject: [Dsol-development] Confused about DESS implementation
>
> Hi DSOL team,
>
> Not that I need it right now, actually I don't even use it and should
> focus on other stuff right now, but studying the DSOL code I'm kind of
> confused about the DESS implementation.
>
> Suppose I use the DSOL application, so then I am actually using the
> Animator as a delayed DEVSDESS simulator. Looking at the code of the
> Animator I see two nested loops in the run() method:
>
> 1-the outer loop which just keeps going for as long as the simulation is
> not finished
> 2-the inner loop which runs until simulatorTime + timeStep
>
> The loop 2 handles all DEVS-events (event.execute() ). Every time such
> an event is executed a TIME_CHANGED_EVENT is fired. After loop 2 another
> TIME_CHANGED_EVENT is fired.
>
> Suppose my model uses both discrete events and differential equations.
> Alse suppose that for a specific timestep four events were executed,
> then 4+1=5 TIME_CHANGED_EVENTS are fired in loop 2.
>
> The class
> nl.tudelft.simulation.dsol.formalisms.dess.DifferentialEquation is a
> listener and listens to TIME_CHANGED_EVENTs in the notify() method. A
> differential equation is solved every time a TIME_CHANGED_EVENT is
> fired. So in my example that means that the differential equation is
> solved 5 times:
>
> public synchronized void notify(final EventInterface event) {
> ...
> this.previousY = integrateY(this.simulator.getSimulatorTime(),
> this.previousX, this.previousY);
> ...
> this.previousX = this.simulator.getSimulatorTime();
> }
>
> This is kind of confusing because:
> 1 Shouldn't a differential equation only be solved at specified timeSteps?
> 2 The constructor of DifferentialEquation allows setting a timeStep, but
> what is the use of that if the equations are solved at
> TIME_CHANGED_EVENTS?
> 3 What if you set a timestep of DifferentialEquation in the constructor
> which differs from the timeStep in Animator: are the results still
> correct?
> 4 What is you have two differential equations which should be solved at
> two different timesteps (e.g. a high frequency motion and a low
> frequency motion)?
> 5 What if you use variable timestep algorithms to optimize the timestep
> / minimize the error?
>
> Maybe I didn't understand the code, and I didn't make a test, but it
> seems kind of odd.
> Greetings,
> Roy
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Dsol-development mailing list
> Dso...@li...
> https://lists.sourceforge.net/lists/listinfo/dsol-development
|