Scenarios - Pyosch/powertac-server GitHub Wiki
This page is an index to a set of usage/operational scenarios that should help us clarify and understand exactly how the Server works. Each scenario should describe a single interaction, such as a broker publishing a new Tariff, or a Customer subscribing to a Tariff, etc. Descriptions need to be clear about what initiates the interaction, what types are involved, which messages are sent from where to where, etc.
Scenarios initiated by the Competition Control
The Competition Control is responsible for configuring and starting a game, for establishing connections with Brokers, for communicating game parameters to Brokers, for
Start of Game
At the start of a game, the CC must initialize the database, configure game parameters, establish connections with Brokers, communicate game parameters to Brokers, [communicate historical load profiles](Load profiles) to brokers, create the Timeslot instances, and start the scheduler.
Start of timeslot
During each timeslot, the CC must coordinate the activities of other server components, including the Customers, the markets, and the Accounting Service.
End of Game
At the conclusion of a game, the CC must disconnect the brokers, determine Broker rankings, generate and save game summary data, and dump the game database.
Scenarios initiated by a Broker
Publish Tariff
A broker can publish a new Tariff at any time.
Expire or Revoke Tariff
A broker can change the expiration date of an existing Tariff. The specified date must be no earlier than the current sim time. Once the expiration date arrives, no further subscriptions will be allowed, but existing subscriptions will remain valid. A Broker can also completely revoke an existing tariff, at which point all existing subscriptions will be forcibly switched to a superseding tariff. If the Broker has not already posted a superseding Tariff, then all its subscriptions will be moved to the Default Tariff. When this is done, the subscription for the superseding Tariff will be marked as "expired" which means customers may switch to a different Tariff without paying an early-withdrawal penalty.
Publish new HourlyCharge for existing Tariff/Rate
Brokers with variable-rate Tariffs need to publish an HourlyCharge for each timeslot out to the Rate's notification interval, to cover all timeslots during which that Rate applies.
Place wholesale market order
Brokers can submit buy / sell orders to the wholesale market.
Scenarios initiated by a Customer
Switch subscription
A customer can switch some number of its individuals from one Tariff to another. This action may, of course, lead to early-withdrawal penalties and subscription bonuses, an empty subscription (which can presumably be discarded), and a tariff with no remaining subscriptions.
Beginning of timeslot
CFL: Are these scenarios really initiated by the Customer? I was always imagining the Accounting Service querying each customer for its latest Meter reading, hence the generateMeterReading(.) method. ... JEC: There is not just one MeterReading per Customer. See the 2011-02-14 notes on Nabble for details.
At the beginning of each timeslot, when requested by the CompetitionController, each Customer model must retrieve data, run its models, and report results.
Scenarios initiated by the Distribution Utility
Completion of customer modeling actions
During each timeslot, after Customer models have run their models to determine consumption and production, the Distribution Utility must run its balancing process and settle the balancing market, post bank transactions, and notify brokers of the results.