Hi guys

I hope everyone is fine and healthy and far from Covid-19 problem.

I have an equilibrium problem, very simple and very basic.

It contains 3 generators that are supposed to supply a deterministic load (200 MW).

single-bus power balance, and maximum power are the only constraints. the objective is to maximize social welfare.

I don’t receive any normal error message but :

"

*** JAMS Equation 1 ( =E= / flipped ) with matching lower bounded variable 4 not allowed

*** JAMS Pre processing failed

"

The program is attached and I appreciate it if you could have a look at it and guide me.

Eq0_max SW.gms (543 Bytes)

Thanks a lot

Again hi

I found out that the problem was related to the declaration of the dual variable of the power-balance constraint. since the constraint is an equality, the dual variable should be a free variable.

I made thecorrectoin in the code.

Now I am faced with another problem. The model still doesn’t produce any result, and the log is not helping:

*** SOLVE aborted

— emp.dat(33) 3 Mb 1 Error

*** Status: Execution error(s)

— Job emp.dat Stop 06/06/12 17:49:43 elapsed 0:00:00.019

— Returning from GAMS step

*** JAMS GAMS job failed

*** JAMS Msg: Execution error(s)

The revised code is attached and I’m still hopeful to get a clue based on your help.

Thank you for your time and consideration

Eq1_max SW.gms (533 Bytes)

If you have a max/min agent it must exist inside an equilibrium model - even in the special case where there is only one agent. So add the equilibrium keyword to your EMP info file.

Your model looks like it could also be specified as an embedded complementarity system using the dualvar keyword. Note that we have two different ways to specify the identical model in this case: as a single-optimizing-agent equilibrium model or as an ECS. As a useful exercise, do both and verify that the results are the same. And then that the scalar MCP models produced are identical (or at least equivalent).

Some helpful links to docs and examples are below.

https://www.gams.com/latest/docs/UG_EMP_Equil.html#UG_EMP_Equil_Example2

https://www.gams.com/latest/docs/UG_EMP_ECS.html

https://www.gams.com/latest/emplib_ml/libhtml/emplib_vidualvar.html

-Steve

Dear Steve

First of all I’d like to apologize for the delay in replying you. Unfortunately I got infected with Covid-19 and it was sever.

Thank you for your response. Yes you’re right. Equilibrium and ECS can be transformed to each other. Actually I tried ECS first but I wasn’t much successful in it. Dr.Conejo has a very good book in this field but it didn’t help me much throught the programming.

So I switched to equilibrium. The model does contain “equilibrium” keyword. after being away from it for a while, maybe I can see things more clearly. I get back to the problem and if I find anything new I will share it here with you and others too.

Again thanks a lot

Sincerely

Iman

Hello everyone

I have pursued the matter and recently I came across a paper written by Youngdae Kim & Michael C. Ferris, and it’s very illuminating actually.

If you too are struggling with using EMP package in GAMS, I recommend having a look at it.

The paper is accessible at the following address which is related to Cornell University.

https://arxiv.org/abs/1806.02255

Best wishes

Iman