Originally posted by: dayouwang
Dear all,
I want to solve a scheduling problem with constraint programming, but i met some diffcults with it.
A set of demands must be covered by the resources. Each of the demands, which has a fixed duration and a fixed resource requirement (power), must be covered within time period [rel, due], in which rel is the release time as earliest starting time and due is the deadline as latest finishing time. The price of resource (an step function) is time variant as illustrated in the figure in the attachment.
There is a capacity constraint on resource, which means in a given time period, the total used resource can not exceeds a given value. To finde is a schedule that minimize the total cost of resource usage in the whole time periode.
Given values of demands:
Given values of resource:
time variant price, capacity constraint with value CapCons in time period [t1, t2]
To find:
dvar interval Demands[d in Demand] in d.rel .. d.due size d.duration ;
objective:
minimize sum (d.power * price of resource * d.duration)
constraint:
sum (d.power) <= CapCons in [t1, t2]
I have tried to use the CumulFunction to describe the time variant price of resource, but it seems that it is difficult to use it in objective, because the price of resource is not fixed.
I will be very gratitude, if somedoby could wirte the code for this problem.
best,
Dayou
#CPOptimizer#DecisionOptimization