Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

RCPSP & CP Optimizer: Oplrun-process is not responding

  • 1.  RCPSP & CP Optimizer: Oplrun-process is not responding

    Posted Sun July 21, 2019 08:14 AM

    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


  • 2.  Re: RCPSP & CP Optimizer: Oplrun-process is not responding

    Posted Sun July 21, 2019 04:09 PM

    Hi,

    first you have not set a time limit so this could run quite long.

    But what I would do is change

    dvar interval doActivity[i in activities]  size i.periodes ;

    into

    dvar interval doActivity[i in activities] in 0..1000 size i.periodes ;

    in order to help CPO prove optimality

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: RCPSP & CP Optimizer: Oplrun-process is not responding

    Posted Mon March 16, 2020 05:20 AM

    Originally posted by: fw2610


    Hi,

    sorry for this late answer but I found a solution concerning my problem:

    I changed the objective function


    minimize sum (i in activities) ((endOf (doActivity[i]) >= deadline) * i.weight);

     

    into

     

    maximize sum (i in activities) presenceOf (doActivity[i]) * i.weight;

     

    combined with the constraint

     

    forall (i in activities)
          endOf (doActivity[i]) <= deadline;

     

    Now the solver has to calculate from 0 to the deadline. With the old objective function, however, he had to calculate from the deadline to infinity.

     

    Best regards
     


    #DecisionOptimization
    #OPLusingCPOptimizer