## 4 CAS Development
### CAS Design
#### 4.2.2 System Design  
Two main steps used to model the smart irrigation CAS are (1) to identify the entities needed to model and (2) to choose the appropriate vocabulary and relation from CASO and IRRIG to model the determined entities. First, we determined the entities needed to model the smart irrigation CAS. The following vocabulary should be considered entities:  
* Feature of interest is the natural phenomenon observed by sensors. * The property of the feature of interest can be a quantitative property (a sensor measurement or aggregation) or a qualitative property (a state that is a result of threshold comparison). * Data processing actions and the actor that executes the action. The data processing may be a measurement, an aggregation or an inference. Figure 6: Overview of the IRRIG ontology. * Result and the time related to the action. The action could be a measurement, aggregation or deduction (threshold comparison or inference). On the one hand, the result of a deduction should be qualitative data that are a state of the entity. On the other hand, the result of the measurement and aggregation is numerical data. Table 2 shows a list of entities needed to model. This table contains six columns:  
* Workflow: there are four streams defined in this project: (1) crop growth, (2) crop water need, (3) soil moisture, and (4) rain quantity. Each stream specifies a dedicated workflow of processes. * Feature of interest: the phenomenon that needs to be observed: crop, rain, soil, etc. * Property: the aspect of the phenomenon that needs to be observed. * Type of action: could be a measurement, an aggregation or a deduction. * Actor: depending on the type of action, an actor could be a sensor, a software component that implements an aggregation, or an inference engine for the deduction. * Type of result: could be a state or a numeric value. In this table, in addition to the entities related to the agricultural phenomenon, it is essential to mention the two other entities: sleeping and delay. Sleeping is the period after a watering action of one plot. No more watering action is applied on this plot during the sleeping period. Delay is the period when a watering action is postponed due to a rain event. \begin{table}
\begin{tabular}{|p{56.9 pt}|p{56.9 pt}|p{56.9 pt}|p{56.9 pt}|p{56.9 pt}|} \hline
**Workflow** & **Feature of Interest** & **Property** & **Type of Action** & **Actor** & **Type of Result** \\ \hline \multirow{3}{*}{Crop growth} & \multirow{3}{*}{Crop} & Growth & Measurement & Human & State \\ \cline{3-6}  & & Growth & Deduction & Inference engine & State \\ \hline \multirow{3}{*}{Crop water need} & \multirow{3}{*}{Sleeping} & Water Need & Deduction & Inference engine & State \\ \cline{3-6}  & & Sleeping duration & Aggregation & Component that gets the sleeping duration & Numeric \\ \hline \multirow{3}{*}{Soil moisture} & Soil at 30 cm depth & Moisture at 30 cm depth & Measurement & Soil tensiometer & Numeric \\ \cline{3-6}  & & Daily average moisture at 30 cm depth & Aggregation & Component that gets daily aggregated moisture & Numeric \\ \cline{3-6}  & & Soil at 60 cm depth & Moisture at 60 cm depth & Measurement & Soil tensiometer & Numeric \\ \cline{3-6}  & & Daily average moisture at 30 cm depth & Aggregation & Component that gets daily aggregated moisture & Numeric \\ \cline{3-6}  & & Daily average moisture at root zone & Aggregation & Component that gets daily aggregated moisture & Numeric \\ \cline{3-6}  & & Root zone zone moisture level & Deduction & Inference engine & State \\ \hline \multirow{3}{*}{Rain quantity} & \multirow{3}{*}{Rain} & Rain quantity & Measurement & Pluviometer & Numeric \\ \cline{3-6}  & & Daily total rain quantity & Aggregation & Component that gets daily total rain quantity & Numeric \\ \cline{3-6}  & & Intensity & Deduction & Inference engine & State \\ \cline{3-6}  & & Delay duration & Aggregation & Component that gets the number of delay days & Numeric \\ \hline \end{tabular}
\end{table} 
Table 2: List of features of interest, properties and actors that require modeling.