请将文档里面的数据代入到代码里
时间: 2024-12-20 16:29:33 浏览: 4
为了将文档中的数据代入到代码中,需要将各类节点数据(废弃产生点、分类回收中心、再制造中心、填埋场等)整理为相应的列表,并在代码中进行调用。以下是完整的可运行代码示例:
```python
import numpy as np
from scipy.spatial import distance_matrix
import matplotlib.pyplot as plt
from tqdm import tqdm
# 节点数据
waste_sources = [
('石桥镇', 107.118101, 31.298319, 2.86),
('百节镇', 107.454102, 31.023069, 0.87),
('万家镇', 107.623465, 30.956475, 3.71),
('南岳镇', 107.502044, 31.215063, 1.52),
('大树镇', 107.633019, 30.903638, 3.39),
('景市镇', 107.552492, 31.012362, 0.97),
('平滩镇', 107.512259, 30.933431, 1.55),
('赵家镇', 107.416361, 30.962931, 1.24),
('双庙镇', 107.367131, 30.984120, 1.61),
('渡市镇', 107.277676, 31.059865, 1.62),
('罐子镇', 107.301602, 31.135825, 1.81),
('管村镇', 107.311350, 31.182932, 2.35),
('大堰镇', 107.332680, 31.236690, 0.93),
('赵固镇', 107.280691, 31.240285, 0.75),
('石梯镇', 107.160852, 31.228216, 3.64),
('桥湾镇', 107.202620, 31.261140, 3.18),
('堡子镇', 107.303139, 31.344459, 1.68),
('复兴镇', 107.431603, 31.224379, 0.27),
('蒲家镇', 107.520675, 31.374130, 0.34),
('罗江镇', 107.534480, 31.305442, 0.63),
('双龙镇', 107.449080, 31.283549, 0.36),
('东岳镇', 107.487468, 31.316087, 0.29),
('磐石镇', 107.597372, 31.230389, 0.36),
('北山镇', 107.304557, 31.473063, 0.35),
('江陵镇', 107.262289, 31.374115, 0.67),
('碑庙镇', 107.381715, 31.469126, 0.43),
('金石镇', 107.379460, 31.402340, 0.38),
('梓桐镇', 107.361585, 31.505554, 0.42),
('青宁镇', 107.442087, 31.496649, 0.32),
('南坝镇', 108.005914, 31.358845, 1.37),
('普光镇', 107.708737, 31.504251, 2.12),
('胡家镇', 107.662229, 31.559861, 0.84),
('天生镇', 107.752983, 31.257788, 2.51),
('君塘镇', 107.568291, 31.356867, 1.25),
('马渡关镇', 107.481080, 31.595353, 1.16),
('红峰镇', 107.626512, 31.684639, 0.93),
('柏树镇', 107.653829, 31.163978, 1.13),
('黄金镇', 107.849845, 31.607142, 0.88),
('清溪镇', 107.792071, 31.415139, 0.85),
('土黄镇', 108.195121, 31.586505, 0.86),
('下八镇', 107.934038, 31.355846, 0.65),
('新华镇', 107.994594, 31.739576, 1.02),
('大成镇', 107.558691, 31.424846, 0.56),
('茶河镇', 108.062908, 31.374234, 1.21),
('厂溪镇', 107.947871, 31.686818, 0.86),
('华景镇', 108.104058, 31.561272, 0.68),
('芭蕉镇', 107.676969, 31.034146, 1.03),
('樊哙镇', 108.246289, 31.635397, 1.91),
('毛坝镇', 107.748143, 31.615537, 1.51),
('上峡镇', 108.024139, 31.301981, 0.56),
('峰城镇', 107.956094, 31.481515, 0.89),
('五宝镇', 108.062990, 31.477050, 0.74),
('白马镇', 108.098518, 31.623465, 1.01),
('桃花镇', 107.955130, 31.480754, 1.05),
('塔河镇', 108.074450, 31.351670, 0.68),
('庙安镇', 107.638492, 31.240581, 0.65),
('南坪镇', 107.964139, 31.602092, 0.54),
('新宁镇', 107.865317, 31.084636, 1.19),
('普安镇', 107.807500, 31.106122, 0.78),
('回龙镇', 107.771015, 31.172891, 1.86),
('永兴镇', 107.884520, 31.142662, 2.29),
('灵岩镇', 107.977251, 31.196791, 1.06),
('讲治镇', 107.950456, 31.030836, 1.83),
('甘棠镇', 107.869738, 30.967549, 2.18),
('任市镇', 107.788644, 30.902817, 1.41),
('广福镇', 107.843240, 30.860538, 0.53),
('长岭镇', 107.874677, 30.897389, 1.06),
('八庙镇', 107.911753, 30.917595, 0.74),
('中华镇', 107.177017, 30.769182, 1.63),
('乌木镇', 107.267710, 30.710460, 1.59),
('团坝镇', 107.505802, 31.210219, 1.51),
('杨家镇', 107.231971, 30.851727, 3.43),
('清河镇', 107.237532, 30.906921, 1.08),
('柏林镇', 107.250535, 30.952828, 1.13),
('石河镇', 107.330816, 30.872058, 3.39),
('月华镇', 107.294933, 30.803319, 4.24),
('石桥铺镇', 107.443078, 30.772700, 2.41),
('永胜镇', 107.457577, 30.818119, 1.17),
('观音镇', 107.452200, 30.673779, 2.51),
('周家镇', 107.363174, 30.612327, 1.99),
('高明镇', 107.347334, 30.546790, 1.65),
('石子镇', 107.300830, 30.436623, 1.31),
('四合镇', 107.255518, 30.404623, 1.98),
('天城镇', 107.341415, 30.499131, 1.14),
('文星镇', 107.249910, 30.503279, 1.33),
('童家镇', 107.299498, 30.536495, 1.45),
('高穴镇', 107.189827, 30.608337, 1.63),
('妈妈镇', 107.148174, 30.564627, 1.16),
('庙坝镇', 107.102218, 30.600076, 2.04),
('欧家镇', 107.063548, 30.515789, 2.04),
('清水镇', 107.130434, 30.677090, 1.09),
('合力镇', 107.010545, 30.761962, 0.56),
('渠北镇', 106.963688, 30.876893, 0.58),
('青龙镇', 106.919115, 30.888598, 0.67),
('万寿镇', 106.937162, 30.973417, 0.56),
('临巴镇', 107.063378, 30.893397, 0.77),
('土溪镇', 107.056366, 31.041071, 0.79),
('东安镇', 107.130933, 30.979729, 1.49),
('李馥镇', 107.012041, 30.944996, 0.79),
('三汇镇', 107.150945, 31.031017, 0.75),
('文崇镇', 107.172132, 31.185103, 0.81),
('丰乐镇', 107.137620, 31.107014, 1.07),
('涌兴镇', 107.077411, 31.124230, 0.85),
('贵福镇', 106.985951, 31.133471, 0.84),
('岩峰镇', 106.971372, 31.061791, 1.12),
('三板镇', 106.961374, 30.996846, 0.77),
('静边镇', 106.837473, 31.012512, 0.75),
('清溪场镇', 106.827981, 30.892694, 0.67),
('龙凤镇', 106.755759, 30.938577, 0.63),
('宝城镇', 106.765051, 30.838877, 0.87),
('新市镇', 106.697042, 30.845795, 0.73),
('有庆镇', 106.838522, 30.804417, 0.82),
('定远镇', 106.791018, 30.801988, 0.64),
('中滩镇', 106.893713, 30.795220, 0.76),
('鲜渡镇', 106.896503, 30.758836, 0.84),
('李渡镇', 106.964716, 30.777590, 0.78),
('琅琊镇', 106.959459, 30.695288, 0.67),
('望溪镇', 106.944718, 30.647351, 0.59),
('卷硐镇', 107.054460, 30.761417, 0.58),
('黑宝山镇', 107.863945, 31.897058, 0.77),
('黄钟镇', 107.820981, 31.998509, 0.86),
('石窝镇', 107.656820, 31.859267, 0.57),
('魏家镇', 107.607726, 31.953844, 0.51),
('草坝镇', 107.661619, 31.928146, 1.08),
('井溪镇', 108.239650, 31.765030, 0.46),
('铁矿镇', 108.034128, 31.821440, 0.43),
('固军镇', 108.129499, 31.762344, 0.75),
('旧院镇', 108.204789, 31.838944, 0.36),
('大沙镇', 107.720600, 31.852001, 0.69),
('鹰背镇', 107.538072, 31.706761, 0.54),
('河口镇', 107.688320, 31.796817, 0.78),
('永宁镇', 107.855873, 32.167962, 0.32),
('竹峪镇', 107.715612, 32.195348, 0.71),
('白果镇', 108.330240, 32.105220, 0.43),
('大竹镇', 108.314721, 32.163017, 0.81),
('官渡镇', 108.056460, 32.153296, 0.53),
('长坝镇', 107.924146, 31.864973, 0.48),
('罗文镇', 107.815272, 31.690878, 0.63),
('石塘镇', 108.121350, 31.890440, 0.78),
('沙滩镇', 108.053074, 31.923260, 1.22),
('八台镇', 108.216720, 31.929845, 1.26),
('白沙镇', 108.167091, 31.967505, 0.69),
('青花镇', 108.004854, 31.961969, 0.63),
('太平镇', 108.064519, 32.049827, 0.39)
]
recycling_centers = [
('分类回收节点1', 107.381715, 31.469126, 150000, 65, 7.4, 0.87),
('分类回收节点2', 107.520675, 31.374130, 160000, 60, 6.8, 0.88),
('分类回收节点3', 107.311350, 31.182932, 155000, 62, 6.5, 0.85),
('分类回收节点4', 107.454102, 31.023069, 160000, 65, 6.6, 0.84),
('分类回收节点5', 107.662229, 31.559861, 156000, 70, 7.1, 0.88),
('分类回收节点6', 107.792071, 31.415139, 170000, 68, 6.5, 0.82),
('分类回收节点7', 107.934038, 31.355846, 165000, 65, 6.8, 0.83),
('分类回收节点8', 107.062990, 31.477050, 175000, 68, 7.2, 0.84),
('分类回收节点9', 107.865317, 31.084636, 180000, 78, 7.9, 0.82),
('分类回收节点10', 107.950456, 31.030836, 160000, 60, 6.1, 0.86),
('分类回收节点11', 107.130434, 30.677090, 150000, 58, 6.0, 0.86),
('分类回收节点12', 107.267710, 30.710460, 164000, 64, 6.2, 0.88),
('分类回收节点13', 107.294933, 30.803319, 158000, 62, 6.4, 0.82),
('分类回收节点14', 107.443078, 30.772700, 160000, 68, 6.7, 0.83),
('分类回收节点15', 106.791018, 30.801988, 180000, 72, 7.4, 0.89),
('分类回收节点16', 106.893713, 30.795220, 150000, 62, 6.1, 0.85),
('分类回收节点17', 106.963688, 30.876893, 190000, 78, 7.6, 0.86),
('分类回收节点18', 107.063378, 30.893397, 176000, 76, 7.2, 0.88),
('分类回收节点19', 107.720600, 31.852001, 165000, 68, 6.9, 0.82),
('分类回收节点20', 107.924146, 31.
阅读全文