How to linearize a floor funtion in constraints?

201 Views Asked by At

I want to linearize the following constraints:

$Y_ij^tb$$M$.$X_ij^tb$

$Y_ij^tb$ ≤ ([$S^tb$]+1)

$Y_ij^tb$ ≥ ([$S^tb$]+1)-(1-$X_ij^tb$).$M$

$Y_ij$^tb ≥ 0

where a floor function is used. $M$ is a large number, $X_ij^tb$ is a binary and $Y_ij^tb$ and $S^tb$ are continuous variables. Is there a simple method to make the floor function linear?

Thank you in advanced for your help.

1

There are 1 best solutions below

0
On

I found the solution and share it here, in case anybody has the same question:

Define a new continuous variable like $Φ_ij^tb$, such that:

$Φ_ij^tb$$M$.$X_ij^tb$

$Φ_ij^tb$$S^tb$

$Φ_ij^tb$$S^tb$-$(1-X_ij^tb)$.$M$

$Φ_ij^tb$$0$

then, let $Y_ij^tb$ be a non-negative integer variable:

$Y_ij^tb$ ∈ {0,1,2,…}

and guarantee the consistency between $Φ_ij^tb$, $Y_ij^tb$ and $X_ij^tb$ via the following constraints:

$Y_ij^tb$ <= $Φ_ij^tb$ + $1$

$Y_ij^tb$ > $Φ_ij^tb$