First, thank you for taking the time to review my query. I am working on a scheduling problem in OPL in which I need to determine the start times of a set of interval variables to maximize their total contribution over a planning horizon H. Below is an excerpt from my current work that illustrates the logic for the interval variable u1_wh_1.
using CP;
int H = 96;
int UP_u1_wh1[1..H] = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
dvar interval u1_wh_1 in 25..41 size 8;
dexpr int UP_contrib_wh1 = sum(t in 1..H)
((t >= startOf(u1_wh_1)) * (t < endOf(u1_wh_1)) * UP_u1_wh1[t]);
// This is the key part: I want UP_contrib_wh1 to account for the sum of the values of the vector UP_u1_wh1 over the periods during which the interval variable u1_wh_1 is active.
maximize UP_contrib_wh1;
The results obtained with CP Optimizer are consistent; however, as the number of interval variables increases, the solver struggles to find optimal solutions. This raises concerns about the formulation's efficiency and scalability, even though it appears correct. Could you suggest a more efficient alternative from a CP Optimizer perspective?
------------------------------
Francisco Yuraszeck
Yuraszeck
------------------------------