楼主,搞定~
model:
sets:
canshu/c1..c3/:;
hangshu/h1,h2/:;
shuju(hangshu,canshu):sh;
xianzhi/xi1,xi2/:xian;
canshus/can1..can3/:ca;
bianliang/bian1..bian3/:x;
endsets
data:
sh = 1 4 2
5 3 6;
xian = 23 26;
ca = 14 20 17;
enddata
max = @sum(canshu(j):ca(j)*x(j));
@for(hangshu(i):@sum(canshu(j):sh(i,j)*x(j))