Dear All,
Pls, I need help to model my problem in GAMS. The problem is as follows:
Given 24 hours in a day and 365days in a year which I intend to define as
set h /124/
d /1365/
At certain hours in the day is when the peak demand is likely to occur
I want to make this a subset of h as follows:
I (h) /10*20/;
Now I want to calculate the peak demand factor (PDF) of customer’s electricity consumption with respect to the system wide consumption for the 5 highest system peaks in a year. To clarify further, my model needs to select the highest 5 peak hours over the year by checking the given system wide demand (this is a static model so the system wide demand is a parameter).Now after selecting the highest 5 peaks, it will use the customers demand in those 5 peak hours to calculate the peak demand factor.
Mathematically:
PDF = sum (Customers demand at the 5 peak hours)/sum (System wide demand at the 5 peak hours).
My challenges are as follows

How to model the selection of the 5 highest peaks for the year in MIP model. I have looked at SMAX but it seems it cannot be applied to MIP Model. Moreover, I may be wrong but SMAX seems to give only one maximum value over the domain of the indexed set. How then do I obtain 5 highest peak for the year from the list of highest peak hour for each day? So first of all, list the highest peak hour for each day of the year, then select the top 5 peak hours from the list for PDF calculation.

Given that only one peak can be selected for a specific day, how I will limit selecting more than 1 peak hours for each day. Because what might appear as peak for Monday may not be peak on Tuesday. To elaborate, let’s assume that systems peaks for the peak hours on Monday is 21000MW, 22000, 20000, 17000 Then for Tuesday: 17000, 18000, 18700, 19000MW. Now system peak on Monday is 22000MW while on Tuesday is 19000MW. So I need this listing of peak hours to be based on highest demand on each day.
I do not know if my explanation is detailed enough for you guys to assist me but I do hope to get help from the GAMS experts here.
Many thanks,
Muna