Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Model does not respect constraints

    Posted 04/03/17 01:19 PM

    Originally posted by: mGlass


    Good afternoon,

     

    My model does not display any error but it does not follow the constraints.

    Can you please help?

     

    Thank you so very much,

     

    M

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Model does not respect constraints

    Posted 04/03/17 01:47 PM

    Hi,

    can you also attach the .dat ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Model does not respect constraints

    Posted 04/03/17 02:24 PM

    Originally posted by: mGlass


    Here it is!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Model does not respect constraints

    Posted 04/04/17 04:03 PM

    hi

    and the excel file ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Model does not respect constraints

    Posted 04/04/17 06:01 PM

    Originally posted by: mGlass


    Here they are,:

    The data set is not really small, though..

    Thank you for your time!

    Ps:I've made some small changes on my .dat file


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Model does not respect constraints

    Posted 04/05/17 01:55 AM

    Hi,

    yes that is normal because your model is not feasible and you get a relaxed solution.

    You have a nice video at https://www.youtube.com/watch?v=tUALbhJ2xWY

    and in the documentation I recommend IDE and OPL > CPLEX Studio IDE > IDE Tutorials > Relaxing infeasible models

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Model does not respect constraints

    Posted 04/05/17 02:55 AM

    Originally posted by: mGlass


    Good morning, 

     

    Thank you so much for the suggestions. 

    However, my problem is that the model should not be infeasible because the supplier does not have any constrain. Hence, the plant requirements should always be possible to fulfill.

     

    Best regards, 

    M


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Model does not respect constraints

    Posted 04/05/17 02:59 AM

    Hi,

    you get a conflict at least:

    Line    In conflict    Element (2)
    109    Yes    StockinClients_Returns#0#2#0
    113    Yes    StockinClients#0#2#0

    If you comment

    //  forall (i in clients, p in pallets, t in aperiods)
    //  StockinClients_Returns:
    //  sum(j in plants) x[i][j][p][t] <= stockinclient[i][p][t] ;
    //  
    //  forall (i in clients, p in pallets,t in aperiods)
    //  StockinClients:
    //  stockinclient[i][p][t]==stockinclient[i][p][t-1]-sum (j in plants)x[i][j][p][t] +xpa[i][p][t];
     

    then your model gets feasible

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 9.  Re: Model does not respect constraints

    Posted 04/05/17 05:23 AM

    Originally posted by: mGlass


    Thank you so much!
    Indeed I had the constraints wrong!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 10.  Re: Model does not respect constraints

    Posted 04/05/17 08:21 AM

    Originally posted by: mGlass


    I'm sorry, I still have a conflict:

     

      forall (i in clients, p in pallets, t in aperiods)

      StockinClients_Returns:

      sum(j in plants)x[i][j][p][t] <= stockinclient[i][p][t-1] +xpa[i][p][t];

     

      forall (i in clients, p in pallets,t in aperiods)

      StockinClients:

      stockinclient[i][p][t]==stockinclient[i][p][t-1]-sum(j in plants)(x[i][j][p][t])+xpa[i][p][t];

     

    How can I have a conflict in these 2 expressions?

    If I join them, I'll have: stockinclient[i][p][t] >= 0.

     

    These constraints were just to assure that:

    1. the client cannot ship more than what it has in stock

    2. keep track of the stock (stock= stock in the previous period +  what the clieent receives - what the client sends


    #DecisionOptimization
    #OPLusingCPLEXOptimizer