Error: #Initial variable>delay1>LV1#

Use this forum to post Vensim related questions.
Post Reply
lellis
Junior Member
Posts: 7
Joined: Sat Jan 09, 2010 2:54 pm

Error: #Initial variable>delay1>LV1#

Post by lellis »

I was trying to specify a initial value and got the message refered in the subject as one of the errors in simultaneous equation. The simultaneous equation error I understand and can easily correct, but I would like to understand what that specific error means. There is no LV1 in the model.

Thank you
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Not entirely sure, but generally the #...# notation indicates a variable that's internal to a macro equation. A few of the built in functions are treated like macros, so it's possible that you're encountering one of those.

You could try setting Tools>Options>Settings>Macro variables to "show". That might make the error easier to trace.

Tom
lellis
Junior Member
Posts: 7
Joined: Sat Jan 09, 2010 2:54 pm

Post by lellis »

Thanks Tom. I will check that.
lellis
Junior Member
Posts: 7
Joined: Sat Jan 09, 2010 2:54 pm

Post by lellis »

As I do not have any macro defined in the model, and if it is a macro issue, than it is because it is reading the delay function as a macro.
Although I resolved the problem changing the structure, I would still be interested in understanding what the error message means.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Can you post the full message? (Do View>As Text then Model>Check Model).
lellis
Junior Member
Posts: 7
Joined: Sat Jan 09, 2010 2:54 pm

Post by lellis »

There it is.


USE FLAG: -Maize residue C to N ratio- is not used in the model.
USE FLAG: -N uptake analysis- is not used in the model.
ERROR: Simultaneous initial value equations involving: #Initial Active SOM>DELAY1>LV1#.
: #Initial Active SOM>DELAY1#.
: Initial Active SOM.
: Initial Active SOM N.
: ASOM N.
: Maize Plant Yield.
: Maize Residue yield.
: Maize residue.
: Residue application.
: #Residues OM added>DELAY1>LV1#.
: #Residues OM added>DELAY1#.
: Residues OM added.
: #Initial Active SOM>DELAY1>LV1#.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

DELAY1 is indeed treated like a macro. Internally, it looks like:

DELAY1=LV/delay time
LV=INTEG(input-DELAY1,input*delay time)

If you switch to DELAY1i and supply an initial value that's outside the simultaneous loop, your structure should work as is.
lellis
Junior Member
Posts: 7
Joined: Sat Jan 09, 2010 2:54 pm

Post by lellis »

Thanks again.
Post Reply