节点文献

并行离散事件仿真可视化组件建模技术研究

Research on Component-based Visual Modeling Technology for Parallel Discrete Event Simulation

【作者】 刘刚

【导师】 姚益平;

【作者基本信息】 国防科学技术大学 , 计算机科学与技术, 2011, 博士

【摘要】 基于高性能计算机的并行仿真往往包含大量的实体,实体间存在错综复杂的交互,且这些实体模型往往涉及多个领域的专业知识,需要不同领域的专家分别开发,特别是由于知识产权保护等原因,这些模型往往需要以封装好的执行码形式提交给使用方,这就使得模型的组件化开发、封装标准和调试、组装技术变得尤为重要。然而,目前的组件化建模理论和方法要么没有考虑并行仿真事件驱动等特征,只适合于HLA等分布交互仿真系统,要么过于复杂,难以使用,从而使得并行仿真往往需要采用从上到下的集中式开发模式,存在开发效率低、模型间耦合度大、协调难,模型与仿真平台紧密绑定、难以实现平台间模型重用等问题,从而使得其难以适应大规模并行仿真应用发展的需要。因此,开展并行离散事件仿真可视化组件建模技术的研究对于实现仿真模型开发与使用的分离,满足专业模型由各领域专家分别开发的模式,提高模型重用性和应用的建模开发效率、促进我国复杂系统并行仿真应用的发展等具有十分重要的理论和实践意义。论文针对当前并行仿真组件化建模理论和技术存在的问题,对并行仿真组件建模形式化规范、仿真组件可视化建模技术、仿真组件建模及平台服务优化技术以及组件调试技术等进行了深入研究,主要工作和创新点如下:(1)提出了基于事件调度的并行仿真组件化建模范式。组件化建模范式是可视化组件建模的基础。现有的建模理论与技术要么不支持可视化建模、且时间同步开销大或者建模方式与仿真平台绑定,要么不支持复杂模型的递归分解、使用难度大,要么不支持并行仿真,难以满足大规模并行仿真应用在模型递归分解、分布式可视化开发、封装和快速组装,及平台间模型的重用等方面的需求。针对这一问题,论文将事件图(Event-Graph)范式与Zeigler等提出的并行离散事件建模规范PDEVS相结合,提出了基于事件调度的并行仿真组件化建模范式EDEVS。EDEVS继承了事件图范式以少量图元简洁高效地对事件调度关系进行建模的特点,吸收了PDEVS在层次化建模及模型自包含特性方面的优势,将PDEVS中的端口、状态变量及模型的递归定义方式引入事件图,使其支持层次化建模及模型的递归分解和组件化封装,从而可满足并行仿真在可视化组件建模方面的需求。(2)提出并设计了基于EDEVS的图形建模语言。支持组件建模的图形描述语言是实现可视化组件建模的前提。事件图建模语言能够利用事件、事件调度、取消调度等有限的几个图元简洁、直观地表达离散事件系统中事件之间的关系,然而目前尚未提供描述模型组件化特征的有效图元,因而不能支持组件化建模。针对这一问题,论文对事件图进行组件化改造,提出了基于EDEVS的图形建模语言,该语言将模型涉及的事件分为三类:仅自身可见的内部事件、外界可触发的输入事件以及可触发外界事件的输出事件,通过引入与三类事件相对应的输入端口、输出端口及内部端口等建模图元,实现了分布式、层次化、组件化及可视化建模,提高了EDEVS组件建模及组装的直观性和效率。(3)提出了基于事件旁路的事件转发优化算法。组件之间的事件转发效率是影响组件应用效率的主要因素之一。EDEVS耦合组件采用直连式端口连接构造方式,将输入端口接收到的事件转发给子组件,自身不提供事件处理逻辑。而耦合组件往往层次复杂,事件从最外层耦合组件进入到最内层原子组件往往要经过多次的输入端口转发,反之亦然,这种转发消耗了大量不必要的执行时间。针对这一问题,论文提出了基于事件旁路的事件转发优化算法。该算法利用事件转发路径皆由输入端口到输入端口、或输出端口到输出端口、或前段是输出端口到输出端口、后段是输入端口到输入端口的连接构成之规律,从端口之间的连接关系中找到事件转发旁路,使耦合组件与其内原子组件之间的事件转发得以沿旁路一步到达,从而可有效提高事件调度效率。测试表明,经算法优化后的耦合组件事件转发时间基本不受组件耦合层次的影响,接近于原子组件之间的事件调度时间。(4)提出了面向组件实例的断点设置算法及事件驱动的组件逻辑跟踪算法。组件调试是组件从建模到封装过程中不可或缺的一个环节。EDEVS组件相对于仿真应用的独立性、层次结构的复杂性及组件间的并发性等特点,使得组件调试过程中的Bug发现及定位异常困难,而现有的并行离散事件仿真调试工具皆未考虑上述特点,致使组件的调试过程往往陷入仿真引擎的执行逻辑而无法关注组件自身的逻辑。论文针对这一问题提出了面向组件实例的断点设置算法及事件驱动的组件逻辑跟踪算法。算法通过在组件容器中设置组件诊断模块,并让该模块监控事件的处理过程,将诸如事件将被处理与事件处理完毕等信息反馈到调试器,使调试器能够针对组件实例动态地设置断点,并屏蔽仿真引擎的执行逻辑,从而可让用户得以专注于组件自身执行逻辑的调试,提高了调试效率。在上述研究成果的基础上,论文基于课题组研制的YH-SUPE并行离散事件仿真引擎设计实现了基于EDEVS范式的组件建模框架VISICOM;并基于该框架进行了突发公共事件条件下的民意趋势模型应用测试,结果表明:与YHSUPE建模工具从上到下的集中式开发模式相比,VISICOM的可视化、分布式及组件化建模方式在开发模式、开发效率和易用性上具有较大的优势,且基于其建立的仿真应用具有良好的运行效率。

【Abstract】 Parallel simulation usually runs on high performance computer and often consists of large numbers of simulation entities. Modeling these entities always need knowledge of multi-domain, thus demand the cooperation of specialists from different fields. Due to the issue of intellectual property rights, these models should be encapsulated before shipped to users. This makes component-based development, encapsulation and assembly techniques highly important. However, current component-based modeling theory and method either neglect the event-driven characteristic of parallel simulation, thus only suitable for distributed interactive simulation systems such as HLA, or too complicated for implementation. As a result, the development of parallel simulation models often takes a top-down and centralized mode. Thus, the model development of parallel simulation suffers from low-efficiency, highly coupled and platform-dependant characteristics. Thus, it is hard to achieve the aim of high-efficient distributed model developing, encapsulation and assembly and inter-platform model reuse. Thus, the research of visual-component based modeling techniques are very important for the separation of model development and model use, which is the key issue to fulfill the aim of“domain models are developed by specialist with the same domain knowledge”. The dissertation aims at providing component-based modeling techniques, which support visual modeling, hierarchical model decomposition, for large-scale parallel simulations, including component-based modeling formalism, visual model techniques, modeling and simulation optimization techniques for component-based modeling and simulation and component debug techniques. The innovations of this paper are as follows:Firstly, a component-based event-driven modeling formalism called EDEVS is proposed. Current component-based modeling theory and method either neglect the event-driven characteristic of parallel simulation, thus only suitable for distributed interactive simulation systems such as HLA, or too complicated for implementation. As a result, the development of parallel simulation models often takes a top-down and centralized mode. Thus, the model development of parallel simulation suffers from high development-threshold, low-efficiency, highly coupled and platform-dependant characteristics. To solve these problems, Event-Graph formalism and PDEVS formalism are integrated to form the component-based EDEVS formalism. EDEVS takes advantage in supporting the modeling of event-scheduling relationship using a few graphic elements. EDEVS also support hierarchical decomposition and composition of models.Secondly, an EDEVS graphic modeling language is proposed. Event Graph supports the modeling of event-scheduling relationship using a few graphic elements, but lacks of the supporting of component-based modeling technique which makes its model hard to be encapsulated and reused. To solve this problem, events are sorted into three classed: inner events, input events and output events with inner events being private to models, and the corresponding graphic modeling elements are introduced to form EDEVS based graphic modeling language.Thirdly, an event-schedule bypass algorithm is proposed. The construction of EDEVS coupled model is based on port interconnections. Coupled model itself does not have any event handling logic, thus when receives an event, it pass the event to its subcomponents until the event reaches an atomic component. Thus, events have to travel a long way to reach an atomic component, if the hierarchy is deep, wasting a lot of time. To solve this problem, an event scheduling bypass algorithm is proposed. The bypass algorithm find event passing routes in coupled models by analyzing input port to input port and output to output connections, and substitute it with bypasses, thus events received by coupled models can be passed to atomic models directly.Fourthly, component instance oriented breakpoint-setting algorithm and event-driven logic tracing algorithm are proposed. EDEVS components are independent of simulation applications. Their complex hierarchical structure and parallel execution nature make bug locating and debugging procedure very complicate. However, existing parallel discrete event simulation debugging tools overlook the above characteristics, results in a very time-consuming debugging procedure. To make it worse, their debugging process usually trapped in the logic of simulation engines, distracting users from focusing components’own logic. To solve this problem, a component instance oriented breakpoint-setting algorithm and event-driven logic tracing algorithm are proposed. The two algorithms interact with component instances by creating a debug module in the component container. Using the information of the component instances, such as“event is going to be handled”or“event has been handled”, the algorithms are able to set breakpoints dynamically according to component instances and keep the debug procedure out of the simulation engine’s logic.Finally, an EDEVS component-based visual modeling framework called VISICOM is implemented. VISICOM is built upon YH-SUPE PDES engine. To test VISICOM’s modeling efficiency, a simulation application to forecast the trend of public opinion under critical condition is reimplemented using VISICOM. The comparison of modeling and runtime efficiency between the old version and the new version of the application shows VISICOM framework has achieved the aim of high-efficient distributed model developing, encapsulation and assembly and inter-platform model reuse and the runtime performance of VISICOM based simulation is well.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络