| |||||||||||
Modify problem: add an extra variable within an additional constraint Description We take the trimloss problem described in
trimloss.mps, in which each integer variable x(p) represents
the number of rolls cut to pattern p. We define a new
integer variable y=SUM(p)x(p) and add the associated
constraint
x(1)+x(2)+...+x(N)-y = 0We do this by first adding a row containing the (unitary) coefficients of the x(p), and then a column corresponding to y. We output the revised matrix to a file and then solve the revised MIP, giving y the highest branching priority. Finally, we output the solution, both to the screen and to an ASCII solution file.
Source Files By clicking on a file name, a preview is opened at the bottom of this page.
Data Files trimloss.mps NAME TRIMLOSS ROWS N Trimloss G Demand01 G Demand02 G Demand03 COLUMNS x_____01 Trimloss 10.000000 Demand01 5.000000 x_____02 Trimloss 2.000000 Demand01 4.000000 x_____02 Demand02 1.000000 x_____03 Demand01 4.000000 Demand03 1.000000 x_____04 Trimloss 6.000000 Demand01 2.000000 x_____04 Demand02 2.000000 x_____05 Trimloss 4.000000 Demand01 2.000000 x_____05 Demand02 1.000000 Demand03 1.000000 x_____06 Trimloss 2.000000 Demand01 2.000000 x_____06 Demand03 2.000000 x_____07 Trimloss 10.000000 Demand02 3.000000 x_____08 Trimloss 8.000000 Demand02 2.000000 x_____08 Demand03 1.000000 x_____09 Trimloss 6.000000 Demand02 1.000000 x_____09 Demand03 2.000000 x_____10 Trimloss 4.000000 Demand03 3.000000 RHS RHS00001 Demand01 8.000000 Demand02 13.000000 RHS00001 Demand03 10.000000 BOUNDS UI BOUND001 x_____01 9.000000 UI BOUND001 x_____02 9.000000 UI BOUND001 x_____03 9.000000 UI BOUND001 x_____04 9.000000 UI BOUND001 x_____05 9.000000 UI BOUND001 x_____06 9.000000 UI BOUND001 x_____07 9.000000 UI BOUND001 x_____08 9.000000 UI BOUND001 x_____09 9.000000 UI BOUND001 x_____10 9.000000 ENDATA | |||||||||||
© Copyright 2023 Fair Isaac Corporation. |