数学建模社区-数学中国
标题:
lingo 是否可以调用WPS中的Excel文件
[打印本页]
作者:
1609692294ai
时间:
2014-8-19 11:20
标题:
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
显示连接错误,
作者:
madio
时间:
2014-8-19 11:42
应该是可以的,你传一个文件上来,我试试看
作者:
1609692294ai
时间:
2014-8-19 15:23
工作簿1.xls
(7.5 KB, 下载次数: 0)
2014-8-19 15:22 上传
点击文件名下载附件
Excel文件
下载积分: 体力 -2 点
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5