If then else function

Use this forum to post Vensim related questions.
Post Reply
reza1999
Junior Member
Posts: 8
Joined: Sat Oct 07, 2023 2:09 pm
Vensim version: PLE

If then else function

Post by reza1999 »

Hi,
How to write this function in vensim?
Thanks in advance.
Attachments
IMG_20231008_230454.jpg
IMG_20231008_230454.jpg (71.87 KiB) Viewed 477 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: If then else function

Post by tomfid »

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.
Post Reply