How to configure sumo-launchd.py to get Lanearea Detectors output? - omnet++

I am learning sumo and Veins, using the F2MD framework for simulation, but I have encountered some problems. I am trying to get Lanearea Detectors output with sumo, when I can use the command:"sumo-gui -a lust.add.xml"(which already set Lanearea Detectors additional) ,I can get the output file like:xxx.output.xml. But when i use sumo-launchd.py to start the same simulation,it don't have any output file , This confuses me, hope someone can help me, thank!

You need to find the sumo configuration which is running and add the line
<additional-files value="lust.add.xml"/>
or add the file to the list if the entry is already present.

Related

How to read serial number of J-Link debug probe via cmd

I am required to read the serial number of connected J-Link (I use J-Link Compact Plus from Segger) via the command line.
I am using tools from Segger such as JFlash.exe and JLink.exe
I managed to find a way to read a serial number via JLink.exe by executing the following command:
JLink.exe -CommanderScript -CommandFile GetSerial.jlink
Where GetSerial.jlink is a custom file that I have created and it looks like:
ShowEmuList
exit
The response is as following:
The above method seems to work fine but I am not convinced that this is the most optimal way.
My questions:
Is it possible to read the serial number using JFlash.exe instead of JLink.exe. Since I use JFlash.exe from flashing, I would prefer to rely on a single tool instead of 2.
If the answer to above is no. I would like to know if there is any way to optimise the JLink.exe command to read the device serial number. I do not fully understand why do I need to pass GetSerial.jlink as an argument to the command. I would much rather prefer something like:
Jlink.exe -ShowEmuList
But the above does not seem to work:
Thanks in advance for the help.

Where to view logged results in Veins 5.1

I'm somewhat new to Veins and I'm trying to record collision statistics within the sample "RSUExampleScenario" provided in the VM. I found this question which describes what line to add to the .ini file, which I have, but I'm unable to find the "ncollisions" value in the results folder, which makes me think either I ran the wrong .ini line or am looking in the wrong place.
Thanks!
Because collision statistics take time to compute (essentially: trying to decode every transmission twice: once while considering interference by other nodes as usual, then trying again while ignoring all interference), Veins 5.1 requires you to explicitly turn collision statistics on. As discussed in https://stackoverflow.com/a/52103375/4707703, this can be achieved by adding a line *.**.nic.phy80211p.collectCollisionStatistics = true to omnetpp.ini.
After altering the Veins 5.1 example simulation this way and running it again (e.g., by running ./run -u Cmdenv -c Default from the command line), the ncollisions field in the resulting .sca file should now (sometimes) have non-zero values.
You can quickly verify this by running (from the command line)
opp_scavetool export --filter 'module("**.phy80211p") and name("ncollisions")' results/Default-\#0.sca -F CSV-R -o collisions.csv
The resulting collisions.csv should now contain a line containing (among other information) param,,,*.**.nic.phy80211p.collectCollisionStatistics,true (indicating that the simulation was executed with the required configuration) as well as many lines containing (among other information) scalar,RSUExampleScenario.node[10].nic.phy80211p,ncollisions,,,1 (indicating that node[10] could have received one more message, had it not been for interference caused by other transmissions in the simulation.

Error while inserting vehicles from Sumo .rou file using PLEXE

I am trying to insert regular vehicles and platoon vehicles in a specific time step in a scenario by using SUMO and Plexe. I am using Sumo 1.2.0, Veins 5.0, Omnet++ 5.5.1, Plexe-3.0a2 versions. As plexe documentation points i have to change the traffic manager in my .ini file to SumoTrafficManager in order to insert the vehicles and the platoons from the .rou file that i have created. For testing purposes i used the platoon example provided from plexe using the option for Sumo Traffic. The problem is that i am get the sumo error
Error: tcpip::Socket::recvAndCheck # recv: peer shutdown
and omnet exits with code 139. The error occurs only when the first car is inserted.
Note: All the other configuration of the example works perfectly.
Why does this error occurs and how can i resolve this??
I got the answer from the sumo mailing list so i am posting it also here. Currently there is a bug for inserting platoons and regular-human car with the standard SUMO way (.rou file). But there is a way to resolve this issue by letting the insertion of platoon cars to be handled by the TrafficManager module and the regular-human car to be inserted with the SUMO way. To make it work you must use the classic PlatoonsTrafficManager and add the following lines to the .ini file:
*.manager.moduleType = "vtypeauto=org.car2x.plexe.PlatoonCar
vtypehuman=HumanCar"
*.manager.moduleName = "vtypeauto=node vtypehuman=human"
That way you seperate the module types for the simulation to handle it differently. A good example for testing is the Human example that is provided. By modifying the .ini file to pass to the TrafficManager only the platoon related variables and then adding some lines in .rou file (like flows or vehs) for the human cars to be injected you get the desired result.

Veins Add Polygon to SUMO GUI

I am simulating a scenario where I want to add and/or delete polygon dynamically. However, when I tried to add a polygon, the system generates me below error;
<!> ASSERT: Condition 'result == RTYPE_OK' does not hold in function 'query' at veins/modules/mobility/traci/TraCIConnection.cc:119 -- in module (TraCIDemo11p) RSUExampleScenario.node[1].appl (id=14), at t=1.1s, event #12
I debug the code and I see that the TraciConnection does not return the RTYPE_OK. If I remove the assert statement, the code works fine. However, I want to learn the logic behind this.
I also see that the SUMO console give an error message. The code that I used to add polygon is;
traci->addPolygon(polyId, polyType, color, filled, layer, points);
Sumo: 0.32 Omnet: 5.4.1 Veins: 4.7
Any suggestion is appreciated. I am a starter on GUI related things. Sorry if the question does not make sense. Thanks.
Most likely SUMO refuses to add the polygon you requested. Maybe the ID you chose already exists in the simulation.
To find out why SUMO complains, you can change its source code to include debug output -- or you can run SUMO in a debugger.
To run SUMO in a debugger, the simplest solution is to switch from using TraCIScenarioManagerLaunchd to TraCIScenarioManager (probably by changing veins/nodes/Scenario.ned) and launching SUMO in a debugger manually (e.g. by running lldb sumo -- --remote-port 9999 -c erlangen.sumo.cfg)

Multiple runs in omnet++ but with new network

I am trying to get different results for the code I have written in veins. I would like to run simulation multiple times to get average of all result. Issue I am facing is when I use repeat=5 i get exact same result in all 5 runs. I want to regenerate the network each time it repeats. I have written code to place RSUs in random positions but i get same result. What I can try?
Frist of all, see the TicToc Tutorial.
For your issue, you need to set a seed for each run as the OMNet Manual show
For me, the best way is set seed-set as the repetition number(repeat)
seed-set = ${repetition}
To start all repetitions of a simulation go to Run Configurations and set Cmdenv as User interface and:
for OMNeT++ 5.0 or older: set * (asterisk) in Runnumber
for OMNeT++ 5.1: set 0..4 in Run(s)
As a result you will obtain five set of results.
Optionally you can choose more than one processes to run in parallel or CPUs/processes to use in Run Configurations.

Resources