|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.interfaces.TimeslotPhaseProcessor
org.powertac.accounting.AccountingService
@Service public class AccountingService
Implementation of Accounting
| Constructor Summary | |
|---|---|
AccountingService()
|
|
| Method Summary | |
|---|---|
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. |
double |
getMaxInterest()
|
double |
getMinInterest()
|
void |
init(org.powertac.common.PluginConfig config)
Sets parameters, registers for timeslot phase activation. |
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()
|
| Methods inherited from class org.powertac.common.interfaces.TimeslotPhaseProcessor |
|---|
init, setTimeslotPhase |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AccountingService()
| Method Detail |
|---|
public void setDefaults()
setDefaults in interface org.powertac.common.interfaces.InitializationService
public String initialize(org.powertac.common.Competition competition,
List<String> completedInits)
initialize in interface org.powertac.common.interfaces.InitializationServicepublic void init(org.powertac.common.PluginConfig config)
public 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.Accounting
public 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.Accounting
public org.powertac.common.DistributionTransaction addDistributionTransaction(org.powertac.common.Broker broker,
double kWh,
double charge)
addDistributionTransaction in interface org.powertac.common.interfaces.Accounting
public 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 double getCurrentMarketPosition(org.powertac.common.Broker broker)
getCurrentMarketPosition in interface org.powertac.common.interfaces.Accounting
public void activate(org.joda.time.Instant time,
int phaseNumber)
activate in interface org.powertac.common.interfaces.Accountingactivate in class org.powertac.common.interfaces.TimeslotPhaseProcessor
public 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 processTransaction(org.powertac.common.BankTransaction tx,
ArrayList<Object> messages)
public double getMinInterest()
public double getMaxInterest()
public Double getBankInterest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||