Getting Started

From powerwiki
Revision as of 16:20, 15 June 2011 by Grampajohn (talk | contribs)
Jump to: navigation, search

Release 0.3, mid-June 2011

For this version, we have developed a script that downloads all the server components along with the demo broker. You do not need to install or use git, but you will need working installations of groovy and grails. See the developer's Getting Started page for setup instructions and links. This script currently depends on tar to expand the tarballs, and it has not been tested on Windows. It should work without problems on Linux and OS X, and it should work on Cygwin. If someone knows how to eliminate the dependence on tar, or wants to contribute a Windows version, let us know.

Download the release package

To pull down the release package (15 modules), follow these steps (examples are for a unix or cygwin shell):

  1. Create a new empty directory (we'll assume you call it powertac-0.3) and copy the script to this directory.
mkdir powertac-0.3
cp installBranch.groovy powertac-0.3
  1. Move to the directory and run the script, giving the release ID as an argument.
cd powertac-0.3
groovy installBranch.groovy release-0.3
  1. The script takes a minute or two and reports its progress; make sure there are no errors. It works to run the script again over the top of an existing installation; that will simply replace the current contents of the module directories with fresh copies from github.

Run the server

To start the server, simply enter the powertac-server directory and use the command grails run-app. This will resolve dependencies, compile all the code, and start the server on localhost:8080. Once it is running, you will see the line

Server running. Browse to http://localhost:8080/powertac-server

in the console. If you browse to this address, you will see a web page that allows you to modify some aspects of the server configuration, and to start a new simulation. The default configuration runs a simulation of just 96 hours, to facilitate testing.

While the server is running, it writes to a log file in logs/powertac-server.log. If you start a simulation and watch the log, you will see evidence of most server processes as they run.

Run the demo agent

The directory powertac-demo-agent-grails is an agent framework, written in grails, that incorporates all the necessary message handling and time-keeping to interact properly with the server. To run the agent on the same machine with the server, it's necessary to force it to use a non-standard port for its web front-end. Do this as

grails -Dport=9090 run-app

and wait for its server running message. To connect the agent to the server, start the server first, but don't start a simulation. Then start the agent and log it in from its web page (by default, the server ignores the agent's password; you can just leave it blank). Finally, configure the server (poke the "default competition" entry and edit/save it) and start it (poke the "dashboard" entry and start the competition). Once the server is running, you can use the broker's web page to submit a tariff, then watch its progress through the server. Note that new tariffs are by default published once every 6 timeslots.

Release notes

This package is far more capable than the 0.2 release from May, but there remain a few missing features and odd bugs that we are aware of. In the following, we give the Github issue number for each issue:

Release 0.2, mid-May 2011

Because the development team is still actively developing, we have not yet packaged the Power TAC server plugins to be automatically resolved by maven. Therefore, you will have to use the release branch in development mode, which means you need to install git and download each component from its github repository and checkout the correct branch. With a git command-line tool, you do this as

git clone https://github.com/powertac/powertac-server.git
git clone https://github.com/powertac-plugins/powertac-common.git
... etc. ...

There are a number of git clients, either embedded in tools like Springsource STS (a custom-packaged version of Eclipse) and IntelliJ, or command-line or GUI clients.

You will need to install Grails 1.3.7 before you can run the server or the demo agent.

To retrieve the server, you will need the server and 12 plugins, each cloned into parallel directories. Instructions for downloading and setting up the server as a developer are given in the developer's wiki on github. If you follow these instructions, you will have the development branch, not the release branch. We attempt to keep the development branch reasonably stable, but we cannot support it for non-developers. To get to the release branch, you will need to check out the branch release-0.2 in each of the component directories. Using the command-line version of git, this is accomplished by

git checkout release-0.2

Once you have done this, you should be ready to start the server.

In addition to the server, there is a simple Grails-based demo agent that runs the communication protocol and provides a simple web interface to the underlying data model.