Skip to content

Commit

Permalink
fixing warnings #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed May 17, 2024
1 parent b83e3a5 commit cc39136
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/microsim/devices/MSDevice_Transportable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ MSDevice_Transportable::notifyMove(SUMOTrafficObject& /*tObject*/, double /*oldP
// no boarding / unboarding time in meso
arrivalTime += 1;
} else {
const double bf = transportable->getVehicleType().getBoardingFactor();
const SUMOTime boardingTime = (SUMOTime)((double)boardingDuration * transportable->getVehicleType().getBoardingFactor());
if (timeForNext > currentTime - DELTA_T) {
timeForNext += boardingDuration * bf;
timeForNext += boardingTime;
} else {
timeForNext = currentTime + boardingDuration * bf;
timeForNext = currentTime + boardingTime;
}
}
//ensure that vehicle stops long enough for deboarding
Expand Down
7 changes: 1 addition & 6 deletions src/microsim/transportables/MSStageTrip.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,13 @@ class MSStageTrip : public MSStage {
}

/// @brief trip doesn't participate in plan summary
SUMOTime getTimeLoss() const {
return 0;
}
SUMOTime getDuration() const {
return 0;
}

SUMOTime getTravelTime() const {
return 0;
}
SUMOTime getWaitingTime() const {
return 0;
}

/** @brief Called on writing vehroute output
*
Expand Down
2 changes: 1 addition & 1 deletion src/microsim/transportables/MSTransportableControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ MSTransportableControl::loadAnyWaiting(const MSEdge* edge, SUMOVehicle* vehicle,
t->setAbortWaiting(-1);
}
if (timeToLoadNext >= 0) { // meso does not have loading times
const SUMOTime loadingDuration = vehicle->getVehicleType().getLoadingDuration(t->isPerson()) * t->getVehicleType().getBoardingFactor();
const SUMOTime loadingDuration = (SUMOTime)((double)vehicle->getVehicleType().getLoadingDuration(t->isPerson()) * t->getVehicleType().getBoardingFactor());
//update the time point at which the next transportable can be loaded on the vehicle
if (timeToLoadNext > currentTime - DELTA_T) {
timeToLoadNext += loadingDuration;
Expand Down

0 comments on commit cc39136

Please sign in to comment.