I would like to linearize a constraint with max. I have the following constraint:
$$\max_{pcj}X_{pwcj}\leqslant L_{wk}.$$
With this constraint, I would like to ensure that for $\forall w \in W$, no matter the values of $p$, $c$ and $j$, the max value of the decision variable $X_{pwcj}$ must be less than or equal to the value of the decision variable $L_{wk}$.
- How can I linearize this function? I've seen some examples, such as How to linearize a constraint with a maximum of binary variables times some coefficient in the right-hand-side. However, their decision variable has only one index. In my case, I have 4 indexes and $w$ must be fixed at each time.
Actually, I would like to check for each set of $w$ occurrences in a sequence given by $j$:
$$H_w=\max \{X_{pwcj}, X_{pwcj+1},\ldots, X_{pwcn}\}$$
I was wondering what the best way to write my constraint could be:
$$H_{w}\leqslant L_{wk}$$ where $n$ is the max number of $j$ positions, but I am not sure.
- If I use this notation, I think that I could do something like this: How to formulate (linearize) a maximum function in a constraint? proposed by @LarrySnyder610, however, in my case I have a set of the same variables thus I am not sure that I can do this.
If this notation can be used in my case, could I ignore the big M value, since both of my variables are binary?
Could someone help me with these questions?