Decision Optimization

Decision Optimization

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


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

    Posted 03/09/21 03:25 AM
    Hi;

    I am working with CP on a scheduling problem for which I would like to export the numerical results ( the start time and the end time of each operation)  into excel. I used SheetWrite in data file using this syntax ( itvs to SheetWrite (datasheet,"solution") but the model do not Recognize itvs, knowing that itvs is a decision variable (dvar interval itvs[o in Operations] size (o.pt+o.st)).
    Could you please suggest how can I do it.

     

    Best regards,



    ------------------------------
    So jana
    ------------------------------


    #DecisionOptimization


  • 2.  RE: Export results to excel

    Posted 03/09/21 03:47 AM
    Hi,

    the simple technique is to convert your intervals into tuple sets.

    For instance, if I consider the sched_cumul example where we have

    dvar interval itvs[h in Houses][t in TaskNames] in ReleaseDate[h]..(maxint div 2)-1 size Duration[t];​

    in the postprocess part I add

    tuple itvs_result
    {
      int h;
      string t;
      int s;
      int e;
      
    }
    
    {itvs_result} results={<h,t,startOf(itvs[h][t]),endOf(itvs[h][t])> | h in Houses,t in TaskNames};

    and then I can use SheetWrite on that tuple set

    regards



    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: Export results to excel

    Posted 03/09/21 04:50 AM
    Thank you Alex it works :)

    ------------------------------
    So jana
    ------------------------------



  • 4.  RE: Export results to excel

    Posted 03/09/21 04:56 AM
    Some more tricks at https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer/viewthread?MessageKey=e1b0c4e9-9665-4cf8-b85e-2498635ecc15&CommunityKey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer#bme1b0c4e9-9665-4cf8-b85e-2498635ecc15

    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------