Hi,
How to write this function in vensim?
Thanks in advance.
If then else function
If then else function
- Attachments
-
- IMG_20231008_230454.jpg (71.87 KiB) Viewed 1467 times
Re: If then else function
Ugh.
The general framework will be something like:
QFP1 = IF THEN ELSE( tfp>0
, IF THEN ELSE( expression beginning with pp>0
,expression beginning with sum over QH
,expression beginning with sum over QH*fraction with pp in numerator )
, 0 )
It's pretty confusing subscripting though - I would strongly encourage making each summation a separate variable.
The general framework will be something like:
QFP1 = IF THEN ELSE( tfp>0
, IF THEN ELSE( expression beginning with pp>0
,expression beginning with sum over QH
,expression beginning with sum over QH*fraction with pp in numerator )
, 0 )
It's pretty confusing subscripting though - I would strongly encourage making each summation a separate variable.
/*
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
*/