Five Things You Didn't Know You Could Do with Ruby - ' Advanced Simulations ' (
Page 5 of 6 )
Troubleshoot the Space Shuttle Disaster, and Perform Other Advanced Simulations
Programmers around the world are using Ruby in computer simulation. At UC Berkeley, Joel VanderWerf reports that Ruby is getting heavy use in simulations, "specifically visualization of vehiclular traffic and ad-hoc mobile wireless networks." The research will have such applications as evaluation of collision avoidance systems, adaptive cruise control, and statistical studies of traffic flow and density.
At SmartHaus in Norway, Jon Egil Strand reports implementing a mathematical simulator for hardware reliability analysis and MTBF (Mean Time Between Failure) computation. They found Ruby to be "a very expressive RAD tool," enabling the team to create this application in a total of three man-days. "Engineering time for MTBF calculations were slashed by 90%, giving a major qualitative, not only quantitative, improvement," Strand said.
Ruby has been used as a domain language in the area of hardware design and simulation. Phil Thomson's RHDL, based on the widely-known VHDL, is a good example. At least one team at Motorola has been doing similar work. Stephen Hill reports, "We use Ruby to script around a simulator, both to generate scenarios, and to post-process the data. The whole thing is pretty flexible, and it was all very easy to write."
But among the most exciting uses of Ruby is the ongoing work at NASA's Langley Research Center. When Bil Kleb was asked, "What does NASA use Ruby for?" his first reply was, "For everything we can."
Kleb is employed at NASA Langley as an engineer working in computational methods, traditionally the domain of Fortran, C, and C++ programs. But now this number-crunching can be wrapped in a modern object-oriented language for ease of programming. Besides pure numerical applications, this team has used Ruby to generate code in C and Fortran (as well as to analyze and refactor it automatically); to create Web sites; to do Beowulf cluster monitoring; and many other tasks, ranging in scope from tiny to huge.
Specifically, Ruby was used in part of the research into the accidental destruction of the space shuttle Columbia, which disintegrated on re-entry in early 2003.
In that sense, the language has played a non-zero role in getting the shuttle program off the ground again.