GET DATA LAST TIME... with auxiliary

Use this forum to post Vensim related questions.
Post Reply
oOLauraOo
Member
Posts: 41
Joined: Wed Mar 22, 2017 5:05 pm
Vensim version: PRO

GET DATA LAST TIME... with auxiliary

Post by oOLauraOo »

Hi,
I am in trouble with the error message "simultaneous equations" !
I would like to build some kind of constraints in my model but I can't figure out how to avoid the simultaneous equations.

For instance :
-> I compute the variable "BIM investment cost", and I want to compare it to my "Available Cash".
-> I use a variable "BIM okay ?" to check if "BIM investment cost" is < to "Available Cash" with IF THEN ELSE.
-> If yes, "BIM okay ?"=1, otherwise "BIM okay ?"=0.
-> When "BIM okay ?"=1, I want it to trigger the investment : "Cash Flow"-"BIM investment cost" ==> simultaneous equation error message

Like in many other cases in my model, some computed results are also triggers for investments, requests, tasks... and it generates errors.
So, my question is : to avoid those error messages, isn't it possible to get the "last time value" of an auxiliary variable to avoid the simultaneous ? Or is there a function to "check" some results and use them as triggers ?

Thank you a lot for your help !

Laura
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Re: GET DATA LAST TIME... with auxiliary

Post by tomfid »

From your description, it sounds like "BIM investment cost" must be somehow dependent on whether the investment is taken or not ("BIM ok"), which might be the problem. However, it's hard to say without a more concrete example.

As a general principle, using information from the future (the last value of an auxiliary) violates causality. Using the optimizer or the simultaneous functions is one way around that, but in general I'd be looking for a way to separate expectations from reality, such that the decision to make the investment depends only on the state of knowledge at the time the decision is made.
Post Reply