Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Job Shop Scheduling using CP

    Posted 07/11/17 06:22 AM

    Originally posted by: Shilpi1991


    Hi, 

    I am trying to solve a job shop scheduling problem for 90 jobs and 26 machines, using the standard example sched_jobshop that uses constraint programming, but I am unable to represent the data from tuple Ops in an excel file and read from there, is it possible How ?

    Also how to account for floating processing times, when I declare pt as float it gives error on dvar Interval ivts

     

    using CP;
     
    int nbJobs = ...;
    int nbMchs = ...;
     
    range Jobs = 0..nbJobs-1;
    range Mchs = 0..nbMchs-1; 
    // Mchs is used both to index machines and operation position in job
     
    tuple Operation {
      int mch; // Machine
      int pt;  // Processing time
    };
     
     
    Operation Ops[j in Jobs][m in Mchs]=...;
     
    dvar interval itvs[j in Jobs][o in Mchs] size Ops[j][o].pt;
    dvar sequence mchs[m in Mchs] in all(j in Jobs, o in Mchs : Ops[j][o].mch == m) itvs[j][o];
     
    execute {
      cp.param.FailLimit = 10000;
    }
     
    minimize max(j in Jobs) endOf(itvs[j][nbMchs-1]);
    subject to {
      forall (m in Mchs)
        noOverlap(mchs[m]);
      forall (j in Jobs, o in 0..nbMchs-2)
        endBeforeStart(itvs[j][o], itvs[j][o+1]);
    }
     
    execute {
      for (var j = 0; j <= nbJobs-1; j++) {
        for (var o = 0; o <= nbMchs-1; o++) {
          write(itvs[j][o].start + " ");
        }
        writeln("");
      }
    }

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Job Shop Scheduling using CP

    Posted 07/11/17 01:31 PM

    Hi,

    what I would do is have mch as a 2D array in one tab and pt as a 2D array in another tab in an excel spreadsheet

    In CPLEX_Studio1271\opl\examples\opl\oil you have some examples

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Job Shop Scheduling using CP

    Posted 07/12/17 05:08 AM

    Originally posted by: rdumeur


    Dear Shilpi1991

    I believe you csv related question is answered there:

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014603725

    which advises to use: https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.6.0/ilog.odms.ide.help/refjsopl/html/IloOplInputFile.html

     

    Regarding the processing time, it cannot be given as a float. All time and durations are integer in CPO. 

    If the number you have as input is floating point, then you can use a scale factor to get an integer. This requires scaling down the obtained value to present the solution.

     

    I hope this helps,

     

             Cheers,


    #DecisionOptimization
    #OPLusingCPOptimizer