A study on a framework for distributed cooperative system in an agricultural simulation model
2013
Tanaka, K. (NARO Agricultural Research Center Agroinformatics Division (Japan))
People have dealt with ever-faster population growth by increasing food production based on the development of agricultural technology. However, food shortages in developing countries have been left unsolved due to abnormal climates, westernized eating habits in emerging countries, and the use of cereal as a raw material for bioethanol. Also, in Japan, we are facing changes to the cultivating season and the best breed of farm product caused by climate change, and the problem of the knowledge of aging farmers not being passed on. In these circumstances, information technology centering on agricultural simulation models (hereinafter called 'agricultural model') to help farmers make decisions is playing a more and more important role. Affected by the results of system dynamics, the development of a plant growth model to dynamically describe plant growth began in the 1970s. And then, an agricultural model such as the growth prediction model, and disease and pest damage forecasting model, became widely used as an alternative way to help farmers make decisions and as an alternative to field trials. In the 1990s, large agricultural models were developed by each development group of Wageningen, IBSNAT, and APSRU, and the paddy-rice growth prediction model SIMRIW was developed in Japan. Agricultural data includes meteorological data that is required by the agricultural model, and cultivation data that is used to develop agricultural models and assume parameters. Among data that has been obtained at weather stations and experiment stations for many years, some may be recorded only for printed material, while other data may be put into a database and shared over a network. The domestic agricultural model and database are characterized by their high regionality with small size and dispersal to universities and research institutes. And also many programs of the agricultural model have become legacy and many databases are operated in a specific manner. Thus, there is a need to build a decision making system connected to these various agricultural models and databases, considering future operation and maintenance. To this end, it was thought that a distributed cooperative system, which manages agricultural models and databases at the development site and connects with networks, is suitable. In this dissertation, we suggested a distributed cooperative system to help farmers make decisions, and named it the Agricultural Model and Databases with Distributed Cooperative System (AMADIS). To solve problems in connecting components such as agricultural models and databases, AMADIS needs to have a search function allowing people to find a suitable agricultural model and data, a management function to manage the location information of each component on the network, communication protocols to connect multiple components, and an executive function to execute agricultural models. In this dissertation, we conducted research mainly on a method to develop a program in the agricultural model as a component and the cooperative method between components, from the functions required for AMADIS. Analyzing the legacy program of a domestically developed agricultural model showed that the calculation part of the program-the core of the agricultural model-other than data reading and result display, accounts for approximately half of the program. The program size of the domestic agricultural model is not large and some Web applications of the agriculture model as components need to be developed quickly. Therefore, translation into Java was adopted rather than developing wrapper programs for the legacy model. Java is an object-oriented language, and developing programs in a way that exploits its characteristics not only makes development more efficient but also makes future expansion and maintenance easier. It also has standard APIs that are useful for building Web applications, such as networks, distributed objects, thread, XML, and multi-language support. After that, Java became a main language for building server-side applications and it is apparent that the choice of development language was right. When agricultural programs were developed, we studied the method of developing models and peripheral technology using three agricultural model development groups. These three groups developed while influencing each other in the 1990s, so their developed structures were similar. All of them have a module structure and center on a model execution engine to manage model calculations. They all use modules such as growth models, disease models, and soil models as components. Calculation and accumulation are repeated on the execution engine until the termination criteria are met by time loop after initialization. The meteorological data required for executing the agricultural model are provided by a program called a 'weather generator.' To develop the program of the agricultural model in this dissertation, a framework for an agricultural model was first built and programs of the agricultural model were secondary developed using a framework. The framework is a program library which is organized to be reused for building the specific target application. The framework is also a semi-finished application so developing the program of the agricultural model requires only deficient parts of the default functions provided by framework. We named this framework Java Agricultural Model Framework (JAMF). JAMF consists of many program packages, such as the model execution engine, model data, the weather generator, user interfaces, and utility programs. The model execution engine is simpler than the ones used by the three development groups but has the same functionalities. The model data class effectively processes Boolean value, numeric value, date, and time-series data that are handled by the agricultural model, and helps to automatically build user interfaces. The weather generator acquires meteorological data used by the agricultural model from MetBroker, average year data, estimation data, and user data, and converts them for use in the model. MetBroker is middleware between various weather databases and the agricultural model, and provides unified database access methods and data forms. The weather generator allows the data at weather stations all over the world to be used via MetBroker, and normal year value, estimation data from the meteorological model instead of non-observation data, and data observed by users can be used to make predictions, as required. To develop the programs of the agricultural model using JAMF, approximately ten programs related to agricultural model calculations, data, and interfaces need to be developed. Those are additional programs to the functions provided by JAMF. The number of lines of source code of MetBLASTAM translated into Java from FORTRAN took only 5.2% (about 1,000 lines, the ratio of source code without comment lines) of all functions of the agricultural model. In more detail, 66% was for calculations that varied by model and 4% was for data acquired, part of which was common to every model. Implementing approximately twenty plant growth prediction models and disease and pest damage forecasting models using JAMF shows that it can be used to build various agricultural model Web applications. If it is an agricultural model with a maintained document and does not require complex user interfaces, Web applications that can be components of AMADIS can be built within a day or two. To become a component of AMADIS, message exchange functionality between components via a network is required. Although we used RMI at first, we decided to use REST to exchange data in XML form using HTTP because of a defect caused by a firewall. For REST, requests can be sent as a URL parameter of a Web application and the result can be received in XML form, so users can see it on a Web browser. Request building needs only strings process, and the result process needs only XML programming that has become more popular thanks to the boom in the use of Ajax. And it also provides platform-independence which means not specifying a server/client environment. The framework JAMF-S (JAMF for Servlet) for converting the agricultural model implemented by JAMF as a Java applet to a Java servlet as a REST application has been built. JAMF-S differs from JAMF in terms of moving the process of obtaining meteorological data and model calculation from the client to the server, and using HTML components from a Swing component to build user interfaces. Those changes meant that the model execution engine for servlets, JSP for interfaces, and servlets for graphic image generation needed to be newly developed. Agricultural model calculation and data, and weather generator which are called from the model execution engine, did not need to be changed. When we changed them to Java Servlet, we redeveloped them as Ajax application that uses Google Maps for the map interface. Although, the development with JavaScript for the interface part was more complex than Java, by emerging the Google Web Toolkit, the whole development could be carried out consistently only with Java, and this made the development and maintenance efficient. We built a simulator for cultivation possibility of rice using SIMRIW as an actual application to show the effectiveness of JAMF. It is a tool that predicts plant growth with various criteria using global meteorological data and examines whether rice cultivation is possible or not at each site. Although it required a massive repetitive calculation and the model execution engine should have been improved for multi-threading and reuses of reading data, we were able to accommodate the modification with the minimum amount of programming by exploiting the characteristics of JAMF built with an object-oriented system. For all of the above reasons, we showed that a basic technique that can develop an excellent program in the development efficiency, maintainability, and the extendibility to implement an agricultural model as Web application that was the component of AMADIS has been build as JAMF. Moreover, the validity of decision support system AMADIS for the agriculture proposed as a distributed cooperative system, which can construct agricultural model with more detailed function by making multiple agricultural models cooperate flexibly, was verified.
Show more [+] Less [-]AGROVOC Keywords
Bibliographic information
This bibliographic record has been provided by Agriculture, Forestry and Fisheries Research Information Technology Center