org.powertac.common.interfaces
Interface CompetitionControl


public interface CompetitionControl

This is the core of the Power TAC simulation framework, responsible for starting, running, and completing a competition. Plugins that are designed to run in the main simulation loop can be activated at the proper phase during each timeslot by registering themselves by phase number.

Author:
jcollins

Method Summary
 boolean isBootstrapMode()
          True just in case the sim is running in bootstrap mode - generating bootstrap data.
 boolean loginBroker(String username)
          Attempts to log in a broker by username.
 void receiveMessage(org.powertac.common.msg.PauseRelease msg)
           
 void receiveMessage(org.powertac.common.msg.PauseRequest msg)
          Processes simulation pause messages
 void registerTimeslotPhase(TimeslotPhaseProcessor thing, int phase)
          Registers the caller to be activated during each timeslot in the proper phase sequence.
 void runOnce(boolean bootstrapMode)
          Waits for broker login, then starts and runs a simulation.
 void setAuthorizedBrokerList(List<String> brokerList)
          Sets the list of brokers authorized to log in to the next game.
 

Method Detail

isBootstrapMode

boolean isBootstrapMode()
True just in case the sim is running in bootstrap mode - generating bootstrap data.


registerTimeslotPhase

void registerTimeslotPhase(TimeslotPhaseProcessor thing,
                           int phase)
Registers the caller to be activated during each timeslot in the proper phase sequence.


loginBroker

boolean loginBroker(String username)
Attempts to log in a broker by username. Returns true just in case the login is successful. The intent is that login will be successful if the username is on the authorizedBrokerList, or if it is one of the pre-configured brokers (usually only the default broker).


setAuthorizedBrokerList

void setAuthorizedBrokerList(List<String> brokerList)
Sets the list of brokers authorized to log in to the next game. Must be called after completion of a simulation and before calling runOnce(). This is normally done immediately after calling preGame().


runOnce

void runOnce(boolean bootstrapMode)
Waits for broker login, then starts and runs a simulation.


receiveMessage

void receiveMessage(org.powertac.common.msg.PauseRequest msg)
Processes simulation pause messages


receiveMessage

void receiveMessage(org.powertac.common.msg.PauseRelease msg)


Copyright © 2012 Power TAC. All Rights Reserved.