TimeslotCommand - Pyosch/powertac-server GitHub Wiki

#TimeslotCommand

##Description TimeslotCommands serve as the basis for time management and are triggered by the Competition Controller. Several actions within the server are started at particular timeslot changes (i.e. upon a server component receiving a TimeslotCommand instance). These are detailed below.

Note: In contrast to server components, Brokers are not limited to acting upon receiving a timeslot event, more precisely, they are not even required to react to timeslot events in any form. Instead they are free to submit their actions (e.g. tariff publishing, shout submission) any time during competition runtime. However, server response to these broker actions may not be immediate but instead deferred to timeslot events. For example, a broker can publish a tariff any time he wants but the updated tariff list is only forwarded to customers (and all other brokers) upon the subsequent timeslot change. An incoming shout from a broker, in contrast, is immediately processed by the wholesale market.

See also Time Management for additional information.

##Command created by:

  • Competition Controller

##Involved roles:

  • Competition Controller
  • Accounting service
  • Broker
  • Customer
  • Distribution Utility
  • (Auctioneer - for non-CDA markets)

##Server logic triggered by this command:

###Publish a customer's meter reading of the current timeslot

  • CC-Cu-AC-Br: Publishing MeterReadings

A TimeslotCommand for a current timeslot triggers the customer service activator generateMeterreading(), which determines the customer's power consumption / generation for this timeslot which is subsequently sent as a MeterReadingCommand to both the customer's broker and the accounting service. This command triggers the accounting service to log the consumption of this customer in this timeslot.

/figures/TimeslotCommandGenerateMeterReading.png

###Calculate Balancing Power for the past timeslot

  • CC-AC-DU-AC-Br: Balance MeterReadings

A TimeslotCommand for a current timeslot triggers the accounting service activator MeterReadingSum() compiling the sums of the meter readings (together with the futures market positions) for each broker of the prior timeslot. These are reported to the distribution utility which will determine the balancing fees and create the corresponding cash positions for each broker. Each of these cash positions are subsequently sent out to the accounting service and the corresponding broker.

/figures/TimeslotCommandCalculateBalancingPower.png

###Publish Tariff List

  • CC-AC-CU-AC-Br: Assign Customer to Tariffs

A TimeslotCommand for a current timeslot triggers the accounting service activator publishTariffList() to compile the current tariff list. Wrapped as a tarifflist command this is sent out to all brokers as well as all customers. For each customer the tariffListCommand will invoke the chooseTariff() service activator. If valid this tariffReplyCommand is sent to both accounting service and the corresponding broker.

/figures/TimeslotCommandPublishTariffList.png

###Time proceed

  • CC-BR: Brokers are informed about timeslot change

###Calculate Timeslot Emission Tax / Renewable Subsidy

  • CC-AC-TA-AC-BR

##Class Diagramm /classDiagrams/TimeslotCommand.png