Ross School - Senior Project 2007-08
Mentor: Urban Reininger
Title: Dynamic Modeling with Java
The goal of this project was to gain more knowledge and experience in the field of computer science through the conception, design, and implementation of a small program. I managed to integrate my interest in biology to make the final product be a scientific application to aid in the process of dynamic modeling. My only starting point was a foundation in the Java programming language, thus I had to research many aspects of software creation, including Object Oriented Analysis and Design and the Unified Modeling Language. Using these processes, I was able to adequately plan, code, and revise the distinct features of the program, which include mathematical graphing, mathematical parsing, data visualization, and a graphical user interface. Dynamic modeling is the process of mathematically representing the state of a system (e.g. a population) over time and is of increasing importance in understanding complex issues across many fields. For my model I chose to study and adapt a known insect population model to the data of population that I researched.
Computer science has been one of my hobbies for about the past five years, so the general direction of this project did not surprise me. In the beginning though, I did not have any focused ideas until I had a meeting with Urban Reininger and Sean Carmichael in the spring. They helped me to narrow down my ideas and led to me seeking an interdisciplinary project in either math or science. The concept of dynamic modeling had been mentioned and eventually I settled upon using it for my project. Dynamic modeling is the process of defining and observing a system over time. That is, for example, if I know the size of a population in 2005 and how exactly the population is going to change each subsequent year, then I can determine the size of population after one year, five years, twenty years, and so on. To do this modeling I decided to use Java, a computer technology and programming language.
After deciding upon the project, my initial goals were to find a data set to model and then create a small computer program or simulation to share that model. During the summer, however, I ran into some problems getting a data set, so I decided to change the project. I was going to a larger, more general program capable of handling any model the user wished to create and one the side I was going to create my own model when I eventually had some data. This was exciting change because I had never created a program of this scale before and it really allowed me to expand upon and draw from everything that I had learned. In order to realize these goals I had to do a fair amount of research in both software design, which is basically intensely structured planning, and the dynamic modeling process.
By late summer, I had finally obtained a data set from Brookhaven National Lab with help from Dr. McGuinness, but I did not have any time to really study it because I had already started planning my program. I wrote a mock customer request for my program, wrote down a list of the requirements and main features, and began to plan and implement each of those features one by one. First, I implemented a basic coordinate graphing system and at this point I was having quite a few problems because I was inexperienced in graphics coding and I was not doing sufficient planning and analysis before writing the code. Thus, when I started over again using the correct approach I learned the importance of careful software design. The next feature, a tool for reconstructing user input into math statements, took the longest to plan and taught me to always be ready for change in programming. The last two features were a graphical model visualizer and a user interface. Both of these required a few weeks of research and intricate planning.
The modeling aspect of the project turned out to be a last minute item. In late November, due to time constraints and certain problems with my data set, I changed the project again. Instead of creating my own model, I was going to share one that I had researched. After researching population models in December, I adapted an insect model from gypsy moth data that I obtained online.
Even though my goals changed throughout, I was able to accomplish quite a bit with this project. I had the opportunity to create my own software and to improve my programming knowledge and problem solving skills. I also got the chance to learn the essential skill of dynamic modeling. Math modeling has always been an important tool for understanding the world and dynamic modeling has arguably been the most useful type. Not only can it be applied to all fields of study, but it also provides the most direct relationship between what we study and out actual surroundings.
Barker, Jacquie. Beginning Java Objects: From Concepts to Code. New York: Apress, 2005. This book served as a refresher of my Java knowledge and reinforced the OOA&D design principles.
Braun, David, Jeff Sivils, Alex Shapiro, Jerry Versteegh. “Unified Modeling Language Tutorial.” Class Diagrams. Kennesaw State University. 2000. Viewed 05 Oct. 2007 <http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/class.htm>. Useful overview on the creation and use of UML diagrams. I used this site to make sure the format of my diagrams was correct.
“Developer Forums: Algorithms – Equation Parsing.” Sun Developer Network. 2004. Viewed 10 Nov. 2007. <http://forum.java.sun.com/thread.jspa?threadID=506162&messageID=2399163>. This forum discussion helped me solve a problem with my own algorithm for equation parsing.
“Developer Forums: Swing [Archive] - JTable-select all/deselect all Menu ?.” Sun Developer Network. 2004. Viewed 08 Jan. 2008. <http://forum.java.sun.com/thread.jspa?threadID=533392&messageID=2574252>. I applied the code discussed in this forum entry to my own GUI components.
Eck, David J. “Introduction to Programing using Java, 5th ed.” Department of Mathematics and Computer Science, Hobart and William Smith Colleges. 2007. Viewed 19 July 2007. <http://math.hws.edu/javanotes/>. Free, online textbook that I used to review some of the Java collection classes. I also adapted some of the code from this book in the creation my program.
Ellner, Stephen P. and John Guckenheimer. Dynamic Models in Biology. Princeton, New Jersey: Princeton University Press, 2006. A more advanced introduction to dynamic models using calculus that provided me with insight into the modeling process itself.
“Enums.” Java Software: Sun Microsystems Inc. 2004. Viewed 10 Oct. 2007. <http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html>. Reference page that helped me learn a Java feature that I used in mathematical parsing part of my program.
Eubanks, Brian D. Wicked Cool Java. San Francisco: No Starch Press, 2005. A good overview of open source solutions to a variety of problems. Helped me with my data visualization code.
Goyvaerts, Jan. Regular Expression Advanced Syntax Reference. 14 Oct. 2006. Viewed 27 Dec. 2007. <http://www.regular-expressions.info/refadv.html>. This reference helped me in the creation of the regular expressions in my program.
Hannon, Bruce and Matthias Ruth. Modeling Dynamic Biological Systems. New York: Springer, 1999. This book helped me in tow ways. First, it provided a history and description of the implications of modeling. Second, it detailed the process of modeling in the context of a different piece of software, Stella, and provided me with numerous example models.
“Java 2 Platform Standard Edition 5.0 API Specification.” Sun Microsystems, Inc. 2004. Viewed Fall-Winter 2007-2008. <http://java.sun.com/j2se/1.5.0/docs/api/>. The official reference for the Java language.
“Java Collections Framework – Version 3.2 Download. Apache Commons. 2007. Viewed 27 Nov. 2007. <http://commons.apache.org/downloads/download_collections.cgi>. This is where I downloaded the Apache framework necessary for JUNG.
“Java Universal Network/Graph Framework – colt-1.2.0 Download.” Sourceforge.net 2007. Viewed 27 Nov. 2007. <https://sourceforge.net/project/showfiles.php?group_id=73840>. From this site I downloaded the Colt scientific library files. Colt is an open-source project developed by CERN, the European Organization for Nuclear Research, and is required by JUNG.
“Java Universal Network/Graph Framework – jung 1.7.6 Download.” Sourceforge.net. 2007. Viewed 27 Nov. 2007. <https://sourceforge.net/project/showfiles.php?group_id=73840>. From this site I downloaded the JUNG framework files.
“JUNG API Documentation (Javadoc).” JUNG: Java Universal Network/Graph Framework. 2007. Viewed 25. Nov. 2007. <http://jung.sourceforge.net/doc/api/index.html>. Javadoc pages containing thorough listings and descriptions of all classes and interfaces in the JUNG framework. Indispensable reference for writing my code.
“JUNG Manual.” JUNG: Java Universal Network/Graph Framework. 2003. Viewed 25 Nov. 2007. <http://jung.sourceforge.net/doc/manual.html>. Overview of the JUNG library, giving a basic description of its underlying structure. Reading this helped me to determine that the JUNG framework would be appropriate for my program. Also contains code snippets that served as a starting point for my own code.
McLaughlin, Brett D., et. al. Object Oriented Analysis & Design. Sebastopol, California: O'Reilly Media, 2006. I learned the design philosophy I used in the creation of my program from this book.
O'Shea, Donal. An Introduction to Dynamical Systems and Mathematical Modelling. Stony Brook: Research Foundation of State University of New York, 1992. A non-calculus and lucid approach to understanding the subject matter. Also gave me ideas for my evaluation algorithms.
Sharov, Alexai. Stage-dependent life-tables. 11 Jan. 1996. Viewed 10 Jan. 2008. <http://www.ento.vt.edu/~sharov/PopEcol/lec6/stagedep.html>. A helpful tutorial on life tables and the place where I go most of my gypsy moth data from.
Tarr, Jeff. “RE: code” E-mail to Adrian Trunzo. 25 Nov. 2007. My outside consultant's remarks upon first viewing my work. He gave me helpful feedback about documenting my project, but decided not to look at my code in-depth until it was more complete.
“Timeplot.” Simile. Viewed 10 Oct. 2007. <http://simile.mit.edu/timeplot/> A graph project hosted by MIT. I fashioned part of my graph feature off of this.
“Trail: 2D Graphics.” The Java Tutorials: Sun Microsystems Inc. 2007. Viewed 21 Aug. 2007. <http://java.sun.com/docs/books/tutorial/2d/index.html>. This tutorial served as an introduction to Java graphics programming for me. It covers fairly basic topics, yet provides a sufficient background in the graphics libraries.
“Trail: Creating a GUI with JFC/Swing.” The Java Tutorials: Sun Microsystems Inc. 2007. Viewed 18 Dec. 2007. <http://java.sun.com/docs/books/tutorial/uiswing/index.html>.
“Understanding the JUNG Visualization System.” JUNG: Java Universal Network/Graph Framework. 2005. Viewed 25 Nov. 2007. <http://jung.sourceforge.net/doc/JUNGVisualizationGuide.html> Tutorial that helped me learn how to use the graphics functions in the JUNG framework.
Varley, G.C., et. al. Insect Population Ecology: An Analytical Approach. Berkeley: University of California Press, 1973.
“Violet UML Editor – violetumleditor Download.” Sourceforge.net. 2007. Viewed 24 Aug. 2007. <http://sourceforge.net/project/showfiles.php?group_id=177682>. A small open-source program that I used to create my UML diagrams.
“Xerces Java Parser – Download.” The Apache XML Project. 2007. Viewed 27 Nov. 2007. <http://xerces.apache.org/xerces2-j/download.cgi>. Download site for another library required by JUNG.
Community Member (Details)
Jeff Tarr runs a technology consulting company and holds a degree in computer science.
Tarr Technology Consulting, LLC
336 West 37 Street, Suite 702
New York, NY 10018
(646) 536-3899 / Fax: (646) 390-6378