Problem with EMP reformulation of a bilevel program

Hi all, I’m trying to use EMPlib to reformulate a multilevel program. Since there are many follower problems, I use some loops to write the emp.info file. The code I use is:

file myinfo / ‘%emp.info%’ /;
put myinfo;
put /‘bilevel’/;
put /‘pc deriv ypred elem of ft io fi fn fetoh u’/;
loop {(nele,nc),
put / ‘max’ growth(nele,nc)/;
put /‘*’ objinner(nele,nc)/;
loop {(ii),
put /balancedemasa(nele,nc,ii)/;
}
put /ineq1_79(nele,nc) ineq1_70(nele,nc)/;
}
putclose;

But, I get the following error:
EMP syntax error: key expected: is balancedemasa (item 1 on line 10) but instance not in equation rim

I thought someone here would have a clearer idea what this error means ?

Regards and thanks in advance !!!

Claudio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Claudio,

Just back from a week out of office. Probably you’ve got this figured already but if not, read on.

The message seems to indicate that your model doesn’t include the equation balancedemasa. It could be that a particular tuple is mentioned in the EMP info file but does not show up in the model, or perhaps balancedemasa is entirely absent from the model. This type of error is a typical one for EMP equilibrium models. The model rim (i.e. the set of rows and columns included in the generated model) can change with changes to the data, etc., and since the EMP info file is referring to these rows and columns it needs to be created in a way that also changes with the data, so that the EMP info file stays consistent with the model rim.

-Steve


On Mon, Apr 14, 2014 at 10:20 AM, Claudio Delpino wrote:

Hi all, I’m trying to use EMPlib to reformulate a multilevel program. Since there are many follower problems, I use some loops to write the emp.info file. The code I use is:

file myinfo / ‘%emp.info%’ /;
put myinfo;
put /‘bilevel’/;
put /‘pc deriv ypred elem of ft io fi fn fetoh u’/;
loop {(nele,nc),
put / ‘max’ growth(nele,nc)/;
put /‘*’ objinner(nele,nc)/;
loop {(ii),
put /balancedemasa(nele,nc,ii)/;
}
put /ineq1_79(nele,nc) ineq1_70(nele,nc)/;
}
putclose;

But, I get the following error:
EMP syntax error: key expected: is balancedemasa (item 1 on line 10) but instance not in equation rim

I thought someone here would have a clearer idea what this error means ?

Regards and thanks in advance !!!

Claudio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



\

Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com

Steve, thanks for your reply !

Yes, I figured it out, it was just what you say. It took me a while because I wasn’t sure about the way to write the empinfo when having several followers (I’m writing a multilevel program).

Finally, it was your approach in the hark-stack.gms example that lead me on, so thanks for that too !!

Regards, Claudio.

PS: Would a clarification in the emplib manual regarding the need to explicitly name every variable over its domain be useful ?


On Mon, Apr 21, 2014 at 1:02 PM, Steven Dirkse wrote:

Claudio,

Just back from a week out of office. Probably you’ve got this figured already but if not, read on.

The message seems to indicate that your model doesn’t include the equation balancedemasa. It could be that a particular tuple is mentioned in the EMP info file but does not show up in the model, or perhaps balancedemasa is entirely absent from the model. This type of error is a typical one for EMP equilibrium models. The model rim (i.e. the set of rows and columns included in the generated model) can change with changes to the data, etc., and since the EMP info file is referring to these rows and columns it needs to be created in a way that also changes with the data, so that the EMP info file stays consistent with the model rim.

-Steve


On Mon, Apr 14, 2014 at 10:20 AM, Claudio Delpino wrote:

Hi all, I’m trying to use EMPlib to reformulate a multilevel program. Since there are many follower problems, I use some loops to write the emp.info file. The code I use is:

file myinfo / ‘%emp.info%’ /;
put myinfo;
put /‘bilevel’/;
put /‘pc deriv ypred elem of ft io fi fn fetoh u’/;
loop {(nele,nc),
put / ‘max’ growth(nele,nc)/;
put /‘*’ objinner(nele,nc)/;
loop {(ii),
put /balancedemasa(nele,nc,ii)/;
}
put /ineq1_79(nele,nc) ineq1_70(nele,nc)/;
}
putclose;

But, I get the following error:
EMP syntax error: key expected: is balancedemasa (item 1 on line 10) but instance not in equation rim

I thought someone here would have a clearer idea what this error means ?

Regards and thanks in advance !!!

Claudio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



\

Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.