Hi,
I am working on the Unit Commitment Problem. I have a GAMS code with different constraints added, but now I want to represent the start-up cost as a function of the number of periods (intervals) the unit has been shut down. What I thought was to follow the idea presented in the literature that represents this cost, for any unit, as a set of constraints:
C(i) >= Kt*(u(i) – SUM (n=1 to t, u(i-n)))
Where i is the time interval in the planning horizon, C(i) is a continuous variable that will be the start-up cost in interval i, Kt is the cost of start-up the unit after it has been shut down for t intervals, u(i) is the binary variable to represent if the unit is on (1) in the interval i.
In my case t can take three values (first is the hot start-up, the second is the warm one, and the third is the cold done).
My problem, and it is warned, is how to manage the operational history of the unit, it is when the index (i-n) is less than zero in the SUM. I do know the status of the unit at its initial condition (i=0), and I know how many periods the unit has been in that condition.
Any comment, help or suggestion will be very appreciated.
Best regards.
Variable Start-up cost in the Unit Commitment Problem
Re: Variable Start-up cost in the Unit Commitment Problem
So in GAMS I guess you do
and you worry about pairs (i,t) where i-n.val goes negative. GAMS will just make these 0 and hence the start-up of a unit in i=1 (that is off at i=0) will costs you K(3) (assuming K(3) is the most expensive one) even though you just started out. Starting a unit in i=2 that have been off in i=0 and i=1 will also cost you K(3). Since you don't how long has a unit been off in the past (if it is off in i=0) you could argue the model determines the cost in a conservative way and charges the full amount for a very cold unit. If you don't like this behavior, you must extend the information from the past and extend your history period by two more periods: -2,-1,0,1,2,... and record the status of the unit in these periods. If you want to assume that all units have been on in period -1, you just need to exclude the constraints that point to indexes -1 and -2, e.g. by adding a $ condition: defC(i,t)$(ord(i)-t.val)>=0)..
Hope this helps,
Michael
Code: Select all
set t /1*3/; alias (t,n);
defC(i,t).. C(i) =g= K(t)*(u(i) - sum(n$(n.val<=t.val), u(i-n.val)))
Hope this helps,
Michael
Re: Variable Start-up cost in the Unit Commitment Problem
Dear Michael,
Of course, your comments are so helpful for me. I will analyze your given options.
Kind regards,
Jose
Of course, your comments are so helpful for me. I will analyze your given options.
Kind regards,
Jose
Re: Variable Start-up cost in the Unit Commitment Problem
I am sorry for this question, I am not so experimented with GAMS. So, is there a way to use negative indexes? I tried something like:
set i / -2, -1, 0, 1, 2 /
But I get error.
Thanks.
set i / -2, -1, 0, 1, 2 /
But I get error.
Thanks.
Re: Variable Start-up cost in the Unit Commitment Problem
When you run
you should get the following error which is very explicit about UNQUOTED elements having to start with a letter or digit.
I hope this helps!
Fred
Code: Select all
set i / -2, -1, 0, 1, 2 /;
Code: Select all
1 set i / -2, -1, 0, 1, 2 /;
**** $338$338 $172$172
**** 172 Element is redefined
**** 338 Unique element expected - symbol was not an element
**** and the following text will be skipped until a proper
**** symbol is found to recover. Remember that an UNQUOTED
**** element has to start with a letter or digit
**** followed by letters, digits, '+', '-' or '_'. The length
**** is limited to 63 characters. The following words are
**** reserved (starting symbols of a GAMS statement) and cannot
**** be used for UNQUOTED set elements:
****
**** ABORT, ACRONYM(S), ALIAS, BINARY, DISPLAY, ELSE
**** EQUATION(S), EXECUTE, FILE(S), FOR, FREE, IF, INTEGER, LOOP
**** MODEL(S), NEGATIVE, OPTION(S), PARAMETER(S)
**** POSITIVE, PROCEDURE(S), PUT, PUTCLEAR, PUTCLOSE, PUTHD
**** PUTPAGE, PUTTL, SCALAR(S), SEMICONT, SET(S), SOS1, SOS2
**** TABLE, VARIABLE(S), WHILE
****
**** QUOTED elements can contain any character. Single and
**** double quotes can be used (starting and ending quote have
**** to match).
Fred