edu.cuny.tac.aa
Class MetroClick

java.lang.Object
  extended by se.sics.tasim.aw.Agent
      extended by edu.cuny.tac.aa.MetroClick
All Implemented Interfaces:
edu.cuny.util.Parameterizable

public class MetroClick
extends se.sics.tasim.aw.Agent
implements edu.cuny.util.Parameterizable

This class implements the framework of MetroClick, the bidding agent for TAC Ad Auctions.

Version:
$Revision: 1 $
Author:
Jinzhong Niu
See Also:
TAC AA Documentation< /a>

Field Summary
protected static java.lang.String[] args
           
static java.lang.String BANNER
           
protected  BiddingStrategy bidding
           
static int majorVersion
           
static int minorVersion
           
static java.lang.String NAME
           
static java.lang.String P_MC
          the root of names of parameters for MetroClick.
static java.lang.String P_VERSION
           
protected  java.lang.String publisherAddress
           
 
Fields inherited from class se.sics.tasim.aw.Agent
ADMIN, COORDINATOR
 
Constructor Summary
MetroClick()
           
 
Method Summary
static java.lang.String getBanner()
           
static java.lang.String getDefaultParameterFile()
           
static java.lang.String getParameterFile(java.lang.String[] args)
          retrieves the name of the parameter file from command line arguments; or the default file is used if no argument is present.
static java.lang.String getVersion()
           
protected  void handleAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)
          Processes the advertiser information.
protected  void handleSimulationStatus(se.sics.tasim.props.SimulationStatus simulationStatus)
          Processes a simulation status notification and sends bids.
protected static void loadConfig(java.lang.String[] args)
           
protected  void messageReceived(se.sics.tasim.aw.Message message)
          Processes the messages received the by agent from the server.
protected static java.lang.String[] parseStrings(java.lang.String s)
           
protected  void setup()
           
 void setup(edu.cuny.util.ParameterDatabase parameters, edu.cuny.util.Parameter base)
           
static void setupPreferences(java.net.URL url, java.lang.String[] args)
           
protected  void simulationFinished()
          Runs any post-processes required for the agent after a simulation ends.
protected  void simulationSetup()
          Prepares the agent for a new simulation.
 java.lang.String toString()
           
 
Methods inherited from class se.sics.tasim.aw.Agent
addTimeListener, getAddress, getName, getNextID, getServerTime, removeTimeListener, sendMessage, sendMessage, sendMessages, sendToRole, simulationStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minorVersion

public static final int minorVersion
See Also:
Constant Field Values

majorVersion

public static final int majorVersion
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

BANNER

public static final java.lang.String BANNER

P_MC

public static final java.lang.String P_MC
the root of names of parameters for MetroClick.

See Also:
Constant Field Values

P_VERSION

public static final java.lang.String P_VERSION
See Also:
Constant Field Values

args

protected static java.lang.String[] args

publisherAddress

protected java.lang.String publisherAddress

bidding

protected BiddingStrategy bidding
Constructor Detail

MetroClick

public MetroClick()
Method Detail

parseStrings

protected static java.lang.String[] parseStrings(java.lang.String s)

loadConfig

protected static void loadConfig(java.lang.String[] args)

setupPreferences

public static void setupPreferences(java.net.URL url,
                                    java.lang.String[] args)

getBanner

public static java.lang.String getBanner()

getVersion

public static java.lang.String getVersion()

getDefaultParameterFile

public static java.lang.String getDefaultParameterFile()

getParameterFile

public static java.lang.String getParameterFile(java.lang.String[] args)
retrieves the name of the parameter file from command line arguments; or the default file is used if no argument is present.

Parameters:
args - command line arguments
Returns:
the name of the parameter file

setup

protected void setup()

setup

public void setup(edu.cuny.util.ParameterDatabase parameters,
                  edu.cuny.util.Parameter base)
Specified by:
setup in interface edu.cuny.util.Parameterizable

messageReceived

protected void messageReceived(se.sics.tasim.aw.Message message)
Processes the messages received the by agent from the server.

Specified by:
messageReceived in class se.sics.tasim.aw.Agent
Parameters:
message - the message

handleSimulationStatus

protected void handleSimulationStatus(se.sics.tasim.props.SimulationStatus simulationStatus)
Processes a simulation status notification and sends bids. Each simulation day the simulation status notification is sent after the other daily messages (QueryReport SalesReport have been sent.

Parameters:
simulationStatus - the daily simulation status.

handleAdvertiserInfo

protected void handleAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)
Processes the advertiser information.

Parameters:
advertiserInfo - the advertiser information.

simulationSetup

protected void simulationSetup()
Prepares the agent for a new simulation.

Specified by:
simulationSetup in class se.sics.tasim.aw.Agent

simulationFinished

protected void simulationFinished()
Runs any post-processes required for the agent after a simulation ends.

Specified by:
simulationFinished in class se.sics.tasim.aw.Agent

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object