Accounting transactions story - Pyosch/powertac-server GitHub Wiki
up
The Accounting service keeps two types of accounts: cash accounts and market position accounts. Updates to those accounts are driven by Transactions of two types - TariffTransactions and MarketTransactions. Accounts are updated as a batch once per timeslot, and the results - updated account balances and the transactions themselves, are forwarded to the individual brokers.
Transactions arrive through the addTransaction() method in the Accounting API. They are kept in a local list until the activate() method on the Accounting API is called, at which point the batch is run.
Interest transactions are generated internally in Accounting, based on the final balance in the 00:00 timeslot each day.