Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] SUMO gap2pred MSCFModel_CC
  • From: Thodoris Zerlentis <zerlentis@xxxxxxxx>
  • Date: Thu, 26 Mar 2020 18:42:48 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lUNgOnul1YRfI1cwb7BAfqJmVafn2f9RBwI4tf1jCjs=; b=kaipsltKy7AQ4slOMCp+hDAV81laJcduhcFfxxBEa2vn43JC/SmbdzidYtFQvyVldRRF9CIu7NeLhu00k8gGiFsOVRwchUUeyKbaRQWJ40RingKuepgYpq3x6N/8TIcZJ8iII4bM2lcsO1+85kVokEOgUma0FOv4LXH5J9RgLJhMZjLtXA+dw7yRRMklLUw38T27Y7e6wSQw90eQzMXurHa53ncQmtf4a//k8pYPP/oyDEbGpI9lkJqCRkgKYPiKntGrIe0d1oIY4nP9gvalVjZWOJnyn2BUu1kv3EAfm8TO/Pt5xbl1PbHCSQHsRGU4emWzPRKTbiiPfjWm9y0BqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=P/l+byaxAFVBTROTgEK6GnzaTy0ZpjQsh8vfV8H5r3WI3NR9Ef+EApWIdAC7VKariNPVhCp3W9APg5FB9l4rByJNQ0ov9vjb6lfnqiGArlIJBm5A9dNVsODJd2xeLAUkGw/2WQcQs4GYNtzKiASRoA1LspaWm1ivEN+rDxNSg6RdO5gK7jk89CIGMmIaljLS8JoqeHy5gUaOIjJx/D6lwEYK5/5TlCX+yQ5HKVtg5FNukPlg83ekY15wRHDotpm5MAOsTj+uU8fo/IePr3LcBJ8FsczMMAm+gl2xnjJviTcgI5ycsct8z5YiL+MmxCnHhj4rMSou3dB20QZfnGX35w==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <>
  • List-help: <>
  • List-subscribe: <>, <>
  • List-unsubscribe: <>, <>
  • Thread-index: AQHWA4mzhsNkFYE02EGsrYfkegOraqhbHoIAgAAQMZE=
  • Thread-topic: [sumo-user] SUMO gap2pred MSCFModel_CC

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 gap2pred(const MSVehicle& pred) const {
            if (gap < 0 && gap > -1.0e-12) {
                     gap = 0;
            return gap;
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?

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

Michele Segata, PhD
Department of Information Engineering and Computer Science
University of Trento, Italy
sumo-user mailing list
To unsubscribe from this list, visit

Back to the top