Page 1 of 1

Problem with EMP Equilibrium syntax

Posted: Sun Jun 06, 2021 10:35 am
by irahmati
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) Downloaded 16 times
Thanks a lot

Re: Problem with EMP Equilibrium syntax

Posted: Mon Jun 07, 2021 8:32 am
by irahmati
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) Downloaded 17 times

Re: Problem with EMP Equilibrium syntax

Posted: Mon Jun 07, 2021 6:40 pm
by dirkse
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. ... l_Example2 ... alvar.html


Re: Problem with EMP Equilibrium syntax

Posted: Mon Jun 28, 2021 12:42 pm
by irahmati
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