Reputation: 1
Question: How I may linearize the following constraint (joined figure), where r[x][y], c[y,j], a[j,t] and p[x,t+l] are binary variables.
Could someone help me please ?
Best
Quadratic constraint
Upvotes: 0
Views: 844
Reputation: 33532
You can introduce an auxiliary binary variable ap
, which holds the product of a
and p
.
Linearization can be done with:
ap <= a
ap <= p
ap >= a + p - 1
Then your remaining formula is ready to be formulated within gurobi (no more quadratic terms).
Upvotes: 3