Skip to content

Commit

Permalink
collisions now don't happen if the station is different
Browse files Browse the repository at this point in the history
  • Loading branch information
mareksubocz committed Sep 21, 2022
1 parent 8e7026f commit 08830e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions annealing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def instance_to_matrix(instance, nodes, stations):
for index2, row2 in im.iterrows():
if index2 <= index1:
continue
if row1['station_index'] == row2['station_index']:
continue
# first to come should be row1
if row2['station_timestamp'] >= row1['station_timestamp']:
if row2['station_timestamp'] - row1['station_timestamp'] < row1['charging_time']:
Expand Down

0 comments on commit 08830e9

Please sign in to comment.