Package org.powertac.common
Class MarketTransaction
- java.lang.Object
-
- org.powertac.common.state.XStreamStateLoggable
-
- org.powertac.common.BrokerTransaction
-
- org.powertac.common.MarketTransaction
-
@Domain(fields={"postedTimeslot","timeslot","MWh","price"}) public class MarketTransaction extends BrokerTransaction
A MarketTransaction instance represents a trade in the wholesale market. It is created by the market, used by Accounting to update accounts, and forwarded to the broker for its records. The values represent changes in the broker's energy and cash balances, from the viewpoint of the broker. Therefore, a positive price means that money will be deposited in the broker's bank account, and a positive amount of energy means that the broker has an additional quantity of energy in its account for the given timeslot.- Author:
- Carsten Block, John Collins
-
-
Field Summary
-
Fields inherited from class org.powertac.common.BrokerTransaction
broker, id, postedTimeslot
-
-
Constructor Summary
Constructors Constructor Description MarketTransaction(Broker broker, int when, int timeslot, double mWh, double price)
MarketTransaction(Broker broker, int when, Timeslot timeslot, double mWh, double price)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMWh()
double
getPrice()
Timeslot
getTimeslot()
int
getTimeslotIndex()
String
toString()
-
Methods inherited from class org.powertac.common.BrokerTransaction
getBroker, getId, getPostedTime, getPostedTimeslot, getPostedTimeslotIndex
-
Methods inherited from class org.powertac.common.state.XStreamStateLoggable
readResolve
-
-
-
-
Constructor Detail
-
MarketTransaction
public MarketTransaction(Broker broker, int when, int timeslot, double mWh, double price)
-
MarketTransaction
@ChainedConstructor public MarketTransaction(Broker broker, int when, Timeslot timeslot, double mWh, double price)
-
-