You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"text": "增加道路1-4之前:\nQ= [[ 0. 510. 690. 0.]\n [ 0. 0. 0. 310.]\n [ 0. 0. 0. 890.]\n [ 0. 0. 0. 0.]]\nJ= [[ nan 1.00995049 2.62678511 nan]\n [ nan nan nan 0.78740079]\n [ nan nan nan 2.98328678]\n [ nan nan nan nan]]\nevalue= {'平均道路通行时间': 3.801193611955694, '加权路网通行时耗': 9205.944948398836, '路网拥堵指数': 1.8518557916463467}\n增加道路1-4之后:\nQ= [[ 0. 240. 300. 660.]\n [ 0. 0. 0. 40.]\n [ 0. 0. 0. 500.]\n [ 0. 0. 0. 0.]]\nJ= [[ nan 0.69282032 1.73205081 2.96647939]\n [ nan nan nan 0.28284271]\n [ nan nan nan 2.23606798]\n [ nan nan nan nan]]\nevalue= {'平均道路通行时间': 3.5738327896660804, '加权路网通行时耗': 7279.645003961635, '路网拥堵指数': 1.5820522430818205}\n"
120
+
},
121
+
{
122
+
"output_type": "error",
123
+
"ename": "AttributeError",
124
+
"evalue": "module 'matplotlib.cm' has no attribute 'PiYlGn'",
"\u001b[1;32m<ipython-input-12-7b2be1b639b0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 31\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m122\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 32\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'after join the network of community:'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 33\u001b[1;33m \u001b[0mdraw_graph\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcm\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mPiYlGn\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
129
+
"\u001b[1;31mAttributeError\u001b[0m: module 'matplotlib.cm' has no attribute 'PiYlGn'"
130
+
]
131
+
}
132
+
],
133
+
"source": [
134
+
"T0 = np.array([\n",
135
+
" [inf, 2, 1, inf],\n",
136
+
" [inf, inf, inf, 2],\n",
137
+
" [inf, inf, inf, 1],\n",
138
+
" [inf, inf, inf, inf]\n",
139
+
" ])\n",
140
+
"OD = np.array([\n",
141
+
" [0, 200, 0, 1000],\n",
142
+
" [0, 0, 0, 0],\n",
143
+
" [0, 0, 0, 200],\n",
144
+
" [0, 0, 0, 0]\n",
145
+
" ])\n",
146
+
"C = np.array([\n",
147
+
" [1, 500, 100, 1],\n",
148
+
" [1, 1, 1, 500],\n",
149
+
" [1, 1, 1, 100],\n",
150
+
" [1, 1, 1, 1]\n",
151
+
" ])\n",
152
+
"m = len(T0)\n",
153
+
"\n",
154
+
"print('增加道路1-4之前:')\n",
155
+
"Q, T, J = run()\n",
156
+
"plt.subplot(121)\n",
157
+
"plt.title('before join the network of community:')\n",
158
+
"draw_graph()\n",
159
+
"\n",
160
+
"print('增加道路1-4之后:')\n",
161
+
"T0[0, 3] = 1.5\n",
162
+
"C[0, 3] = 75\n",
163
+
"Q, T, J = run()\n",
164
+
"plt.subplot(122)\n",
165
+
"plt.title('after join the network of community:')\n",
0 commit comments