Max function with equality constraint in MIP solvers #2271
Unanswered
tahaarbaoui
asked this question in
Linear Solver questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
In a MIP, I would like to write the following equations and don't find the max function in ortools for MIP solvers (in CP, it can be written using absEquality)
D, C in R+,
T in R
D = max (0, T)
C = max (0, -T)
Classical linearizations don't work since they rely on using the minimization (or maximization). However, this cannot be used here since if we maximize D, we minimize C and vice versa. Besides, a linearization using a binary variable is not efficient. We used this:
Define Y in {0, 1}
D >= 0
D >= T
D <= M*Y
C >= 0
C >= -T
C <= M (1-Y)
When using this linearization, the performance is greatly degraded whereas using CPLEX (and its IloMax function), the performance remains the same.
When we checked the LP of CPLEX, it is using indicator constraints to linearize IloMax functions.
For commercial reasons, we need to use SCIP, CBC or any other open-source software.
Is there any other way to linearize the max? Is there a max function that we can use in SCIP or CBC? If yes, how can one access them?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions