Software for spatially-explicit simulation of forest dynamics

The Java Architecture

The design of the Java GUI is not fundamental to the functioning of SORTIE-ND, like the design of the core model is. The GUI could use any design which allowed it to perform its designated jobs (creating the parameter file, calling the core model, and interpreting model output). This means that I welcome ideas for architecture improvement.

While there are several packages, they do three main things: parameter file building, output file visualization, and miscellaneous tools and utilities. The parameter file building code is built in a similar fashion to the C++ model core, but it's meant to be "smarter" than the C++ code and more aware of the logic of simulation building, to keep the user from making logical mistakes that the core would allow. Output file code is all kept in the datavisualizer package. All tools are in the tools package.

Parameter file editing code

The class structure of the parameter file editing code, mostly found in the package root, mirrors the C++ code. There's a GUIManager, which functions much like the Simulation Manager. There are Behaviors collected into BehaviorTypeBases, which map to functional submodels. If you understand the C++ architecture, it will help a lot when it's time to look at the Java code.

datavisualizer package

The datavisualizer package is simpler than it looks. Multiple files can be open at once in the interface for graphing; each open file is managed by an object descended from DataFileManager. For detailed output files, each type of chart is managed by a separate object descended from DataRequest, which knows how to collect and draw data for its particular chart type. Detailed output files are parsed from the XML by DetailedOutputFileSetupParseHandler and DetailedOutputTimestepParseHandler. Most of the actual graphics code resides in DataGrapher.