Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Resource constraint Project Scheduling Problem

  • 1.  Resource constraint Project Scheduling Problem

    Posted Thu February 14, 2019 10:21 AM

    Originally posted by: Rahul Ghate


     I am working on RCPSP and want to apply Preemption to it. I have divided the duration of every task into equal parts. Now after doing that I am unable to apply Precedence constraints to each of individual unit duration of task. Which function can I use for that.

    
    using CP;
    
    int NbTasks = ...;
    int NbRsrcs = ...;
    range RsrcIds = 1..NbRsrcs;  
    
    int Capacity[r in RsrcIds] = ...;    
    tuple Task {                 
    
      key int id;
      int     pt;
      int     dmds[RsrcIds];
      {int}   succs;            
      {int} pred;
     }
    {Task} Tasks=...;
    
    
    tuple sub_task{ 
     Task task; 
     int p_no;
    
     }
      {sub_task} sub_activities = {<t,i > | t in Tasks, i in 1..t.pt  };  
     dvar interval itvs[t in Tasks]  size t.pt;
     dvar interval a[p in sub_activities] size 1;
     cumulFunction rsrcUsage[r in RsrcIds] = 
      sum (p in sub_activities: p.task.dmds[r]>0) pulse(a[p], p.task.dmds[r]);
     minimize max(t in Tasks) endOf(itvs[t]);
    
    subject to {
       forall (r in RsrcIds)
        rsrcUsage[r] <= Capacity[r];
       forall (t1 in Tasks, t2id in t1.succs)
        endBeforeStart(itvs[t1], itvs[<t2id>]);
    
    }     
    
     execute {
    
      for (var p in sub_activities){
     writeln("subactivity of " + p.task.id + " - " + p.p_no + " starts at " + a[p].start + " Ends at " + a[p].end);  
      } 
     }
    
    
    Please Help.
    

    Thanks in Advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Resource constraint Project Scheduling Problem

    Posted Mon February 18, 2019 03:44 AM

    It looks like you are using constraint programming to solve your model (using CP).

    Can you please post your question on one of the CP optimizer forums here: https://www.ibm.com/developerworks/community/forums/html/category?id=33333333-0000-0000-0000-000000000268


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Resource constraint Project Scheduling Problem

    Posted Sun February 24, 2019 12:26 AM

    Originally posted by: Rahul Ghate


    Ok Sir. Thanks for your directions.


    #CPLEXOptimizers
    #DecisionOptimization