Closed ErikUGent closed 1 year ago
I think this is the same example of your original issue?
Hello,
Yes it is. I thought, since the other one was closed, that I needed a new one.
Regards, Erik
I think this may be a networkx issue.
I have noticed some differences between syntaxes G.edges[i, j]["cost"]
and G.edges[i][j]["cost"]
and this may be causing the problem.
Thanks!
do you think you can solve It?
regards
Closing. Duplicate of #143 see discussion there.
Dear,
When I run the algorithm hereunder, I get the following error:
_File "/Users/erikdekuyffer/.conda/envs/Test_2/lib/python3.9/site-packages/vrpy/vrp.py", line 252, in solve self._initialize(solver) File "/Users/erikdekuyffer/.conda/envs/Test_2/lib/python3.9/site-packages/vrpy/vrp.py", line 478, in _initialize self._convert_initial_routes_to_digraphs() File "/Users/erikdekuyffer/.conda/envs/Test_2/lib/python3.9/site-packages/vrpy/vrp.py", line 945, in _convert_initial_routes_to_digraphs edge_cost = self.G.edges[i, j]["cost"][0] File "/Users/erikdekuyffer/.conda/envs/Test_2/lib/python3.9/site-packages/networkx/classes/reportviews.py", line 1093, in getitem return self.adjdict[u][v] KeyError: 1
The problem situates around nodes 1, 2, 4, 16 and 22. When I set the upper time limit for node 1 to 675, the error is not present anymore at node 1. However, this is not the goal of the exercise and when I run the VRPTW solver of OR tools, I do get a result to the problem. Could you tell me what is going wrong?
Kind regards, Erik