lingo编程遇到问题,还望帮助
题目大概意思是:7个节点,彼此之间存在物流量w和距离d,要从中选出3个作为枢纽,但作为枢纽便有建设费用f,单位距离单位物流的成本为c,每个普通节点有且仅连接1个枢纽,且普通节点到枢纽的运输享受折扣a1,枢纽之间享受折扣a。现在建立模型,并用lingo求解。模型我已建,lingo也编写了,但是遇到了问题,希望有网友能够帮我解决。(具体的值我都已经赋好了,参见程序中)lingo编程如下:model: sets: spoke/s1,s2,s3,s4,s5,s6,s7/:y,F; link(spoke,spoke,spoke,spoke):w,d; data: d=0 18.8 17.7 97.8 68 36.847.9 18.8 0 36.2 98.7 5927.7 35.6 17.7 36.2 0 112.6 82.851.6 65.3 97.8 98.7 112.6 0 76.297.5 105.4 68 59 82.8 76.2 0 33.934.9 36.8 27.7 51.6 97.533.9 0 23.5 47.9 35.6 63.3 105.434.9 23.5 0;
w=0,36.14,37.11,32.96,41.05,35.82,28.32, 41.63,0,19.62,17.42,21.70,18.94,14.97, 42.60,19.55,0,17.83,22.21,19.38,15.32, 38.41,17.62,18.10,0,20.02,17.47,13.81, 46.48,21.33,21.90,19.45,0,21.14,16.71, 41.31,18.96,19.47,17.29,21.53,0,14.86, 33.57,15.40,15.82,14.05,17.50,15.27,0; F=50000,50000,50000,30000,30000,30000,30000; c=50; a=0.7; a1=0.9; N=7; enddata min=@sum(spoke(k):y(k)*F(k))+@sum(spoke(i):@sum(spoke(j):@sum(spoke(k):@sum(spoke(m):w(i,j)*a1*d(i,k)*c+w(i,j)*a1*d(m,j)*c)))) +@sum(spoke(k):@sum(spoke(m)|k#NE#m:c*a*w(i,j)*d(m,j))); @sum(spoke(k):y(k)=3); @for(spoke(i):@for(spoke(k):@for(spoke(m):@for(spoke(j):x(i,k,m,j)<=y(k))))); @for(spoke(i):@for(spoke(k):@for(spoke(m):@for(spoke(j):x(i,k,m,j)<=y(m))))); @for(spoke(i):@sum(spoke(k):x(i,k,m,j)=1)); @for(spoke(j):@sum(spoke(m):x(i,k,m,j)=1)); end 在lingo里运行总是有问题,可是以自己现在的能力,暂时也不知道是怎么回事了,希望能有吧友帮帮忙,帮我看看,在此感谢了。
怎么 冒号“:”变成生气的表情了???
Team # 26333 Page 51 of 53
In the heavy traffic case, pexit will increase the utilization ratio of the rightmost
lane. This reasonable because a large number of vehicles tend to use the rightmost
lane to move into the off-ramp.
9.3.4 Failure Ratio
A significant difference in our refined model is that some vehicles might fail
to move to the exit of the freeway, a common situation in the real world. The
failure ratio is defined as the ratio of the number of the vehicles failing to exit
to the total number of vehicles. We seek to investigate how failure rate changes
with varying pexit.
Figure 33 Failure ratio in light & heavy traffic (different pexit)
Figure 33 demonstrate that in the case of light traffic, pexit is an irrelevant factor.
The vehicles can move to the rightmost lane with ease. pexit plays an important
role in the heavy traffic case. When pexit remains low, the average speed is
relatively high, which makes moving to the rightmost lane extremely difficult.
When pexit becomes high, the average speed slows down. Vehicles have more
time to move to the rightmost lane, which in turn reduces the failure ratio.
Team # 26333 Page 52 of 53
10 Strengths andWeaknesses
10.1 Strengths
Our models are fairly robust to the changes in parameters based on sensitivity
analysis. It means a slight change in parameters will not cause a
significant change in the result.
Different types of vehicles are taken into consideration, and the mixing ratio
is based on actual data. We consider the length of vehicles and different
maximum speeds which makes the model closer to reality.
We come up with various criteria to compare different situations. Hence
an overall comparison can be made based on these criteria.
Our models are capable of simulating the situation in real life. The results
also agree with common sense and life experience.
A refined model is established to consider the role of ramps, which is a
bright spot of our model.
10.2 Weaknesses
Factors of human judgments may be over-simplified. In order to consider
that a driver may randomly decelerate and not choose to overtake when
possible, we simply defined a possibility respectively. Actual situation
may be more complicated.
Some of the parameters are based on semi-educated guess because few
data are available. However, based on our sensitivity analysis, they will
not make a great difference if slightly changed.
We did not consider the prediction of each driver. In our model, drivers
change their speed only based on the information of the previous time
step. But in fact, they can make a prediction
lou zhu hao yin a
lou zhu hao yin a
lou zhu hao yin a
lou zhu hao yin a
lou zhu hao yin a
lou zhu hao yin a
页:
[1]
2