Hi guys,
I need to write a specific condition but couldn't figure out .Here it is;
I want Y is equal to X if R becomes less than 0 once, otherwise Z.
For my project, I could only do this one:
Nominal exchange rate:IF THEN ELSE(Reserves<=0,Shadow Exchange Rate,3)
but it didn't work because whenever R>0, it again comes back to 3. I want nominal exchange rate to be equal to shadow one, once R<0 and indifferent of whether in some point of time R again becomes greater than 0.
Can you guys help me?
Help for 'if then else'
Re: Help for 'if then else'
You can use a stock to create a persistent state, or check out the SAMPLE IF TRUE function.
/*
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
*/
Re: Help for 'if then else'
Hi,
Thank you for the reply. Can you elaborate on creating stock for persistent state? I want the condition work for once, and constantly change the variable's value without affected by condition again.
I don't have the full version, I don't have SAMPLE TRUE function, unfortunately.
Thank you for the reply. Can you elaborate on creating stock for persistent state? I want the condition work for once, and constantly change the variable's value without affected by condition again.
I don't have the full version, I don't have SAMPLE TRUE function, unfortunately.
-
- Super Administrator
- Posts: 4573
- Joined: Wed Mar 05, 2003 3:10 am
Re: Help for 'if then else'
I've attached a model showing how to do it using a level. It's probably more complicated than you need, but I'm sure you can simplify it so suit your needs.
- Attachments
-
- forum demo.mdl
- (2.63 KiB) Downloaded 165 times
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
Re: Help for 'if then else'
I can't tell how I'm grateful for your help right now. Thank you very much. It worked. Many thanks.
With love,
Melih
With love,
Melih