Re: [rules-users] Reasoning with past events
On 15 November 2010 11:56, Anais Martinez amarti...@iti.upv.es wrote: I'm using Drools for a system of alarms on agriculture. I am considering several parcels, whose plants can be on different status (for example, sprouting, flowering, etc.). These statuses are updated automatically by rules, controled by several calendars. In the other hand, the farmer is allowed to change the plants' status by hand if he/she observes that real plants are in a status in the terrain. If the farmer set the status before the automatic change, there is no problem: the rules corresponding to the new state become active and the automatic change has no effect. But if the farmer changed the status after the automatic change, how would I consider the events in the period of time between automatic and hand changes? Please explain the last sentence in more detail. I don't quite see where the problem lies. If the automatic change occurs, does this trigger any rule? Are there rules that should be triggered by the subsequent manual change? Which events arrive between automatic and hand change? -W Thanks in advance. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Reasoning-with-past-events-tp1903815p1903815.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reasoning with past events
The system is receiving readings from real sensors of humidity, temperature, etc.. There are a lot of rules for deciding if a specific plague or illness affects (or can affect) to the plants or not: One condition of those rules is the plants' status, because the illnesses affect to the plant depending on its status. I have defined Status, Reading and Risk as events. Well. Supose than the system has just passed from status A to status B, and after that, it has received several readings from sensors whose values are a risk for an illness in the status A but not in B. Then, the system has not activated the Risk, because it thinks that the current status is B. Therefore, if the farmer inserts an status B after those readings, the system has not activated the Risk but that readings are dangerous. In that case, how do i say that there is a Risk? Thanks again. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Reasoning-with-past-events-tp1903815p1904201.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reasoning with past events
I think that a parcel (a field) needs to be a static fact, perhaps not maintaining a single state but two states, previous and current. Events are state changes and sensor readings. Now, if sensor readings are dangerous for state A and if the last state change is not much distant from the sensor readings you can still raise an alarm. I also think that a state change in a field is not a single point in time; states overlap in a (large) field, as one part may be sunnier or drier or... as other parts. Clearly, this complicates rules, but I think that the whole problem cannot be handled in an absolutely discrete manner. -W On 15 November 2010 13:56, Anais Martinez amarti...@iti.upv.es wrote: The system is receiving readings from real sensors of humidity, temperature, etc.. There are a lot of rules for deciding if a specific plague or illness affects (or can affect) to the plants or not: One condition of those rules is the plants' status, because the illnesses affect to the plant depending on its status. I have defined Status, Reading and Risk as events. Well. Supose than the system has just passed from status A to status B, and after that, it has received several readings from sensors whose values are a risk for an illness in the status A but not in B. Then, the system has not activated the Risk, because it thinks that the current status is B. Therefore, if the farmer inserts an status B after those readings, the system has not activated the Risk but that readings are dangerous. In that case, how do i say that there is a Risk? Thanks again. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Reasoning-with-past-events-tp1903815p1904201.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Reasoning with past events
Well, I'm in a dead end with my model, so I'm going to consider your idea. I think it is best solution. Thanks again. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Reasoning-with-past-events-tp1903815p1904505.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users