| 1 | | sdf |
| | 1 | = Quickstart = |
| | 2 | |
| | 3 | 1. Go to the simulations/Demo Folder |
| | 4 | 1. Right-Click on Demo.ini |
| | 5 | 1. Select Run as.. Omnet++ Simulation |
| | 6 | 1. Select the Config "Demo" by clicking Ok |
| | 7 | 1. You will see two windows: |
| | 8 | ||[[Image(eVRR-Demo-Network.png, 200px)]]||[[Image(eVRR-Demo-Startup.png, 400px)]]|| |
| | 9 | Right-clicking on "manager" and selecting "Inspect as graphics" will show you the network: |
| | 10 | [[Image(eVRR-Demo-NetworkAsGraphics.png, 400px)]][[BR]] |
| | 11 | and allow you to observe the simulation in detail (at least for small-sized simulations << 1000 nodes). |
| | 12 | 1. Push the "Run"-Button |
| | 13 | |
| | 14 | = Detailed Explanation = |
| | 15 | |
| | 16 | You have two possibilities to build the network topology for your simulation. |
| | 17 | |
| | 18 | 1. Running from an OMNet++ NEtwork Description (NED) |
| | 19 | a. Using a given .ned file |
| | 20 | NED files are OMNet++'s integrated language for the description of networks. Let's take a look at a simple Network Topology for RoutingSim: |
| | 21 | {{{ |
| | 22 | package routingsim.simulations; |
| | 23 | import routingsim.foundation.Node; |
| | 24 | |
| | 25 | |
| | 26 | }}} |
| | 27 | a. Using OMNet++'s Topology Generator |
| | 28 | 1. Select, e.g., Random Topology and click "Next" |
| | 29 | 1. Determine network size and connectivity and click "Next" |
| | 30 | 1. Name the network and as NED type for Node select routingsim.foundation.Node before clicking on "Next" |
| | 31 | 1. 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). |
| | 32 | 1. Click finish and inspect the generated topology |
| | 33 | 1. Running from a [wiki:TopologyFiles topology file] |
| | 34 | 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) |
| | 35 | {{{ |
| | 36 | #!c |
| | 37 | 1 [General] |
| | 38 | 2 network = routingsim.simulations.DefaultNetwork |
| | 39 | 3 |
| | 40 | 4 [Config Demo] |
| | 41 | 5 # logging |
| | 42 | 6 **.samplingInterval=1.0 |
| | 43 | 7 |
| | 44 | 8 # evrr |
| | 45 | 9 **.immediateResponse=false |
| | 46 | 10 **.updateFrequency=1.0 |
| | 47 | 11 **.vneighbors = 1 |
| | 48 | 12 |
| | 49 | 13 # network manager |
| | 50 | 14 **.protocols = "routingsim.routing.evrr.VirtualRing" |
| | 51 | 15 **.topologyFile = "Demo-Grid-100.txt" |
| | 52 | 16 #**.spath = "path/to/file.spath" |
| | 53 | 17 |
| | 54 | 18 # general |
| | 55 | 19 sim-time-limit = 1000s |
| | 56 | }}} |
| | 57 | |
| | 58 | 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) |
| | 59 | {{{ |
| | 60 | #!c |
| | 61 | 1 package routingsim.simulations; |
| | 62 | 2 |
| | 63 | 3 import routingsim.foundation.*; |
| | 64 | 4 import routingsim.dynamics.*; |
| | 65 | 5 |
| | 66 | 6 network DefaultNetwork |
| | 67 | 7 { |
| | 68 | 8 submodules: |
| | 69 | 9 manager: NetworkManager; |
| | 70 | 10 } |
| | 71 | }}} |
| | 72 | On startup, the !NetworkManager module is created and based on the configuration parameters dynamically sets up the simulation with the above parameters: |
| | 73 | |
| | 74 | Line 6 defines the sampling interval, i.e., the time span between statistics are polled from your protocol by the statistics module.[[BR]] |
| | 75 | Lines 8-11 set protocol-specific parameters.[[BR]] |
| | 76 | Line 14 defines the protocol that you want to simulate and that needs to be instantiated within each node.[[BR]] |
| | 77 | Line 15 sets the topology to be instantiated[[BR]] |
| | 78 | Line 16 is commented out, but for larger topologies may set the precalculated shortest path file.[[BR]] |
| | 79 | Line 19 sets an OMNeT++ parameter that restricts the runtime of the simulation measured in simulation time. |