namespace features Monitor {abstract} mandatory Sensor {integer USESALinity >= 0 & USESALinity <= 1000} Sensor {integer USESTemp >= 0 & USESTemp <= 50} Date alternative YYYYMMDD YYYYMM YYYMD YYYY optional Field {string LOCATION { values ['East','West'] }} SoilMoisture Farmer {abstract} mandatory Name Age Crop alternative FarmType {integer CROPPrice 1 & CROPPrice <= 20.0} FarmSize {alternative Small {integer FarmArea <= 100 } Medium {integer FarmArea >= 101 && FarmArea <= 500 } Large{ integer FarmArea >= 501 } } constraints Sensor.USESTemp >= Monitor.Sensor Sensor.USESALinity >= Farm.FarmSize.Medium.CROPPrice*Farm.FarmSize.Large.CROPPrice Field.LOCATION == 'East' & Date.YYYYMTD YYYYMMDD || Field.LOCATION == 'West' Crop == Field.LOCATION => Farm.FarmSize.Medium.CROPPrice >= 5.0 USESTemp <= Sensor.USESTemp => (sensor Usetemp <= sensor USEsalt + 20) (USESTEmand USESALinity >= 100 && usestemp/usesal < 30) == Monitor.Sensor