@Domain public class MarketPosition extends Object
MarketPosition
domain instance represents the current position of a
single broker for wholesale power in a given timeslot. The evolution of this
position over time is represented by the sequence of MarketTransaction instances
for this broker and timeslot. These are created by the AccountingService and
communicated to individual brokers after the market clears in each timeslot.Modifier and Type | Field and Description |
---|---|
protected long |
id |
Constructor and Description |
---|
MarketPosition(Broker broker,
int timeslot,
double balance) |
MarketPosition(Broker broker,
Timeslot timeslot,
double balance) |
Modifier and Type | Method and Description |
---|---|
Broker |
getBroker() |
long |
getId() |
double |
getOverallBalance() |
Timeslot |
getTimeslot() |
int |
getTimeslotIndex() |
String |
toString() |
double |
updateBalance(double mWh)
Adds a quantity to the current balance.
|
public MarketPosition(Broker broker, int timeslot, double balance)
@ChainedConstructor public MarketPosition(Broker broker, Timeslot timeslot, double balance)
public long getId()
public Broker getBroker()
public int getTimeslotIndex()
public Timeslot getTimeslot()
public double getOverallBalance()
@StateChange public double updateBalance(double mWh)
Copyright © 2019 Power TAC. All rights reserved.