Software Engineering

CropOptimser has been developed to provide a simple user interface for solving the previously defined LP problem. Three key functionality requirements of its design are; to input data into the LP model; to solve the LP model; and to display and analyse the results of the optimization. Its developed required decisions into many software engineering concepts including:

  • Choice of software engineering tools;
  • Program structure;
  • Formulation of mathematical components;
  • Graphical user interface design;
  • Developing program inputs; and
  • Developing program outputs;

CropOptimiser’s implementation of these concepts will now be presented in turn.

Technologies

CropOptimiser has been developed in C++ as a Win32 application with a multi-threaded object-oriented design structure under Microsoft Windows using Borland C++Builder and the Visual Class Library (www.codeweavers.com). XML (extensible Mark-up Language), and XSLT technologies (www.w3.org/xml) were chosen to develop the reporting and storage components of the software while prototyping was undertaken using XML Spy Suite software (www.altov.com). Several third party libraries including GIPALS32 linear programming library (www.optimalon.com), TeeChart (www.teemach.com) and VirtualTreeView (www.delphi-ges/VirtualTreeview) feature predominantly throughout CropOptimiser

 Program Structure

CropOptimiser has been designed to be highly modular focusing on the key elements of forms, managers, data, engines and analyses (Figure 2). This benefits of this includes:

  • Simplifying the process of future enhancement and modification;
  • Separation of user-interface and non-user-interface code;
  • Interchangeability of components, such as the LP solver engine; and
  • Reuse of code from co-developed software.;

The two key parts of the software are the main-form and the program-manager. The main-form is a central Graphical User Interface (GUI) component that serves as the entry point to the program. The program-manager is a non-GUI component created by the main-form to coordinate all program functionality and communication. It acts as an intermediary between the GUI and mathematical functionality and provides the program’s input/output operations. The central data entity is the ‘project’, which contains both input and output data. Task-oriented managers are located inside of the program-manager that deal with functionalities such as generating reports, spatial mapping, browsing data, and viewing forecast probabilities. Each manager is associated with one or more graphical analyses that display the outputs of these tasks. Calculation engines such as the LP engine and stratification engine are also located in the program manager so as to be central to all calling functions.