C语言问题求解
问题:物流中心与需求点分配问题条件:
(1)有若干个节点,每个节点都有需求量、坐标。
(2)每个需求点只能由一个物流中心分配
(3)有若干个物流中心,分别有容量、坐标。
问题:如何把这些节点分配给物流中心,使得所有物流中心到所分配各个节点的距离最短?
需求点:
{1,35.00,35.00,30.00}, 第一列:序号
{2,41.00,49.00,10.00}, 第二列:X坐标
{3,35.00,17.00,7.00}, 第三列:Y坐标
{4,55.00,45.00,13.00}, 第四列:容量
{5,55.00,20.00,19.00},
{6,15.00,30.00,26.00},
{7,25.00,30.00,3.00},
{8,20.00,50.00,5.00},
{9,10.00,43.00,9.00},
{10,55.00,60.00,16.00},
{11,30.00,60.00,16.00},
{12,20.00,65.00,12.00},
{13,50.00,35.00,19.00},
{14,30.00,25.00,23.00},
{15,15.00,10.00,20.00},
{16,30.00,5.00,8.00},
{17,10.00,20.00,19.00},
{18,5.00,30.00,2.00},
{19,20.00,40.00,12.00},
{20,15.00,60.00,17.00},
{21,45.00,65.00,9.00},
{22,45.00,20.00,11.00},
{23,45.00,10.00,18.00},
{24,55.00,5.00,29.00},
{25,65.00,35.00,3.00},
{26,65.00,20.00,6.00},
{27,45.00,30.00,17.00},
{28,35.00,40.00,16.00},
{29,41.00,37.00,16.00},
{30,64.00,42.00,9.00},
{31,40.00,60.00,21.00},
{32,31.00,52.00,27.00},
{33,35.00,69.00,23.00},
{34,53.00,52.00,11.00},
{35,65.00,55.00,14.00},
{36,63.00,65.00,8.00},
{37,2.00,60.00,5.00},
{38,20.00,20.00,8.00},
{39,5.00,5.00,16.00},
{40,60.00,12.00,31.00}
物流中心:
{ 1,25,21,120 } ,
{ 2,19,21,100 } ,
{ 3,20,26,900 } ,
{ 4,18,18,170 }
[此贴子已经被作者于2021-12-21 12:49编辑过]