帮我用lingo编编程吧

学习 时间:2026-04-01 06:48:15 阅读:1488
帮我用lingo编编程吧设X1,X2,X3……X46为46档长度肠衣分别的数,N成品捆数.则 Max Z=N (成品捆数越多越好)89.5>=3X1+3.5X2+……+6.5X8>=88.589.5>=7X9+7.5X10+……+13.5X22>=88.589.5>=14X23+14.5X24+……+25.5X46=>88.5X1+X2+……+X8=19NX9+X10+……+X22=7NX23+X24+……+X46=4N帮我把这个编编程吧!

最佳回答

直率的草丛

高贵的樱桃

2026-04-01 06:48:15

model:sets:set1/1。。46/:X;endsetsub=89。5;lb=88。5;max = N;@sum(set1(i)|i#ge#1 #and# i#le#8:X(i))=19*N;@sum(set1(i)|i#ge#9 #and# i#le#22:X(i))=7*N;@sum(set1(i)|i#ge#23 #and# i#le#46:X(i))=4*N;@sum(set1(i)|i#ge#1 #and# i#le#8:(3+0。5*(i-1))*X(i))=lb;@sum(set1(i)|i#ge#9 #and# i#le#22:(7+0。5*(i-9))*X(i))=lb;@sum(set1(i)|i#ge#23 #and# i#le#46:(14+0。5*(i-23))*X(i))=lb;end如果需要整数要求,则需要加上@for(set1(i):@gin(X));

最新回答共有2条回答

  • 美好的草莓
    回复
    2026-04-01 06:48:15

    model:sets:set1/1。。46/:X;endsetsub=89。5;lb=88。5;max = N;@sum(set1(i)|i#ge#1 #and# i#le#8:X(i))=19*N;@sum(set1(i)|i#ge#9 #and# i#le#22:X(i))=7*N;@sum(set1(i)|i#ge#23 #and# i#le#46:X(i))=4*N;@sum(set1(i)|i#ge#1 #and# i#le#8:(3+0。5*(i-1))*X(i))=lb;@sum(set1(i)|i#ge#9 #and# i#le#22:(7+0。5*(i-9))*X(i))=lb;@sum(set1(i)|i#ge#23 #and# i#le#46:(14+0。5*(i-23))*X(i))=lb;end如果需要整数要求,则需要加上@for(set1(i):@gin(X));

上一篇 电池电压降低的时间比如一个手机,电池充满电后的电压是4V,容量是1300mAh.但是使用一段时间后,电池电压降低,当降到

下一篇 老师让写600字作文,题目是《老师,您辛苦啦》,希望给个素材