Invalid Quadratic Form: multiplication of a binary variable and continuous variable

(Mostafa Mohammadpourfard) #1

we are solving the if-else condition problem with introducing binary variables but it creates another problem as invalid quadratic form(s): not a square, which occurs by multiplication of binary and continuous variables how can I solve this problem?

(Mark L. Stone) #2

When you introduce binary variables for logical constraint modeling, you should not multiply binary variables with continuous variables. The whole idea is not to do that.

See the first part of section 2.8 of https://www.fico.com/en/resource-download-file/3217 to see how to rewrite the product of a binary with a continuous variable.