Using the min / max operator in whole programming

I am trying to optimize an objective function using integer programming, I need to use an operator Maxin my function, I want to know if there is a way to handle this?

Actually my question is similar to Using min / max inside an integer linear program , but in some aspects it differs:

  • All variables are binary.
  • Please note that x4both are x5presented in two places.
  • One possible solution is to use auxiliary variables, such as the answer to a similar question , but I'm confused when using this solution for my example.

Example:

Collapse (c1 * x1) + (c2 * x2) + (c3 * x3) + Max(c4 * x4, c5 * x5) + (c6 * x4) + (c7 * x5)

subject to
some limitations of equality and inequality

0
source share
1 answer

Use the approach in the question you linked. Expression

Max(c4 * x4, c5 * x5)

can be replaced with a variable x6provided that you add the following additional restrictions:

x6 >= c4 * x4
x6 >= c5 * x5

So your general set becomes:

Minimize (c1 * x1) + (c2 * x2) + (c3 * x3) + x6 + (c6 * x4) + (c7 * x5)

given that:

some equality and inequality constraints

and new requirements:

x6 >= c4 * x4
x6 >= c5 * x5

, Max(c4 * x4, c5 * x5) c4 * x4, c5 * x5. x6 , max-. x6 max-. .

+2

All Articles