Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  opl modelling error

    Posted 06/09/18 08:27 PM

    Originally posted by: open_ball


    Hi, 

     

    The txt file shows a part of my model and where it gives me the error. Unfortunately, I am not able to identify what the problem is.  I am also attaching the error message that I receive. When I copy and paste the code, it considers it a spam, that's why I am not able to put the code here.

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: opl modelling error

    Posted 06/10/18 01:28 AM

    Hi

    can you attach .dat and .mod

    so that other users could try ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: opl modelling error

    Posted 06/10/18 01:38 AM

    Originally posted by: open_ball


    Hi Alex,

     

    I rearranged my code and am now sharing the mod and dat file here. 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: opl modelling error

    Posted 06/10/18 05:07 AM

    Hi,

    you wrote out of bounds. If you write

    Constraint17:
                forall(<a, c1, c2, t> in Ytup : c2 !=  "Anchorage" && c1!= "Ship" && c2 != "Ship" ){
              sum(r in Resources : <r,a, c1, c2, t> in gtup ) (omega[r]*g[<r,a, c1, c2, t>] )  +  
              sum(e in Equipment: <e, a, c1, c2, t> in htup ) (varepsilon[e]*h[<e, a, c1, c2, t>])  
             <=  mu[a]*Y[<a, c1, c2, t>];}

    for Constraint17 your model will work

    regards

    PS:

    some useful posts at https://www.ibm.com/developerworks/community/forums/html/topic?id=1bf1f4de-b6fa-4375-a397-741e9239513e&ps=25


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: opl modelling error

    Posted 06/10/18 10:48 AM

    Originally posted by: open_ball


    Hi Alex,

     

    Thanks for your answer. So If I wrote sum(<r,a, c1, c2, t> in gtup ) (omega[r]*g[<r,a, c1, c2, t>] ) , would that also work in the same way? 

     

    Do I need following condition in forall (c2 !=  "Anchorage" && c1!= "Ship" && c2 != "Ship") for the model to work properly? or Is it redundant?  gtup and htup do not contain those locations but Ytup does. 

     

    Lastly, I had to wait for 7 hours to receive this error in my original model. Shouldn't have I received this earlier? Doesn't CPLEX first create the constraint sets to solve the model?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: opl modelling error

    Posted 06/10/18 12:02 PM