Study of an expert system on preservation of the quality of post-harvest grain: planning of storage technical route

: The planning space is represented on 3 different abstraction levels : grain, operation, and silo. The planning is hierarchical and non linear and involves several techniques of artificial intelligence : causal diagnosis of grain quality at grain level ; selection of the storage operations needed to preserve grain quality at operation level ; ordering the selected operations, allocating and reasoning on resources, at silo level. The main originality of this study lies in the introduction of a preventive approach to stored grain management which is guided by the preservation of the grain quality.


INTRODUCTION
Developing expert systems to help maintain the quality of stored grain is one of the major concerns of post-harvest research. Storage proves to be the weak link in foodstuff quality chain. Modern farm ing technics have allowed an increase in the world production of cereals ; and, consequently, an increase in storage capacities and' duration. It so happens that any lengthening of storage duration means an increase in the risk of grain degradation. Grain is a living organism, and the normal outcome of its vital activity is germination and oxidation phenomena, A stock of grain is the natural environment of insects, mites, and micro organisms : insects and mites consume and spoil the grain (Fleurat-Lessard et al. , 1994a), while micro-organisms deteriorate and contaminate it (Cahagnier et al. . 1993), Degradation in grain quality is a normal and irreversible process. Degradation speed depends on the environment factors : temperature, moisture, impurity rate and C02 content. The question we are asking is the following : how to store grain in order to preserve its quality ? Of course one should start with a definition of the idea of grain quality.

85
Grain quality is a complex entity in which four different specific qualities take place (intrinsic & physico-chemical, sanitary & security, technological and nutritional) ,These specific qualities are in function with the environment factors and the degradation agents which are measurable data. The grain state of quality can be appreciated through grain quality tests. These tests are put together depending upon which qualities they can evaluate (Ndiaye and Fleurat-Lessard 1994).
The interest of using expert systems (ES ) to take up this problem can be explained by 1) the lack of any grain quality preservation model ; 2) the strongly experimental and granulary nature of the available knowledge. For example, the population growth rates are known only for certain degradation agents, at certain temperatures and moisture and for certain grains (Beckett et aI., 1994) Our aim is to build a preventive system of stored grain quality maintenance guided by the measured values of the environment factors . The studies on environment factors show that they give an early information on the risks of quality degradation (Fleurat-Lessard et aI., 1994b ;Wrigley et al. 1994 ;Juliano, 1994). Our approach differs from existing systems in that we give priority to the prevention of grain quality degradation, and therefore to predictive signs of degradation. The fight against degradation agents remains a mean to decontaminate grain.
Our strategy of preventive preservation of stored grain quality is based on a good appreciation of instantaneous grain quality in order to be able to determine the optimal storage technical route allowing us to monitor the quality of grain. It involves the following 4 stages : 1) to establish the state of grain quality before storage, 2) to determine an optimal storage preventive technical route, 3) to monitor the evolution of grain quality during storage, 4) to react to any event representing a foreseen or effective quality degradation and readjust the storage technical route accordingly.
This paper presents the different planning stages of the stored grain preventive maintenance : causal diagnosis of grain quality, selection of the operations needed for grain storage, and the ordering of these operations in storage preventive technical routes. These two stages constitute the phase of storage technical route planning.

ROUTE
Within the planning space of the storage technical route, we distinguish 12 different entities (Table 1) which are linked by causality relations of a influence or give_in formation_on type (Steyer et aI., 1993 ). These entities are gathered in 3 different knowledge levels ( Fig. 1) : The grain level is the level of grain quality diagnosis. The quality of grain is appreciated from the environment factors, presence or proliferation of degradation agents, quality tests, grain identity and aspect.

J. diagnosis of grain quality
In literature. grain quality is defined nowadays in function with the grain foreseen utilisation : "the word 'quality' means suitability for the specific process or utilisation for which it's destined" (Wrigley et al. . 1994). Such a definition infers an inversion in causality between quality and future utilisation of grain. Each utilisation implies a given quality of grain. This required quality must be available at the time of utilisation to make it possible. Aiming at preservation of grain quality during storage on one part. and at assigning it to an economically optimal utilisation on another part. it is necessary to respect the causality direction : from quality to grain utilisation. Therefore it is imperative to determine the quality in function with the characteristics and not in function with the foreseen utilisation of the grain which is. after all, only a bet on future .
It is still difficult nowadays to give a formal definition of grain quality. so we will limit ourselves to the following operating definition : grain quality comes out of its specific qualities : intrinsic & physico-chemical, sanitary & security, nutritional and technological.
We determine the quality of grain through a process of causal diagnosis. the data of which are : the environment factors . the degradation agents. the quality tests and the identity of grain. On the basis of these measurements or observations which are not necessarily all known. we appreciate the specific qualities of grain ; and on the basis of these specific qualities. we appreciate the quality of grain.
At grain level the data and the appreciations are reduced to quantitative values. the formalism for qualitative reasoning developed by Guerrin (1991)      The production area exposure to radioactivity at a given period is an example of the knowledge on grain security. The color and smell data are sensorial indicators of micro-organism proliferation.
-the data indicating that additional tests should be carried out: PMit, n~o, MT, PR, HM. Presence of mites (PMit), in particular Acarus siro, implies checking the germinative power (GP). Proliferation of micro-organisms (n~O) implies an ergosterol measuring out to precise the levels of degradation and contamination by grain mycotoxins. The presence of mycotoxins (MT) implies an investigation on types and species, and eventually checking the bread making quality (BQ), the germinative power (GP) and the lipid quality (LQ). The presence of pesticide residues (PR) implies a measuring out of the active residues in order to improve the proportion of any pesticide application and to determine a minimal grain storage duration in relation with the residues activity period . The presence of heavy metals (HM) implies a measuring out of Pb and Cd.
-the data for fast confirmation of the guality obtained during the first appreciation : PC, GP, GH, PQ. These tests which can be done rather quickly (within a 24 hour delay) will complement the available data for a better valuation of the technological and nutritional qualities (Qt) and (Qn) and therefore of the grain quality.
-the data indicating a redhibitory defect at grain quality level : Rad , MT. Radioactive grain is not edible. Cancer-producing mycotoxins (MT) such as aflatoxin B1 have a tolerance threshold in the region of ppb ; which in fact means that their presence in grain cannot be tolerated.
-data on additional information to honor a specific schedule of conditions : WlOOO, n~o, MT, PR, HM , Rad, BQ, EA, SQ, LQ, NV . For example the nutritional value (NV) will be measured only on grain intended for controlled food such as baby food or diets for sick people.
Our strategy to diagnose the grain quality is progressive and data driven . It can be split up into five stages: I) To make a first causal diagnosis of grain quality from the data that are immediately available .
2) To identify the necessary additional tests from the data indicating additional tests to be carried out. 3) To check that there is no redhibitory defect from the data indicating redhibitory defects. 4) To confIrm grain quality from the data of fast confIrmation of qUality. 5) If necessary, to confIrm grain quality from the additional information data.

Selection of storage operations
We can distinguish nine different storage operations : Airtight storage : storage of grain under modified or confined atmosphere.
Apply pesticides : application of any pesticide by : nebulisation, spraying or fumigation . Clean: any grain cleaning operation due to high impurity rate.
Cool : cooling down ventilation or refrigeration of grain. Dry: drying of grain with heat supply. Mix : mixing grains of equivalent quality in order to improve their respective specific qualities Qipc or Qss Move : any mechanical turn over operation of grain.
Select bin : selection of the most adapted bin for preservation of grain qUality. In the selection of the bin comes the fact that it can be fIlled with grains from different origins, but of same quality. Stabilize : stabilization of grain with use of organic acid.
The role of each of these operations is to bring an answer to a specifIc need for improvement or preservation of grain quality and for fight or prevention against degradation agents (Table 3) Examples : 1-to cool the grain favours good preservation of its quality and prevents degradations due to insects and mites. The rate of isomultiplication of insects and mites decreases in proportion with temperature, and the sprouting and oxidation processes slow down. The combination of these phenomenon allows an increase in the period of grain preservation (Lasseran andFleurat-Lessard, 1991 , 1994).
2to mix a very damp wheat with a very dry wheat of equivalent specific weight improves the intrinsic & physico-chemical quality (Qipc) of grain and reduces the risk of degradation due to micro-organisms (nIlO). The resulting grain will have a larger specifIc weight and damp. average or dry moisture content according to the proportions of the mixture . If grain specific quality (Qipc) is very bad and the MC is very damp and the SW is average or high , then you have to Mix grain with grain of equivalent quality but with dry or very dry MC and high SW.
Such a mixture will bring Qipc to good and MC to average or damp and SW to high.
We select the storage operations mainly in function with specific qualities (Qipc, Qss), degradation risks (Ins,Mit,1l0) and the foreseen utilisation of grain (U, ~t) . These main criteria are backed up by the secondary criteria which are the environment factors (ImpR, MC, SW) and the degradation agents (PIns, PMit, nIlO). Our selection mechanism is causal, it is guided by the cause/effect relation linking the main criteria to the secondary criteria. It can be expressed by a rule of this type : We have just seen an example where the choice was made by selecting a storage operation. In the selection process we can also be led to exclude the selection of a storage operation. For example, if the corn is intended for human consumption, stabilization with an organic acid is excluded (it would leave a disagreeable taste).

Setting up of a storage technical route
A storage technical route is a succession of storage operations that should be undertaken in order to preserve grain quality. A storage operation is manageable only if it has been allocated the resources (equipment and consumables) necessary to its accomplishment. An equipment is a fitting such as : dryer, cooling aeration system, airtight storage system, etc.. . . A consumable is a pesticide or stabilizing product. The resources that are taken in account are the resources available at the storage silo.
Our strategy to set-up a technical route is as follows: I) to allocate to each storage operation the equipment necessary to carry it out; 2) to order the manageable storage operations thus obtained in a plan ; 3) to allocate to each operation of this plan the products that are best adapted to its execution within the plan .

Allocation of equipment
The problem involved in the allocation of an equipment to a' storage operation is the problem of checking whether the equipment exists, is available and is specifically adapted to the operation that should be carried out. For example, if you want to dry corn, you will first check if there is a dryer in the silo, then if it is available, and, last, if it is adapted to corn drying. Such an approach is easy to formalize in terms of preconditions to allocation rules (Wilkins, 1988).

Ordering of TTumageable storage operations
A manageable storage operation is caracterized by its process, its effects on grain, and the energy it consumes.
Examples : 1-To clean grain, you have to move it to the cleaning machine and to move it to the storage bin or to be weighed.

2-
The Dry operation uses a dryer and its effects on grain are a decrease in grain moisture and an increase of its temperature.
3-The Cool operation uses a bin equipped with a cooling aeration or refrigeration system, and its effect on grain is a noticeable decrease of its temperature.

92
The example 1 shows that there exists a teleological relation (Sacerdoti, 1979) between Move and Clean . This teleological relation is due to the process of Clean. It also links Move to Apply pesticide, Mix and Stabilize. It implies that each of these operations is usually a double operation, except in some very precise cases. For example, Apply pesticide by fumigation does not need Move .
With examples 2 and 3 we can see that if you apply to grain a Cool operation followed by a Dry operation, the effects of the second operation would annul the effects of the first one. Therefore Dry should always precede Cool. The relation linking these two operations is a relation of order, determined by their effects on grain.
If we consider the operations Dry and Cool, one can precede the other and inversely. No relation of order links these two operations. They can be considered as equivalent as regard the order, and therefore linked by a relation of equivalence.
We set up the order of the storage operations by using the 3 relations, teleological, of order and of equivalence; and by taking into account the fact that some equipments use a great amount of electricity. There are usually hours in the day during which the electricity costs less (off-peak periods). Operations such as Dry which use up a lot of electricity can be preferably carried out during the off-peak periods. This constraint due to optimisation of storage cost influences the order of the operations.

Allocation of the consumables
Consumable resources are products and therefore can be shared and still considered as available. The problem involved in the allocation of consumables is selecting the product which is the most adapted to the storage operation process, to the equipment to be used, to the quality of grain and eventually to the concerned degradation agents.

CONCLUSION
The development of expert systems for stored grain management is a very young field of research (around 10 years). These last five years have been marked by the coming of pest control systems guided by the fight against insects and mites already present in the stored grain. These systems proved themselves to be . little efficient for grain quality preservation.
Preserving the quality of stored grain is a new approach to stored grain maintenance implying the planning of the storage technical route. The data present in the planning space are heterogeneous. The planning process can be broken down into three stages : diagnosis of quality, selection of the storage operations and ordering of the operations. We approach them respectively through a causal qualitative reasoning, inference rules, and a reasoning on resources.
This first approach, which is sufficient to build a specific system, has to be developed in order to achieve a planning model of the storage technical route. One of our main difficulties to-date lies in the existence of significant areas in the field of stored grain maintenance for which knowledge is lacking.