lingo 是否可以调用WPS中的Excel文件
model:title transportation;
!a 3 warehouses,4 customers transportation problem;
sets:
warehouse/wh1,wh2,wh3,wh4/:capacity;
customer/c1,c2,c3,c4/:demand;
route(warehouse,customer):cost,volume;
endsets
!the objective;
min=@sum(route:cost*volume);
!the demand constraints;
@for(customer(i):
@sum(warehouse(j):volume(j,i))>=demand(i));
!the supply constrains;
@for(warehouse(i):
@sum(customer(j):volume(i,j))=capacity(i));
!here is the parameters;
data:
capacity=@OLE('F:\自学天地\lingo\LINGO11\excel文件\工作簿1.xls');
demand=@OLE('F:\自学天地\lingo\LINGO11\excel文件\工作簿1.xls');
cost=@OLE('F:\自学天地\lingo\LINGO11\excel文件\工作簿1.xls');
@OLE('F:\自学天地\lingo\LINGO11\excel文件\工作簿1.xls')=volume;
enddata
显示连接错误,
应该是可以的,你传一个文件上来,我试试看
页:
[1]