Shouruv
Shouruv

Reputation: 1

Linearization for Optimization in CPLEX

I have tried to solve an optimisation problem which has quadratic constraint. I need an linearize form of the constraint. I am looking for a way to do that for the following equality constraint:

z == x*(x-y);

where x and y are continuous decision variables and:

x1 <= x <= x2;

y1 <= y <= y2;

Upvotes: 0

Views: 565

Answers (1)

Alex Fleischer
Alex Fleischer

Reputation: 10059

The idea is to first use

4xy=(x+y)*(x+y)-(x-y)(x-y)

and then use piecewise to linearize square.

I posted an example at

https://www.ibm.com/developerworks/community/forums/html/topic?id=f48c280e-144b-46aa-abb9-906a4eb4219f&ps=25

Upvotes: 1

Related Questions