Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Reading Tuples from Excel

    Posted 10/30/19 07:51 AM

    Originally posted by: kcapt


    Hello,

    I cannot import/read excel data from excel in this example: "sched_jobshopflex". I tried a lot of different ways as you can see in the image below, but none worked!

    I want to be able to read the variable Ops{<x,x,x>,...) and the variable Modes{<x,x,x>,...).

    I have tried:

    id from SheetRead(sheet, "'Folha1'!N2:N25");   
    jobId from SheetRead(sheet, "'Folha1'!O2:O25");
    pos from SheetRead(sheet, "'Folha1'!P2:P25");

    and

    Ops = {
    <id from SheetRead(sheet, "'Folha1'!N2:N25")>,
    <jobId from SheetRead(sheet, "'Folha1'!O2:O25")>,
    <pos from SheetRead(sheet, "'Folha1'!P2:P25")>};
    }

    And many more ways...

    What do you think it's the best way or how would you adapt the .mod and .dat to make it work?

    Thanks!

     

    ---------------------------------------------------------------------------------------------------------------------------

    Sched_jobshopflex:

    .mod


    tuple paramsT{
        int nbJobs;
        int nbMchs;
    };
    paramsT Params = ...;    
    int nbJobs = Params.nbJobs;
    int nbMchs = Params.nbMchs;

    range Jobs = 1..nbJobs;
    range Mchs = 1..nbMchs; 

    tuple Operation {
      int id;    // Operation id
      int jobId; // Job id
      int pos;   // Position in job
    };

    tuple Mode {
      int opId; // Operation id
      int mch;  // Machine
      int pt;   // Processing time
    };


    {Operation} Ops   = ...;

    {Mode}      Modes = ...;

     

    .dat

    Params = <5, 10>;

    Ops = {
      <1,1,0>,
      <2,1,1>,
      <3,1,2>};

    Modes = {
      <1,3,13>,
      <1,7,12>,
      <2,8,9>,
      <2,9,17>,
      <3,7,16>,
      <3,5,5>};


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Reading Tuples from Excel



  • 3.  Re: Reading Tuples from Excel

    Posted 10/30/19 11:45 AM

    Originally posted by: kcapt


    Hi,

    Thank you very much!!! After all it was so simply, that I cannot believe.

    Just one more question, refering to the same example (sched_jobshopflex). What if my processing time is 0.5 instead of an integer variable.

    Is there a way to solve this problem ? You can see the error in the image below.

    Thank you, once again!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Reading Tuples from Excel

    Posted 10/30/19 11:49 AM

    Hi,

    then I would suggest to multiply all time by 2 ...

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Reading Tuples from Excel

    Posted 10/30/19 12:24 PM

    Originally posted by: kcapt


    That won't resolve my problem because my processing time is often 1.33, 2.66...

    Thanks again.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Reading Tuples from Excel

    Posted 10/30/19 12:26 PM

    Then multiply by 6!

    Or 60 in order to replace hours by minutes.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer