87 double newPos,
double newSpeed);
135 void setParameter(
const std::string& key,
const std::string& value);
153 static double getTimeToNextSwitch(
const MSLink* tlsLink,
bool ¤tPhaseGreen,
bool ¤tPhaseStop,
int& countOld);
168 void adaptSpeed(
double distance,
double timeToJunction,
double timeToSwitch,
bool &solved);
176 double addSwitchTime,
bool useQueue,
bool overrideSafety,
bool ignoreCFModel);
A device which collects info on the vehicle trip (mainly on departure and arrival)
bool isSpeedAdviceActive() const
Returns if the GLOSA device is currently changing the speedFactor.
void generateOutput(OutputDevice *tripinfoOut) const
Called on writing tripinfo output.
const MSLink * myNextTLSLink
the upcoming traffic light
MSVehicle & myVeh
myHolder cast to needed type
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
static double timeGreen(const MSLink *tlsLink)
bool mySpeedAdviceActive
If speedFactor is currently beeing changed by the GLOSA device.
bool myOverrideSafety
if true ignore the current light state, always follow GLOSA's predicted state
bool myUseQueue
if true the queue in front of the TLS is used for calculation
double myAddSwitchTime
Additional time the vehicle shall need to reach the intersection after the signal turns green.
double getOriginalSpeedFactor() const
Returns the precomputed, original factor by which the driver wants to be faster than the speed limit.
double myMaxSpeedFactor
maximum speed factor when trying to reach green light
double myRange
maximum communication range
void adaptSpeed(double distance, double timeToJunction, double timeToSwitch, bool &solved)
adapt speed to reach junction at green
double myMinSpeed
minimum approach speed towards red light
~MSDevice_GLOSA()
Destructor.
double time_to_junction_at_continuous_accel(double d, double v)
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_GLOSA-options.
static double getTimeToSwitch(const MSLink *tlsLink, int &countOld)
compute time to next (relevant) switch
MSDevice_GLOSA(const MSDevice_GLOSA &)
Invalidated copy constructor.
double myDistance
the distance to the upcoming traffic light
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
updates next tls link
double distance_at_continuous_accel(double speed, double time)
double earliest_arrival(double speed, double distance)
return minimum number of seconds to reach the junction
double myOriginalSpeedFactor
original speed factor
double latest_arrival(double speed, double distance, double earliest)
return maximum number of seconds to reach the junction
static void cleanup()
resets counters
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
updates distance and computes speed advice
static double getTimeToNextSwitch(const MSLink *tlsLink, bool ¤tPhaseGreen, bool ¤tPhaseStop, int &countOld)
compute time to next (relevant) switch the vehicle can reach
bool getOverrideSafety() const
Returns if the traffic light stop calculation of the CF model shall be ignored.
const std::string deviceName() const
return the name for this type of device
bool myIgnoreCFModel
if true ignore non-critical speed calculations from the CF model, follow GLOSA's perfect speed calcul...
MSDevice_GLOSA & operator=(const MSDevice_GLOSA &)
Invalidated assignment operator.
Representation of a lane in the micro simulation.
Notification
Definition of a vehicle state.
Abstract in-vehicle device.
Representation of a vehicle in the micro simulation.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
Representation of a vehicle, person, or container.
Representation of a vehicle.