87 double newPos,
double newSpeed);
135 void setParameter(
const std::string& key,
const std::string& value);
163 void adaptSpeed(
double distance,
double timeToJunction,
double timeToSwitch);
171 double addSwitchTime,
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.
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
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)
adapt speed to reach junction at green
double myMinSpeed
minimum approach speed towards red light
~MSDevice_GLOSA()
Destructor.
MSDevice_GLOSA(SUMOVehicle &holder, const std::string &id, double minSpeed, double range, double maxSpeedFactor, double addSwitchTime, bool overrideSafety, bool ignoreCFModel)
Constructor.
double time_to_junction_at_continuous_accel(double d, double v)
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_GLOSA-options.
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 getTimeToSwitch(const MSLink *tlsLink)
compute time to next (relevant) switch
bool getOverrideSafety() const
Returns if the traffic light stop calculation of the CF model shall be ignored.
MSDevice_GLOSA & operator=(const MSDevice_GLOSA &)
Invalidated assignment operator.
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...
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.