I am using docplex
(docplex.md.model) for a minimization problem, and my objective function has a product of three variables (one continuous and two binaries), when running the code I got this error:
DOcplexException: Cannot multiply -x1*x21 by x2, some terms would have degree >= 3. Maximum polynomial degree is 2.
How can I solve this issue?
And thank you.
2 options with CPLEX:
Within Easy optimization python see Non Linear function
But you need to turn your float decision variable into an expression
See https://github.com/AlexFleischerParis/zoodocplex/blob/master/zoodecimalcpo.py
See multiply 2 binary variables
and multiply binary and other variable