优质解答
model: SETS: m/p1,p2,p3,p4,p5,p6,p7,p8/:y,x,w,v,q,t; ENDSETS DATA: w=0.233,0.544,0.329,0.780,0.533,0.454,0.762,0.303; v=4000,2500,3500,1800,2500,2600,1800,2500; q=0.022,0.015,0.024,0.032,0.02,0.018,0.03,0.02; t=0.04,0.015,0.025,0,0.015,0.02,0.01,0.02; D=5000; Q1=0.025; t1=0.025; n=4; ENDDATA !The objective; max=@sum(m(j):v(j)*x(j)); !The capacity constraints; @for(m(j):x(j)=D; !The quality constraints; @sum(m(j):x(j)*q(j))
model: SETS: m/p1,p2,p3,p4,p5,p6,p7,p8/:y,x,w,v,q,t; ENDSETS DATA: w=0.233,0.544,0.329,0.780,0.533,0.454,0.762,0.303; v=4000,2500,3500,1800,2500,2600,1800,2500; q=0.022,0.015,0.024,0.032,0.02,0.018,0.03,0.02; t=0.04,0.015,0.025,0,0.015,0.02,0.01,0.02; D=5000; Q1=0.025; t1=0.025; n=4; ENDDATA !The objective; max=@sum(m(j):v(j)*x(j)); !The capacity constraints; @for(m(j):x(j)=D; !The quality constraints; @sum(m(j):x(j)*q(j))