0

Let's say I have sourced 10 different suppliers to send products via 6 different routes to the same distribution center. Depending on costs some suppliers won't send any products, but those that do are constrained by a min and max amount.

How can I model this constraint using solver? I can't use an if function, because that would make it non-linear.

But if I set a min constraint for all suppliers then solver won't account for suppliers who shouldn't ship any products due to a high cost.

thx

1 Answer 1

2

A variable x that can assume values zero or between L and U (i.e. x ∈ 0 ∪ [L,U]) is called a semi-continuous variable. Many MIP solvers support this type of variable. If not then semi-continuous behavior can be simulated with an additional binary variable:

 L⋅δ ≤ x ≤ U⋅δ
 δ ∈ {0,1}  (i.e. δ is a binary variable)

This can be handled by any MIP solver. You may have to split the sandwich constraint into two constraints.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.