org.powertac.common.interfaces
Interface CompetitionSetup
public interface CompetitionSetup
Handles the pre-game competition setup process. To start a simulation,
one must call preGame(), followed by CompetitionControl.runOnce().
- Author:
- John Collins
|
Method Summary |
String |
bootSession(String bootFilename,
String configFilename,
String logfileSuffix,
String seedData,
String weatherData)
Starts a bootstrap session with parameters. |
void |
preGame()
Runs the pre-game cycle of the simulator, which sets all plugin components
to their default state. |
String |
simSession(String bootData,
String config,
String jmsUrl,
String logfileSuffix,
List<String> brokerUsernames,
String seedData,
String weatherData,
String inputQueueName)
Starts a simulation session with parameters, in a new thread. |
preGame
void preGame()
- Runs the pre-game cycle of the simulator, which sets all plugin components
to their default state.
bootSession
String bootSession(String bootFilename,
String configFilename,
String logfileSuffix,
String seedData,
String weatherData)
- Starts a bootstrap session with parameters. Result is null if successful,
otherwise contains an error message. Parameters are:
- bootFilename is the (required)
name of an output file where the bootstrap dataset will be stored.
- configFilename is the (optional) name of a server-configuration file;
if the name contains a ":" it will be treated as a URL.
- logfileSuffix is an (optional) filename suffix for the log output
files; default value is "boot".
- weatherData is the (optional) name of a file containing weather data
for the simulation; Either XMl or a state file
A state file will be treated as a URL if it contains a ":" character.
simSession
String simSession(String bootData,
String config,
String jmsUrl,
String logfileSuffix,
List<String> brokerUsernames,
String seedData,
String weatherData,
String inputQueueName)
- Starts a simulation session with parameters, in a new thread.
Result is null if successful, otherwise contains an error message.
Parameters are:
- bootData is the (required) name of an input file containing a
bootstrap dataset for the simulation; it will be treated as a URL if it
contains a ":" character.
- config is the (optional) name of a server-configuration file;
if the name contains a ":" it will be treated as a URL.
- jmsUrl is the URL on which the server should listen for JMS connections.
This is required if the server is to interact with brokers on separate
machines. If given, all brokers must use this URL to contact the server.
- logfileSuffix is an (optional) filename suffix for the log output
files; default value is "sim".
- brokerUsernames is a list of Strings giving the usernames of brokers
who are expected to log in to the simulation before it starts. If a username
is of the form string1/string2, then string1 is the broker's username,
and string2 is the name of that broker's JMS input queue. If this argument
is null or empty, the simulation will start without brokers.
- seedData is the (optional) name of a file containing seed data
for the simulation;
it will be treated as a URL if it contains a ":" character.
- weatherData is the (optional) name of a file containing weather data
for the simulation; Either XMl or a state file
A state file will be treated as a URL if it contains a ":" character.
- inputQueueName is the name of the server's JMS input queue. If not
given, then the default value of 'serverInput' will be used.
Copyright © 2013 Power TAC. All Rights Reserved.