Getting Maximum value in PLE

Use this forum to post Vensim related questions.
Post Reply
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Getting Maximum value in PLE

Post by pet »

Hi there,

i use Vensim PLE for modelling capacity development. My problem is to the decsion making rule. Therefor i established differnet views, for each view calculated the Present Value of investment. The Present Value will be a level variable. at the end of time (not FINAL TIME) the present value is calculated as accumulation. Now i would like to have the present value (maximum value in my graph), constantly shown in a new variable throughout the simulation time.
Is there a function which gives me the maximum value in PLE? I know there is one called GET DATA MAX, but not in PLE.:(

Please help me !

Sincerely

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

Max value

Post by LAUJJL »

Hi

At each time step, if you have say three diferent levels of accumulation that depend on three different decision rules,
value1,value2,value3
the solution is to create a variable named var_max and to have var_max = max (value1, max (value2,value3))
If you have more than three decision rules, you will have a longer equation.
you can add that variable to any graph.
Regards.
JJ
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Max Value

Post by pet »

thank you very much for the quick response!

suggesting your solution, things make it a little easiier. Still i have some request.

The maximum values for each decision occurs on different times. Lets assume D1 starts in 7 years and ends in 10 years. D2 starts in 5y and goes 10y also. D3 starts today and ends in 10y.


Quote 1:............At each time step, if you have say three diferent levels of accumulation that depend on three different decision rules, ..........

I need a level comparing process for each time step which represents the levels at time step for their individuell timeframe.

To make it easier i suggested to take only the maximum value of each decision as a constant value and compare those at every timestep in the way you already stated.

Don't know if i make it clear?

Quote 2:...........If you have more than three decision rules, you will have a longer equation..............

Please repeat the equation for 5 decisions. Don't know if i make it right.

I appreciate your help a lot!

Kind Regards,

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

capacity development

Post by LAUJJL »

Hi

For the quote 1, I do not understand what you mean.
The best is to give a simplistic example to illustrate your problem.
For quote 2, if you have at each time step 5 decision rules, you will have 5 values and the maximum will be equal to :
max (val1, max (val2,max(val3,max(val4,val5)))).
Of course if you have 100 decision rules, you will have to buy
vensim pro or be an expert at counting parenthesis!
Regards.
JJ.
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Max Value

Post by pet »

counting parenthesis is no problem, in the case of 100 decision kind of exhausting. I could image the equation, needed your ratification ;).

in case of quote 1:

i dont get it either;)

Assume: three decisions with the same duration, starting at different time steps. The Present Value therefor is different for all three decision. The present value turns out to be the margin discounted to the timestep the decision is taken. '(In my case three different times). For comparing i need the max value of each cumulated, discounted margin (the present value as Level: max is shown at the end of investment period, i need it earlier, before investment decision is taken!). The present value on his part will change in future, if i change the input data!
How can i compare these decision.

Hopefully i made it clearer!

Much kind regards,

Pet
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

It sounds like at time 2 you want to compare the results of making your decision at time 15. There is no way to get a future value for a variable. You will need to conceptualize the problem differently.
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

capacity development

Post by LAUJJL »

Hi

It still is not clear in my mind.
The explanation you give is not straightforward, and being lazy and probably a bit tired I really am not encouraged to think about it.
You must make some efforts to really show what you want to do.
Why not model the problem in Excel that you probably know better than Vensim and post it?
Use columns as time periods, put the name of the variables in the first column, use the second column to initialise the stocks and use each line for each variable, and use as many intermediate lines as auxiliaries, with special lines to cumulate into the levels.
It will be then easy to understand what you want.
Another question:
you do not have to accumulate the values into a stock to calculate the present value: there are formulas like
Present value = old value /( 1+i)^n where n is the period and old value is the cash in.
you do not have then to wait to calculate future values at a certain moment to compare different strategies.
Regards.
JJ

[Edited on 5-10-2007 by LAUJJL]
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Max Value

Post by pet »

Hello,

i'm sorry for the late responds, just came back from a trip.

You stated:

".....you do not have to accumulate the values into a stock to calculate the present value: there are formulas like
Present value = old value /( 1+i)^n where n is the period and old value is the cash in.
you do not have then to wait to calculate future values at a certain moment to compare different strategies."


I do have Vensim PLE. Therefor a Present value equation is not available. In my case i can only calculate on future values of 3 different cashflows!
If i enter the data by hand i can only calculate on constant variable and changing the input datas of all projects have no effects.
This is my dilemma´.
I need a function which gets the maximum value of each project regardless when it is occuring. Then changing input data (sensitivity analysis) effects the cash flows and max value, furtheron leads to an decision by comparing at a certain timestep.

Sorry for bothering

Regards,

Pet
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Max Value

Post by pet »

Hey Bob,

like you say! this will help!

Some advice?

Thanks anyway!

Regards,
Pet
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

If you want to find the maximum of a variable at all times and can't use SAMPLE IF TRUE use

max val = INTEG(IF THEN ELSE(val > maxval,(val - maxval)/TIME STEP,0),val)

then make the comparison at final time - that will work. (If the above causes a simultaneous initial error then replace val with init val as the initializer.)

To get the time of the best value:

max val time = INTEG(IF THEN ELSE(val > maxval,(Time - max val time)/TIME STEP,0),INITIAL TIME)

Hope that helps.

Bob Eberlein
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Hi Bob,

Post by pet »

thanks for the help, seems like at least one way i can try. But you need to be more specific please. I cant follow!

Regards

Pet
pet
Junior Member
Posts: 8
Joined: Thu Oct 04, 2007 11:54 am

Hi bob

Post by pet »

finally i realized your suggestion in my model. Well, on final time comparising is possible, but unfortunately i need the value for the decision on time step to determine wether the first or the second choice is been realized!
Thinking about conceptual changes!

Thnaks anyway!

Regards
Pet
Post Reply