- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
public void handleEvent(LaneLeaveEvent event) { this.agentsOnLane--; if (this.doDistanceMonitoring){ for (Double distance : this.distanceMeterCarLocatorMap.keySet()){ Map<Id<Vehicle>, CarLocator> carLocatorPerVehicleId = this.distanceMeterCarLocatorMap.get(distance); carLocatorPerVehicleId.remove(event.getVehicleId()); } } }
@Override public void handleEvent(LaneLeaveEvent event) { // count lane leave events on link 1 in the second hour if (event.getLinkId().equals(Id.createLinkId(1)) && event.getTime() >= 3600 && event.getTime() < 2*3600){ if (!laneCapacities.containsKey(event.getLaneId())){ laneCapacities.put(event.getLaneId(), 0.); } laneCapacities.put(event.getLaneId(), laneCapacities.get(event.getLaneId())+1); } }
@Override public final QVehicle popFirstVehicle() { double now = context.getSimTimer().getTimeOfDay() ; QVehicle veh = removeFirstVehicle(); if (this.context.qsimConfig.isUseLanes() ) { if ( hasMoreThanOneLane() ) { this.context.getEventsManager().processEvent(new LaneLeaveEvent( now, veh.getId(), this.qLink.getId(), this.getId() )); } } return veh; }