2
$\begingroup$

I have an MILP as below

$\begin{equation} \begin{array}{*{35}{l}} \underset{d_{u,c}}{\max}\hspace{1mm}\hspace{1mm}\sum_{u=1}^{U}\sum_{c=1}^{C}d_{u,c}\omega_{u,c}\\ \text{}\text{subject to }\text{ C1:} \hspace{2mm}1\le \sum_{c=1}^Cd_{u,c}\le 10,\forall u, u=1,\cdots, U, \\ \text{}\hspace{16.5mm}\text{ C2:} \hspace{2mm}\sum_{u=1}^U d_{u,c}\le 50,\forall c, c=1,\cdots, C, \\ \end{array} \end{equation}$

In addition, I want to enforce that for $\omega_{u,c}<t_{\min}$, $d_{u,c}=0$.

Should I replace the entries of $\omega_{u,c}$ that are less than $<t_{\min}$ to 0 or negative value, or add a new constraint?

$\endgroup$
6
$\begingroup$

Neither. You should delete $d_{u,c}$ from the model whenever $\omega_{u,c} < t_\min$.

$\endgroup$
1
$\begingroup$

To add to @prubin's answer (which is the correct answer) if you somehow need to choose between the two obtions, my advice would be to add the constraints (or better, change the bounds on the variables). Obviously, a good solver will immediately identify the variables with a negativ profit and set their value to zero, but a bad/homebrew solver might not. Thus, you help the solver more by giving the values of the fixed variables explicitly, compared to indicating the values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.