# # an uncapacitated facility location model, with # disaggregated constraints # param m; # number of warehouse locations param n; # number of customers option randseed 421415; param f{1..m} = Uniform(10,30); # fixed cost of opening facility param c{1..m, 1..n} = Uniform(1,9); # shipping cost for satisfying all of j's demand var y{1..m} binary; # whether to open facility var x{1..m, 1..n} >= 0; # proportion of demand satisfied by each facility minimize objective: sum{i in 1..m} f[i]*y[i] + sum{i in 1..m, j in 1..n} c[i,j]*x[i,j]; subject to meetdemand{j in 1..n}: sum{i in 1..m} x[i,j] =1; subject to onlyuseopen{i in 1..m, j in 1..n}: x[i,j] <= y[i];