Lab1 Introduction to Omnet

download Lab1 Introduction to Omnet

of 23

Transcript of Lab1 Introduction to Omnet

  • 7/31/2019 Lab1 Introduction to Omnet

    1/23

    Introduction to Simulation

    Omnet++ 3.3

  • 7/31/2019 Lab1 Introduction to Omnet

    2/23

    Projects

    2

    Flight simulator

    War Simulator

    hurricane simulation

    Car crash simulation

  • 7/31/2019 Lab1 Introduction to Omnet

    3/23

    Collect data fromreal system

    Build Equation that describe thesystem behavior

    Build Programand simulate the system

    Collect dataresults

    analysis theresults

    Make decisions of how toimprove the system

    Real system

  • 7/31/2019 Lab1 Introduction to Omnet

    4/23

    Simulation Basic

    Job Generator

    RandomNumberGenerator

    Job 3 Job 2 Job 1 Job Worker

    ServiceTime

    Simulation Clock

    4

  • 7/31/2019 Lab1 Introduction to Omnet

    5/23

  • 7/31/2019 Lab1 Introduction to Omnet

    6/23

    What is OMNeT++? OMNeT++ is a public-source, component-based, modular

    and open-architecture simulation environment with strongGUI support and an embeddable simulation kernel.

    OMNeT++ provides a component architecture for models.Components (modules) are programmed in C++, thenassembled into larger components and models using ahigh-level language (NED).

    OMNeT++ is free for academic and non-profit use;commercial users must obtain a license from OmnestGlobal Inc.

  • 7/31/2019 Lab1 Introduction to Omnet

    7/23

    System ModuleAn OMNeT++ model consists of hierarchically nestedmodules, which communicate bypassing messages to eachanother.The top level module is the system module.The system module contains submodules.Model structure is described in OMNeT++'s NED language.Modules that contain submodules are termed compoundmodules.simple modulesare at the lowest level of the module hierarchy

  • 7/31/2019 Lab1 Introduction to Omnet

    8/23

    Omnet++ Installation

  • 7/31/2019 Lab1 Introduction to Omnet

    9/23

    Omnet++: Download OMNeT++ is free for academic and non-profit use

    You can download Omnet++ 3.3 win 32 from

    http://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exe

    http://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exehttp://www.omnetpp.org/omnetpp/doc_details/2084-omnet-33-win32-binary-exe
  • 7/31/2019 Lab1 Introduction to Omnet

    10/23

    Windows Install OMNeT++ into a directory that doesn't have

    space in its name, e.g. don't install in underC:\Program files\ (Otherwise you'll have problems

    with the makefiles.)

  • 7/31/2019 Lab1 Introduction to Omnet

    11/23

    Dont forget: check the box

    11Register Enviroment Variables

  • 7/31/2019 Lab1 Introduction to Omnet

    12/23

    Easy way to set env. variables

    Open command prompt (cmd)

    Drag and drop one of the following batch files:

    omnetenv-win32-vs6 (for Visual Studio 6.0).

    Press Enter.

  • 7/31/2019 Lab1 Introduction to Omnet

    13/23

    Easy way to set env. variables

  • 7/31/2019 Lab1 Introduction to Omnet

    14/23

    Installation Note Install VB 6.0 in C:\ drive.

    Install Omnet++ in C:\ (Defualt).

    Omnet++ directory name should not contains SPACE.

  • 7/31/2019 Lab1 Introduction to Omnet

    15/23

  • 7/31/2019 Lab1 Introduction to Omnet

    16/23

    Installation Guid

  • 7/31/2019 Lab1 Introduction to Omnet

    17/23

    Installation Guid

  • 7/31/2019 Lab1 Introduction to Omnet

    18/23

    Installation GuidDuring the installation choose the VC6-(debug or release) .

    VisualStudio 6.0

  • 7/31/2019 Lab1 Introduction to Omnet

    19/23

    Test OMNeT++ Windows users: Compiling OMNET++ applications from the command line

    Click start button on your computer screen Chose run a small window will open: type cmdand click with the mouse on

    OK, a command line window will open Change the directory to the current work directory (e.g.C:\OMNeT++\samples\queues)

    1. Use the OMNET++ utility to create Makefile.vc [opp_nmakemake f ](willconsider all files in the current directory)

    2. Add dependencies [nmake f Makefile.vc depend]3. Compile [nmake f Makefile.vc]

    4. An executable program will be created which has the name of the directory(e.g. nim)

    Every time you make changes to the files, first type [nmake f Makefile.vcclean], than repeat from 3 If you add files in the directory, you have to rerun 1, to create another Makefile.

  • 7/31/2019 Lab1 Introduction to Omnet

    20/23

    Go to Start RUN

    Type cmd and then press OK

  • 7/31/2019 Lab1 Introduction to Omnet

    21/23

    Enter your project path ex: C:\OMNeT++\samples\queues

    Type opp_nmakemake

    f to create makefile.vc

  • 7/31/2019 Lab1 Introduction to Omnet

    22/23

    Type namke f Makefile.vc depend to Add dependencies

  • 7/31/2019 Lab1 Introduction to Omnet

    23/23

    Type nmake f Makefile.vc to build the program.

    An exe file -with the name of the project directory- will be created