org.powertac.common.interfaces
Interface Accounting


public interface Accounting

Common interface for the PowerTAC accounting service. The accouting service module is responsible for bookeeping, with respect to cash (broker bank accounts) and market positions on behalf of brokers. All activities that could potentially affect cash or market positions must be recorded by making calls on the Accounting API. Summaries of accounts, along with all new transactions, are sent to brokers at the end of each timeslot.

Accounting is also a TimeslotPhaseProcessor, running in the last phase of the simulation cycle. All processors that can generate transactions must run in earlier phases.

Author:
John Collins

Method Summary
 void activate(org.joda.time.Instant time, int phase)
          Runs the accounting process.
 org.powertac.common.BalancingTransaction addBalancingTransaction(org.powertac.common.Broker broker, double imbalance, double charge)
          Adds a balancing transaction to represent the cost of imbalance
 org.powertac.common.DistributionTransaction addDistributionTransaction(org.powertac.common.Broker broker, double load, double fee)
          Adds a distribution transaction to represent charges for carrying power
 org.powertac.common.MarketTransaction addMarketTransaction(org.powertac.common.Broker broker, org.powertac.common.Timeslot timeslot, double price, double mWh)
          Adds a market transaction that includes both a cash component and a product commitment for a specific timeslot.
 org.powertac.common.TariffTransaction addTariffTransaction(org.powertac.common.TariffTransaction.Type txType, org.powertac.common.Tariff tariff, org.powertac.common.CustomerInfo customer, int customerCount, double kWh, double charge)
          Adds a tariff transaction to the current-day transaction list.
 double getCurrentMarketPosition(org.powertac.common.Broker broker)
          Returns the market position for the current timeslot for a given broker.
 double getCurrentNetLoad(org.powertac.common.Broker broker)
          Returns the current net load represented by unprocessed TariffTransactions for a specific Broker.
 

Method Detail

addMarketTransaction

org.powertac.common.MarketTransaction addMarketTransaction(org.powertac.common.Broker broker,
                                                           org.powertac.common.Timeslot timeslot,
                                                           double price,
                                                           double mWh)
Adds a market transaction that includes both a cash component and a product commitment for a specific timeslot.


addTariffTransaction

org.powertac.common.TariffTransaction addTariffTransaction(org.powertac.common.TariffTransaction.Type txType,
                                                           org.powertac.common.Tariff tariff,
                                                           org.powertac.common.CustomerInfo customer,
                                                           int customerCount,
                                                           double kWh,
                                                           double charge)
Adds a tariff transaction to the current-day transaction list.


addDistributionTransaction

org.powertac.common.DistributionTransaction addDistributionTransaction(org.powertac.common.Broker broker,
                                                                       double load,
                                                                       double fee)
Adds a distribution transaction to represent charges for carrying power


addBalancingTransaction

org.powertac.common.BalancingTransaction addBalancingTransaction(org.powertac.common.Broker broker,
                                                                 double imbalance,
                                                                 double charge)
Adds a balancing transaction to represent the cost of imbalance


getCurrentNetLoad

double getCurrentNetLoad(org.powertac.common.Broker broker)
Returns the current net load represented by unprocessed TariffTransactions for a specific Broker. This is needed to run the balancing process.


getCurrentMarketPosition

double getCurrentMarketPosition(org.powertac.common.Broker broker)
Returns the market position for the current timeslot for a given broker. Needed to run the balancing process.


activate

void activate(org.joda.time.Instant time,
              int phase)
Runs the accounting process. This needs to be here to support some tests



Copyright © 2011 Power TAC. All Rights Reserved.