dk.deepthought.sidious.rules
Class HeatExpensesRule

java.lang.Object
  extended by dk.deepthought.sidious.rules.Rule
      extended by dk.deepthought.sidious.rules.HeatExpensesRule

public class HeatExpensesRule
extends Rule

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.

Author:
Deepthought

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

logger

private static final org.apache.commons.logging.Log logger
Logger for this class

Constructor Detail

HeatExpensesRule

public HeatExpensesRule()
Method Detail

desire

public double desire(State currentState,
                     State newState,
                     Step step)
Description copied from class: Rule
Method returns the calculated desire associated with the change from 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.

Specified by:
desire in class Rule
Parameters:
currentState - the current state
newState - the new state
step - the step
Returns:
the calculated desire

getGoals

public java.util.Collection<Goal> getGoals()
Description copied from class: Rule
Method returns a collection of immediate goals.

If there are no immediate goals, an empty collection is returned.

Specified by:
getGoals in class Rule
Returns:
the goals of this rule


Copyright © Deepthought Development - All Rights Reserved.