de.cesr.lara.components.decision.impl
Class LDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>

java.lang.Object
  extended by de.cesr.lara.components.decision.impl.LDeliberativeDecider<BO>
Type Parameters:
BO - type of behavioural option
All Implemented Interfaces:
LaraDecider<BO>, LaraDeliberativeDecider<BO>

public class LDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
extends Object
implements LaraDeliberativeDecider<BO>

the agents decision module


Field Summary
protected  LaraDecisionConfiguration dConfiguration
          According LaraDecisionConfiguration
protected  LaraDeliberativeChoiceComponent deliberativeChoiceComponent
          deliberativeChoiceComp component
protected  Logger logger
          logger
protected  Map<Class<? extends LaraPreference>,Double> preferenceWeights
          preferenceWeights
protected  Collection<BO> selectableBOs
          behavioural options
protected  BO selectedBo
          BO selected by decision
protected  Collection<LaraBoRow<BO>> situationalUtilityMatrixRows
           
 
Constructor Summary
LDeliberativeDecider(LaraDecisionConfiguration dConfiguration)
           
 
Method Summary
 void decide()
          Executes the decision!
protected  LaraDeliberativeChoiceComponent getDeliberativeChoiceComp()
          Checks if the deliberative choice component has been set and provides it true.
 Set<? extends BO> getKSelectedBos(int k)
          This method delegates to the deliberative choice component since bos may not be stored in this class because k is not finitely defined.
 int getNumSelectableBOs()
           
 Map<Class<? extends LaraPreference>,Double> getPreferenceWeights()
          Provides the individual preference weights
 Collection<BO> getSelectableBos()
           
 BO getSelectedBo()
          Return the LaraBehaviouralOption that was selected in LaraDecider.decide().
 void setDeliberativeChoiceComponent(LaraDeliberativeChoiceComponent deliberativeChoiceComponent)
           
 void setPreferenceWeights(Map<Class<? extends LaraPreference>,Double> preference)
          Sets the individual preference weights.
 void setSelectableBos(Collection<BO> behaviouralOptions)
          Set the collection of BOs the decision process decides upon.
 String toString()
          Return the name of this decider and the LaraDecisionConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected Logger logger
logger


dConfiguration

protected LaraDecisionConfiguration dConfiguration
According LaraDecisionConfiguration


deliberativeChoiceComponent

protected LaraDeliberativeChoiceComponent deliberativeChoiceComponent
deliberativeChoiceComp component


preferenceWeights

protected Map<Class<? extends LaraPreference>,Double> preferenceWeights
preferenceWeights


selectableBOs

protected Collection<BO extends LaraBehaviouralOption<?,? extends BO>> selectableBOs
behavioural options


selectedBo

protected BO extends LaraBehaviouralOption<?,? extends BO> selectedBo
BO selected by decision


situationalUtilityMatrixRows

protected Collection<LaraBoRow<BO extends LaraBehaviouralOption<?,? extends BO>>> situationalUtilityMatrixRows
Constructor Detail

LDeliberativeDecider

public LDeliberativeDecider(LaraDecisionConfiguration dConfiguration)
Parameters:
dConfiguration - the decision configuration of the current decision process
Method Detail

decide

public void decide()
Description copied from interface: LaraDecider
Executes the decision! That is, select a LaraBehaviouralOption.

Specified by:
decide in interface LaraDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
See Also:
LaraDecider.decide()

getKSelectedBos

public Set<? extends BO> getKSelectedBos(int k)
This method delegates to the deliberative choice component since bos may not be stored in this class because k is not finitely defined.

Specified by:
getKSelectedBos in interface LaraDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Parameters:
k - the size of the returned set - Integer.MAX_VALUE if all BOs shall be returned
Returns:
a set of LaraBehaviouralOptions as result of the decision process
See Also:
LaraDecider.getKSelectedBos(int)

getNumSelectableBOs

public int getNumSelectableBOs()
Specified by:
getNumSelectableBOs in interface LaraDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Returns:
the number of rows in the decision's laraBoRows
See Also:
LaraDecider.getNumSelectableBOs()

getPreferenceWeights

public Map<Class<? extends LaraPreference>,Double> getPreferenceWeights()
Description copied from interface: LaraDeliberativeDecider
Provides the individual preference weights

Specified by:
getPreferenceWeights in interface LaraDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Returns:
Returns the preference weights
See Also:
LaraDeliberativeDecider.getPreferenceWeights()

getSelectableBos

public Collection<BO> getSelectableBos()
Specified by:
getSelectableBos in interface LaraDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Returns:
Returns the behaviouralOption.
See Also:
LaraDeliberativeDecider.getSelectableBos()

getSelectedBo

public BO getSelectedBo()
Description copied from interface: LaraDecider
Return the LaraBehaviouralOption that was selected in LaraDecider.decide(). Note: Do not perform the actual selection here since this method might be called more than once!

Specified by:
getSelectedBo in interface LaraDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Returns:
a LaraBehaviouralOption as result of the decision process
See Also:
LaraDecider.getSelectedBo()

setDeliberativeChoiceComponent

public void setDeliberativeChoiceComponent(LaraDeliberativeChoiceComponent deliberativeChoiceComponent)
Specified by:
setDeliberativeChoiceComponent in interface LaraDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
See Also:
LaraDeliberativeDecider.setDeliberativeChoiceComponent(de.cesr.lara.components.decision.LaraDeliberativeChoiceComponent)

setPreferenceWeights

public void setPreferenceWeights(Map<Class<? extends LaraPreference>,Double> preference)
Description copied from interface: LaraDeliberativeDecider
Sets the individual preference weights.

Specified by:
setPreferenceWeights in interface LaraDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
Parameters:
preference - individual preference weights
See Also:
LaraDeliberativeDecider.setPreferenceWeights(java.util.Map)

setSelectableBos

public void setSelectableBos(Collection<BO> behaviouralOptions)
Description copied from interface: LaraDeliberativeDecider
Set the collection of BOs the decision process decides upon.

Specified by:
setSelectableBos in interface LaraDeliberativeDecider<BO extends LaraBehaviouralOption<?,? extends BO>>
See Also:
LaraDeliberativeDecider.setSelectableBos(java.util.Collection)

toString

public String toString()
Return the name of this decider and the LaraDecisionConfiguration

Overrides:
toString in class Object
See Also:
Object.toString()

getDeliberativeChoiceComp

protected LaraDeliberativeChoiceComponent getDeliberativeChoiceComp()
Checks if the deliberative choice component has been set and provides it true.

Returns:
deliberative choice component