Skip to content

Commit

Permalink
fix #14359
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Feb 18, 2024
1 parent ba81457 commit 11cb602
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/microsim/MSEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,14 @@ MSEdge::insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly, const
return false;
}
const double occupancy = insertionLane->getBruttoOccupancy();
return occupancy == 0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength;
return (occupancy == 0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength ||
v.getParameter().departProcedure == DepartDefinition::SPLIT);
}
default:
for (std::vector<MSLane*>::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) {
const double occupancy = (*i)->getBruttoOccupancy();
if (occupancy == 0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength) {
if (occupancy == 0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength ||
v.getParameter().departProcedure == DepartDefinition::SPLIT) {
return true;
}
}
Expand Down

0 comments on commit 11cb602

Please sign in to comment.