Page 1 of 1

There is a delay of one step between the simulated and obser

Posted: Sat May 17, 2008 12:34 pm
by luoyf21
This is simple monthly water balance model of a catchment, and the conceptual model is show in the ppt file. There is a delay of one step between the simulated and observed. The problem I think is the way Vensim calculate Storage. Can anyone help? Many thanks.

[Edited on 5-17-2008 by luoyf21]

storage

Posted: Sat May 17, 2008 1:10 pm
by LAUJJL
Hi

There is a conceptual flaw in your power point presentation.

Storage(t)=Storage(t-1)+precipitation (t) - evapotranspiration (t)-runoff (t)

It should be
Storage(t)=Storage(t-1)+precipitation (t-1) - evapotranspiration (t-1)-runoff (t-1)

Vensim has no time postcript variables and the time is generated automatically.

One thing that you should do is to forbid a rate influencing another rate or another auxiliary. It makes things clearer.
It is better to respect the following order.
State at the time t-1 influences rates at the time t - 1 that influcence state at the time t.
Or when using auxiliaries
State at the t-1 influences auxiliaries at the time t - 1 that influence rates at the time t - 1 that influence state at the time t.
Regards.
jj

Posted: Sat May 17, 2008 4:27 pm
by paulnewton
Your equations with (t) and (t-1) time references indicate to me that you are building a "period" or "discrete time" model. Although there are ways to create such models in Vensim, Vensim is generally used to create "continuous time" models where TIME STEP (=DT) is small enough such that it does not significantly influence model behavior. See the attached PowerPoint (in Slide Show mode) for how such continuous time models work when using Euler integration.

time step delay

Posted: Sun May 18, 2008 10:51 am
by LAUJJL
Hi Paul

I am not thinking at all about a discreet time process, where there is no time
period. It is the contrary: in continuous modelling, there is a fixed time period, the dt,
that normally should give roughly invariant results when decreased.
When I wrote t – 1 I meant t – dt or more exactly the preceding time period. the equation is right. But yours is still wrong.
In your formulation you assume that a level at the start of a period is depending
from a rate from that period. You cannot get information from something that has not yet
happened.
About your new power point presentation, it tells exactly what I wrote before about the order
of the processing.
I am not sure that you have really understood the difference between discreet and continuous
modelling.

In the model model.mdl, there is something not logical.
The evaporation is depending from the precipitation in the same time step.
Logically the precipitation must first occur and the evaporation occurring
Later on, eventually through the storage.
If the precipitation influences directly the evaporation, it must be formulated differently.
It should be better formulated as something else influencing both the precipitation and
the evaporation, but precipitation influencing directly the evaporation is difficult
to imagine.
I have tried to spot where the there is a difference of one time step between the
Observed and the calculated and I did not find where.
There is only the runoff data that exist in the observed data and I cannot find
The time step difference.
Joined a model where the unit error is corrected.
But introducing a time step in a model is alwyas risky as it
makes the model time step dependant.
Regards.
JJ

Posted: Sun May 18, 2008 11:39 am
by bob@vensim.com
Independent of difference or differential equations by default Vensim reports levels at time t and the rates and auxiliaries that result for those level values. If you would like to see the rates an auxiliaries that cause the levels to be computed (ie those from the previous computational interval) reported together with the levels choose integration method Diff. This is only available with Euler integration because resulting in is not defined for Runge-Kutta integration.

Posted: Sun May 18, 2008 6:48 pm
by paulnewton
Hi JJ,

Sorry, I didn't make it clear that I was responding to the original post and not to yours.

I think I understand the difference between discrete time and continuous time models, but maybe I still have some areas of confusion. In any case, I do try to stay away from building discrete time models, but sometimes it is unavoidable.

Best,

Paul