@Service
public class AccountingService
extends org.powertac.common.interfaces.TimeslotPhaseProcessor
implements org.powertac.common.interfaces.Accounting, org.powertac.common.interfaces.InitializationService
Accounting| Constructor and Description |
|---|
AccountingService() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.joda.time.Instant time,
int phaseNumber)
Processes the pending transaction list, computes interest, sends
updates to brokers
|
org.powertac.common.BalancingTransaction |
addBalancingTransaction(org.powertac.common.Broker broker,
double kWh,
double charge) |
org.powertac.common.DistributionTransaction |
addDistributionTransaction(org.powertac.common.Broker broker,
double kWh,
double charge) |
org.powertac.common.MarketTransaction |
addMarketTransaction(org.powertac.common.Broker broker,
org.powertac.common.Timeslot timeslot,
double mWh,
double price) |
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) |
Double |
getBankInterest() |
double |
getCurrentMarketPosition(org.powertac.common.Broker broker)
Gets the net market position for the current timeslot.
|
double |
getCurrentNetLoad(org.powertac.common.Broker broker)
Returns the net load for the given broker in the current timeslot.
|
Map<org.powertac.common.Broker,Map<org.powertac.common.TariffTransaction.Type,Double>> |
getCurrentSupplyDemandByBroker()
Returns a mapping of brokers to total supply and demand among subscribed
customers.
|
double |
getMaxInterest() |
double |
getMinInterest() |
List<org.powertac.common.TariffTransaction> |
getPendingTariffTransactions()
Returns the current list of pending tariff transactions.
|
void |
handleMarketTransactionsForTimeslot(org.powertac.common.Timeslot ts) |
String |
initialize(org.powertac.common.Competition competition,
List<String> completedInits) |
void |
processTransaction(org.powertac.common.BalancingTransaction tx,
ArrayList<Object> messages) |
void |
processTransaction(org.powertac.common.BankTransaction tx,
ArrayList<Object> messages) |
void |
processTransaction(org.powertac.common.DistributionTransaction tx,
ArrayList<Object> messages) |
void |
processTransaction(org.powertac.common.MarketTransaction tx,
ArrayList<Object> messages) |
void |
processTransaction(org.powertac.common.TariffTransaction tx,
ArrayList<Object> messages) |
void |
setDefaults() |
void |
updateBrokerMarketPosition(org.powertac.common.MarketTransaction tx) |
public void setDefaults()
setDefaults in interface org.powertac.common.interfaces.InitializationServicepublic String initialize(org.powertac.common.Competition competition, List<String> completedInits)
initialize in interface org.powertac.common.interfaces.InitializationServicepublic org.powertac.common.MarketTransaction addMarketTransaction(org.powertac.common.Broker broker,
org.powertac.common.Timeslot timeslot,
double mWh,
double price)
addMarketTransaction in interface org.powertac.common.interfaces.Accountingpublic 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)
addTariffTransaction in interface org.powertac.common.interfaces.Accountingpublic org.powertac.common.DistributionTransaction addDistributionTransaction(org.powertac.common.Broker broker,
double kWh,
double charge)
addDistributionTransaction in interface org.powertac.common.interfaces.Accountingpublic org.powertac.common.BalancingTransaction addBalancingTransaction(org.powertac.common.Broker broker,
double kWh,
double charge)
addBalancingTransaction in interface org.powertac.common.interfaces.Accountingpublic double getCurrentNetLoad(org.powertac.common.Broker broker)
getCurrentNetLoad in interface org.powertac.common.interfaces.Accountingpublic Map<org.powertac.common.Broker,Map<org.powertac.common.TariffTransaction.Type,Double>> getCurrentSupplyDemandByBroker()
getCurrentSupplyDemandByBroker in interface org.powertac.common.interfaces.Accountingpublic double getCurrentMarketPosition(org.powertac.common.Broker broker)
getCurrentMarketPosition in interface org.powertac.common.interfaces.Accountingpublic void activate(org.joda.time.Instant time,
int phaseNumber)
activate in interface org.powertac.common.interfaces.Accountingactivate in class org.powertac.common.interfaces.TimeslotPhaseProcessorpublic void processTransaction(org.powertac.common.TariffTransaction tx,
ArrayList<Object> messages)
public void processTransaction(org.powertac.common.BalancingTransaction tx,
ArrayList<Object> messages)
public void processTransaction(org.powertac.common.DistributionTransaction tx,
ArrayList<Object> messages)
public void processTransaction(org.powertac.common.MarketTransaction tx,
ArrayList<Object> messages)
public void handleMarketTransactionsForTimeslot(org.powertac.common.Timeslot ts)
public void updateBrokerMarketPosition(org.powertac.common.MarketTransaction tx)
public void processTransaction(org.powertac.common.BankTransaction tx,
ArrayList<Object> messages)
public List<org.powertac.common.TariffTransaction> getPendingTariffTransactions()
getPendingTariffTransactions in interface org.powertac.common.interfaces.Accountingpublic double getMinInterest()
public double getMaxInterest()
public Double getBankInterest()
Copyright © 2015 Power TAC. All Rights Reserved.