I am trying to model some logical constraints in ILOG. Logical constraints could be given such as:
Constraint 1 or Constraint 2,
Constraint 3 or Constraint 4,
Constraint 5 or Constraint 6.
The six constraints in question are listed below. \begin{align}&\,\,\sum_{s=1}^Sx_{is}=1\quad\forall i\in T\\\text{Constraint}\,1:&\,\,\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{js}&=0&\quad(i,j)\in\text{linked}\\\text{Constraint}\,2:&\,\,\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{j(2\cdot m-s)}&=0&\quad(i,j)\in\text{linked}\\\text{Constraint}\,3:&\,\,\left\vert\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{js}\right\vert&\ge d_1&\quad(i,j)\in\min\\\text{Constraint}\,4:&\,\,\left\vert\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{j(2\cdot m-s)}\right\vert&\ge d_1&\quad(i,j)\in\min\\\text{Constraint}\,5:&\,\,\left\vert\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{js}\right\vert&\le d_2&\quad(i,j)\in\max\\\text{Constraint}\,6:&\,\,\left\vert\sum_{s=1}^Ss\cdot x_{is}-\sum_{s=1}^Ss\cdot x_{j(2\cdot m-s)}\right\vert&\le d_2&\quad(i,j)\in\max\end{align} Only one of the constraints in each group should be satisfied and active, i.e if Constraint 1 is active, Constraint 2 should not be active, or vice versa.
I have tried some logical constraints definition method, e.g. Big M method, but I could not define the constraints and run the model. Since there are too many sum functions in my model, it is very challenging to build a big-M model. So I need your help.
I would appreciate it if you have any suggestions. Thank you in advance. Regards.
set D {i in ISET, s in SSET} = setof {<(i),j> in MIN, t in SSET: abs(s-t) < d1 or abs(s-(2*m-t)) < d1} <j,t> union setof {<(i),j> in MAX, t in SSET: abs(s-t) > d2 or abs(s-(2*m-t)) > d2} <j,t>;Maybe it will help you. – RobPratt Oct 27 '19 at 03:06