Back to NewsletterORGANON Growth Model as a Dynamic Link LibraryThe ORGANON Growth Model as a Dynamic Link Library At its 1997 meeting, the Stand Management Cooperative approved a proposal to convert the newly completed SMC version of the ORGANON growth model to a dynamic link library (DLL). The main reason for this change was to create a true 32-bit version of the model that was flexible and easier to adapt to the wide range of information management and planning systems of different organizations. After extensive testing, the ORGANON DLL is now available. In this article, we would like to introduce SMC members to the advantages and challenges of using the ORGANON DLL. What is the ORGANON DLL?The ORGANON DLL is a dynamic link library that implements the growth model and supporting subroutines that were developed as part of the ORegon Growth ANalysis and projectiON project. The DLL contains the growth functions, including responses to management response, of all three versions (Southwest Oregon, Northwest Oregon and Stand Management Cooperative) of the DOS version of the ORGANON model. The DLL does not contain much of the input/output overhead of the DOS version allowing the user greater access and control of the data. Previously, using ORGANON output required time consuming parsing of the ORGANON output file and if information that wasn’t part of the standard output was required, users had to calculate variables from the projected tree lists. Using the DLL from applications like Microsoft Access now allows the user to access the tree lists and stand level information directly in memory. The DLL can be used from any application that can load and call dynamic link libraries. This includes Visual Basic, Microsoft Office 95/98/2000 (i.e. EXCEL and ACCESS), and MapInfo to name a few. Users can also develop custom software in C/C++, Visual Basic, and Delphi that incorporate the DLL into their own applications. With the DLL also comes an updated internal architecture and added flexibility for future development efforts. The basis for passing information to and from the model is now a header file that defines the data structure. Other software projects can also make use of this header file. Now data can be moved between different models and applications that use the same structure without having to perform external data input/output by reading and writing files that take time and increasing the chance of introducing errors. The data structure also allows users to “carry” their own information into the growth model in the form of simple floating point and integer variables. As variables are requested and there’s a general consensus that the variable should be added to the model or made available internally, those variables can be easily added. What Can I Do With the ORGANON DLL?The DLL requires the same basic tree and stand data that was required by in the DOS version of ORGANON. The difference is that data that was previously hidden in large arrays, are now organized into user–defined data structures. All of the new subroutines in the DLL now accept these arrays of user-defined data types. This allows applications calling the DLL to easily exchange data. The result is a more efficient exchange and flow of data between databases, inventory projection systems, harvest scheduling software, and optimization applications. Unlike the DOS version of ORGANON, the DLL is only concerned with projecting tree lists. Additional features like volume calculations and complex thinning subroutines were intentionally left out of the DLL. This was done to allow the user the greatest flexibility to customize output, to apply any method of volume calculation using their favorite taper function or volume equations and to apply complex silvicultural regimes and decision making processes. It is probably obvious by now that it is the users responsibility to getting data properly into the model, to creating their own summaries and to performing management activities (i.e. apply harvests and fertilizations). This requires a good understanding of a programming language like Visual Basic or C/C++, Windows API and data management. So far, users of the DLL have been pleased with the usability of the DLL. The growth projections from the DLL remain the same as the DOS version of ORGANON. Why NOT COM?Some users have asked, “Why not build COM Objects instead of a DLL?” While the idea of building (Component Object Model) COM objects for forest simulation software might be a good idea in the future, currently most forestry software developers do not have the sophistication or development experience to implement COM objects. This is a potential problem in working with multiple forestry applications that require external expertise, such as contract programmers, who usually do not understand the details of forest growth and yield models. A DLL on the other hand provides a simpler and straightforward implementation while reducing the chance for errors. Where Can I Download the ORGANON DLL?The ORGANON DLL and supporting documentation is available from the ORGANON web site at http://www.cof.orst.edu/cof/fr/research/organon/. Interested uses can download the compressed file that contains the DLL and supporting documentation. After using WINZIP to uncompress the file in a desired folder, run the SETUP.EXE program. This will install the DLL into the Windows system directory and create folders with source code examples, html help files and manuals. Jeff Hamann and David Marshall
|