core包:
Contains core classes and interfaces of the simulator. Almost all of these classes are needed for every run of the simulator. DTNSim is the main class of the program. It starts up a proper user interface which in turn starts the simulation. @see ui.DTNSimUI
包含模拟的核心类和接口。运行模拟几乎需要所有这些类。
DTNSim是程序的主类。它启动合适的用户接口,依次开始模拟。
相关看ui.DTNSimUI
core.DTNSim
功能:Simulator's main class仿真的主类,仿真的起点。
1. 根据命令行的参数,决定仿真的模式和次数。(批处理模式或GUI模式)
2. 在批处理模式下:用
core.Settings.setRunIndex设置配置参数,重置所有注册类后,用
new DTNSimTextUI().start()创建新的对象,开始仿真。
3.在GUI模式下,调用
core.Settings.setRunIndex设置配置参数,用
new DTNSimGUI().start()创建仿真对象,开始仿真
outline:
意义
:
属性
BATCH_MODE_FLAG= "-b" --
(如果运行时有-b,则进入批处理模式,使用Text UI)
RANGE_DELIMETER = ":" --
(批处理模式指引值范围的定界符)
RESET_METHOD_NAME = "reset" --
(所有可重调的类必须有的静态方法名称)
private static List<Class<?>> resetList = new ArrayList<Class<?>>() --
在批处理运行时需