de.cesr.lara.components.decision.impl
Class LTreeDecider<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P>

java.lang.Object
  extended by de.cesr.lara.components.decision.impl.LTreeDecider<A,BO,P>
Type Parameters:
A - type of agents
BO - type of behavioural options
P - type of parameter
All Implemented Interfaces:
LaraDecider<BO>

public class LTreeDecider<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P>
extends Object
implements LaraDecider<BO>


Constructor Summary
LTreeDecider(LaraDecisionTree<A,BO,P> decisionTree, A agent, P parameter)
           
 
Method Summary
 void decide()
          Executes the decision!
 Set<BO> getKSelectedBos(int k)
          Return the LaraBehaviouralOptions that were selected in LaraDecider.decide().
 int getNumSelectableBOs()
           
 BO getSelectedBo()
          Return the LaraBehaviouralOption that was selected in LaraDecider.decide().
 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
 

Constructor Detail

LTreeDecider

public LTreeDecider(LaraDecisionTree<A,BO,P> decisionTree,
                    A agent,
                    P parameter)
Parameters:
decisionTree -
agent -
parameter -
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<?,BO>>

getKSelectedBos

public Set<BO> getKSelectedBos(int k)
Description copied from interface: LaraDecider
Return the LaraBehaviouralOptions that were selected in LaraDecider.decide(). Note: Do not perform the actual selection here since this method might be called more than once!

Specified by:
getKSelectedBos in interface LaraDecider<BO extends LaraBehaviouralOption<?,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

getNumSelectableBOs

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

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<?,BO>>
Returns:
a LaraBehaviouralOption as result of the decision process

toString

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

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