Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  OR constraints

    Posted 05/19/09 08:38 PM

    Originally posted by: SystemAdmin


    [morteza4321 said:]

    Hello,

    I have a program with two constraint sets,  Cons1: x - x[j]>= 1-z[i,j] and Cons2: x[j] - x>= 1-z[i,j]
    for each i and j, I want to add a constraint in which at least one of Cons1 or Cons2 is satisfied.
    For this purpose, I write (in C#):

    for each i,j:
      cplex.Or(cplex.AddGe(cplex.Sum(x, cplex.Prod(-1, x[j]), z[count]), 1), cplex.AddGe(cplex.Sum(x[j], cplex.Prod(-1, x), z[count]), 1));
           
    Cplex solver adds both the constraints Cons1 and Cons2 and solves the program (therefore it obtains z[i,j]=1 and x = x[j]). I was wondering if any could help me to solve the problem.


    Best Regards,
    Morteza
    #ConstraintProgramming-General
    #DecisionOptimization