org.powertac.visualizer.domain.wholesale
Class WholesaleMarket
java.lang.Object
org.powertac.visualizer.domain.wholesale.WholesaleMarket
public class WholesaleMarket
- extends Object
WholesaleMarket contains information about the wholesale market for one
timeslot.
- Author:
- Jurica Babic
WholesaleMarket
public WholesaleMarket(org.powertac.common.Timeslot timeslot,
Integer timeslotSerialNumber)
getTimeslotSerialNumber
public int getTimeslotSerialNumber()
findSnapshot
public WholesaleSnapshot findSnapshot(int timeslotSerialNumber)
- Returns WholesaleSnapshot by given timeslot serial number. If there is no
snapshot available, the new WholsaleSnapshot object with specified serial
number index is created.
- Parameters:
timeslotSerialNumber -
- Returns:
getSnapshotsMap
public Map<Integer,WholesaleSnapshot> getSnapshotsMap()
getTotalTradedQuantityMWh
public double getTotalTradedQuantityMWh()
getAvgWeightPrice
public double getAvgWeightPrice()
getWeightSumTradedQuantityMWh
public double getWeightSumTradedQuantityMWh()
isClosed
public boolean isClosed()
close
public void close()
- Wholesale Market should be closed when all of its snapshots have been
closed and the current relative index is equal to market's relative
index.
toString
public String toString()
- Overrides:
toString in class Object
getName
public String getName()
getType
public String getType()
getTotalTradedQuantity
public String getTotalTradedQuantity()
getSnapshots
public ArrayList<WholesaleSnapshot> getSnapshots()
getTimeslot
public org.powertac.common.Timeslot getTimeslot()
getLastWholesaleSnapshotWithClearing
public WholesaleSnapshot getLastWholesaleSnapshotWithClearing()
setLastWholesaleSnapshotWithClearing
public void setLastWholesaleSnapshotWithClearing(WholesaleSnapshot lastWholesaleSnapshotWithClearing)
getJson
public WholesaleMarketJSON getJson()
Copyright © 2012 Power TAC. All Rights Reserved.