Text and supporting code for Modeling and Simulation.