22 #ifndef MSInsertionControl_h
23 #define MSInsertionControl_h
int getPendingFlowCount() const
Returns the number of flows that are still active.
void checkFlowWait(SUMOVehicle *veh)
Checks whether any flow is blocked due to this vehicle and clears the block.
Representation of a vehicle in the micro simulation.
void descheduleDeparture(SUMOVehicle *veh)
stops trying to emit the given vehicle
std::set< SUMOVehicle * > myAbortedEmits
Set of vehicles which shall not be inserted anymore.
SUMOVehicle * vehicle
The last created vehicle.
MSVehicleContainer myAllVeh
All loaded vehicles sorted by their departure time.
~MSInsertionControl()
Destructor.
std::vector< SUMOVehicle * > VehicleVector
definition of a list of vehicles which have the same departure time
unsigned int checkFlows(SUMOTime time, MSVehicleContainer::VehicleVector &refusedEmits)
Checks for all vehicles coming from flows whether they can be emitted.
unsigned int getWaitingVehicleNo() const
Returns the number of waiting vehicles.
Representation of a vehicle.
bool myCheckEdgesOnce
Whether an edge on which a vehicle could not depart should be ignored in the same step...
unsigned int tryInsert(SUMOTime time, SUMOVehicle *veh, MSVehicleContainer::VehicleVector &refusedEmits)
Tries to emit the vehicle.
SUMOTime myMaxDepartDelay
The maximum waiting time; vehicles waiting longer are deleted (-1: no deletion)
MSVehicleContainer::VehicleVector myRefusedEmits1
Buffers for vehicles that could not be inserted.
bool isVolatile
whether it has route or vehicle type distribution
Inserts vehicles into the network when their departure time is reached.
std::vector< Flow > myFlows
Container for periodical vehicle parameters.
MSVehicleContainer::VehicleVector myRefusedEmits2
Structure representing possible vehicle parameter.
MSVehicleControl & myVehicleControl
The assigned vehicle control (needed for vehicle re-insertion and deletion)
MSInsertionControl(MSVehicleControl &vc, SUMOTime maxDepartDelay, bool checkEdgesOnce)
Constructor.
unsigned int emitVehicles(SUMOTime time)
Emits vehicles that want to depart at the given time.
The class responsible for building and deletion of vehicles.
SUMOVehicleParameter * pars
The paramters.
MSInsertionControl & operator=(const MSInsertionControl &)
Invalidated assignment operator.
void add(SUMOVehicle *veh)
Adds a single vehicle for departure.
void checkPrevious(SUMOTime time)
Adds all vehicles that should have been emitted earlier to the refuse container.