EMP error

Solver related questions
Post Reply
nozarian
User
User
Posts: 2
Joined: 2 weeks ago

EMP error

Post by nozarian » 2 weeks ago

Hello everyone,
I am trying to write a gams model of a bilevel problem. However, GAMS said I have a EMP syntax error:

EMP syntax error: key expected: has dimension 0 but should be 2: emp error (item 2 on line 2)

--- EMP Summary (errors=1)
Adjusted Equations = 0
Dual Variable Maps = 0
Dual Equation Maps = 0
VI Functions = 0
Equilibrium Agent = 0
Bilevel Followers = 0
Disjunctions = 0
*
* JAMS Pre processing failed - please report to support@gams.com
* JAMS Please capture the GAMS input file


I don't know how to deal with this error.
I don't know where my problem is, please help me to solve it.
Thank you,
Best wishes.

abhosekar
Moderator
Moderator
Posts: 97
Joined: 4 months ago

Re: EMP error

Post by abhosekar » 2 weeks ago

Hi, the error suggests that you have included some element in your empinfo file that without its indices (for example, x instead of x('i1', 'j1')).

To figure this out, you can use GAMS command line option keep=1 so that the process directory 225.. is not deleted. After running your model, you can check the file named empinfo.dat in this directory. The error refers to item 2 on line 2 in this file.

Hope this helps.

- Atharv

nozarian
User
User
Posts: 2
Joined: 2 weeks ago

Re: EMP error

Post by nozarian » 2 weeks ago

Hi Dear Atharv,
Thanks for the answer.
The error is related to this section of the original code:


Model bilevel /all/;
******************************************************
$onecho > "%emp.info%"
bilevel P_lem P_wem P_wgm
OBJ_UL
C1_UL
C2_UL
C3_UL
C4_UL
C5_UL
C6_UL
C1_LI
C2_LI
C3_LI
C4_LI
C5_LI
C6_LI
C7_LI
C8_LI
C9_LI
C10_LI
C11_LI
C12_LI
C13_LI
C14_LI
C15_LI
C16_LI
min objin Ipvinv Iwinv Ichpinv Isttvinv E LSIh LSIe Pcpv Pcw Pdch Pch
OBJ_LL
C1_LL
C2_LL
C3_LL
C4_LL
C5_LL
C6_LL
C7_LL
C8_LL
C9_LL
C10_LL
C11_LL
C12_LL
C13_LL
C14_LL
C15_LL
C16_LL
C17_LL
C18_LL
C19_LL
C20_LL
$offecho
**********************************************************
solve bilevel using EMP minimizing objout ;

Which C symbols are constraints and the rest are the variables, which are two or more dimensional for example C1_LL (h, t) and Pch (h, t).
However, I don't know what's wrong in writing this section.

Thank you again for your help.
Best Regards.
--

abhosekar
Moderator
Moderator
Posts: 97
Joined: 4 months ago

Re: EMP error

Post by abhosekar » 1 week ago

This is what I explained in my previous response and also the error message mentions the exact same thing that you have included a symbol that is 2 dimensional without any index.

You should explicitly add C1_LL('h1','t1'), C1_LL('h2','t2') and so on. Simply writing C1_LL is not enough.

You can do this using put writing facility and using loop.
https://www.gams.com/33/docs/UG_Put.htm ... %20writing
https://www.gams.com/33/docs/UG_FlowCon ... trol_Loop


Further, you have to use command line option keep=1 and check empinfo.dat file inside 225? directory in order to see which element is being referred in the error message.

- Atharv

Post Reply