[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] SUMO gap2pred MSCFModel_CC
|
These kind of details are better known by the core SUMO developers, but
basically gap2pred is computed by the SUMO logic at each time step, and
are given to the methods of the CF models to compute the action. Each
SUMO lane has a list of vehicles, and for each of those it simply
computes the distance by using their positions.
It is much more complicated than this, as gap2pred is also used in
different situations, e.g., understanding whether it is convenient to
change lane (so in that case the gap2pred becomes the distance the
vehicle would have to the vehicle ahead if changing lane) or whether the
car should slow down because it is approaching a red traffic light (so
in that case gap2pred becomes the distance to the traffic light).
If you have very detailed questions on this, maybe Jakob can answer. I
know this concepts because I learn them for developing MSCFModel_CC.
Best,
Michele
On 26/03/2020 19:42, Thodoris Zerlentis wrote:
Hi Michele,
I appreciate you for your quick response. About my question i understand
the meaning of gap2pred as the distance between ego veh and pred veh and
why for example CACC need the gap2pred or the leaders acceleration (its
just the algorithm), but i cant really understand how the passing is
done. What i mean in detail is, for each time step the vehicle variables
are stored for every vehicle in the platoon in by the vehicle_data
function, but the gap2pred must be calculated by using either
radarmeasurments or either positionX (of the pred veh) - length( of the
pred veh) - positionX (of the ego veh). I cannot find any file class,
function where these variables are calculated. I just see them being
used by function like _v inside the MSCFModel_CC. So the real question
is in which file or class are they calculated or is it just SUMO defines
them somewhere (like Vehicle Data fuction or front vehicle) and we just
recall them with the variable name gap2pred. From older version i found
that:
SUMOReal
<http://sumo.sourceforge.net/doxygen/db/d16/config_8h.html#a2481f526aef497857d2b407bc09129fd>
gap2pred
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html#acf305da80a7c8b78024d4a53aee2df9f>(const
MSVehicle
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html>&
pred)const {
SUMOReal
<http://sumo.sourceforge.net/doxygen/db/d16/config_8h.html#a2481f526aef497857d2b407bc09129fd>
gap
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html#ace5dbee2110fa42aee690dc14f0158fc>
= pred.getPositionOnLane
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html#a856a8abbc0123a2ce4dacac818e5032c>()
- pred.getVehicleType
<http://sumo.sourceforge.net/doxygen/d9/dd6/class_m_s_base_vehicle.html#af0509244821c3c7c85e64344ca66929c>().getLength
<http://sumo.sourceforge.net/doxygen/de/da2/class_m_s_vehicle_type.html#a38e4894183ccb67d0fa6b6383b77d2eb>()
- getPositionOnLane
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html#a856a8abbc0123a2ce4dacac818e5032c>()
- getVehicleType
<http://sumo.sourceforge.net/doxygen/d9/dd6/class_m_s_base_vehicle.html#af0509244821c3c7c85e64344ca66929c>().getMinGap
<http://sumo.sourceforge.net/doxygen/de/da2/class_m_s_vehicle_type.html#a96cb59437a9e8c2b2931707bfdd8a145>();
if (gap < 0 && gap > -1.0e-12) {
gap = 0;
}
return gap
<http://sumo.sourceforge.net/doxygen/d7/d90/class_m_s_vehicle.html#ace5dbee2110fa42aee690dc14f0158fc>;
Is there any similar function in up-to-date versions?
About SUMO's version, in the Feautures template of Plexe's official
site, SUMO versions is said to be compatible with 0.32. Because while
SUMO is open the version is showed to be <d1422e4780> i guess i had the
0.32. But I followed the sites instructions and downloaded the files
from the git repository, so i guess my version is up to date.
Best regards,
Thodoris Zerlentis
Undergraduate Mechanical Engineer Student
------------------------------------------------------------------------
*From:* sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on
behalf of Michele Segata <msegata@xxxxxxxxxxxxx>
*Sent:* Thursday, March 26, 2020 7:20 PM
*To:* sumo-user@xxxxxxxxxxx <sumo-user@xxxxxxxxxxx>
*Subject:* Re: [sumo-user] SUMO gap2pred MSCFModel_CC
Hi Thodoris,
the gap2pred and the predspeed variable are passed to any car following
model in sumo so that the model can decide what to do (accelerate or
brake). gap2pred is simply the distance in meters to the preceding
vehicle, while predspeed is the speed of the preceding vehicle in meters
per second.
With respect to MSCFModel_CC, the model requires additional data to
compute what to do, depending on the CACC algorithm you choose. This is
where the communication comes into place. For example, if you are using
the default CACC (PATH's CACC) the control law also requires
acceleration and speed of the first vehicle in the platoon, which can
only be obtained by means of communication.
As a side note, I guess you should better switch to a sumo version from
1.2.0 onward, as starting from 1.2.0 my platooning models have been
included in the official sumo release, so you don't need a special
version of sumo.
Does this answer your question?
Best,
Michele
On 26/03/2020 17:17, Thodoris Zerlentis wrote:
Hi,
I am trying to use SUMO as a Platoon simulation software, through Plexe
and Veins extensions. I am currently using 0.32 version for SUMO.
So my question is how the 'gap2pred' and 'predspeed' variables used in
MSCFModel_CC are defined. I get the meaning of those variables but their
definition in the code is a mystery for me. I cant find any function
that serves that purpose. I found through sourceforge archives an older
version of SUMO where gap2pred was defined in the MSVehicle.h as a
function. But this function isn't in use any more. Although i think it
might has something to do with the getcarfollowVariables() function, but
i cannot either find all the cars defined variables. Please enlighten me.
Best regards,
Thodoris Zerlentis
Undergraduate Mechanical Engineer Student
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
--
Michele Segata, PhD
Department of Information Engineering and Computer Science
University of Trento, Italy
https://ans.disi.unitn.it/~segata/
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
--
Michele Segata, PhD
Department of Information Engineering and Computer Science
University of Trento, Italy
https://ans.disi.unitn.it/~segata/