CSE505/Assignment2/C/cut.mod

21 lines
396 B
Modula-2
Raw Normal View History

2024-03-09 16:25:30 -05:00
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;
2024-03-09 10:16:18 -05:00
display Number;