Page 1 of 1

Error: #Initial variable>delay1>LV1#

Posted: Mon May 24, 2010 6:11 pm
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

Posted: Mon May 24, 2010 10:40 pm
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

Posted: Tue May 25, 2010 1:11 pm
by lellis
Thanks Tom. I will check that.

Posted: Wed May 26, 2010 2:29 pm
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.

Posted: Wed May 26, 2010 2:45 pm
by tomfid
Can you post the full message? (Do View>As Text then Model>Check Model).

Posted: Wed May 26, 2010 4:10 pm
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#.

Posted: Wed May 26, 2010 5:16 pm
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.

Posted: Wed May 26, 2010 7:02 pm
by lellis
Thanks again.