## 4 CAS Development
### CAS Specification
#### 4.1.1 Ontology Requirement  
First, the IRRINOV(r) documentation [13] was studied to identify the following:  
* The type of sensors used and their measurements.
* The data needed to make the decision: type of soil, type of crop, sowing date, sensor localization and depth, quantity of rain per day, evolution of crop growth stage, and moisture measurements at different depths.
* The different processes applied to the sensor measurement streams, such as data cleaning, spatial and temporal aggregation, and threshold comparison.
* The different decisions produced by the method.  
Second, it was necessary to communicate with specialists of Arvalis and INRAE to clarify the IRRINOV method. Some of the questions formulated to the experts were as follows: What is the difference between an irrigation period and a watering cycle? What are the possible values of maize growth stages? How are we to observe a growth stage?  
Third, to generalize the system, it was necessary to derive standard definitions and concepts in the agriculture domain. This work was carried out by querying a web retrieval system. The selected resources were articles referenced in publications and from well-known organizations. For example, the different maize growth stages are defined in a publication from the University of Iowa [14].  
Fourth, the analysis of the Arvalis dataset provided a better understanding of the computing processes on sensor measurements, as well as the experimental details such as the type of soil and the code names of the sensors.  
The first analysis enabled this system to define several process workflows corresponding to the type of sensor measurement stream. A workflow defines the aggregations (or any mathematical functions) and deductions applied on the streams. An example of temporal aggregation is the computation of the average on a 24-h window applied on a soil moisture stream produced by one probe. Then, the aggregation results are conceptualized into a property of an observed phenomenon. This system considers four main sensor streams described by observed phenomena and associated properties: (1) the moisture of the soil, (2) the quantity of rain, (3) the growth stage of the crop, and (4) the water need state of the crop.  
Moreover, from the first analysis, an ontology requirement specification about the smart irrigation CAS was generated. These specific requirements were written as a competency questions document. An online spreadsheet (The spreadsheet is available on the GitLab repository of this project [[https://gitlab.irstea.fr/irrig/public/tree/master/CompetencyQuestions](https://gitlab.irstea.fr/irrig/public/tree/master/CompetencyQuestions)]([https://gitlab.irstea.fr/irrig/public/tree/master/CompetencyQuestions](https://gitlab.irstea.fr/irrig/public/tree/master/CompetencyQuestions))) was defined to share them. It contains the following fields:  
* The identified code of requirements.
* The competency questions written in natural language. Various forms of the question were written to generalize them.
* Some examples of answers to identify the domain value.
* The explanation of the answer.
* The references of the vocabulary definitions.  
Figure 4 presents an excerpt of the current competency questions. Please note that these competency questions are a large table with many columns and rows; we only show an excerpt as an illustration. For example, CQ1.1 expresses the need to know the type and brand of each sensor. CQ1.3 expresses the need to define the type of sensor streams used as inputs in the IRRINOV(r) method.