|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.deepthought.sidious.rules.Rule dk.deepthought.sidious.rules.HeatExpensesRule
public class HeatExpensesRule
Class simulates the heat expenses.
This simple simulation is done by checking whether the heater is active or not. The higher the activity of the heater the higher the desire value.
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
logger
Logger for this class |
Constructor Summary | |
---|---|
HeatExpensesRule()
|
Method Summary | |
---|---|
double |
desire(State currentState,
State newState,
Step step)
Method returns the calculated desire associated with the change from currentState to newState . |
java.util.Collection<Goal> |
getGoals()
Method returns a collection of immediate goals. |
Methods inherited from class dk.deepthought.sidious.rules.Rule |
---|
getAdjustableSetting, getAdjustableSettingFromParent, getExplanation, getParentID, getSensorValue, setParentID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public HeatExpensesRule()
Method Detail |
---|
public double desire(State currentState, State newState, Step step)
Rule
currentState
to newState
.
The calculated desire must evaluate to [0,1], where 0 represents no desire for changing state, and 1 represents maximum desire for change.
Some rules are allowed to evaluate to values (much) larger than 1. This exception is only allowed if the outcome of not respecting the rule is fatal.
desire
in class Rule
currentState
- the current statenewState
- the new statestep
- the step
public java.util.Collection<Goal> getGoals()
Rule
If there are no immediate goals, an empty collection is returned.
getGoals
in class Rule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |