I am having difficulty in understand how to best approach this problem, and was wondering if anyone could confirm if my solution is correct.
Suppose we have two products: $P_1$ and $P_2$ such that $P_1 \leq 5000$ and $P_2 \leq 3000$ + non-negativity constraints.
How would I formulate the constraint that I can only produce $P_2$ if at least $1000$ units of $P_1$ have been produced?
My attempt is as follows:
Introduce $S_1,S_2 \in \{0,1\}$ where: $$ S_1 = 1 \;\; \text{if}\;\;P_1 \leq 999 \;\; \text{and} \;\; S_1 = 0 \;\; \text{ otherwise.}$$ $$S_2 \leq S_1$$. Then: $$P_1 \geq 1000*S_1 $$ $$P_2 \geq 1000*S_2 $$
does this work? Is there an easier way to do this? Also, does this type of problem have a name? For example, I have come across "either or" type constraints, and "set up cost" constraints.
Thanks!
You want to enforce $P_2>0 \implies P_1 \ge 1000$. Introduce binary variable $x$ and linear "big-M" constraints \begin{align} P_2 &\le 3000 x \tag1 \\ P_1 &\ge 1000 x \tag2 \end{align} Constraint $(1)$ enforces $P_2 > 0 \implies x=1$. Constraint $(2)$ enforces $x=1 \implies P_1 \ge 1000$.