How can I increase speed of vehicles in Veins? - omnet++

I am using OMNeT++ 5.4.1, Veins 7.4.1, and SUMO 0.30.0.
As the maximum speed of vehicles in Veins is 13.99, I really want to increase it up to 33. How can I do it? is it possible in Veins or should I do it in SUMO?

You may need to modify the network. Probably the vehicles are only allowed to drive 50 km/h (about 13.99 m/s considering the deviations allowed by the models) on the streets you are looking at. Use SUMO's netedit to edit the maximum edge speeds.

Related

Throughput's change is not logical when mobile UEs are increasing their distance

I'm trying to measure throughput when the distance between two mobile UE is changing. I'm using Omnet++. and measuring throughput in the mac layer.
It's supposed to be that when the distance increases throughput should decrease (well-known inverse relationship)
But in my simulation it doesn't happen. Does anyone have any idea about it in omnet++?
I also attached the chart of throughput during the time
enter image description hereenter image description here
Thanks
#thardes2 Ok, I'm using Omnet++. In my scenario, there is 1 base station and 2 UE without any mobility during the simulation. I run the simulation 20 times (10,20,30 ,... 200m) and try to measure the throughput which is calculated in the MAC layer in the LteHarqBufferRx.cc (in a way total received bytes / simulation time)
double tputSample = (double)totalRcvdBytes_ / (NOW - getSimulation()->getWarmupPeriod());
macOwner_->emit(macThroughput_, tputSample);
I used SinglePair-UDP-Infra scenario in D2D sample in Simulte and verything is working well, but my issue is: Why throughput doesn't reduce when distance increases? Even in some long distance throughput increases!!! Am I calculating throughput in a wrong place?
Thank you for your help

Why is the number of SNIRLostPackets so large?

I am trying to simulate vehicular ad hoc networks using Veins 4.4, OMNeT++ 5.0 and SUMO 0.25.
There are only one-hop broadcast beacons in the vanet, and each vehicle sends 10 beacons/s. The size of each beacon is 4000 bits. And nic.mac1609_4.bitrate is 6Mbps.
In my simulation,there are 120 vehicles almost uniformly along the 2-km road, and the TX power of each vehicle is 200mW. After 20s' simulation, I select the vehicles in the middle part, and their SNIRLostPackets is almost 19000 and ReceivedBroadcasts is almost 3500, so the Packet Error Ratio is so high.
I read the codes and find:if there is one bit error in one packet, the packet is consedered to be not correctly received. Is my finding right?
The TX power is 200mW and vehicles are in each others' communication range. Then the network load at each vehicle is 4000*10*120 = 4.8Mbps < 6Mbps,so the number of SNIRLostPackets should not be so large?

speed of vechile in veins increases slowly

I'm using veins 4.4, OMNeT++ 5.0 and SuMO 0.25. I have set vehicle speed to 0 to stop them by traciVehicle->setSpeed(0) then after certain case i set them to 20 by traciVehicle->setSpeed(20) to cross the intersection but for no reason it increases slowly till its time finish , so can i make it faster ???
A vehicle in SuMO has the speedMode parameter which determines how it should behave for instance in terms of acceleration and deceleration.
By default this parameters is set to consider all checks like keeping a safe gap to other vehicles and the maximum acceleration. When set to 0 the vehicle ignores all checks like the maximum acceleration.
Try setting different values for the speedMode in Veins to achieve the expected vehicle behavior. You can do so by using the TraCICommandInterface and the TraciVehicle. Have a look at the TraCITestApp for an example. Also you could play around with the maximumSpeed parameter.
i solved the problem by regenerating my map and after that vehicles crossed in its expected speed.i think unknown error occurred in my (.net or .rou ) files while i was debugging my code.

What is the unit of travel time and speed in Veins?

I'm working on Veins in OMNeT++, by using TraCI commands to get the travel time of roads using this method:
double getCurrentTravelTime().
The value which I get from this is very small. So I wondered what the unit of travel time is and also how to get the mean speed in SuMO or Veins?
This commands queries variable 0x5a from an edge. Its meaning is documented on the SUMO wiki, on page http://www.sumo.dlr.de/wiki/TraCI/Edge_Value_Retrieval:
current travel time (0x5a): double, Returns the current travel time (length/mean speed).
Where not specified otherwise, SUMO uses the international system of units, that is, the return value is in seconds.

Fix speed in omnet++ and sumo

I have question. If I have road with three lane each lane has own speed like ( 80 , 100 , 120 )Km/h ... Then need to test the performance of any protocol like the AODV for VANET when the vehicle speed is 90 Km/h.. and the number of vehicle is 100 how can do this,mean to set fix speed for these cars. Thanks in advance.
To fix the speed of a vehicle you can simply give it the aspired speed as maximum speed and prevent it from dawdling (which it does with the default model). An input route file could look like this:
<routes>
<vType sigma="0" id="t1" maxSpeed="90"/>
<vehicle id="v1" type="t1" depart="0" route="r1" departSpeed="max"/>
</routes>
Please note that this will set the maximum speed to 90m/s (as requested in the question) which means 324 km/h. Also the definition of the route r1 is excluded here.
If you have multiple interacting vehicles however you cannot at the same time guarantee collision free simulation and constant speed and sumo will favor the first.

Resources