Originally posted by: fw2610
Hello,
today I have created a model for the resource-constrained project scheduling problem that works well and with a fast computation time up to a size of 8 activities (=jobs). For more than 8 activities, the computation takes place over a very long period of time until it is finally aborted with the note "Oplrun-process is not responding".
About the model: It minimizes the weighted sum of activities that are not completed by the deadline. The activities are done by workers and can take place in parallel, as long as the capacity of workers is not exceeded.
My guess: It is related to the decision variable "interval" in combination with ">=" in my objective function. Is there a way to formulate the objective function differently without changing its mode of action?
Many thanks for suggestions!
Best regards
.mod:
//solver
using CP;
//input
int capacity = ...;
int deadline = ...;
tuple activity {
int number;
int periodes;
int workers;
int weight;
}
{activity} activities = ...;
//decision variable
dvar interval doActivity[i in activities] size i.periodes;
//model
minimize sum (i in activities) ((endOf (doActivity[i]) >= deadline) * i.weight);
subject to {
sum (i in activities) pulse (doActivity[i], i.workers) <= capacity;
}
.dat:
//input
capacity = 75;
deadline = 11;
activities = {
< 1, 3, 25, 4>
< 2, 3, 50, 3>
< 3, 5, 45, 5>
< 4, 4, 40, 1>
< 5, 5, 35, 6>
< 6, 5, 30, 2>
< 7, 3, 25, 7>
< 8, 3, 25, 8>
< 9, 3, 25, 9> // with the 9th activity "Oplrun-process is not responding"
};
#DecisionOptimization#OPLusingCPOptimizer