lingo语句求解析sets: demand/1..6/:a,b,d; supply/1..2/:x,y,e; link(demand,supply):c;endsetsdata:a=1.25,8.75,0.5,5.75,3,7.25;b=1.25,0.75,4.75,5,6.5,7.75;d=3,5,4,7,6,11;e=20,20;enddatainit:x,y=5,1,2,7;endinit[obj]min=@sum(link(i,j):c

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 08:28:45
lingo语句求解析sets:demand/1..6/:a,b,d;supply/1..2/:x,y,e;link(demand,supply):c;endsetsdata:a=1.25,8.75,0

lingo语句求解析sets: demand/1..6/:a,b,d; supply/1..2/:x,y,e; link(demand,supply):c;endsetsdata:a=1.25,8.75,0.5,5.75,3,7.25;b=1.25,0.75,4.75,5,6.5,7.75;d=3,5,4,7,6,11;e=20,20;enddatainit:x,y=5,1,2,7;endinit[obj]min=@sum(link(i,j):c
lingo语句求解析
sets:
demand/1..6/:a,b,d;
supply/1..2/:x,y,e;
link(demand,supply):c;
endsets
data:
a=1.25,8.75,0.5,5.75,3,7.25;
b=1.25,0.75,4.75,5,6.5,7.75;
d=3,5,4,7,6,11;
e=20,20;
enddata
init:
x,y=5,1,2,7;
endinit
[obj]min=@sum(link(i,j):c(i,j)*(((x(j)-a(i)))^2+(y(j)-b(i))^2)^(1/2));
@for(demand(i):@sum(supply(j):c(i,j))=d(i));
@for(supply(j):@sum(demand(i):c(i,j))

lingo语句求解析sets: demand/1..6/:a,b,d; supply/1..2/:x,y,e; link(demand,supply):c;endsetsdata:a=1.25,8.75,0.5,5.75,3,7.25;b=1.25,0.75,4.75,5,6.5,7.75;d=3,5,4,7,6,11;e=20,20;enddatainit:x,y=5,1,2,7;endinit[obj]min=@sum(link(i,j):c
你最好找个教程看看 @for的基本格式就是
@for(集名(下标): 约束条件); 具体哪个是哪个你自己对应一下我想应该能知道吧 基本格式的问题而已

lingo中sets是什么? lingo语句求解析sets: demand/1..6/:a,b,d; supply/1..2/:x,y,e; link(demand,supply):c;endsetsdata:a=1.25,8.75,0.5,5.75,3,7.25;b=1.25,0.75,4.75,5,6.5,7.75;d=3,5,4,7,6,11;e=20,20;enddatainit:x,y=5,1,2,7;endinit[obj]min=@sum(link(i,j):c 模型求解 用lingo软件 求输入的lingo语句以及答案! 如何用lingo求和如何用lingo求1+2+3+4+ +100,要用for语句和sum语句 目标函数的lingo语句(0-1变量)是不是写错了啊求大神指点!运行出的结果是没有计算运费的最优方案,但是不知道错在哪里…本程序是模型Ⅰ中张三的程序;model:最优网购问题;sets:定义变量部 求以下公式lingo代码: 定义集为:sets: demand/1..8/:O,D; supply/1..14/:Y; link(demand,supply):w,c,di,z;endsets lingo语句哪错了sets:position/P1 P2 P3 P4 P5/:x,k;endsetsdatax=5 6 4 8 10;enddata@for(position(i):k(i)=1/x(i)); lingo语句 求大神修改...model:sets: xzb/x1..x9/:x; yzb/y1..y9/:y; cl/c1..c9/:c; links(xzb,yzb,cl):cost,m,n;endsetsdata: x=22 8 5 52 38 16 81 18 62; y=38 13 81 32 11 12 63 45 12; c=17 40 60 25 30 15 50 8 35;enddatamin=@sum(links:c lingo中@for语句代表什么意思? lingo 中if语句怎么运用. 怎样利用LINGO进行循环语句 lingo中判断语句怎么用 lingo累乘语句怎么用? Lingo@for循环和@if的语句 Lingo新手,不知道该怎么写程序,MODEL:SETS:city/A1..A4/:U;;links(city,city):distance,;quan/1..4/:A;demond/1..4/:D;link(quan,demond):c;ENDSETSDATA:distance=0,34,84,8,34,0,63,7,84,63,0,5,8,7,5,0;d=12,18,23,16;ENDD Lingo部分编程问题SETS:BUILDING/B1..B87/:DEMAND;POINT/P1..P100/:MAXCAPACITY;LINKS(BUILDING,POINT):DISTANCE,CAPACITY;此处补充两条语句语句一:目标函数为CAPACITY之和最小语句二:CAPACITY与对应的DISTANCE相乘的积累加 求一个Lingo限制条件语句,使一个数X的限制条件为5的倍数 lingo 循环语句中能不能使用if语句?程序是这样的:model:3个化肥厂4个需求地运输问题; sets:huafeichang/1..3/:chanliang,youhui;diqu/1..4/:xuqiu;links(huafeichang,diqu):yunfei,yunliang,danjia;endsets目标函数;min=@sum(links 关于 LINGO @FOR 语句请问下面的@for 语句中为什么@for(set1(i):@sum(set1(k):x(k))=1); i j k 总是在换啊?model:sets:set1/1..2/:x;set2/1..2/:y;link(set1,set2):a,b;endsets@for(set1(i):@sum(set1(k):x(k))=1);@for(set2(j):@sum(set2(k):y(k))