21 lines
396 B
Modula-2
21 lines
396 B
Modula-2
set WIDTHS;
|
|
param orders {WIDTHS} > 0;
|
|
|
|
param nPAT integer >= 0;
|
|
param nbr {WIDTHS, 1..nPAT} integer >= 0;
|
|
|
|
var Cut {1..nPAT} integer >= 0;
|
|
|
|
minimize Number:
|
|
sum {j in 1..nPAT} Cut[j];
|
|
|
|
subject to Fulfill {i in WIDTHS}:
|
|
sum {j in 1..nPAT} nbr[i,j] * Cut[j] >= orders[i];
|
|
|
|
data cut.dat;
|
|
option solver cplex;
|
|
solve;
|
|
option omit_zero_rows 1;
|
|
option display_1col 0;
|
|
display Cut;
|
|
display Number; |