@Override public void notifyMobsimAfterSimStep(@SuppressWarnings("rawtypes") MobsimAfterSimStepEvent e) { if ((e.getSimulationTime() + 1) % chargeTimeStep == 0) { for (Charger c : chargers) { c.getLogic().chargeVehicles(chargeTimeStep, e.getSimulationTime()); } } }
@Inject public ChargingHandler(EvData evData, EvConfigGroup evConfig, EventsManager eventsManager) { this.chargers = evData.getChargers().values(); this.chargeTimeStep = evConfig.getChargeTimeStep(); for (Charger c : chargers) { c.getLogic().initEventsHandling(eventsManager); } }