基于WindowsNT下实时仿真支撑软件及教练员软件的开发
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
计算机仿真培训系统是以计算机仿真为基础的人—机实时仿真系统。目前在电力、核能、交通和石油工业等领域有较广泛的用途。但是,在开发大型、复杂、模型逼真度高的仿真系统时,如全任务飞行模拟器、轮机仿真模拟器等,系统的软件开发和集成的工作量是十分庞大的。为了提高开发效率、缩短研制周期,同时保证软件系统的可靠性,必须创建一个良好的软件开发环境。本文即为适应这种需求,以Windows2000操作系统为开发平台,在Visual C++6.0环境下开发了一套适用于开发仿真培训系统的一体化仿真环境——基于WindowsNT下的实时仿真支撑软件。
     本文首先介绍了一体化仿真环境的基本框架,以此框架为基础,根据实时仿真支撑软件的特点,采用面向对象软件工程方法,设计了本实时仿真支撑软件的结构。然后根据实时仿真支撑软件的结构,利用WindowsNT的多任务机制,以目前最流行的面向对象的程序设计思想,进行了WindowsNT下并发程序的设计,采用三个进程和多个线程,以互斥信号量为同步对象,在共享同一个实时仿真数据库的前提下,协调完成仿真支撑软件的各项任务。接下来介绍了构成仿真支撑软件的几个关键部分:实时仿真数据库、建模与模型调度、教练员与工程师工作站和实时通讯。
     实时仿真数据库是本文的重点,也是开发实时仿真支撑软件的关键。通过对各种仿真数据的分析,根据各仿真数据的特点,分别以文件系统、传统数据库和内存数据库进行存储。对于要实时更新的变量存储在内存数据库中,以保证系统运行的实时性。内存数据库利用动态链接库和内存映射文件加以实现。
     建模与模型调度中,利用面向对象的建模方法,建立系统的树状层次模型库,供模型调度程序调度。模型调度程序采用基本步长调度原理对模型实时调度。
     教练员与工程师工作站中各个功能的实现都采用了面向对象类的概念,根据功能的划分,封装成不同的功能类。各个功能类之间通过实时仿真数据库相联系。
    
     基于WindowsNT下实时仿真支撑软件及教练员软件的开发
     实时网络通讯采用了目前流行的基于TCP/IP协议的Winsock套接字进
    行了设计,实现了仿真主机与接口机和仿真主机与各个监控机之间的实时通
    讯。
     本实时仿真支撑软件是一个完整的支撑实时仿真开发、调试、运行和维
    护的大型软件平台。初步通过了绞吸式挖泥船疏浚作业仿真器的测试,运行
    状况良好。
The computer simulation training system is a man-machine interface realtime simulation system based on computer simulation technology. It is widely used in many fields, such as electric power, nuclear energy, traffic, petrochemistry and so on. It is a large amount of work to develop a large, complex high-fidelity simulation system, for example the full-tasking Flight Simulator, the Marine Engine Simulator. In order to improve efficiency, reduce the construction cycle and insure the reliability of the software system, the software integration environment must be well-established. To solve these problems, the author, taking the universal operating system of WindowsNT as the working platform, develops a set of integrative simulation environment for simulation training system development-a real-time simulation support software based on WindowsNT in the environment of Microsoft Visual C++ 6.0.
    The present thesis first introduces the basic framework of integrative simulation environment. Based on the framework, utilizing the Object-Oriented Technique, the configuration of real-time simulation support software is designed according to the characteristics of a real-time simulation support software. Based on the configuration and the mechanism of multitasking in WindowsNT, the software concurrent program is designed, including three procedures and multithreading, taking mutex semaphores as synchronization objects, to accomplish concertedly the simulation support software's tasks in terms of sharing one and the same real-time simulation database. And then the thesis introduces several key parts of software, the real-time database, the modeling and model scheduling, the instructor and engineer workstation, and the real-time communication.
    The real-time database is the key in developing the real-time simulation support software. According to the characteristics of simulation data, it is stored in the file system, traditional database system and the EMS memory database system respectively. In order to insure that the system runs in real time, the data that need be updated frequently is stored in EMS memory
    
    
    
    database system. The EMS memory database system is realized by DLL and FileMaping.
    Utilizing the Object-Oriented Technique in agreement with the idea of modern software engineering as the way of modeling, a tree-form layer model base is established which is scheduled by model scheduling program. The model scheduling program schedules the model adopting base step scheduling principle.
    All kinds of functions of the instructor and engineer workstation adopt object-oriented concepts and are encapsulated into different function classes. All classes are contacted through the real-time simulation database.
    The real-time network communication program adopts Winsock based on TCP/IP. The program realizes real-time communication between the main simulation computer and I/O computer and that between the main simulation computer and any monitor computer.
    The real-time simulation support software is a large software platform that supports the simulation program development, debugging, running and maintenance. It has been tested by dredger simulation training machine and is running perfectly.
引文
[1] 王慧刚.计算机仿真原理及其应用.国防科技大学出版社.1994.1~14
    [2] 游景玉.实时仿真技术及其应用.珠海出版社.1997.1~39
    [3] 黄柯棣.系统仿真技术.国防科技大学出版社.1998.177~218
    [4] 何江华.计算机仿真导论.科学出版社.2001.1~10
    [5] 王恒霖 曹建国.系统仿真的发展沿革与展望.系统仿真学报,1997年第9卷第1期:1~7
    [6] 方可燕,张双民,徐振明.VisualC++实战与精通.清华大学出版社.2000.
    [7] 熊光楞,彭毅.先进仿真技术与仿真环境.国防工业出版社.1997.26~52,84~97
    [8] [美]David A.Solomon著,北京博颜科技发展有限公司 译.WindowsNT技术内幕(第二版).清华大学出版社.2000
    [9] 肖章权 高孝洪.现代轮机仿真训练器及其仿真技术发展.99全国仿真技术学术会议,1999年:37~40
    [10] 王行仁.建模与仿真的回顾及展望.系统仿真学报.1999年10月第11卷第5期:1~10
    [11] 徐晓刚 高兆法 王秀娟.“sual C++ 6.0入门与提高.清华大学出版社.1999.323~342
    [12] 徐庚保.系统仿真的过去、现在和未来.计算机仿真,1998年7月第15卷第3期:2~5
    [13] 杨明等.面向对象的建模技术开发大型培训系统的一种方法.计算机仿真,1997年12月第9卷第4期:19~24
    [14] 陈建春.Visual C++高级编程技术——开发实例剖析.电子工业出版社,2000
    [15] 蔡皖东.计算机网络技术.西安电子科技大学出版社,1998
    [16] 武汉交通科技大学轮机仿真中心.WMS_1型轮机仿真训练器技术报告汇编.1996年12月.1~30
    [17] 程芳真,高琪瑞,吕崇德,蒋滋康.基于Windows平台的仿真支撑系统的研究.系统仿真学报.2001年3月第13卷第2期:192~194
    [18] 张聪师,王兵树,马永光,等.基于Web的在线实时仿真支撑环境研究.系统仿真学报.2001年7月第13卷第4期:462~465
    
    
    [19] 吴重光.仿真技术.化学工业出版社.2000.115~168
    [20] 章晓明,王扬.一体化仿真支撑软件PROSIMS.计算机仿真.2000年1月第17卷第1期:64~67
    [21] 余凯,赵长安,李劲松.Windows98环境下实时控制系统的开发.计算机应用研究.2001年6月:116~119
    [22] 高惠敏,曾建湖,等.基于Winsock的网络通信程序设计.99全国仿真技术学术会议论文集.1999.248~250
    [23] 赵黎明,赵刚.Windows95/98环境中并行程序设计.计算机应用.2001年1月第21卷第1期:86~88
    [24] 廖良才,陈英武.实时仿真器设计与实现.计算机仿真.2001年3月第18卷第2期:80~82
    [25] 石章松,张洪向.Winsock在C~3I系统分布式仿真中的应用.计算机应用研究.2001年6月:97~98
    [26] 周万宁,陈丹东.Windows98/2000编程实例详解.电子工业出版社.1999.2~5,14~25
    [27] 张云生.实时控制系统软件设计原理及应用.国防工业出版社.1998.58~82,105~155
    [28] 刘强,冯德群.面向对象仿真.99全国仿真技术学术会议论文集.1999.45~47
    [29] 汪翔,袁辉.Visual C++实践与提高——网络编程篇.中国铁道出版社.2001.1~49,75~156
    [30] 葛海燕,钟崴,等.化工过程控制仿真培训系统的开发范式.计算机工程与应用.2000年5月:183~185
    [31] 李洪儒 冯证声.面向对象仿真的基本概念框架研究.计算机仿真,2000年9月第17卷第5期
    [32] 张国峰.C++语言及其程序设计教程(修订版).电子工业出版社.1997.1~80
    [33] David J.Kruglinski著.Visual C++技术内幕(第五版).北京希望电子出版社 1999.27~546
    [34] 北京希望电脑公司.Visual C++ 6.0编程高手.北京希望电子出版社.1999,1~54
    [35] 张俊星,魏玉东.开放式工控实时数据库的设计.计算机应用.2000年3月.18~22
    [36] 周德兴,孟晓风.实时系统软件设计方法.计算机自动测量与控制.2000.8(4).4~6
    [37] 宫民,王形仁,等.基于模型库/数据库的面向对象仿真环境框架.系统仿真学报.2000年11月第12卷第6期.656~659
    
    
    [38] 刘杰,宫民.一种面向对象/基于网络软件开发集成环境.系统仿真学报.2000年9 月第12卷第5期.484~486
    [39] Bennett S.Real-Time Computer Control Prentice Hall. International(UK)Ltd.1998
    [40] Paul J.Fortier.Database System Handbook.PUBLISHING HOUSE OF ELECTRONICS INDUSTRY.199948-249
    [41] Auslander D M,Tham C H.Real-Time Software for Control:Program Examples in C.Prentice Hall.Int,1990
    [42] Robert D.Thompson.The MFC Programer's Referrence.Ventana Comunication Group.1998. 330-382
    [43] Wang WeiPing.Objected-Oriented Multimedia Simulation models.A Reserch Prototype.Proceeding of SCSS,1994
    [44] Stroutrop Publishing.The C++ Programming Language,second edition Addiso-Welsy.Reading MA 1991. 122-188
    [45] Zeigler B P.Object_Oriented Simulation With Hierachi,Modular Models.London.Academic Press.1990
    [46] Eugene Olafsen Kenn Scribner K.David White.MFC Programming With Visual C++ 6 Unleashed.Sams Publishing.1999. 136-143
    [47] Oren T I,Zeigler B P.Concepts for Advanced Simulation Methodologies. Simulation,1979,32(3)
    [48] Chuck Wood.OLE DB AND ODBC DEVELOPER'S GUIDE.Publishing House of Electronics Industry,2002. 469-506

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700