【汇率最高的货币】...按美元计算的价值最高.设每天的汇率、现有货币和当天需
答案:2 悬赏:80 手机版
解决时间 2021-01-27 02:22
- 提问者网友:兔牙战士
- 2021-01-26 14:24
【汇率最高的货币】...按美元计算的价值最高.设每天的汇率、现有货币和当天需
最佳答案
- 五星知识达人网友:愁杀梦里人
- 2021-01-26 14:55
【答案】 如果可以请采纳 如果有问题请说明
model:
sets:
currency/1..4/:amount,demand,a;
link(currency,currency):exchange,rate;
endsets
data:
demand=6 3 1 10;
amount=8 1 8 0;
rate=
1 0.58928 1.743 138.3
1.697 1 2.9579 234.7
0.57372 0.33808 1 79.346
0.007233 0.00426 0.0126 1;
enddata
[email protected](currency(i):a*(rate(i,1)+1/rate(1,i))/2);
@for(currency(j):a(j)[email protected](currency(i):rate(i,j)*exchange(i,j)));
@for(currency:a>=demand);
@for(currency(i):amount(i)>[email protected](currency(j):exchange(i,j)));
@for(link(i,j)|j#ne#i:exchange(i,j)*exchange(j,i)=0);
end
model:
sets:
currency/1..4/:amount,demand,a;
link(currency,currency):exchange,rate;
endsets
data:
demand=6 3 1 10;
amount=8 1 8 0;
rate=
1 0.58928 1.743 138.3
1.697 1 2.9579 234.7
0.57372 0.33808 1 79.346
0.007233 0.00426 0.0126 1;
enddata
[email protected](currency(i):a*(rate(i,1)+1/rate(1,i))/2);
@for(currency(j):a(j)[email protected](currency(i):rate(i,j)*exchange(i,j)));
@for(currency:a>=demand);
@for(currency(i):amount(i)>[email protected](currency(j):exchange(i,j)));
@for(link(i,j)|j#ne#i:exchange(i,j)*exchange(j,i)=0);
end
全部回答
- 1楼网友:不如潦草
- 2021-01-26 16:13
感谢回答,我学习了
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯