Giter Club home page Giter Club logo

spider_omnet's Introduction

This is a simulator that models the flow of transactions through a payment channel network.

Omnet Installation and Setup

To setup, first follow the omnet installation instructions from Omnet Installation. Based on your version of omnet, add this line to your default shell rc file.

export OMNET="omnetpp-5.6"

Next, clone this repo in the samples directory of the omnet installation and then run the following:

cd samples/spider_omnet/
make

Using the IDE

To use the Omnet IDE, run omnetpp which opens the IDE allowing you to click on the simpleNet.ned file and run the OmnetSimulation from there. Once you have completed installation, navigate to the folder with setenv (should be first level inside the omnet simulation folder) and run the following to save rebuilding time.

. setenv
omnetpp

Open the simpleNet.ned file and click the green run button to run the simulation.

Additional setup for running experiments

This software needs Python3 and the following python modules can be installed via pip: networkx, matplotlib

It also requires Gurobi. Once installed, navigate to the Gurobi installation folder and run python setup.py install to get the associated gurobipy module.

Command line instructins

To run from the command line, either use the run_exp.sh script or by running simpleNet using the command

./spiderNet -u Cmdenv -f omnetpp.ini -c simpleNet -n .

If you use the run_exp.sh script, the plots can be found in the scripts/figures directory.

Collecting Statistics in the IDE and Plotting Graphs

Click the button to run the simulation. For just the purpose of collection statistics, you can use the EXPRESS setting (triple arrow) to run through the simulation. Once the simulation has terminated, close the simulation window.

Inside the omnet IDE, open the results folder. The statistics of the most recent run will be saved in the "simpleNet-#0.vec" file. To view the file, rename the .vec file to something unique, for example "figure4b-time10.vec". Double click the renamed file, which will prompt you to generate a .anf file. Click Finish.

In the .anf file, click Browse Data on the bottom toolbar. The individual nodes are in the expanded view under the folder "simpleNet: #0". Expand a node to see the statistics collected for that node. Right click on a node, folder, or statistic to plot it.

Tips

  • The third white drop down menu next to the blue arrow can filter by statistic.
  • If you want to filter by more than one statistic, use the funnel button next to the blue arrow, and query for example:
name("numAttemptedPerDest_Total(dest *") name("numCompletedPerDest_Total(dest *")
  • For aesthetic graphs, you need to right click -> properties, add titles and axis under "Titles", check display legend under "Legend"

spider_omnet's People

Contributors

gfanti avatar karuan avatar shaileshhbv avatar vibhaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spider_omnet's Issues

Readme

Add documentation in the README for how to run simulation from the command line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.