omnet++

omnet++/veins : connecting inet and veins : TraCIMobility error in TraCIScenarioManagerLaunchd

久未见 提交于 2019-12-02 19:40:56
问题 I'm trying to connect inet 3.4.0 and veins 4.4 to get Tcp/Ip support. I've followed those instructions ( Veins - INET compatibility ) and even more, but I have this error while trying to run a simulation : I'm not sure to understand the TraCIMobility function. <!> Error in module (Veins::TraCIScenarioManagerLaunchd) simple_junction_noTls_ipv4.manager (id=6) at event #23, t=0.2: ASSERT: condition lastUpdate != simTime() false in function changePosition, veins/modules/mobility/traci

How could nodes receive packets from sensors and on the other hand send them to Mobile Elements?

谁说胖子不能爱 提交于 2019-12-02 10:25:32
I am using OMNet++ to simulate a wireless network. The scenario is : "sensor nodes send sensory data to some nodes (called RN)(send to the nearest RN). and some mobile elements collect data from these points." sensors distribute uniform in field and position of RNs are determined.also MEs follow BonnMobility with predefined path. I'm using omnet 5.4 with inet 3.6. numHost=500 ** numME=5 ** numRN=50 NED file: network MyNet { parameters: int numHost; int numME; int numRN; string hostType = default("WirelessHost"); string mediumType = default("IdealRadioMedium"); @display("bgb=600,600;bgu=m");

Computing End-To-End Delay in Veins

做~自己de王妃 提交于 2019-12-02 06:49:38
I have read a bunch of posts on SO regarding the computation of end-to-end delay in Veins, but have not found an answer to be fulfilling in explaining why the delay is seemingly too low. I am using: Veins 4.7 Sumo 0.32.0 Omnetpp 5.3 Channel switching is turned off. I have the following code, sending a message from the transmitting node: if(sendMessage) { WaveShortMessage* wsm = new WaveShortMessage(); sendDown(wsm); } The receiving node computes the delay using the wsm creation time, but I have also tried setting the timestamp on the transmitting side. The result is the same. simtime_t delay =

Transmission of vehicular status in Veins

允我心安 提交于 2019-12-01 15:30:50
I want to transmit a given car's vehicular data such as it's vType , instantaneous speed and position to a RSU in a scenario in Veins. How can I obtain the data from SUMO and send it through MiXiM methods to an RSU node? user4786271 To achieve your goal you have to use the TraCIMobility component of Veins . You can do that by first getting a pointer to that component in the initialize() method of your node cModule *tmpMobility = getParentModule()->getSubmodule("veinsmobility"); mobility = dynamic_cast<Veins::TraCIMobility*>(tmpMobility); ASSERT(mobility); Once you have the mobility component

Running parallel simulations (using the Command Line)

╄→гoц情女王★ 提交于 2019-12-01 14:13:40
How can I run the simulation with different configurations? I am using omnet++ version 4.6 . My omnetpp.ini file looks as below : [General] [Config Dcn2] network = Dcn2 # leaf switch #**.down_port = 2 **.up_port = 16 #12 # 4 # spine switch **.port = 28 # 20 #2048 # crossconnect **.cross_down_port = 28 # 20 #2048 **.cross_up_port = 28 # 20 #2048 # to set destination of packet **.number_leaf_switch = 28 # 20 #2048 # link speed #**.switch_switch_link_speed = 40 Mbps **.interArrivalTime = ${exponential(.0001),exponential(0.0002),exponential(0.0003)} **.batch_length = 10 **.buffer_length = 10 sim

Transmission of vehicular status in Veins

左心房为你撑大大i 提交于 2019-12-01 13:34:45
问题 I want to transmit a given car's vehicular data such as it's vType , instantaneous speed and position to a RSU in a scenario in Veins. How can I obtain the data from SUMO and send it through MiXiM methods to an RSU node? 回答1: To achieve your goal you have to use the TraCIMobility component of Veins . You can do that by first getting a pointer to that component in the initialize() method of your node cModule *tmpMobility = getParentModule()->getSubmodule("veinsmobility"); mobility = dynamic

Running parallel simulations (using the Command Line)

有些话、适合烂在心里 提交于 2019-12-01 13:21:52
问题 How can I run the simulation with different configurations? I am using omnet++ version 4.6 . My omnetpp.ini file looks as below : [General] [Config Dcn2] network = Dcn2 # leaf switch #**.down_port = 2 **.up_port = 16 #12 # 4 # spine switch **.port = 28 # 20 #2048 # crossconnect **.cross_down_port = 28 # 20 #2048 **.cross_up_port = 28 # 20 #2048 # to set destination of packet **.number_leaf_switch = 28 # 20 #2048 # link speed #**.switch_switch_link_speed = 40 Mbps **.interArrivalTime = $

Calculating distance between cars nodes VEINS

会有一股神秘感。 提交于 2019-12-01 13:10:39
问题 I am new to VEINS and trying to implement weighted p-persistence inside MyVeinsApp.cc. Distance between the sending node and receiving is used in that formula. I saw the 2 functions below. virtual Coord& getSenderPos(); virtual const Coord& getSenderPos() const {return const_cast<WaveShortMessage*>(this)->getSenderPos();} Should I use one of those methods to calculate the distance between nodes? Please advise on the best approach. 回答1: For the distance you obviously need the two positions.

How to change configuration of network during simulation in OMNeT++?

此生再无相见时 提交于 2019-12-01 11:56:02
I want to modify some parameters of element's .ini file in OMNeT++, say a node's transmission rate, during the simulation run, e.g. when a node receives some control message. I found information saying that it's possible to somehow loop the configuration stated as: some_variable = ${ several values }, but there are no conditional clauses in .ini files and no way to pass to those files any data from C++ functions (as far as I'm concerned). I use INET, but maybe some other models' users already bothered with such a problem. While you can certainly manually change volatile parameters , OMNeT++

Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc

戏子无情 提交于 2019-12-01 10:03:39
问题 I use Veins-4a2 and I have modified the scenario of the demo example. When I executed the simulation, I had this error: Error in module (Veins::ObstacleControl) RSUExampleScenario.obstacles (id=2) at event #22, t=0.037209: Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc line 127. Why this error was happened? Can you please help me to 回答1: There is a known bug in Veins versions up to 4.4, where sometimes a