Example #1
0
 @Override
 public void notifyMobsimAfterSimStep(@SuppressWarnings("rawtypes") MobsimAfterSimStepEvent e) {
   if ((e.getSimulationTime() + 1) % chargeTimeStep == 0) {
     for (Charger c : chargers) {
       c.getLogic().chargeVehicles(chargeTimeStep, e.getSimulationTime());
     }
   }
 }
Example #2
0
  @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);
    }
  }