Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Data exchange with Excel/Python

    Posted 11/26/19 10:00 AM

    Originally posted by: Mohamed Awad


    Dears,

    Currently, I am working on a case that must be solved various times using different integer numbers. I have the values of the integer numbers at excel sheet and I would like to run the same case for 10 times and at each run, the model must pick the values from a row from the excel sheet, solve the case and send the results back to the excel file again. Is there a way to do this using SheetConnection and SheetRead or DOcplex-Python could be better.

    Thanks in advance

    Mohamed


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Data exchange with Excel/Python



  • 3.  Re: Data exchange with Excel/Python

    Posted 11/26/19 01:51 PM

    Originally posted by: Mohamed Awad


    Hi Alex,

     

    I started by making a connection with excel by using SheetConnection. When I activate the constraint "precedence_constraint" in A.mod (that I attached with .dat and .xlsx files), I receive the following errors:

    Index out of bound for array "itvs(1)": masonry.
    OPL cannot extract expression: forall(h in 1..9) (forall(p in Precedences) YRAB: endBeforeStart(itvs[h][p.pre], itvs[h][p.post], 0)->).
    OPL cannot extract expression: YRAB: endBeforeStart(itvs[h][p.pre], itvs[h][p.post], 0)->.

    Whenever I deactivate the previous constraint, the model runs and solves without considering the precedence relations. Could you please help me with to figure ou what is the source of the problem. Also, I would like to solve the model three times using the duration at sheets: S1,S2 and S3. You advised me to use mail but would you please give an example on the attached case.

     

    Best regards,

    Mohamed  


    #DecisionOptimization
    #OPLusingCPOptimizer