Hi every one
I have a question about vensim:
I have use the condition function that if X in the time series=Max, then X+b, X
X is the number in the time step
How i can do this?
the attached pic my concept
thanks a lot
Question
-
- Junior Member
- Posts: 13
- Joined: Thu Nov 09, 2017 6:57 pm
- Vensim version: PLE
Question
- Attachments
-
- Capture.JPG (37.56 KiB) Viewed 2875 times
Re: Question
If N is a proxy for time here, there are two answers.
1. If the maximum is taken over all time, this is acausal (except at the end of the run), i.e. it implies knowledge of the future, which is impossible both in reality and in the model.
2. If what you mean by MAX is the largest value encountered so far at time t, then it's possible. You could do the following:
maximum x = SAMPLE IF TRUE( x > maximum x, x, x)
y = IF THEN ELSE( x >= maximum x, x+b, x )
1. If the maximum is taken over all time, this is acausal (except at the end of the run), i.e. it implies knowledge of the future, which is impossible both in reality and in the model.
2. If what you mean by MAX is the largest value encountered so far at time t, then it's possible. You could do the following:
maximum x = SAMPLE IF TRUE( x > maximum x, x, x)
y = IF THEN ELSE( x >= maximum x, x+b, x )
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Junior Member
- Posts: 13
- Joined: Thu Nov 09, 2017 6:57 pm
- Vensim version: PLE
Re: Question
Hello
thanks for your reply
this function did not work properly
I want do this (attached Pic)
It is worth mentioning that I use free version (Vensim PLE)
I 'll thank you to guide me .
thanks for your reply
this function did not work properly
I want do this (attached Pic)
It is worth mentioning that I use free version (Vensim PLE)
I 'll thank you to guide me .
- Attachments
-
- Capture.JPG (35.45 KiB) Viewed 2857 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Question
Try the attached model.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 13
- Joined: Thu Nov 09, 2017 6:57 pm
- Vensim version: PLE
Re: Question
thanks for your reply
my goal that max A in total A time series select, in this time series A is 13.97
my goal that max A in total A time series select, in this time series A is 13.97
-
- Junior Member
- Posts: 13
- Joined: Thu Nov 09, 2017 6:57 pm
- Vensim version: PLE
Re: Question
Please help me to solve this problem
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Question
The demo model I uploaded does give you the maximum value.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559