Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Tips on developing a network simulator and writing a paper Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of.

Similar presentations


Presentation on theme: "1 Tips on developing a network simulator and writing a paper Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of."— Presentation transcript:

1 1 Tips on developing a network simulator and writing a paper Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of Technology Speaker: Chia-Wei Tuan 10/20/2009

2 2 Outline Network Simulation Network Simulation The structure of filesThe structure of files Running simulatorRunning simulator Writing a paper Writing a paper ZoteroZotero Numbering References in MS WordNumbering References in MS Word

3 3 Writing a Network Simulation by yourself The well-known network simulators such as NS2, OMNET are powerful. The well-known network simulators such as NS2, OMNET are powerful. But… But… Sometimes, they may not fit your problem.Sometimes, they may not fit your problem. It hard to trace and modify the source code.It hard to trace and modify the source code.

4 4 The structure of files Config: The parameters in simulation. Config: The parameters in simulation. Event: Event abstract class. Event: Event abstract class. Algorithm: Algorithm abstract class. Algorithm: Algorithm abstract class. Traffic: Traffic abstract class. Traffic: Traffic abstract class. Statistics: It consists of performance criterion. Statistics: It consists of performance criterion. Main: Representations of the performance result. Main: Representations of the performance result.

5 5 Config The Config file consists of the parameter in the network. The Config file consists of the parameter in the network. Ex: Ex: Whenever other file needs the parameters in config.h, we just use include statement. Whenever other file needs the parameters in config.h, we just use include statement. Advantage: You can control the simulator in one file instead of multi-files. Advantage: You can control the simulator in one file instead of multi-files.

6 6 Event In simulation, the operation of a system can be represented as a chronological sequence of events. In simulation, the operation of a system can be represented as a chronological sequence of events. An event is described by the time at which it occurs and a type, indicating the code that will be used to simulate that event. An event is described by the time at which it occurs and a type, indicating the code that will be used to simulate that event.

7 7 Events and EventCollection

8 8 Event class

9 9 Concrete class of Event

10 10 Implementation of concrete Event

11 11 EventCollection EventCollection is a singleton pattern. EventCollection is a singleton pattern.

12 12 Algorithm Use strategy pattern to implement Algorithm in various conditions. Use strategy pattern to implement Algorithm in various conditions.

13 13 Traffic We may also evaluate the network performance with various traffic. We may also evaluate the network performance with various traffic.

14 14 Statistics The implementation codes such as transmitting packets, dropping packets may distribute over several objects. The implementation codes such as transmitting packets, dropping packets may distribute over several objects. Thus, we need a global accessible Statistics class to keeps track of these information. Thus, we need a global accessible Statistics class to keeps track of these information. That is, we implement Statistics class as a singleton pattern. That is, we implement Statistics class as a singleton pattern.

15 15 main function The main function calculates the performance results based on the information in Statistics. The main function calculates the performance results based on the information in Statistics. Ex: We may want to observe the relationship between throughput and fairness index. Ex: We may want to observe the relationship between throughput and fairness index. When writing the result to a file, we use a tab instead of a blank to separate each column. When writing the result to a file, we use a tab instead of a blank to separate each column.

16 16 Running simulator

17 17 Debug message In developing stage, we may see as the output message as detailed as possible. Ex: All states of all nodes in the networks. In developing stage, we may see as the output message as detailed as possible. Ex: All states of all nodes in the networks. However, we do not need these information when evaluating the system performance. However, we do not need these information when evaluating the system performance. Thus, in config.h file, we write Thus, in config.h file, we write For any debug message, write message in this way: For any debug message, write message in this way:

18 18 Batch running Batch running: run the simulator with various conditions (traffic, algorithm, size of network, etc). Batch running: run the simulator with various conditions (traffic, algorithm, size of network, etc). Before this stage, you should check if there are any errors in your code. Before this stage, you should check if there are any errors in your code. Speed up your simulator by compiling codes in release mode. Speed up your simulator by compiling codes in release mode.

19 19 Batch running Ex: There are two algorithms and three traffic pattern. Ex: There are two algorithms and three traffic pattern. Six simulations. Six simulations. ( config.h is copied to each directory ) Batch file: “SDF batch.bat” Batch file: “SDF batch.bat”

20 20 Batch file Open two consoles by [1]. Open two consoles by [1].

21 21 Batch file

22 22 Produce figures

23 23 Writing a paper

24 24 Zotero[2] is a free, easy-to-use Firefox extension to help you collect, manage, and cite your research sources. It lives right where you do your work — in the web browser itself. Zotero[2] is a free, easy-to-use Firefox extension to help you collect, manage, and cite your research sources. It lives right where you do your work — in the web browser itself.

25 25 Zotero – add papers in website You can use this tool at IEEExplorer and ACM website. You can use this tool at IEEExplorer and ACM website.

26 26 Zotero – add papers from DOI Add papers by Digital Object Identifier (DOI). Add papers by Digital Object Identifier (DOI). DOI usually appears at the bottom of first page. DOI usually appears at the bottom of first page. Ex: Ex:

27 27 Zotero – add papers from PDF Drag and drop the pdf file to Zotero. Drag and drop the pdf file to Zotero. Retrieve metadata for PDF. Retrieve metadata for PDF. After that, the metadata is retrieved. After that, the metadata is retrieved.

28 28 A bug in Zotero Language problem: Language problem: Type “about:config” in firefox. Type “about:config” in firefox. Filter: extensions.zotero.export.bibliographyLocale Filter: extensions.zotero.export.bibliographyLocale Value: en-US Value: en-US

29 29 Cite a paper For More style: check http://www.zotero.org/styles http://www.zotero.org/styles

30 30 Numbering References (1) When writing a paper, we may not start from the introduction section. When writing a paper, we may not start from the introduction section. Ex: Ex:

31 31 Numbering References (2) Numbering References in reference section: Numbering References in reference section: Cite in text: Cite in text:

32 32 Numbering References (3) More citation in Introduction section: More citation in Introduction section: F9 F9  

33 33 Figure, Table, Section We can apply the same method to number figures, tables, and sections. We can apply the same method to number figures, tables, and sections.

34 34 References [1]http://download.microsoft.com/download/whistler/ Install/2/WXP/EN-US/CmdHerePowertoySetup.exe [1]http://download.microsoft.com/download/whistler/ Install/2/WXP/EN-US/CmdHerePowertoySetup.exehttp://download.microsoft.com/download/whistler/ Install/2/WXP/EN-US/CmdHerePowertoySetup.exehttp://download.microsoft.com/download/whistler/ Install/2/WXP/EN-US/CmdHerePowertoySetup.exe [2] http://www.zotero.org/ [2] http://www.zotero.org/

35 35 Thank you very much. Q&A


Download ppt "1 Tips on developing a network simulator and writing a paper Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of."

Similar presentations


Ads by Google