Hello everyone,
I have a problem with one of the parameters in a Vensim model (I use Vensim DSS).
I want to express the following:
First the variable x is used in different equations (it should take every integer from 0 to 100),
then the term “earnings minus losses” (both variables are dependent from x) is calculated.
Now the model should tell me (for each time step) the variable x, for which the term “earnings minus losses” is maximum.
This max value is then used further in the model.
How can I do this with Vensim or is it possible at all?
I tried the GET DATA MAX function, but the problem seems to be the time step for the calculation… Vensim gave me the message that variable x is used simultaneously in different equations.
I am a beginner in the system dynamics modeling world, so I’d appreciate help of any kind,
Thanks in advance,
Danny
Maximum value
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
You need to either use the optimizer or the FIND ZERO function (to break the simultaneous loop). Depends on which is most suitable.
More info on FIND ZERO.
http://www.vensim.com/documentation/html/22430.htm
Optimization
http://www.vensim.com/documentation/vensim.htm
User's guide, chapter 18.
From your description, it sounds as if the optimizer is the more suitable for what you want to do.
Hope this helps.
Tony.
More info on FIND ZERO.
http://www.vensim.com/documentation/html/22430.htm
Optimization
http://www.vensim.com/documentation/vensim.htm
User's guide, chapter 18.
From your description, it sounds as if the optimizer is the more suitable for what you want to do.
Hope this helps.
Tony.
Hello,
Sorry for my late response, but there were other urgent issues waiting on my desk.
I think the optimization or the FIND ZERO do not work for me.
I try to explain the problem differently:
The parameter FW(%) (0 to 100 %) is the problem.
It is used to calculate a set of parameters which then result in the calculation of DIFF.
OptFW(%) is the one FW (e.g. 65 %) for which DIFF is highest.
OptFW is then used in further equations…
I guess my problem is concerning the time steps:
One part of the model is using OptFW (one value) but the other part of the model needs to be calculated 100 times to get 1 value for further calculation (leading to other parameters). So I have a submodel which provides data for the real model.
How can I do this with Vensim?? Can I do it at all?
Thanks for any help,
Danny
Sorry for my late response, but there were other urgent issues waiting on my desk.
I think the optimization or the FIND ZERO do not work for me.
I try to explain the problem differently:
The parameter FW(%) (0 to 100 %) is the problem.
It is used to calculate a set of parameters which then result in the calculation of DIFF.
OptFW(%) is the one FW (e.g. 65 %) for which DIFF is highest.
OptFW is then used in further equations…
I guess my problem is concerning the time steps:
One part of the model is using OptFW (one value) but the other part of the model needs to be calculated 100 times to get 1 value for further calculation (leading to other parameters). So I have a submodel which provides data for the real model.
How can I do this with Vensim?? Can I do it at all?
Thanks for any help,
Danny
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Another approach could be used here. You could create 101 subscripts
FWSub : (FW0-FW100)
FWTry[FWSub] = INITIAL(FWSub-1)
then subscript Diff and the stuff leading up to it by FSSub - then use the VECTOR SORT function to figure out which subscript (and therefore value) is the best and assign this to OptFW.
I have demonstrated this in the attached model since I am sure the above is not very clear.
FWSub : (FW0-FW100)
FWTry[FWSub] = INITIAL(FWSub-1)
then subscript Diff and the stuff leading up to it by FSSub - then use the VECTOR SORT function to figure out which subscript (and therefore value) is the best and assign this to OptFW.
I have demonstrated this in the attached model since I am sure the above is not very clear.
- Attachments
-
- FWTry.mdl
- (1.96 KiB) Downloaded 562 times