|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.memphis.ccrg.lida.globalworkspace.triggers.AggregateCoalitionActivationTrigger
public class AggregateCoalitionActivationTrigger
Implements a trigger that is activated when the sum of all Coalition
s
in GlobalWorkspace
is greater than the threshold.
Field Summary | |
---|---|
protected GlobalWorkspace |
gw
The GlobalWorkspace |
protected double |
threshold
The activation treshold |
Constructor Summary | |
---|---|
AggregateCoalitionActivationTrigger()
|
Method Summary | |
---|---|
void |
checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
This method is executed each time a new Coalition enters the GlobalWorkspace and
calculates the total activation. |
double |
getThreshold()
|
void |
init(java.util.Map<java.lang.String,java.lang.Object> parameters,
GlobalWorkspace gw)
This method is a generic way to setup the Trigger. |
void |
reset()
To reset the Trigger. |
void |
start()
To start the Trigger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GlobalWorkspace gw
GlobalWorkspace
protected double threshold
Constructor Detail |
---|
public AggregateCoalitionActivationTrigger()
Method Detail |
---|
public void checkForTriggerCondition(java.util.Collection<Coalition> coalitions)
Coalition
enters the GlobalWorkspace
and
calculates the total activation. If it is over threshold then the broadcast is triggered.
checkForTriggerCondition
in interface BroadcastTrigger
coalitions
- a Collection of all the Coalition
s in the GlobalWorkspace
.public void reset()
BroadcastTrigger
reset
in interface BroadcastTrigger
public void init(java.util.Map<java.lang.String,java.lang.Object> parameters, GlobalWorkspace gw)
BroadcastTrigger
init
in interface BroadcastTrigger
parameters
- a map for generic parameters.gw
- A TriggerListener. Most of the cases is the same class that
implements GlobalWorkspace Interface.public void start()
BroadcastTrigger
start
in interface BroadcastTrigger
public double getThreshold()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |