logging
Class AgentLogging

java.lang.Object
  extended by logging.AgentLogging
All Implemented Interfaces:
java.io.Serializable

public class AgentLogging
extends java.lang.Object
implements java.io.Serializable

This class provides a storage of all events, action, proposals and etc. occured for one agent during the scenario. These information will be stored to Java binary file for future analysis.

See Also:
Serialized Form

Field Summary
 java.util.ArrayList<ActionLog> actionsHistory
          Agents action history.
 int agentId
          Id of the agent this storage is for.
 java.lang.String agentName
          Name of the agent this storage is for.
 java.util.ArrayList<AgentStateLog> agentStateHistory
          Agent state history.
 java.util.ArrayList<EmotionEventLog> emotionEventsHistory
          Agent emotion events history.
 java.util.ArrayList<EmotionsLog> emotionsHistory
          Agents emotion history.
 java.util.ArrayList<java.util.ArrayList<FeelingLog>> feelingsHistory
          Agent feelings history.
 java.lang.String fileName
          Filename of this storage.
 java.util.ArrayList<ItemLog> itemsHistory
          Agent item history.
 java.util.ArrayList<MoodLog> moodHistory
          Agent mood history.
 java.util.ArrayList<ProposalInfo> proposalsHistory
          Agents proposal history.
(package private) static long serialVersionUID
          This was used so we can load the object even if we have done minor implementation changes to some methods here
 
Constructor Summary
AgentLogging(java.lang.String myName, java.lang.String fileName)
          Constructor.
AgentLogging(java.lang.String agentName, java.lang.String fileName, int agentId)
          Constructor.
 
Method Summary
 void finish()
          Method invoked at the end of the scenario - this class will be stored to Java binary file.
 void insertAction(ActionType type, int id, double feeling, java.lang.String name, double time, double duration)
          This method is used to insert action in the actionsHistory.
 void insertAgentState(double currentTime, java.lang.String agWithName, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agentWith, PlaceType myGoalPlace, cz.cuni.amis.pogamut.base3d.worldview.objects.Location myGoalTarget, StateType state, cz.cuni.amis.pogamut.base3d.worldview.objects.Location location, cz.cuni.amis.pogamut.base3d.worldview.objects.Rotation rotation, java.util.ArrayList<java.lang.String> interNames, java.util.ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> inters)
          This method is used to insert agent state to agentStateHistory.
 void insertEmotionEvent(EventId eventId, java.lang.String elicitor, java.lang.String elicitorName, int elicitorId, double time, double desirability, double praiseworthiness, double appealingness, double likelihood, double liking, double realization, java.lang.String agency)
          This method is used to emotion event into emotionEventsHistory.
 void insertEmotions(double currentTime, java.util.ArrayList<AEmotion> currentEmotions)
          Used for inserting emotion list into emotionsHistory.
 void insertFeelings(java.util.ArrayList<FeelingLog> feelLog)
          Used for inserting feeling into feelingsHistory.
 void insertItem(ScenarioItemType item, int id, java.lang.String name, boolean bReceived, double feeling, double time)
          Used for inserting item into itemsHistory.
 void insertMood(double currentTime, AMood currentMood)
          Used for inserting the mood into moodHistory.
 void insertProposal(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent, ProposalInfo newProp)
          Used for inserting proposal into proposalsHistory.
 void setAgentId(int id)
          Used for setting the agents Id (may not be known at the time this object is created).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
This was used so we can load the object even if we have done minor implementation changes to some methods here

See Also:
Constant Field Values

agentName

public java.lang.String agentName
Name of the agent this storage is for.


fileName

public java.lang.String fileName
Filename of this storage.


agentId

public int agentId
Id of the agent this storage is for.


actionsHistory

public java.util.ArrayList<ActionLog> actionsHistory
Agents action history.


proposalsHistory

public java.util.ArrayList<ProposalInfo> proposalsHistory
Agents proposal history.


emotionsHistory

public java.util.ArrayList<EmotionsLog> emotionsHistory
Agents emotion history.


emotionEventsHistory

public java.util.ArrayList<EmotionEventLog> emotionEventsHistory
Agent emotion events history.


feelingsHistory

public java.util.ArrayList<java.util.ArrayList<FeelingLog>> feelingsHistory
Agent feelings history.


agentStateHistory

public java.util.ArrayList<AgentStateLog> agentStateHistory
Agent state history.


itemsHistory

public java.util.ArrayList<ItemLog> itemsHistory
Agent item history.


moodHistory

public java.util.ArrayList<MoodLog> moodHistory
Agent mood history.

Constructor Detail

AgentLogging

public AgentLogging(java.lang.String myName,
                    java.lang.String fileName)
Constructor.

Parameters:
myName -
fileName -

AgentLogging

public AgentLogging(java.lang.String agentName,
                    java.lang.String fileName,
                    int agentId)
Constructor.

Parameters:
agentName -
fileName -
agentId -
Method Detail

finish

public void finish()
Method invoked at the end of the scenario - this class will be stored to Java binary file.


insertAction

public void insertAction(ActionType type,
                         int id,
                         double feeling,
                         java.lang.String name,
                         double time,
                         double duration)
This method is used to insert action in the actionsHistory.

Parameters:
type -
id -
feeling -
name -
time -
duration -

insertAgentState

public void insertAgentState(double currentTime,
                             java.lang.String agWithName,
                             cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agentWith,
                             PlaceType myGoalPlace,
                             cz.cuni.amis.pogamut.base3d.worldview.objects.Location myGoalTarget,
                             StateType state,
                             cz.cuni.amis.pogamut.base3d.worldview.objects.Location location,
                             cz.cuni.amis.pogamut.base3d.worldview.objects.Rotation rotation,
                             java.util.ArrayList<java.lang.String> interNames,
                             java.util.ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> inters)
This method is used to insert agent state to agentStateHistory.

Parameters:
currentTime -
agWithName -
agentWith -
myGoalPlace -
myGoalTarget -
state -
location -
rotation -
interNames -
inters -

insertEmotionEvent

public void insertEmotionEvent(EventId eventId,
                               java.lang.String elicitor,
                               java.lang.String elicitorName,
                               int elicitorId,
                               double time,
                               double desirability,
                               double praiseworthiness,
                               double appealingness,
                               double likelihood,
                               double liking,
                               double realization,
                               java.lang.String agency)
This method is used to emotion event into emotionEventsHistory.

Parameters:
eventId -
elicitor -
elicitorName -
elicitorId -
time -
desirability -
praiseworthiness -
appealingness -
likelihood -
liking -
realization -
agency -

insertEmotions

public void insertEmotions(double currentTime,
                           java.util.ArrayList<AEmotion> currentEmotions)
Used for inserting emotion list into emotionsHistory.

Parameters:
currentTime -
currentEmotions -

insertFeelings

public void insertFeelings(java.util.ArrayList<FeelingLog> feelLog)
Used for inserting feeling into feelingsHistory.

Parameters:
feelLog -

insertItem

public void insertItem(ScenarioItemType item,
                       int id,
                       java.lang.String name,
                       boolean bReceived,
                       double feeling,
                       double time)
Used for inserting item into itemsHistory.

Parameters:
item -
id -
name -
bReceived -
feeling -
time -

insertMood

public void insertMood(double currentTime,
                       AMood currentMood)
Used for inserting the mood into moodHistory.

Parameters:
currentTime -
currentMood -

insertProposal

public void insertProposal(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent,
                           ProposalInfo newProp)
Used for inserting proposal into proposalsHistory.

Parameters:
agent -
newProp -

setAgentId

public void setAgentId(int id)
Used for setting the agents Id (may not be known at the time this object is created).

Parameters:
id -