Giter Site home page Giter Site logo

jimmy940292 / ns3_simulator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 189.68 MB

License: GNU General Public License v2.0

Python 65.00% CMake 0.31% C++ 34.04% C 0.40% Shell 0.04% Makefile 0.05% MATLAB 0.07% Click 0.03% Perl 0.01% Gnuplot 0.01% Jupyter Notebook 0.05%

ns3_simulator's Introduction

NS3 simulator

Recompile the whole program

./ns3 clean
./ns3 configure
./ns3 build

Run the sample

Programs are under the scratch folder

ex: ./ns3 run myfirst

The main program is Build_Env.cc

Input parameters

input_file: The file contains planning graph
event_file: The file contains network traffic event
unexpected_event: The file contains device failure
output_folder: The folder contains output csv files
add_event: Whether add human movement data event
  0: No
  1: Yes
record_time: The network metric recording frequency
  0: 1s
  1: 10s
simulation_time: The simulation time (s) for simulator
unexpected_event: Whether add network failure event
  0: No
  1: Yes
ground: 0 is nthu, 1 is irvine
exp_number: The number of experiment

Run once

ex: ./ns3 run Build_Env -- planning_graph_nthu/0.json network_traffic_event/0_400_0.json 10_0.txt output 0 0 60 0 0 0 

Human_movement_generator.py

Input parameters

people_size: Number of people
ground: 0 is nthu, 1 is irvine 
exp_number: The number of experiment

Run

ex: python Human_movement_generator.py 100 0 0 

movement_data_trans.py

Input parameters

input_file: The file contains human movement data
planning_graph file: The file contains planning graph

Run

ex: python movement_data_trans.py movement_data_nthu/100_0.csv planning_graph_nthu/0.json  

Unexpected_event_generaotr.py

Input parameters

ground: 0 is nthu, 1 is irvine
number_to_generate: Number of affected location
exp_number: The number of experiment

Run

ex: python Unexpected_event_generator.py 0 10 0

Run whole program

1. Create planning graph in folder planning_graph

2. Generate network traffic event

First create human movement data

  python Human_movement_generator.py 100 0 0 

Second convert to network traffic event

  python movement_data_trans.py movement_data_nthu/100_0.csv planning_graph_nthu/0.json  

3. Generate network failure event

  python Unexpected_event_generator.py 0 10 0

4. Run NS3 simulator

  ./ns3 run Build_Env -- planning_graph_nthu/0.json network_traffic_event/0_1200_0.json 10_0.txt output 0 0 60 0 0 0 

Conf

config.yaml

Output csv format

avg.csv

sent_packet
received_packet
lost_packet
loss_ratio
delivery_ratio
throughput
delay

traffic_failed.csv

additional traffic packet
failed_device

ns3_simulator's People

Contributors

jimmy940292 avatar tungchunchang avatar

Watchers

 avatar

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.