6.1.1.4.1.5. pytfa.optim.reformulation
¶
MILP-fu to reformulate problems
6.1.1.4.1.5.1. Module Contents¶
6.1.1.4.1.5.1.1. Functions¶
|
Substitutes bilinear forms from an expression with dedicated variables |
|
Glover, Fred. |
|
PETERSEN, C,, |
|
|
6.1.1.4.1.5.1.2. Attributes¶
|
|
|
- pytfa.ConstraintTuple¶
- pytfa.OPTLANG_BINARY = binary¶
- pytfa.subs_bilinear(expr)¶
Substitutes bilinear forms from an expression with dedicated variables :param expr: :return:
- pytfa.glovers_linearization(b, fy, z=None, L=0, U=1000)¶
Glover, Fred. “Improved linear integer programming formulations of nonlinear integer problems.” Management Science 22.4 (1975): 455-460.
Performs Glovers Linearization of a product z = b*f(y) <=> z - b*f(y) = 0 <=> { L*b <= z <= U*b { f(y) - U*(1-b) <= z <= f(y) - L*(1-b)
where : * b is a binary variable * f a linear combination of continuous or integer variables y
- Parameters
b – Must be a binary optlang variable
z – Must be an optlang variable. Will be mapped to the product so that z = b*f(y)
fy – Must be an expression or variable
L – minimal value for fy
U – maximal value for fy
- Returns
- pytfa.petersen_linearization(b, x, z=None, M=1000)¶
PETERSEN, C,, “A Note on Transforming the Product of Variables to Linear Form in Linear CLIFFORD Programs,” Working Paper, Purdue University, 1971.
Performs Petersen Linearization of a product z = b*x <=> z - b*x = 0 <=> { x + M*b - M <= z <= M*b { z <= x
where : * b is a binary variable * f a linear combination of continuous or integer variables y
- Parameters
x – Must be an expression or variable
b – Must be a binary optlang variable
z – Must be an optlang variable. Will be mapped to the product so that z = b*f(y)
M – big-M constraint
- Returns
- pytfa.linearize_product(model, b, x, queue=False)¶
- Parameters
model –
b – the binary variable
x – the continuous variable
queue – whether to queue the variables and constraints made
- Returns