Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  read tuple data in excel

    Posted 01/16/18 03:10 AM

    Originally posted by: A.Omidi


    hi dear

    i have a problem for read tuple data from excel.

    my data is:

    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] = ...;

     

    pls, let me know, how can i read tuple multi dimensional data in excel?

    best regard

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: read tuple data in excel

    Posted 01/16/18 03:38 PM

    Hi,

    I see two options:

    - consider your input as a 3D array and have a look at http://www-01.ibm.com/support/docview.wss?rs=0&context=SSCMS55&uid=swg21401340&loc=en_US&cs=utf-8&cc=us&lang=all

    - have mch and pt in 2 different excel tabs, you read the 2 2D arrays and then you turn those into a tuple 2D array

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: read tuple data in excel

    Posted 01/17/18 01:57 AM

    Originally posted by: A.Omidi


    dear Alex

    thanks so much for your reply.

     

    i have another question:

    if, i want process batch of jobs in ordered way, how can i add this constraint in my model? (in job shop or flow shop models)

    for example i have 3 different batches that every batch have 5 same jobs. i need in the solution, process of jobs in the batch, be ordered :

    for example with below sequence :

    batch 1 , batch 3, batch 2

    jobs process must be:

    11111 33333 22222

     

    thanks 

    best regards 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: read tuple data in excel



  • 5.  Re: read tuple data in excel

    Posted 01/17/18 05:41 AM

    Originally posted by: A.Omidi


    hi

    thanks a lot. but when i added this constraint to the model, i have below error:

    The function endBeforeStart(int,int,int) does not exist.

     

    my model is:

    int nbJobs = ...;
    int nbMchs = ...;

    {int} Jobs = asSet(0..nbJobs-1);
    {int} Mchs = asSet(0..nbMchs-1);

    int OpDurations[j in Jobs][m in Mchs] = ...;

    dvar interval itvs[j in Jobs][m in Mchs] size OpDurations[j][m];
    dvar sequence mchs[m in Mchs] in all(j in Jobs) itvs[j][m];

    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]);
        
        endBeforeStart(0,1,0);

     

    best regards 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: read tuple data in excel

    Posted 01/17/18 06:00 AM

    Originally posted by: A.Omidi


    sorry

    i can run it. 

     

    thanks so much


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: read tuple data in excel