⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 topo_gen基于NS2的场景自动生成软件源代码
💻
字号:
//// topo_gen  : Topology Generator for Simulation of Directed Diffusion// author    : Fabio Silva// updates   : Fred Stann//// Copyright (C) 2001-2005 by the University of Southern California//// The topo_gen source is free software; you can redistribute it// and/or modify it under the terms of the GNU General Public License,// version 2, as published by the Free Software Foundation.//// topo_gen source is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License along// with this software; if not, write to the Free Software Foundation, Inc.,Topo_gen is a handy way to generate sensor network topologies with random node placement for simulation experiments that run Directed Diffusion. Topo_gen will generate either EmSim ".sim" files or ns2 topology files. Numerous parameters are configurable such as: number of nodes and node density.Say, for example, a user wants to experiment with changing density and Push diffusion. They could increase the node count while maintaining the same simulation area. They might generate 10 random topologies at each density in order to do statistical averaging.  Or perhaps a researcher wishes to run One-Phase-Pull diffusion with and without his/her custom filter. Topo_gen can generate two EmSim sim files or NS-2 tcl files for each randomly generated topology, one that specifies the custom filter and one that doesn't. Topo_gen can also generate a simple location file, useful for viewing your topology with gnuplot or any other tool.Most of the parameters are specified on the command line (displayed by typing "topo_gen"), however several variables are set by the user in the topo-gen.hh file. Here is a sample set of user specified constants in the include file:// User Defined Constants#define CUSTOM_FILTER_NAME "rrd"#define COMMUNICATION_RANGE 11.5#define EXPERIMENT_RUN_MINUTES 30#define EXPERIMENT_RUN_SECONDS 0#define SIM_RADIO_MODEL "norm_noise"#define SIM_RADIO_POWER 2 // User Defined Locations of EmSim ".run" files// These must be created/modified by the user. Topo_gen will only generate the simulation file// (containing node positions, and information about which nodes are sinks, sources, etc...).// The ".run" files should include what components (filters and/or other programs) associated with sink, source,// and other nodes. For examples, please refer to the sample .run files included in this release.// Samples of ".run" files are included in the "tabs" directory of this release.// Also, you must specify file locations relative to the directory from which you run emsim.#define TPP_DEFAULT_TAB "../link/diffusion/tppdefaulttab"#define TPP_SOURCE_TAB "../link/diffusion/tppsourcetab"etc...Definitions:CUSTOM_FILTER_NAME - If you want to generate a second topology file with a custom filter, this is the name of the filter.COMMUNICATION_RANGE - This specifies the communication distance in meters that you define as connected.EXPERIMENT_RUN_MINUTES - For EmSim, this specifies the simulation minutes.EXPERIMENT_RUN_SECONDS - For EmSim, this specifies the simulation seconds.SIM_RADIO_MODEL - For EmSim, this specifies the error model.SIM_RADIO_POWER - For EmSim, this specifies the radio power.TPP_DEFAULT_TAB - For EmSim, all the "TAB" defines specify the locations of your runtab files.Notes:If there is specific text that needs to be added or deleted to/from your runtab or tcl files, you must modify the topo_gen source or edit the files generated by topo_gen. Although we have attempted to make topo_gen fairly generally, it was created to facilitate particular sets of experiments. As such, it may lack features required by other lines of research.File names may be specified by the user or generated automatically by topo_gen. Automatically generated file names have the following fields separated by dashes:topo                // Common prefixdiffusion_algorithm // tpp, opp, or pushnumber_of_nodes     // total node countnumber_of_sinks     // how many sourcesnumber_of_sources   // how many sinksposition            // Code indicating placement of sources and sinksrun                 // which run this file isOptionally the send rate can be displayed in the file name.The source code for topo_gen is in the "build" directory. A Makefile is provided.Sample source and sink applications are included in the "apps" directory. You must integrate them into your diffusion source tree and generate a Makefile.Notes for EmSim users:Included in the samples of ".run" files in the "tabs" directory are examples of runtabs that run a custom diffusion filter.The tpp runtabs may also be used to run PUSH (see the diffusion API doc).Notes for NS-2 users:Topo_gen simply generates the "topology_file" that is referenced by your primary ns-2 tcl script. Examples of diffusion ns-2 scripts can be found in the ns-2 release in "ns-2/tcl/test/". The command line switches in topo_gen that specify the diffusion algorithm only affect file names when generating ns-2 tcl files. To use a particular diffusion algorithm, your primary tcl file must use the "node-config" command with the "-diffusionFilter" switch set to the desired algorithm.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -