gr.demokritos.iit.jinsect.distributed
Class ResultsAgent

java.lang.Object
  extended by jade.core.Agent
      extended by gr.demokritos.iit.jinsect.distributed.ResultsAgent
All Implemented Interfaces:
jade.core.TimerListener, java.io.Serializable, java.lang.Runnable

public class ResultsAgent
extends jade.core.Agent

An agent to manage the whole comparison process of summaries, that results into evaluation. This is actually an agent implementation of the summary evaluation process that can be found in package console.

See Also:
summaryEvaluator, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
jade.core.Agent.Interrupted
 
Field Summary
protected  java.util.LinkedList ActiveAgents
           
protected  int AgentUniqueIDLength
           
protected  int AllRequests
           
protected  java.lang.Integer CharDist
           
protected  java.lang.Integer CharMax
           
protected  java.lang.Integer CharMin
           
protected  int CompletedRequests
           
protected  java.util.ListIterator CurrentAgent
           
protected  java.lang.String Do
           
protected  java.util.LinkedList InitializedAgents
           
protected  int MaxAgents
           
protected  int MaxPendingRequests
           
protected  double MigrationProbability
           
protected  java.lang.String ModelDir
           
protected  java.lang.String OutFile
           
protected  int PendingRequests
           
protected  java.io.PrintStream psOutputStream
           
protected  boolean ShowProgress
           
protected  boolean Silent
           
protected  java.lang.String SummaryDir
           
protected  java.lang.Integer WeightMethod
           
protected  java.lang.Integer WordDist
           
protected  java.lang.Integer WordMax
           
protected  java.lang.Integer WordMin
           
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
ResultsAgent()
           
 
Method Summary
 void complete()
          Completes the evaluation process, updating the dispatched agents of the event .
protected  java.lang.String createAgentID(int iLen)
          Creates a unique agent ID with a given length.
protected  java.lang.String readFromFile(java.lang.String sFileName)
          Reads a given file into a string .
 void setup()
          Uses the agent command line arguments to initialize the evaluation process.
 void takeDown()
          Shuts down the agent, with a debug message.
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OutFile

protected java.lang.String OutFile

SummaryDir

protected java.lang.String SummaryDir

ModelDir

protected java.lang.String ModelDir

Do

protected java.lang.String Do

psOutputStream

protected java.io.PrintStream psOutputStream

Silent

protected boolean Silent

ShowProgress

protected boolean ShowProgress

PendingRequests

protected int PendingRequests

CompletedRequests

protected int CompletedRequests

AllRequests

protected int AllRequests

AgentUniqueIDLength

protected int AgentUniqueIDLength

MaxPendingRequests

protected int MaxPendingRequests

MaxAgents

protected int MaxAgents

ActiveAgents

protected java.util.LinkedList ActiveAgents

InitializedAgents

protected java.util.LinkedList InitializedAgents

CurrentAgent

protected java.util.ListIterator CurrentAgent

MigrationProbability

protected double MigrationProbability

WordMin

protected java.lang.Integer WordMin

WordMax

protected java.lang.Integer WordMax

WordDist

protected java.lang.Integer WordDist

CharMin

protected java.lang.Integer CharMin

CharMax

protected java.lang.Integer CharMax

CharDist

protected java.lang.Integer CharDist

WeightMethod

protected java.lang.Integer WeightMethod
Constructor Detail

ResultsAgent

public ResultsAgent()
Method Detail

setup

public void setup()
Uses the agent command line arguments to initialize the evaluation process. More on the arguments can be found at summaryEvaluator, with the exception of migration probability (-migProb switch), that indicates the probability of migration of calculating agents.

Overrides:
setup in class jade.core.Agent
See Also:
summaryEvaluator

takeDown

public void takeDown()
Shuts down the agent, with a debug message.

Overrides:
takeDown in class jade.core.Agent

readFromFile

protected java.lang.String readFromFile(java.lang.String sFileName)
Reads a given file into a string .

Parameters:
sFileName - The file to read.

createAgentID

protected java.lang.String createAgentID(int iLen)
Creates a unique agent ID with a given length.

Parameters:
iLen - The required length for the returned string.
Returns:
The unique ID.

complete

public void complete()
Completes the evaluation process, updating the dispatched agents of the event .