|
model:
sets:
plane/1..6/:cita;
link(plane,plane):alpha,beta;
endsets
min=@sum(planeabs(cita));
@for(plane(i):
@bnd(-30,cita(i),30);
);
@for(link(i,j)|i#ne#j:
@abs(beta(i,j)+0.5*cita(i)+0.5*cita(j))>alpha(i,j);
);
data:
alpha=0.000000 5.391190 32.230953 5.091816 20.963361 2.234507
5.391190 0.000000 4.804024 6.613460 5.807866 3.815925
32.230953 4.804024 0.000000 4.364672 22.833654 2.125539
5.091816 6.613460 4.364672 0.000000 4.537692 2.989819
20.963361 5.807866 22.833654 4.537692 0.000000 2.309841
2.234507 3.815925 2.125539 2.989819 2.309841 0.000000
;
beta=0.000000 109.263642 -128.250000 24.179830 173.065051 14.474934
109.263642 0.000000 -88.871097 -42.243563 -92.304847 9.000000
-128.250000 -88.871096 0.000000 12.476311 -58.786243 0.310809
24.179830 -42.243563 12.476311 0.000000 5.969234 -3.525606
173.065051 -92.304846 -58.786244 5.969234 0.000000 1.914383
14.474934 9.000000 0.310809 -3.525606 1.914383 0.000000
;
enddata
end
这是有一年竞赛的飞机碰撞问题的程序 |
|