diff --git a/README.md b/README.md index f04fa77..4a39e5f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,37 @@ -### **Gardeners Green Thumb Decision Support System** (GGD-DDS) +## **Gardeners Green Thumb Decision Support System** (GGD-DDS) An open source rule engine, GGD engine and complex event processing (CEP) engine for Java™ and the JVM Platform. Drools is a business rule management system with a forward-chaining and backward-chaining inference based rules engine, allowing fast and reliable evaluation of rules and complex event processing. A rule engine is also a fundamental building block to create an expert system which, in artificial intelligence, is a computer system that emulates the decision-making ability of a human expert. -Putting this together a decision support system is designed with the help of drools library which is used in the project. -The service of decision support system is inferring knowledge from the available data of the greenhouse, the user input, and historical data what a user/the gardener should do & which action a gardener should execute to be successful with the growing process of the plants. -These actions are called goals. -The list of inferred active goals is offered to other services of the system. +Putting all of this together, a decision support system is designed with the help of drools library which is used in the project. +The service of decision support system is inferring knowledge from the available data of the greenhouse, the user input, and historical data what a user/the gardener should do. +The inferred knowledge derived from the algorithm are presented to the gardener where an action is taken. +These actions can be presented as goals where each goal is offered to other services of the system (partners). The approach of the DSS is based on three eu.hsrw.ias.ggd.MainExe concepts: -**Fact knowledge (Knowledgebase)** +###**Facts Knowledgesession,and Knowledgebase** -1. Hardware Information(sensor data info) -2. Data information was given by an expert that is overwriting sensor data -3. User Input (We assume that the user is every time honest and that input is every time correct) +***Facts are nothing but plain old java objects (POJO) that represents the data which serves as input for rules.*** -**Rules (General structure, if premises then consequence)** -1. Explicit given by expert (before and during runtime) +***Knowledgesession :This component holds all the resources required for firing rule. +Here, all facts are inserted into the single session, and then matching rules are fired.*** + +***KnowledgeBase is an interface which manages a collection of knowledge definitions like rules. +Knowledge packages are created by grouping knowledge definition.*** + +Since the creation of Knowledge packages is very expensive, KnowledgeBase stores and reuse them. +Knowledge Sessions are created from KnowledgeBase, which consumes less memory. +KnowledgeBase keeps track of each Knowledge Session, so that updates to knowledge base can be applied to all the session at run time. +Another advantage of KnowledgeBase is that, it is completely serializable. +We can restore serializable object of KnowledgeBase rather creating a new one. +In the following case StatefulKnowledgeSession are used. +So facts are inserted first and stored to KnowledgeSession where it is latter on provided to Knowledgebase. + + +###**Rules (General structure, if premises then consequence)** +1. Rules are given explicitly by the expert. The list of rules created for this project are: 1. Battery 2. Dielectric Permittivity 3. Precipitation @@ -26,20 +39,27 @@ The list of inferred active goals is offered to other services of the system. 5. Soil Moisture 6. Soil Temperature 7. Temperature -2. All this information is considered as facts which are part of the entire knowledge graph -3. One particular rule can be fire on multiple rules can be fired. User defined. +2. One particular rule can be fired or multiple rules can be fired at the same time. -**Goals** -1. Goals are active rules which are able to change the fact +###**Goals (Rule Outcome)** +1. Goals are active rules which are able to change the value of the fact. 2. Goals can be activated and deactivated based on the user preferences -3. Goals can have priorities -#### **Build** -Run the MainExe.java which is part of the eu.hsrw.ias.ggd package -#### **Usage** + +### **Build** +1. Go to Build and build project in order to index all the dependecies required. +2. Run the *MainExe.java* which is part of the src/main/java/eu.hsrw.ias.ggd package + +### **Usage** You can reuse the project by changing the UserCredentials.java file located on the Credentials package. -It is possible to create new rules tailored to the needs. -#### **Examples** -For each sensor mentioned in the list of rules an example is given. You may change the values based on the needs of the expert/user. -#### **Dependencies** -drools.org \ No newline at end of file +It is possible to create new rules tailored to the needs of the use case scenario. +### **Examples** +For each sensor mentioned in the list of rules(src/main/resources/rules) an example is given. +You may change the values based on the needs of the expert/user. + +### **Dependencies** +org.drools version 7.48 + +org.slf4j version 1.7.30 + +com.google.code.gson 2.8.6