## 5 Example of CAS Development
### Ontology Conceptualization
#### 5.2.4 RootZoneMoistureLevel Deduction Model  
The goal of the subsection is to model the output of the rule engine, which infers the state of the RootZoneMoistureLevel property based on the result of the function getRootZoneDailyAverageMoisture(d). IRRIG defines several classes and instances used for modeling RootZoneMoistureLevel deductions:  
* [noitemsep]  
An instance of the class **irrig:RootZoneMoistureLevelDeduction** represents a deduction process for the RootZoneMoistureLevel property, as shown in Figure 14. By definition, this individual is linked to the individual _irrig:observedProperty_rootZone_moistureLevel_, an instance of the class **irrig:MoistureProperty**, and to the individual _irrig:featureOfInterest_rootZone_. The deduction individual is linked to an actor that produces the result. The actor is an SWRLAPI Drools Engine that is represented by the individual _aralysis:ontogen_inferenceEngine_SWRLAPI_drools, an instance of the class **sosa:Sensor**. Figure 14: Example of the deduction of root zone moisture level (part 1). Figure 15: Example of the deduction of root zone moisture level (part 2). The deduction is linked to the sensor via the sosa:madeBySensor object property, as shown in Figure 14.  
A RootZoneMoistureLevel deduction is based on an observation individual that represents a computation of the function getRootZoneDailyAverageMoisture(d). The deduction instance of Figure 14 is based on the observation individual presented in Figure 13. Thus, the deduction individual is linked to the instance of the class **irrig:RootZoneDailyAverageMoistureObservation** via the prov:wasInformedBy object property. The result of a RootZoneMoistureLevel deduction is an instance of the class **irrig:RootZoneMoistureLevelState**. The deduction individual is linked to its state result by the caso:hasResultState object property, as shown in Figure 14. The possible states are shown in Figure 16.  
Each day, our system makes decisions about the value of certain properties, such as crop growth, rain intensity and root zone moisture level. These decisions are based on several sensor observations performed during day d. Day d is represented by an interval of 24 h: [d 00:00:00, d+1 00:00:00[. For the synchronization of computations, the frequency of such decisions should be fixed to one precise time. According to Meteo-France, the record of rain quantity per day is made between day d at 06:00:00 to day d+1 at 06:00:00 [31]. This project considers that all the computations should be available at a precise time, fixed at [d+1 06:00:00]. Each decision regarding day d will be valid for an interval of 24 h: [d+1 06:00:00, d+2 06:00:00[. Figure 15 illustrates the time period regarding a RootZoneMoistureLevel deduction. The phenomenon time represents day d. It is represented by a 24-h interval: [d 00:00:00, d+1 00:00:00[. In Figure 15, the time when the result of the deduction is available is named the result time. It is fixed at [d+1 06:00:00]. This result is valid during a period of 24 h named valid time: [d+1 06:00:00, d+2 06:00:00[. To store the time of the deduction, we use the _sosa:resultTime_ datatype property to links the deduction individual to the _xsd:dateTime_ corresponding to the result time at [d+1 06:00:00]. This is presented in Figure 15.  
Figure 16: States of root zone moisture level property. To represent the fact that a deduction concerns day d, we use the object property sosa:phenomenonTime. Day d is represented by an instance of the class **time:Interval**, which is described by two instances of the class **time:Instant**:  
* One instance represents the beginning of the interval: [d 00:00:00]. The object property time:hasBeginning links the instance of **time:Interval** to the beginning **time:Instant** instance. * One instance represents the end of the interval: [d+1 00:00:00]. The instance of **time:Interval** is linked to the ending **time:Instant** by the object property time:hasEnding.