Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Export solutions/results to excel

    Posted 03/13/16 07:42 AM

    Originally posted by: NguyenHuuTRi


    Hello,

    In my model, the result returns three decision values, so I would very much appreciate it if you could show me how to export solutions/these value to excel automatically in CPLEX.

     

    Thanks.

     

    Tri.

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Export solutions/results to excel



  • 3.  Re: Export solutions/results to excel

    Posted 03/13/16 11:13 AM

    Originally posted by: NguyenHuuTRi


    Hello,

     

    My question is that I have already the results as the post mentioned , let's say 4-dimensional array data. However, I wonder if we have anyway to export directly the results to excel instead that I have to copy all data sheet from CPLEX to excel?

     

    Thanks.

     

    Tri.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Export solutions/results to excel

    Posted 03/13/16 11:26 AM

    Hi,

    once you have your tuple set you may use SheetWrite and then the tuple set will be written in the excel spreadsheet.

    Regards 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Export solutions/results to excel

    Posted 03/13/16 11:28 AM

    Originally posted by: NguyenHuuTRi


    Hi,

    As I am a new beginner of CPLEX. Could you help me how to use syntax sheetwrite to the tuple set , let's say a four-dimensional array (xi,j,k,l) to excel?

     

    Thanks so much.

     

    Tri.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Export solutions/results to excel

    Posted 03/13/16 05:35 PM

    Hi,

    let me give you a small example:

    .mod

    range I=1..3;
    range J=1..5;
    range K=1..6;
    range L=1..3;

    string writeConnection="A1:E";

    execute
    {
    writeConnection+=I.UB*J.UB*K.UB*L.UB;
    }

    int x[i in I,j in J,k in K,l in L]=i*j*k*l;

    subject to
    {

    }

    tuple t
    {
    int i;
    int j;
    int k;
    int l;
    int x;
    }

    sorted {t} s={<i,j,k,l,x[i,j,k,l]> | i in I,j in J,k in K,l in L};

    .dat

    SheetConnection s("tutu.xlsx");

    s to SheetWrite(s,writeConnection);

    regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer