org.powertac.visualizer.domain.wholesale
Class WholesaleMarket

java.lang.Object
  extended by org.powertac.visualizer.domain.wholesale.WholesaleMarket

public class WholesaleMarket
extends Object

WholesaleMarket contains information about the wholesale market for one timeslot.

Author:
Jurica Babic

Constructor Summary
WholesaleMarket(org.powertac.common.Timeslot timeslot, Integer timeslotSerialNumber)
           
 
Method Summary
 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.
 WholesaleSnapshot findSnapshot(int timeslotSerialNumber)
          Returns WholesaleSnapshot by given timeslot serial number.
 double getAvgWeightPrice()
           
 WholesaleMarketJSON getJson()
           
 WholesaleSnapshot getLastWholesaleSnapshotWithClearing()
           
 String getName()
           
 ArrayList<WholesaleSnapshot> getSnapshots()
           
 Map<Integer,WholesaleSnapshot> getSnapshotsMap()
           
 org.powertac.common.Timeslot getTimeslot()
           
 int getTimeslotSerialNumber()
           
 String getTotalTradedQuantity()
           
 double getTotalTradedQuantityMWh()
           
 String getType()
           
 double getWeightSumTradedQuantityMWh()
           
 boolean isClosed()
           
 void setLastWholesaleSnapshotWithClearing(WholesaleSnapshot lastWholesaleSnapshotWithClearing)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WholesaleMarket

public WholesaleMarket(org.powertac.common.Timeslot timeslot,
                       Integer timeslotSerialNumber)
Method Detail

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.