Quickstart
- Go to the simulations/Demo Folder
- Right-Click on Demo.ini
- Select Run as.. Omnet++ Simulation
- Select the Config "Demo" by clicking Ok
- You will see two windows:
Right-clicking on "manager" and selecting "Inspect as graphics" will show you the network:
and allow you to observe the simulation in detail (at least for small-sized simulations << 1000 nodes).
- Push the "Run"-Button
Detailed Explanation
You have two possibilities to build the network topology for your simulation.
- Running from an OMNet++ NEtwork Description (NED)
- Using a given .ned file
NED files are OMNet++'s integrated language for the description of networks. Let's take a look at a simple Network Topology for RoutingSim:
package routingsim.simulations; import routingsim.foundation.Node;
- Using OMNet++'s Topology Generator
- Select, e.g., Random Topology and click "Next"
- Determine network size and connectivity and click "Next"
- Name the network and as NED type for Node select routingsim.foundation.Node before clicking on "Next"
- as "Gate to connect", choose "inout toNeighbors[]", which is the OMNet++ gate vector for the interconnection of nodes (in contrast to, e.g., node-internal connctions (toProtocols[]) or connections to other modules (Statistics, Dynamics, NetworkManager).
- Click finish and inspect the generated topology
- Using a given .ned file
NED files are OMNet++'s integrated language for the description of networks. Let's take a look at a simple Network Topology for RoutingSim:
- Running from a topology file
Along with the RoutingSim package, there comes a ready to start configuration for the included eVRR that you can use as example for further configurations (file RoutingSim/simulations/Demo/Demo.ini)
1 [General] 2 network = routingsim.simulations.DefaultNetwork 3 4 [Config Demo] 5 # logging 6 **.samplingInterval=1.0 7 8 # evrr 9 **.immediateResponse=false 10 **.updateFrequency=1.0 11 **.vneighbors = 1 12 13 # network manager 14 **.protocols = "routingsim.routing.evrr.VirtualRing" 15 **.topologyFile = "Demo-Grid-100.txt" 16 #**.spath = "path/to/file.spath" 17 18 # general 19 sim-time-limit = 1000s
Line 2 sets the default network. This network is the base for every simulation that is driven with file-based topology input and consists solely of the NetworkManager module (file RoutingSim/simulations/DefaultNetwork.ned)
1 package routingsim.simulations; 2 3 import routingsim.foundation.*; 4 import routingsim.dynamics.*; 5 6 network DefaultNetwork 7 { 8 submodules: 9 manager: NetworkManager; 10 }
On startup, the NetworkManager module is created and based on the configuration parameters dynamically sets up the simulation with the above parameters:
Line 6 defines the sampling interval, i.e., the time span between statistics are polled from your protocol by the statistics module.
Lines 8-11 set protocol-specific parameters.
Line 14 defines the protocol that you want to simulate and that needs to be instantiated within each node.
Line 15 sets the topology to be instantiated
Line 16 is commented out, but for larger topologies may set the precalculated shortest path file.
Line 19 sets an OMNeT++ parameter that restricts the runtime of the simulation measured in simulation time.
Attachments (3)
- eVRR-Demo-Startup.png (83.7 KB ) - added by 13 years ago.
- eVRR-Demo-NetworkAsGraphics.png (85.6 KB ) - added by 13 years ago.
- eVRR-Demo-Network.png (14.3 KB ) - added by 13 years ago.
Download all attachments as: .zip