invalid operation during network initialization in inet4.2.7 with gpsr routing protocol

91 views
Skip to first unread message

Tianxiang Zhou

unread,
Mar 1, 2023, 7:08:12 AM3/1/23
to OMNeT++ Users
Hi everyone!
I tried to use gpsr protocol in UAV ad hoc network. But when I   tried to set the mobility, the simulation would have error.
1.png
By the way, the mobility is set to random way point mobility.
And I wrote a new routing protocol called glpr based on gpsr. When I tried to set any dynamic mobility, the simulation would also have errors. But in static mobility, it works very well.
2.png
Can any one help me with those problems?

Tianxiang Zhou

unread,
Mar 1, 2023, 7:42:30 AM3/1/23
to OMNeT++ Users
And I tried inetmant4. But it still didn't work.4.png

Alfonso Ariza Quintana

unread,
Mar 1, 2023, 12:49:32 PM3/1/23
to omn...@googlegroups.com
Can you send me the scenario?


De: 'Tianxiang Zhou' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: miércoles, 1 de marzo de 2023 13:08
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/a0e129c6-e2ea-4882-acde-58ca17c96534n%40googlegroups.com.

Alfonso Ariza Quintana

unread,
Mar 1, 2023, 12:50:31 PM3/1/23
to omn...@googlegroups.com
I need the scenario to test the problem.

De: 'Tianxiang Zhou' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: miércoles, 1 de marzo de 2023 13:42
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

天天

unread,
Mar 1, 2023, 8:25:17 PM3/1/23
to omnetpp
Ok, I send the project pro2 and my routing protocol folder glpr with this e-mail. Besides, the version of omnet is 5.7.
Thanks for your help.
 


------------------ 原始邮件 ------------------
发件人: "omnetpp" <aari...@hotmail.com>;
发送时间: 2023年3月2日(星期四) 凌晨1:50
主题: RE: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol

I need the scenario to test the problem.

De: 'Tianxiang Zhou' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: miércoles, 1 de marzo de 2023 13:42
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 
And I tried inetmant4. But it still didn't work.

在2023年3月1日星期三 UTC+8 20:08:12<Tianxiang Zhou> 写道:
Hi everyone!
I tried to use gpsr protocol in UAV ad hoc network. But when I   tried to set the mobility, the simulation would have error.

By the way, the mobility is set to random way point mobility.
And I wrote a new routing protocol called glpr based on gpsr. When I tried to set any dynamic mobility, the simulation would also have errors. But in static mobility, it works very well.

Can any one help me with those problems?

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/4444600c-e62c-473e-bb78-cee3810df61dn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/EAvDD7dtLrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/AS2P195MB2155F8C92B1015B206F0D8048CAD9%40AS2P195MB2155.EURP195.PROD.OUTLOOK.COM.
DEC733FB@B11D8368.B6FAFF63.jpg
pro2.rar
glpr.rar

Tianxiang Zhou

unread,
Mar 1, 2023, 8:25:56 PM3/1/23
to OMNeT++ Users
My omnetpp.ini code:
[General]
sim-time-limit = 30s
# app
*.source.numApps = 2
#*.source.app[0].typename = "PingApp"
#*.source.app[0].destAddr = "destination"
#*.source.app[0].printPing = true
*.source.app[0].typename = "UdpBasicBurst"
*.source.app[0].messageLength = 256B
*.source.app[0].sendInterval = exponential(200ms)
*.source.app[0].startTime = 0us
*.source.app[0].burstDuration = 1000s
*.source.app[0].sleepDuration = 0s
*.source.app[0].chooseDestAddrMode = "perSend"
*.source.app[0].destPort = 270
*.source.app[0].localPort = 1
*.source.app[0].destAddresses = "destination"

*.source.app[1].typename = "UdpSink"
*.source.app[1].localPort = 270

*.destination.numApps = 2
*.destination.app[0].typename = "UdpBasicBurst"
*.destination.app[0].messageLength = 256B
*.destination.app[0].sendInterval = exponential(200ms)
*.destination.app[0].startTime = 0us
*.destination.app[0].burstDuration = 1000s
*.destination.app[0].sleepDuration = 0s
*.destination.app[0].chooseDestAddrMode = "perSend"
*.destination.app[0].destPort = 270
*.destination.app[0].localPort = 1
*.destination.app[0].destAddresses = "destination"

*.destination.app[1].typename = "UdpSink"
*.destination.app[1].localPort = 270



# physical layer
*.visualizer.*.mediumVisualizer[*].displaySignals = true
*.visualizer.*.physicalLinkVisualizer[*].displayLinks = true # green dot line
#*.visualizer.*.physicalLinkVisualizer[*].packetFilter = "UDPData*"

# data link visualizer
*.visualizer.*.numDataLinkVisualizers = 5
*.visualizer.*.dataLinkVisualizer[*].activityLevel = "peer"
*.visualizer.*.dataLinkVisualizer[*].displayLinks = true
*.visualizer.*.dataLinkVisualizer[0].packetFilter = "aodv::Rreq or GLPRReq"
*.visualizer.*.dataLinkVisualizer[1].packetFilter = "ping* or UDP*"
*.visualizer.*.dataLinkVisualizer[1].*Color = "blue"
*.visualizer.*.dataLinkVisualizer[2].packetFilter = "aodv::Rrep or GLPRRep"
*.visualizer.*.dataLinkVisualizer[2].*Color = "darkslategray"
*.visualizer.*.dataLinkVisualizer[3].packetFilter = "aodv::Rerr"
*.visualizer.*.dataLinkVisualizer[3].*Color = "red"
*.visualizer.*.dataLinkVisualizer[4].packetFilter = "Hello or GLPRBeacon"
*.visualizer.*.dataLinkVisualizer[4].*Color = "green"

# network layer
*.visualizer.*.networkRouteVisualizer[0].displayRoutes = true # blue arrow line
#*.visualizer.*.networkRouteVisualizer[0].packetFilter = "*ping*"

# misc
**.wlan[*].bitrate = 24Mbps
*.configurator.addStaticRoutes = false
**.netmaskRoutes = ""
**.arp.typename = "GlobalArp"

[Config MobileNodesBase]
network = GpsrNodes

# tx power
**.transmitter.power = 1.25mW

## node movement gpsr not fit
#*.node*.mobility.typename = "LinearMobility"
#*.node*.mobility.initialMovementHeading = uniform(0deg,360deg)
#*.node*.mobility.speed = 25mps
#
#**.constraintAreaMaxX = 400m
#**.constraintAreaMaxY = 400m
#**.constraintAreaMinX = 0m
#**.constraintAreaMinY = 0m

# visualization
#*.visualizer.*.routingTableVisualizer[0].displayLabels = false
#*.visualizer.*.routingTableVisualizer[0].displayRoutesIndividually = false
#*.visualizer.*.routingTableVisualizer[0].lineShift = 0

#*.visualizer.*.interfaceTableVisualizer[0].displayInterfaceTables = true
#*.visualizer.*.interfaceTableVisualizer[0].format = "%a/%l"

[Config Aodv]
extends = MobileNodesBase

# routing protocol parameters
*.*.routingApp.typename = "Aodv"

*.*.routingApp.activeRouteTimeout = 1s
*.*.routingApp.deletePeriod = 0.5s

[Config AodvStation]
extends = Aodv
# mobility
*.node*.mobility.typename = "StationaryMobility"#"RandomWaypointMobility"  #"StationaryMobility"
#*.node*.mobility.speed = 10mps

[Config AodvLinear]
extends = Aodv
# mobility
*.node*.mobility.typename = "LinearMobility"
*.node*.mobility.speed = 1mps

[Config Dsdv]
extends = MobileNodesBase

# routing protocol
*.*.routing.typename = "Dsdv"

*.*.routing.helloInterval = 1s
*.*.routing.routeLifetime = 2s

[Config DsdvStation]
extends = Dsdv
# mobility
*.node*.mobility.typename = "StationaryMobility"#"RandomWaypointMobility"  #"StationaryMobility"
#*.node*.mobility.speed = 10mps

[Config DsdvLinear]
extends = Dsdv
# mobility
*.node*.mobility.typename = "LinearMobility"
*.node*.mobility.speed = 1mps

# ping app
#*.source.app[0].sendInterval = 0.5s

[Config Gpsr]
extends = MobileNodesBase

# app
*.source.numApps = 2
#*.source.app[0].typename = "PingApp"
#*.source.app[0].destAddr = "destination"
#*.source.app[0].printPing = true
*.source.app[0].typename = "UdpBasicBurst"
*.source.app[0].messageLength = 256B
*.source.app[0].sendInterval = exponential(200ms)
*.source.app[0].startTime = 0us
*.source.app[0].burstDuration = 1000s
*.source.app[0].sleepDuration = 0s
*.source.app[0].chooseDestAddrMode = "perSend"
*.source.app[0].destPort = 269
*.source.app[0].localPort = 1
*.source.app[0].destAddresses = "destination"

*.source.app[1].typename = "UdpSink"
*.source.app[1].localPort = 269

*.destination.numApps = 2
*.destination.app[0].typename = "UdpBasicBurst"
*.destination.app[0].messageLength = 256B
*.destination.app[0].sendInterval = exponential(200ms)
*.destination.app[0].startTime = 0us
*.destination.app[0].burstDuration = 1000s
*.destination.app[0].sleepDuration = 0s
*.destination.app[0].chooseDestAddrMode = "perSend"
*.destination.app[0].destPort = 269
*.destination.app[0].localPort = 1
*.destination.app[0].destAddresses = "destination"

*.destination.app[1].typename = "UdpSink"
*.destination.app[1].localPort = 269

# routing protocol
#*.host*.typename = "GpsrRouter"
*.*.routing.typename = "Gpsr"

**.planarizationMode = "RNG"
**.beaconInterval = 5s

**.displayBubbles = true
**.displayCommunicationRanges = true

[Config GpsrStation]
extends = Gpsr
# mobility
*.node*.mobility.typename = "StationaryMobility"#"RandomWaypointMobility"  #"StationaryMobility"
#*.node*.mobility.speed = 10mps

[Config GpsrLinear]
extends = Gpsr
# mobility
*.node*.mobility.typename = "LinearMobility"
*.node*.mobility.speed = 1mps

[Config GpsrRandom]
extends = Gpsr
# mobility
*.node*.mobility.typename = "RandomWaypointMobility"
*.node*.mobility.speed = 1mps

[Config Glpr]
extends = MobileNodesBase

# routing protocol
#*.host*.typename = "GpsrRouter"
*.*.routing.typename = "Glpr"

**.planarizationMode = "RNG"
**.beaconInterval = 5s

**.displayBubbles = true
**.displayCommunicationRanges = true

[Config GlprStation]
extends = Glpr
# mobility
*.node*.mobility.typename = "StationaryMobility"#"RandomWaypointMobility"  #"StationaryMobility"
#*.node*.mobility.speed = 10mps

[Config GlprLinear]
extends = Glpr
# mobility
*.node*.mobility.typename = "LinearMobility"
*.node*.mobility.speed = 1mps

Alfonso Ariza Quintana

unread,
Mar 2, 2023, 5:17:13 AM3/2/23
to omn...@googlegroups.com
I don't know the Glpr, the protocol is not included in inetmanet or inet framework

but you have not included the landscape size in the ini file, if this information is not in the ini file you will have an error in the mobility module.

For example
# mobility
**.mobility.constraintAreaMinZ = 20m #min UAV altitude
**.mobility.constraintAreaMaxZ = 100m #max UAV altitude
**.mobility.constraintAreaMinX = 0m
**.mobility.constraintAreaMinY = 0m
**.mobility.constraintAreaMaxX = 1600m
**.mobility.constraintAreaMaxY = 800m

# if true this will choose the position of the node, for example,  @display("p=779.104,724.888;i=misc/drone_s");, initial position x= 779.104, y = 724.888
# if false, the initial position will be chosen randomly in the interval MAX, MIN
**.mobility.initFromDisplayString = false

De: 'Tianxiang Zhou' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: jueves, 2 de marzo de 2023 2:25
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: Re: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 

天天

unread,
Mar 2, 2023, 9:16:37 PM3/2/23
to omnetpp
Thank you. According to your suggestion, I tried to add the landscape size codes, but the same error information occurred. glpr is a new rouing protocol I wrote and added in routing folder. In static conditions, the protocol works well, and all the logical functions seem correct. The mobility setting code is:
*.node*.mobility.typename = "StationaryMobility"
And the simulation runs well.

But when I tried LinearMobility, it will have the invalid operation during network initialization.
 


------------------ 原始邮件 ------------------
发件人: "omnetpp" <aari...@hotmail.com>;
发送时间: 2023年3月2日(星期四) 晚上6:17
主题: RE: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
And I tried inetmant4. But it still didn't work.

在2023年3月1日星期三 UTC+8 20:08:12<Tianxiang Zhou> 写道:
Hi everyone!
I tried to use gpsr protocol in UAV ad hoc network. But when I   tried to set the mobility, the simulation would have error.

By the way, the mobility is set to random way point mobility.
And I wrote a new routing protocol called glpr based on gpsr. When I tried to set any dynamic mobility, the simulation would also have errors. But in static mobility, it works very well.

Can any one help me with those problems?
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/b9a253f9-503b-4249-abc3-2c0972fcc3cdn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
3DD4FD65@AD2D9034.66580164.png.jpg

Tianxiang Zhou

unread,
Mar 2, 2023, 9:28:21 PM3/2/23
to OMNeT++ Users
The custom routing protocol glpr uses the position, velocity and acceleration information. In gpsr, beacon only uses position. I am not sure if it is the reason why the error occurs when I use a dynamic mobility mode with velocity. Is it because I forget to declare some header about velocity and acceleration.
Here is my modified code in create beacon function:
const Ptr<GlprBeacon> Glpr::createBeacon()
{
    const auto& beacon = makeShared<GlprBeacon>();
    beacon->setAddress(getSelfAddress());
    beacon->setPosition(mobility->getCurrentPosition());
    beacon->setVelocity(mobility->getCurrentVelocity()); // use velocity information
    beacon->setAcceleration(mobility->getCurrentAcceleration());  // use acceleration information

    beacon->setChunkLength(B(getSelfAddress().getAddressType()->getAddressByteLength() + 3*positionByteLength ));
    return beacon;
}

Alfonso Ariza Quintana

unread,
Mar 3, 2023, 4:53:06 AM3/3/23
to omn...@googlegroups.com
I can run the simulation with GPRS with linear mobility

De: '天天' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: viernes, 3 de marzo de 2023 3:16
Para: omnetpp <omn...@googlegroups.com>
Asunto: 回复:RE: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 

Tianxiang Zhou

unread,
Mar 7, 2023, 8:17:16 AM3/7/23
to OMNeT++ Users
Hi Alfonso.  I found the problem. In my custom routing protocol, I use acceleration of each node to establish a prediction model. But in MovingMobilityBase class,  getCurrentAcceleration() is override. If acceleration is used, it will throw a runtime error called invalid operation. That was my error mentioned before.  When I tried to use any dynamic mobility module, the error occurred.Snipaste_2023-03-07_17-35-33.png
This means omnet doesn't support getting acceleration unless we establish a new mobility model and overwrite that function in the mobility model.

Alfonso Ariza Quintana

unread,
Mar 7, 2023, 12:52:34 PM3/7/23
to omn...@googlegroups.com
Most of the mobility models don't have acceleration, for example, RWP has an acceleration of 0.

De: 'Tianxiang Zhou' via OMNeT++ Users <omn...@googlegroups.com>
Enviado: martes, 7 de marzo de 2023 14:17
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: Re: 回复:RE: [Omnetpp-l] Re: invalid operation during network initialization in inet4.2.7 with gpsr routing protocol
 

Mohamad Azizi

unread,
May 25, 2023, 8:01:27 AM5/25/23
to OMNeT++ Users
hi every one
how i can add a specific routing protocol upon vehicles? 

Alfonso Ariza Quintana

unread,
May 25, 2023, 3:42:21 PM5/25/23
to omn...@googlegroups.com
You can add it as an external project using the project reference to inet-framework and veins, or you can include it in a folder inside the folder routing.

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de Mohamad Azizi <mohamad.a...@gmail.com>
Enviado: jueves, 25 de mayo de 2023 14:01

Mohamad Azizi

unread,
May 26, 2023, 4:38:30 AM5/26/23
to OMNeT++ Users
thanks for reply 
i do actually i create my  project an refer to inet and veins then run 
but i have a submodule routing error 
no module type named 'Mrouting' found that implements module interface inet.applications.contract.IApp

Alfonso Ariza Quintana

unread,
May 26, 2023, 6:44:48 AM5/26/23
to omn...@googlegroups.com
This error is that the simulator doesn't find the ned file where is defined the module Mrouting.

You should have something like

import inet.applications.contract.IApp;

simple Mrouting  like IApp
{
       ......
}

Enviado: viernes, 26 de mayo de 2023 10:38

Mohamad Azizi

unread,
May 26, 2023, 10:49:04 AM5/26/23
to OMNeT++ Users
thanks a lot 
i do this but this time i get this error
no such gate or gate vector :'ipIn' -- in module (inet :: Mrouting) Mrouting.RSU[0].routing (id=24) , during network initialization

Simulation terminated with exit code: -2147483645

Alfonso Ariza Quintana

unread,
May 29, 2023, 3:50:21 AM5/29/23
to omn...@googlegroups.com
If you implement the routing protocol like a UDP application, the gates should be    input socketIn  output socketOut. Your code uses other gate names. Check your code and how you want to implement the routing protocol. If the routing protocol will work like a UDP application or directly connected to the network layer.

Enviado: viernes, 26 de mayo de 2023 16:49

Mohamad Azizi

unread,
May 31, 2023, 7:54:04 AM5/31/23
to OMNeT++ Users
thank you for hits
I have an other problem 
this time I export my custom map from OpenStreetMap and create net.xml file but when I want create trip.xml file I insert :
randomTrips.py -n map.net.xml -e 200 -o map.trips.xml
 and get this :
usage: randomTrips.py [-h] [-c FILE] [-C FILE] [--save-template FILE] -n NETFILE [-a ADDITIONAL] [-o TRIPFILE]
                      [-r ROUTEFILE] [--vtype-output VTYPEOUT] [--weights-prefix WEIGHTSPREFIX]
                      [--weights-output-prefix WEIGHTS_OUTPREFIX] [--pedestrians] [--persontrips]
                      [--personrides PERSONRIDES] [--persontrip.transfer.car-walk CARWALKMODE]
                      [--persontrip.walkfactor FLOAT] [--persontrip.walk-opposite-factor FLOAT] [--prefix TRIPPREFIX]
                      [-t TRIPATTRS] [--fringe-start-attributes FRINGEATTRS] [-b BEGIN] [-e END] [--random-depart]
                      [-s SEED] [--random] [-l] [-L] [--edge-param EDGEPARAM] [--speed-exponent FLOAT]
                      [--fringe-speed-exponent FLOAT] [--angle ANGLE] [--angle-factor ANGLE_WEIGHT]
                      [--fringe-factor FRINGE_FACTOR] [--fringe-threshold FRINGE_THRESHOLD] [--allow-fringe]
                      [--allow-fringe.min-length ALLOW_FRINGE_MIN_LENGTH] [--fringe-junctions] [--min-distance FLOAT]
                      [--max-distance FLOAT] [-i INTERMEDIATE] [--flows FLOWS] [--jtrrouter] [--maxtries MAXTRIES]
                      [--binomial N] [--vclass VCLASS] [--vehicle-class VEHICLE_CLASS] [--remove-loops]
                      [--random-routing-factor RANDOMROUTINGFACTOR] [--junction-taz] [--via-edge-types VIAEDGETYPES]
                      [--validate] [-v] [--random-departpos] [--random-arrivalpos] [-p FLOAT [FLOAT ...] |
                      --insertion-rate FLOAT [FLOAT ...] | --insertion-density FLOAT [FLOAT ...]]
randomTrips.py: error: the following arguments are required: -n/--net-file

I check the path in system environment variables and that correct 

Alfonso Ariza Quintana

unread,
May 31, 2023, 12:05:00 PM5/31/23
to omn...@googlegroups.com
I can try to reproduce the problem but I need the scenario that you are using

Enviado: miércoles, 31 de mayo de 2023 13:54
--
We are deprecating this forum. Please use https://forum.omnetpp.org instead.
---
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

Mohamad Azizi

unread,
May 31, 2023, 1:13:01 PM5/31/23
to OMNeT++ Users
I try to create the config.xml file to import sumo 
independent of the omnet 
I export the map from open street map and download som file
Capture.PNG
Reply all
Reply to author
Forward
0 new messages