01 package dk.deepthought.sidious.ruleengine;
02
03 import java.util.Collection;
04
05 import dk.deepthought.sidious.goalhandler.Goal;
06 import dk.deepthought.sidious.supportsystem.State;
07 import dk.deepthought.sidious.supportsystem.Step;
08 import dk.deepthought.sidious.supportsystem.SuperLinkID;
09
10 public interface RuleEngine {
11
12 /**
13 * This method extracts the goals of the specified
14 * <code>PlanRequester</code>.
15 *
16 * @param requesterID
17 * the id of the plan requester
18 * @return the extracted goals
19 */
20 public Collection<Goal> extractGoals(SuperLinkID requesterID);
21
22 /**
23 * This method evaluates the rules associated with the given plan requester.
24 * <p>
25 * The calculation is based upon the state change from <code>current</code>
26 * to <code>next</code>.
27 *
28 * @param requesterID
29 * the ID of the plan requester
30 * @param current
31 * the current state
32 * @param next
33 * the next state
34 * @param step
35 * the step
36 * @return the combined evaluation.
37 */
38 public double evaluate(SuperLinkID requesterID, State current, State next,
39 Step step);
40
41 }
|