Skip to content

Commit

Permalink
Tiny code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marecabo committed Mar 13, 2024
1 parent d7bd8fe commit 1aa9b21
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id<Link> 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<Link> routeLinkId : networkRoute.getLinkIds()) {
newTravelTime += this.travelTime.getLinkTravelTime(network.getLinks().get(routeLinkId),
now + newTravelTime, person, vehicle);
Expand All @@ -112,8 +112,8 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id<Link> linkId) {
}
// remove vehicle of teleported agent from parking spot
QVehicle removedVehicle = null;
if (agent instanceof MobsimDriverAgent) {
Id<Vehicle> vehicleId = ((MobsimDriverAgent) agent).getPlannedVehicleId();
if (agent instanceof MobsimDriverAgent driverAgent) {
Id<Vehicle> vehicleId = driverAgent.getPlannedVehicleId();
QVehicle vehicle = qNetsimEngine.getVehicles().get(vehicleId);
QLinkI qLinkI = (QLinkI) this.qNetsimEngine.getNetsimNetwork().getNetsimLink(linkId);
removedVehicle = qLinkI.removeParkedVehicle(vehicleId);
Expand Down

0 comments on commit 1aa9b21

Please sign in to comment.