model ModelName options noimplicit uses "mmxprs" ! uses "mminsight" ! uncomment this line for an Xpress Insight model declarations S = 1..6 M = 1..5 c: array(S) of integer A: array(M,S) of integer b: array(M) of integer x: array(S) of mpvar profit:linctr end-declarations c::[30,45,24,26,24,30] A::[1,4,0,4,2,0, 4,5,3,0,1,0, 0,3,8,0,1,0, 2,0,1,2,1,5, 2,4,2,2,2,4] b::[1200,1160,1780,1050,1360] writeln("Begin running model") profit := sum(j in S) c(j)*x(j) forall(i in M) sum(j in S) A(i,j)*x(j) <= b(i) maximize(profit) writeln("End running model") writeln(getobjval) forall(j in S) writeln(getsol(x(j))) end-model