diff --git a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java index 9dbd91f2f0a..6ce932ecebc 100644 --- a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java +++ b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java @@ -101,7 +101,7 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id linkId) { // update travel time with travel times of last iteration double newTravelTime = 0.0; - // start and end link are not consideres in NetworkRoutingModule for travel time + // start and end link are not considered in NetworkRoutingModule for travel time for (Id routeLinkId : networkRoute.getLinkIds()) { newTravelTime += this.travelTime.getLinkTravelTime(network.getLinks().get(routeLinkId), now + newTravelTime, person, vehicle); @@ -112,8 +112,8 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id linkId) { } // remove vehicle of teleported agent from parking spot QVehicle removedVehicle = null; - if (agent instanceof MobsimDriverAgent) { - Id vehicleId = ((MobsimDriverAgent) agent).getPlannedVehicleId(); + if (agent instanceof MobsimDriverAgent driverAgent) { + Id vehicleId = driverAgent.getPlannedVehicleId(); QVehicle vehicle = qNetsimEngine.getVehicles().get(vehicleId); QLinkI qLinkI = (QLinkI) this.qNetsimEngine.getNetsimNetwork().getNetsimLink(linkId); removedVehicle = qLinkI.removeParkedVehicle(vehicleId);