Excluding max power unit

Problems with syntax of GAMS
Post Reply
dbambi
User
User
Posts: 1
Joined: 5 months ago

Excluding max power unit

Post by dbambi »

Hi

New member here so please be patient with me :)

I’m working on economic dispatch where operation of several power generators needs to be optimized (operational cost minimized) subject to a number of conditions. One of the conditions is than reserve power residing with each generator (p_res(unit)) need to be such that reserves of all generators except max power generator need to be sufficient to cover the loss of that max power generator.
I’m giving just parts of the code here which I think are relevant for the problem at hand:

---------------------------------------
Set
unit declaring a set of generating units A-F /A, B, C, D, E, F/
alias(unit, unit_alias)
;

Positive Variables
p(unit) operating unit power
p_res(unit) operating unit reserve
;

Equations
Reserve_balance(unit) imposes the requirement for enough reserves from other units to cover loss of max power unit
;

Reserve_balance(unit).. sum(unit_alias$(ord(unit_alias) ne ord(unit)), p_res(unit_alias)) =g= Smax(unit, p(unit);

---------------------------------------

This last equation doesn’t work. What needs to happen is in pseudo-code:

Sum(p_res(all units except unit with max.p)) >= max.p(unit)


Can someone throw a quick line of code that would do this? I presume an NLP or DNLP solver would have to be employed on a problem like this?

Kind regards...
Post Reply