riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 129 forks source link

CAM (CAService) / DEN (IRC/EEBL) influence on Collisions number, how does it work? #259

Closed vincelle closed 1 year ago

vincelle commented 1 year ago

Hello,

I am trying to find out how V2X services could reduce the number of collisions depending on the percentage of vehicles equipped (market penetration rate). And the next step would be to see that if we add CPM (with a % as well), if it would also reduce the number of collisions. Also I don't really know much about C++, libraries and their links and other stuff, so that I don't understand much about how everything is structured and works, so that may be why I have some questions.

I tried working my way to it in a few steps, but if you have any better way / good to start example for my objectives, I would gladly have a look at them !

  1. First, I have to generate collisions, I did it the following way in the .sumocfg file, and I get like 40 collisions over 17000 seconds for 9000 vehicles (generated the usual way), so I guess it's alright to do it that way?
    <processing>
        <ignore-junction-blocker value="20"/>
        <collision.action value="teleport"/>
        <collision.mingap-factor value="0"/>
        <time-to-teleport value="600"/>
        <max-depart-delay value="600"/>
    </processing>
  2. Would an "Inet car" automatically change his behaviour when CAM are sent compare to "Plain Vehicle"? Meaning there would somehow be less collisions since they would be "aware of each other". Assuming that CAService is activated from the services.xml file Using these lines of code in the omnetpp.ini file for the "inet car":
    *.traci.mapper.typename = "traci.MultiTypeModuleMapper" 
    *.traci.mapper.vehicleTypes = xmldoc("vehiclestest.xml")

    And adapting the Plain and Inet values in the .xml to have a % of V2X implemented

    <vehicle type="artery.inet.Car" rate="0.3" />
    <vehicle type="artery.inet.PlainVehicle" rate="0.7" />
  3. If yes, do you have an example of scenario where this does happen (i.e seeing less collisions)?
  4. If no, how should I proceed ? Create a dedicated application for it ? Because I found this from an article

"Within the Veins framework, vehicles are only aware of the presence of other vehicles, if they receive a message, such as the periodically disseminated CAM, from neighbouring vehicles. It is up to the applications in the vehicles to interpret and to react to the received messages, e.g. by changing the lane due to a decelerating vehicle in front." from Collective Perception in Vehicular Ad-hoc Networks Von der Carl-Friedrich-Gauß-Fakultät der Technischen Universität Carolo-Wilhelmina zu Braunschweig zur Erlangung des Grades eines Doktoringenieurs (Dr.-Ing.) genehmigte Dissertation von Hendrik-Jörn Günther geboren am 09.04.1989 in Hannover

  1. If I wanted to test a DENM V2X application and see if it reduces collision, that is EEBL or IRC that are already implemented I believe, should I do this : Write these lines in omnetpp.ini : To activate the storyboard and create a situation that will activate the DENM Event such as EEBL, using the .py file

    network = artery.inet.World
    *.withStoryboard = true

    To activate the DENM service, and then the IRC (or EEBL) useCase

    *.node[*].middleware.updateInterval = 0.1s
    *.node[*].middleware.datetime = "2017-06-26 12:00:00"
    *.node[*].middleware.services = xmldoc("services.xml")
    *.node[*].middleware.DEN.useCases = xmldoc("usecases.xml")
    *.node[*].middleware.DEN.*.nonUrbanEnvironment = true

    Services.xml containing :

    <services>
    <!--<service type="artery.application.CaService" name="CA">
    <listener port="2001" />
    </service>-->
    <service type="artery.application.DenService" name="DEN">
    <listener port="2002" />
    </service>
    </services>

    Usecases.xml containing :

    <usecases>
    <usecase type="artery.application.den.ImpactReductionContainerExchange" />
    </usecases>

    Storyboard file (it was created by someone who previously worked on the project) containing :

    def createStories(board):
        # Create TtcCondition
        ttcCondition = storyboard.TtcCondition(1.5, 200)  # ttc 1.5sec | radius 200m
        speedConditonGreater = storyboard.SpeedDifferenceConditionFaster(5.55556)  # 20 km/h
        ttcSignalEffect = storyboard.SignalEffect("irc")
        speedAndTTC = storyboard.AndCondition(ttcCondition, speedConditonGreater)
        stopEffect = storyboard.StopEffect()
        vehicleToStop = storyboard.CarSetCondition("randUni2316:1.8")
        vehicleToStop2 = storyboard.CarSetCondition("randUni3068:1")
    
        story = storyboard.Story(speedAndTTC, [ttcSignalEffect])
        story2 = storyboard.Story(speedAndTTC, [stopEffect])
        storyvehicle = storyboard.AndCondition(speedAndTTC, vehicleToStop)
        storyvehicle2 = storyboard.AndCondition(speedAndTTC, vehicleToStop2)
        story3 = storyboard.Story(storyvehicle, [stopEffect])
        story4 = storyboard.Story(storyvehicle, [stopEffect])
        board.registerStory(story)
        board.registerStory(story2)
                   board.registerStory(story3)
        board.registerStory(story4)
  2. And then playing with the inet/plainVehicle % to have more or less V2X equipped vehicles ? However I did try a lot of % and things, but I never saw a real improvement over the number of collisions. Could it be because of how my collisions are defined ? For example, a vehicle uses his emergency brake (stopEffect), creating an EEBL condition and triggering the DENM => the following vehicle equipped with V2X brakes on time, but the next next one isn't, and then collides with the second vehicle?

  3. If everything before, I wanted to see if adding the CPM message has some influence on the simulation, does activating

    Would it do anything, or should some code be written? Probably the same thing as CAM I guess?

Thanks in advance for your answers and your help.

riebl commented 1 year ago

Hi @vincelle,

regarding 2) Vehicles may be aware of each other, but they do not actively avoid any collisions by default. For example, if you want to slow down vehicles when they detect a hazard, you have to model this behaviour explicitly.

regarding 4) One option is to create a CollisionAvoidanceService which listens for received CAMs and CPMs, calculates a risk value and slows down the hosting vehicle according to this calculation. As the very first step, you should sketch which information you want to evaluate and which collision avoidance strategy you want to pursue. That is not specific to Artery; just imagine how one would realize it for real vehicles.

regarding 6) The observed number of collisions or EEBL triggering events won't change by merely adding passive V2X services to your vehicles. These vehicles need to make use of this additional information as well.