Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15162

Re: What is the actual simulation time of NDSolve?

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: What is the actual simulation time of NDSolve?
Date 2013-07-11 05:56 +0000
Message-ID <krlhe9$88g$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


On 7/10/13 at 3:36 AM, mccarter.patrick@gmail.com wrote:

>I am trying to determine how long my simulation is going to run with
>NDSolve. Without knowing what the time step is for the simulation,
>is it possible to obtain the actual final time of the run?

No.

>For example, lets say I want to run a simulation for a total of 1000
>seconds, procedurally I could specify a dt = 0.01 and then a total
>number of steps = 100000. Then dt*number of steps = 1000. I need to be
>able to do this, but am not sure if it is possible with NDSolve?

This computation only means something *if* the 1000 seconds is a
*simulated* 1000 seconds. If your meant 1000 seconds real time,
then your result is highly unlikely to have match the actual
time required.

Every call to NDSolve will take some finite time. The actual
time required will depend on details of the model you are using
NDSolve and this will be highly variable.

A possible way to get an estimate of how many steps for your
specific problem can be done in 1000 seconds real time would be
to use TimeConstrained. If you add a counter to your model so
that you can easily determine how many times NDSolve is called,
you could put a constraint of say 10 seconds or whatever you are
willing to wait and see how many times NDSolve was called. Using
that information it should be a simple matter to see how many
steps can be done in 1000 seconds and set up the problem accordingly.

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: What is the actual simulation time of NDSolve? Bill Rowe <readnews@sbcglobal.net> - 2013-07-11 05:56 +0000
  Re: What is the actual simulation time of NDSolve? Patrick McCarter <mccarter.patrick@gmail.com> - 2013-07-14 05:43 +0000

csiph-web