System modeling and simulation with python

Document Type

Conference Proceeding

Publication Date

12-1-2008

Abstract

Instead of using high-level simulation languages, we present Python, VPython and Pygame as the platform in teaching System Modeling and Simulation [2]. Python [3], VPython [4] and Pygame [5] are public domain software with freely available software codes that can be installed in computers running any one of the Windows, Linux/Unix and Macintosh(X11 or OSX) operating systems. We present three small projects: (1) A stochastic generator, Linear Congruential Generator (LCG), for generating uniformly distributed random numbers [2]; (2) A simulation project of Time-Driven-System which is a model of an electrical resistive network system [2]; and (3) a simulation project of Event-Driven-System which is a factory conveyor system [2]. All three are developed using the general procedural programming method in Python [1], and the 3-D graphic capability of VPython. We also present a semester long project that uses object oriented programming method to create animation of dynamic object, an airplane, flying in sky to and from cities over the maps of the USA continent or the State of North Carolina. Finally we use features in Pygame to play musical melodies composed by, and in the time interval prescribed by user. Copyright © 2008 by the International Institute of Informatics and Systemics.

This document is currently not available here.

Share

COinS