Skip to content

Commit

Permalink
ev: fix missing drive discharging events due to concurrent access to …
Browse files Browse the repository at this point in the history
…a hash map
  • Loading branch information
michalmac committed Dec 27, 2023
1 parent 718d27f commit be9290b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

package org.matsim.contrib.ev.discharging;

import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;

import org.matsim.api.core.v01.Id;
Expand Down Expand Up @@ -80,7 +80,7 @@ private boolean isOnFirstLink() {
this.network = network;
this.eventsManager = eventsManager;
eVehicles = data.getElectricVehicles();
evDrives = new HashMap<>(eVehicles.size() / 10);
evDrives = new ConcurrentHashMap<>(eVehicles.size() / 10);
}

@Override
Expand Down

0 comments on commit be9290b

Please sign in to comment.