Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Unknown conflicts in constraints

  • 1.  Unknown conflicts in constraints

    Posted Sat August 17, 2013 03:54 AM

    Originally posted by: luluhung


    Here is my code:

      //each target psg select only one psg & not repeat
      forall( p in SPsg )
        onepsg: sum(np in Psg) pp[np][p] == 1;
      
      forall(np in Psg)
        Norepeat: sum( p in SPsg ) pp[np][p] <=1;
       
      //total selected discrete item = 10
      Numdis:
      sum(nb in Discrete) bx[nb] == NBdctItem;
      //UB & LB of item of psg
     
      //selected psg length should equal to target psg length
      forall( p in SPsg ,np in Psg){
        psglength: 
        sum (pi in PItem) PsgItem[np][pi]*px[np][pi] == pp[np][p]*TargetPattern[p];}

    Why cplex said there are conflicts in onepsg[1] , onepsg[2], onepsg[3], onepsg[4], Numdis,

    and  psglength#1#0, psglength#1#1, ...

    What is the problem? 


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Unknown conflicts in constraints

    Posted Sat August 17, 2013 04:24 PM

    CPLEX does not believe those constraints can be satisfied simultaneously. This is most likely the result of a flaw in your formulation, but only you can find the flaw (since only you know what was intended by the various constraints). One thing you can try is to write out a solution that you think should satisfy those constraints (ignoring the objective and all other constraints). Substitute it into each of the constraints CPLEX named and look for violations.

    Paul

     


    #CPLEXOptimizers
    #DecisionOptimization