guidelines for calculating initial values in equilibrium?

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
Post Reply
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

guidelines for calculating initial values in equilibrium?

Post by rdudley »

I am wondering if there are guidelines for how to calculate initial values (in this case for an aging chain) in equilibrium. Some stocks have multiple outflows with different time constants.

I assume that there are some standard ways of doing this for various types of stocks.

For example a stock with an independent inflow and a simple exponential outflow (stock/time in stock) would a have an initial value of inflow*time in stock.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equilibrium

Post by LAUJJL »

Hi Richard.

Logically whatever the initial value, a model can sometimes after a while reach an equilibrium where it stays.

To calculate that equilibrium, I generally choose an acceptable value, run the model that will automatically goes to the equilibrium. I then choose the values calculated by the first run, and put them in the model.
Some models can reach different equilibrium, depending the initial values.
Exemple: the path dependant models like polya’s model explained in Sterman’s book.
Starting from a slightly different value can change completely the equilibrium.


But this works in a theoretical model, as in the reality nothing proves that when you start a model, it is in an equilibrium.

Regards.
JJ
malli
Member
Posts: 44
Joined: Wed Nov 15, 2006 5:10 am

Re: Equilibrium

Post by malli »

Hi JJ,

While what you are saying is right - that in general, any model with a strong negative loop would eventually tend to equilibrium -

are there guidelines for initializing a model in equilibrium before testing it with policy inputs?

For the simple example of an independent inflow - Little's Law as mentioned by Richard works

But frequently, in my models - where inflows are not independent, and when there are table functions etc. initializing the model in equilibrium is tricky - can be done, but I kind of go about it in a trial & error way, which I suspect is not too efficient.

Is there a rubric that one can follow for initializing the model in equilibrium?

Malli
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

Post by rdudley »

Assume a situation where we have an "aging chain" of classes of employment. Each stock has an exponential outflow (i.e. Stock/time in stock. The inflows in these cases are not dependent on the recipient stock.

If there is one inflow and one outflow then:

INIT value= inflow*time in stock. (the units are People/time*time)

If there are two outflows (say being promoted or being fired) then I found that:

INIT value is inflow*time in stock a*time in stock b/(time in stock a+time in stock b)

If there are three outflows with different time constants (getting promoted, gettng fired and retiring) then I believe that:

INIT value = inflow*(time a*time b*time c)/(time a*time b+time a*time c+time b*time c))

Anyone care to tell me what is the case when there are four outflows (getting promoted, gettng fired, moving away, and retiring)

I haven't been able to figure that out, but presumable these are all of the form: inflow*mean time in stock.

It should be easier than what I am doing..... ? Some where in the back of my mind......!
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

Post by rdudley »

Hmmm. I don't seem to be having much success with my version using three outflows from a stock. Maybe that is wrong, though it seems to work in a test case.

Actually I should re-state the problem: How can we directly calculate the mean time in a stock when there is more than one outflow?


My interest in this is to be able to set a model up with equilibrium initial values even though some of the time constants and other constants may be changed. Then the effects of other adjustments will be clearer. Of course, as an alternative, I can run the model until it reaches equilibrium (this model does) and then add the changes.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equilibrium

Post by LAUJJL »

Hi Richard.

I was travelling and did not answer during that time.

I think that to solve your problem, one must work. systematically.

First build a model with one stock.
Post it for feedback from the forum people.
Try to understand where is the equilibrium and verify it.
Then build a second model with two stocks, try to use the model and find the equilibrium, post it etc...
No problem resists this systematic way of working.

Of course this is a theoretical model that is probably not based on reality where the initialization comes from real data.
Real models are easier to build because you have the reality
that guides you but are much more complicate too if you
have a complex reality and you want a model that simulates it sufficiently closely.
Regards.
JJ
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

Post by rdudley »

Yes, of course I can do that... in fact that is what I often do. But I was wondering about the analytical solution to setting the simpler initial values. It would be easier to set up different runs of the model for testing.

If someone tells me how to attach a model here I can send a simple one showing what I mean.

I am sure Bob has an answer to this question. :)
R. G. Dudley
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equilibrium

Post by LAUJJL »

Hi

I do not think that there is an analytical solution.

If there was one, the model could be build analytically, which is rarely the case with SD model that deliver numerical solutions.
To post a model you must click on post a reply and click on browse near attachment at the bottom of the page and choose the file you want to insert.
If you cannot do it, send me an e-mail with the file attached and I will post it for you.
My e-mail: jean-jacques.lauble@wanadoo.fr
Regards.
JJ
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

Post by rdudley »

OK here is the test model I was using to look at this question. Often I want to set up a model in equilibrium and then alter various components. I can always set the model to run for a long enough period to have it reach equilibrium, but for some of the simpler stocks this should not be necessary. Of course some, more interesting models, do not reach equilibrium.

for what it is worth I have attached test model I was playing with.
malli
Member
Posts: 44
Joined: Wed Nov 15, 2006 5:10 am

Post by malli »

My solution is the same as yours. Attaching my sample model

For equilibrium in the model-

Inflow must be = Outflow(s)

Hiring (H) = (F/ AT) + (F/PT) + (F/FT)

solving for F

F = H(AT*PT*FT) / (PT*FT + AT*FT + AT*PT)

Using the parameters assumed in my sample model

Initial value of stock F = 2400/26

Agree with what you are saying for 4 outflows - similar analytical solution.

Malli
Attachments
equilibrium.mdl
(2.63 KiB) Downloaded 426 times
malli
Member
Posts: 44
Joined: Wed Nov 15, 2006 5:10 am

Post by malli »

Just another thought on the equilibrium. In my sample model, there is no feedback structure for the inflow. If there is a feedback from the stock to the inflow-

then the equilibrium stock can only be achieved by changing one of the time constants also I suppose

For instance if h= F/ht then how does one solve for F(equilibrium) without changing ht?

Malli
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equilibrium

Post by LAUJJL »

Hi Richard.

I did not find your model that was supposed to be attached.

I downloaded the model from Malli.

Regards.
JJ
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equilibrium

Post by LAUJJL »

Here is attached a generalized version of the model that can find automatically the initial equilibrating stock with any number of outflowing stock. in this case 20.

One can add too as many as additional stocks to create the
ageing chain. The formulation will be the same, because the stock being constant the outflow will be constant and the inflow of the next stock will be constant too and the formulations will be the same too, at the condition that the
time in the stocks of the diverse populations are fixed through the time.

One can too build a subscript whose dimension will be equal to the number of stocks and build the model on one subscripted stock that will simplify the sketch ot the model.

If the inflow is varying (generally the case with real cases ) and one wants to find the initial stock that will keep the fluctuation to a minimum, one has to
use a random funtion for the inflow, add a subscript with for instance 100 dimensions to all the variables, and optimize by minimization the average over the subscript of the standard deviation of the actual stock minus the initial stock.
Regards.
JJ
Attachments
equilibrium_generalized.mdl
(2.89 KiB) Downloaded 458 times
rdudley
Senior Member
Posts: 71
Joined: Mon Sep 08, 2003 2:16 am

Post by rdudley »

very interesting! Why didn't I think of that?;)

thanks for your help, Richard
R. G. Dudley
Post Reply