350 likes | 573 Views
Tcl/Tk in Survivability Modeling for Military Systems. 8 th Annual Tcl/Tk Conference 29 July 2001. Ronald A. Bowers Robert G. Parker Paul J. Tanenbaum U.S. Army Research Laboratory Survivability/Lethality Analysis Directorate. What We Do.
E N D
Tcl/Tk in Survivability Modelingfor Military Systems 8th Annual Tcl/Tk Conference 29 July 2001 Ronald A. Bowers Robert G. Parker Paul J. Tanenbaum U.S. Army Research Laboratory Survivability/Lethality Analysis Directorate
What We Do • Our mission is to analyze the survivability of Army systems against a wide variety of threats, including ballistic threats such as bullets, missiles, and bursting artillery rounds, as well as electronic, chemical, and biological threats. • Testing is very expensive and can be dangerous; therefore, we use modeling extensively. • For ballistic threats, the primary analysis model is a program called MUVES. • Ballistic analysis requires knowledge of the target geometry, which is captured using a tool called BRL-CADTM.
CSG Boolean Operations (wedgeÇ block) -cylinder wedge cylinder block wedgeblock-cylinder block- (wedge cylinder)
BRL-CAD Software Libraries libbnNumerical computation, quaternions, wavelets, ... libbu Utilities: memory mgmt, parallel processing, ... libdmDisplay manager: X, OGL, PostScript, ... librt Ray tracing libpngPNG libzData compression libtclTcl libtkTk libitcl [incr Tcl/Tk] and [incr Widgets]
Object Orientation • Initially we packaged instances of library objects as Tcl commands. tclsh> wdb_open db scene.g db tclsh> db ls LIGHT cone.r/R light.r/R tor.r/R all.g/ cone.s platform.r/R box.r/R ellipse.r/R platform.s box.s ellipse.s tor
Object Orientation • Now we are wrapping those objects in [incr Tcl] classes. itcl::class Db { protected variable db "" public variable dbfile "" constructor {filename} { set dbfile $filename set db [subst $this]_db wdb_open $db $dbfile } destructor {} { rename $db "" } public method ls {args} { eval $db ls $args } }
MUVES • MUVES is a tool for vulnerability/lethality analysis—stochastic and deterministic—of ballistic threats against ground and air systems. • MUVES consists of 410,000 lines of C code, including graphical user interface and general-purpose packages.
Pcd/h v v m MUVESinputs & outputs Target geometry Behind-armor debris Criticality analysis Impact conditions MUVES Personnel data Residual penetration Personnel incapacitation Component damage Subsystem capabilities Remaining system utility User-defined criteria Threat characterization . . . Component vulnerability
A Ray-Tracing Application: Shotlining fan rear armor transmission sump starter engine fire wall HE round armor-piercing rounds glacis armor
DMUVES • DistributedMUVES (DMUVES) is an enhancement to MUVES that enables an analysis to be run in parallel on a single computer and distributed upon multiple networked computers.
raytracer raytracer raytracer raytracer The Original MUVES Architecture View File Threats File Other Input Files Ray Requests BRL-CAD Target Description Analyzer Pipe Ray Results Final Results File Run times were horrific, but converting the analyzer into a multithreaded application was deemed too costly.
The DMUVES Approach Workers MUVES GUI Host B daemon Boss daemon Host C Input Files Host A
The Use of Tcl in DMUVES The daemon is written entirely in [incr Tcl]. Boss daemon Task Manager daemonIf Worker Tcl scripts over sockets workerIf Results Manager Tcl Event Handler The workers also use Tcl event handlers to monitor their socket connections. Final Results File
MUVES System Evaluation Braking controls Brake pedal lever Brake control rod Brake crank Syncro mechanism Syncro brake rod Brake control rod (right) Syncro brake crank Brake control rod (left)
Lessons Learned • Developing portable GUIs is far easier with Tcl/Tk than with other packages such as Java Swing, MFC, Motif, Athena, and raw X. • Use [incr Tcl/Tk]. • Get Tcl/Tk training early.
Plans • BRL-CAD • Gradually replace first-generation Tcl code with [incr Tcl]. • Implement object-oriented geometry? • MUVES • Wrap additional MUVES functions. • Continue transitioning tools from X to Tk. • Replace ASCII boss-to-worker messages with binary. • Add additional boss and worker tasks, including tasks expressed in Tcl. • Couple MUVES parameters to Tcl variables.