Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ev: fix ConcurrentModificationException in VehicleChargingHandler.notifyMobsimBeforeSimStep() #3022

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.matsim.vehicles.Vehicle;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
* This is an events based approach to trigger vehicle charging. Vehicles will be charged as soon as a person begins a charging activity.
Expand All @@ -71,7 +72,7 @@ public class VehicleChargingHandler
private final Map<Id<Person>, Id<Vehicle>> lastVehicleUsed = new HashMap<>();
private final Map<Id<Vehicle>, Id<Person>> lastDriver = new HashMap<>();
private final Map<Id<Vehicle>, Id<Charger>> vehiclesAtChargers = new HashMap<>();
private final Set<Id<Person>> agentsInChargerQueue = new HashSet<>();
private final Set<Id<Person>> agentsInChargerQueue = ConcurrentHashMap.newKeySet();

private final ChargingInfrastructure chargingInfrastructure;
private final ElectricFleet electricFleet;
Expand Down
Loading