public abstract class MotivationalCodelet extends Codelet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INPUT_DRIVES_MEMORY |
static java.lang.String |
INPUT_SENSORS_MEMORY |
static java.lang.String |
OUTPUT_DRIVE_MEMORY |
Constructor and Description |
---|
MotivationalCodelet(java.lang.String id,
double level,
double priority,
double urgencyThreshold) |
Modifier and Type | Method and Description |
---|---|
void |
accessMemoryObjects()
This method is used in every Codelet to capture input, broadcast and
output MemoryObjects which shall be used in the proc() method.
|
void |
addDrive(Memory drive,
double relevance) |
void |
calculateActivation()
This abstract method must be implemented by the user.
|
abstract double |
calculateSecundaryDriveActivation(java.util.List<Memory> sensors,
java.util.List<Drive> listOfDrives) |
abstract double |
calculateSimpleActivation(java.util.List<Memory> sensors) |
java.util.Map<Memory,java.lang.Double> |
getDrivesRelevance() |
double |
getEmotionalDistortion() |
java.lang.String |
getId() |
Memory |
getInputDrivesMO() |
Memory |
getInputSensorsMO() |
double |
getLevel() |
Memory |
getOutputDriveMO() |
double |
getPriority() |
java.util.List<Memory> |
getSensoryVariables() |
double |
getUrgencyThreshold() |
void |
proc()
Main Codelet function, to be implemented in each subclass.
|
void |
removeDrive(Memory drive) |
void |
setEmotionalDistortion(double emotionalDistortion) |
void |
setId(java.lang.String id) |
void |
setInputDrivesMO(Memory inputDrivesMO) |
void |
setInputSensorsMO(Memory inputSensorsMO) |
void |
setLevel(double level) |
void |
setOutputDriveMO(Memory outputDriveMO) |
void |
setPriority(double priority) |
void |
setSensoryVariables(java.util.List<Memory> sensoryVariables) |
void |
setUrgencyThreshold(double urgencyThreshold) |
addBroadcast, addBroadcasts, addInput, addInputs, addOutput, addOutputs, getActivation, getBroadcast, getBroadcast, getBroadcast, getEnabled, getInput, getInput, getInputs, getInputsOfType, getName, getOutput, getOutput, getOutputs, getOutputsOfType, getThreadName, getThreshold, getTimeStep, impendingAccess, impendingAccessBuffer, isLoop, isProfiling, notifyCodelet, removeFromInput, removeFromOutput, removesInput, removesOutput, run, setActivation, setBroadcast, setCodeletProfiler, setEnabled, setInputs, setIsMemoryObserver, setLoop, setName, setOutputs, setProfiling, setThreshold, setTimeStep, shouldLoop, start, stop, toString
public static final java.lang.String INPUT_DRIVES_MEMORY
public static final java.lang.String INPUT_SENSORS_MEMORY
public static final java.lang.String OUTPUT_DRIVE_MEMORY
public MotivationalCodelet(java.lang.String id, double level, double priority, double urgencyThreshold)
public void accessMemoryObjects()
Codelet
accessMemoryObjects
in class Codelet
public void proc()
Codelet
public void addDrive(Memory drive, double relevance)
public void removeDrive(Memory drive)
public void calculateActivation()
Codelet
calculateActivation
in class Codelet
public abstract double calculateSimpleActivation(java.util.List<Memory> sensors)
public abstract double calculateSecundaryDriveActivation(java.util.List<Memory> sensors, java.util.List<Drive> listOfDrives)
public double getLevel()
public java.util.Map<Memory,java.lang.Double> getDrivesRelevance()
public java.lang.String getId()
public void setId(java.lang.String id)
public double getPriority()
public void setPriority(double priority)
public Memory getInputDrivesMO()
public void setInputDrivesMO(Memory inputDrivesMO)
public Memory getInputSensorsMO()
public void setInputSensorsMO(Memory inputSensorsMO)
public Memory getOutputDriveMO()
public void setOutputDriveMO(Memory outputDriveMO)
public java.util.List<Memory> getSensoryVariables()
public void setSensoryVariables(java.util.List<Memory> sensoryVariables)
public void setLevel(double level)
public double getUrgencyThreshold()
public void setUrgencyThreshold(double urgencyThreshold)
public double getEmotionalDistortion()
public void setEmotionalDistortion(double emotionalDistortion)