|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cesr.lara.components.LaraProperty<BO,Map<Class<? extends LaraPreference>,Double>>
de.cesr.lara.components.LaraBehaviouralOption<A,BO>
A
- the agent class that may deal with these BOsBO
- the behavioural option typepublic abstract class LaraBehaviouralOption<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>
LaraBehaviouralOption
declares behavioural options an agent may
choose from to perform. The agent type parameter allows the user to access
agent members without casting, for instance to preselect the behavioural
option with respect to agent properties.
Instances of this class are only modifiable by invoking the instance methods
get
Constructor Summary | |
---|---|
LaraBehaviouralOption(String key,
A agent)
Does not call constructor with more parameters above to prevent double initialisation of preferenceUtilities |
|
LaraBehaviouralOption(String key,
A agent,
LPrefEntry... prefEntry)
constructor |
|
LaraBehaviouralOption(String key,
A agent,
Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
constructor |
Method Summary | |
---|---|
protected int |
calculateHashCode()
calculate hash code: |
int |
compareTo(LaraBehaviouralOption<A,BO> bo1)
|
boolean |
equals(Object o)
NOTE: Subclasses that add fields need to redefine the method appropriately according to the contract of equals() of Object . |
A |
getAgent()
Returns the agent this BO belongs to |
Map<Class<? extends LaraPreference>,Double> |
getModifiableUtilities()
Returns a copy of the internal utility map that may be edited. |
BO |
getModifiedAgentBO(A agent)
|
abstract BO |
getModifiedBO(A agent,
Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
|
BO |
getModifiedProperty(Map<Class<? extends LaraPreference>,Double> value)
|
BO |
getModifiedUtilitiesBO(Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
|
abstract Map<Class<? extends LaraPreference>,Double> |
getSituationalUtilities(LaraDecisionConfiguration dBuilder)
|
float |
getTotalSituationalUtility(LaraDecisionConfiguration dConfig)
Returns the sum of BO-utility * agent'S situational preference over all preferenceWeights. |
Map<Class<? extends LaraPreference>,Double> |
getValue()
Returns an unmodifiable(!) |
int |
hashCode()
|
boolean |
isCurrentlyApplicable()
This method may be called by LaraBOPreselector to check whether
the BO is applicable under current environmental and agent conditions. |
String |
toString()
The returned String representation has the format [ |
Methods inherited from class de.cesr.lara.components.LaraProperty |
---|
getKey, getRefreshedProperty, getTimestamp |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LaraBehaviouralOption(String key, A agent)
key
- agent
- public LaraBehaviouralOption(String key, A agent, LPrefEntry... prefEntry)
key
- agent
- prefEntry
- list of LPrefEntry
spublic LaraBehaviouralOption(String key, A agent, Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
key
- agent
- preferenceUtilities
- Method Detail |
---|
public int compareTo(LaraBehaviouralOption<A,BO> bo1)
compareTo
in interface Comparable<LaraBehaviouralOption<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>>
bo1
-
public boolean equals(Object o)
Object
.
equals
in class LaraProperty<BO extends LaraBehaviouralOption<?,?>,Map<Class<? extends LaraPreference>,Double>>
Object.equals(java.lang.Object)
public A getAgent()
public Map<Class<? extends LaraPreference>,Double> getModifiableUtilities()
public BO getModifiedAgentBO(A agent)
agent
-
public abstract BO getModifiedBO(A agent, Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
agent
- preferenceUtilities
-
public BO getModifiedProperty(Map<Class<? extends LaraPreference>,Double> value)
getModifiedProperty
in class LaraProperty<BO extends LaraBehaviouralOption<?,?>,Map<Class<? extends LaraPreference>,Double>>
LaraProperty.getModifiedProperty(java.lang.Object)
public BO getModifiedUtilitiesBO(Map<Class<? extends LaraPreference>,Double> preferenceUtilities)
preferenceUtilities
- map of preferenceWeights and values
public abstract Map<Class<? extends LaraPreference>,Double> getSituationalUtilities(LaraDecisionConfiguration dBuilder)
dConfig
-
public float getTotalSituationalUtility(LaraDecisionConfiguration dConfig)
dConfig
- the LaraDecisionConfiguration
the situational
preferenceWeights apply to
public Map<Class<? extends LaraPreference>,Double> getValue()
getValue
in class LaraProperty<BO extends LaraBehaviouralOption<?,?>,Map<Class<? extends LaraPreference>,Double>>
public int hashCode()
hashCode
in class LaraProperty<BO extends LaraBehaviouralOption<?,?>,Map<Class<? extends LaraPreference>,Double>>
LaraProperty.hashCode()
public boolean isCurrentlyApplicable()
LaraBOPreselector
to check whether
the BO is applicable under current environmental and agent conditions.
public String toString()
toString
in class LaraProperty<BO extends LaraBehaviouralOption<?,?>,Map<Class<? extends LaraPreference>,Double>>
LaraProperty.toString()
protected int calculateHashCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |