se.sics.tasim.is.common
Class ResultManager

java.lang.Object
  extended by se.sics.tasim.is.common.ResultManager

public abstract class ResultManager
extends java.lang.Object

The ResultManager is responsible for storing simulation results for the simulation types it handles. It also generates the result and score web pages.


Constructor Summary
ResultManager()
           
 
Method Summary
protected  void addSimulationResult(ParticipantInfo[] participants, double[] scores)
           
protected  void addSimulationResult(ParticipantInfo[] participants, long[] scores)
           
protected  void addSimulationToHistory(ParticipantInfo[] participants)
          Adds this simulation to the history table.
protected  void addSimulationToHistory(ParticipantInfo[] participants, java.lang.String[] participantColors)
          Adds this simulation to the history table.
protected abstract  void generateResult()
          generateResult is responsible for: Storing the result in the database Generating the result web pages Updating the total score table for this type of simulation and server Adding this simulation to the history page
 void generateResult(LogReader logReader, java.lang.String destinationPath)
           
protected  java.lang.String getDestinationPath()
          Returns the directory where the result pages should be stored.
protected  java.lang.String getGameLogName()
           
protected  LogReader getLogReader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultManager

public ResultManager()
Method Detail

generateResult

public final void generateResult(LogReader logReader,
                                 java.lang.String destinationPath)
                          throws java.io.IOException
Throws:
java.io.IOException

getDestinationPath

protected java.lang.String getDestinationPath()
Returns the directory where the result pages should be stored.

The path is either an empty string or ends with a file separator and the result manager should at least create the file getDestinationPath() + "index.html".

Returns:
the destination path where to store the result pages

getLogReader

protected LogReader getLogReader()

getGameLogName

protected java.lang.String getGameLogName()

addSimulationToHistory

protected void addSimulationToHistory(ParticipantInfo[] participants)
Adds this simulation to the history table. The specified participants should be sorted with best scored participant first.

Parameters:
participants - the sorted vector with the participants in this simulation

addSimulationToHistory

protected void addSimulationToHistory(ParticipantInfo[] participants,
                                      java.lang.String[] participantColors)
Adds this simulation to the history table. The specified participants should be sorted with best scored participant first.

Parameters:
participants - the sorted vector with the participants in this simulation
participantColors - the HTML colors for the specified participants or null if no colors should be used

addSimulationResult

protected void addSimulationResult(ParticipantInfo[] participants,
                                   long[] scores)

addSimulationResult

protected void addSimulationResult(ParticipantInfo[] participants,
                                   double[] scores)

generateResult

protected abstract void generateResult()
                                throws java.io.IOException
generateResult is responsible for:

Throws:
java.io.IOException


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.