org.powertac.visualizer.domain.wholesale
Class VisualizerOrderbook

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

public class VisualizerOrderbook
extends Object

This is a convenient class for wholesale visualization. It is a copy of Orderbook class. Purpose of this class is to avoid unnecessary entries created by original Orderbook for Power TAC server STATE log.

Author:
Jurica Babic

Constructor Summary
VisualizerOrderbook(org.powertac.common.Orderbook orderbook)
          Constructor for creating an object from the original Orderbook.
VisualizerOrderbook(org.powertac.common.Timeslot timeslot, Double clearingPrice, org.joda.time.Instant dateExecuted)
          Constructor with default product type.
 
Method Summary
 VisualizerOrderbook addAsk(VisualizerOrderbookOrder ask)
           
 VisualizerOrderbook addBid(VisualizerOrderbookOrder bid)
           
 SortedSet<VisualizerOrderbookOrder> getAsks()
          The set of asks (negative energy quantities) that were submitted and did not clear, ascending sort.
 SortedSet<VisualizerOrderbookOrder> getBids()
          The set of bids (positive energy quantities) that were submitted and did not clear, ascending sort.
 Double getClearingPrice()
          Returns the positive price at which the market cleared.
 org.joda.time.Instant getDateExecuted()
          The date when the market cleared.
 org.powertac.common.Timeslot getTimeslot()
          The timeslot in which energy commitments represented by cleared trades are due.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualizerOrderbook

public VisualizerOrderbook(org.powertac.common.Timeslot timeslot,
                           Double clearingPrice,
                           org.joda.time.Instant dateExecuted)
Constructor with default product type.


VisualizerOrderbook

public VisualizerOrderbook(org.powertac.common.Orderbook orderbook)
Constructor for creating an object from the original Orderbook.

Method Detail

getClearingPrice

public Double getClearingPrice()
Returns the positive price at which the market cleared. This is the price paid to sellers, the negative of the price paid by buyers. Null if no trades were cleared.


getDateExecuted

public org.joda.time.Instant getDateExecuted()
The date when the market cleared.


getTimeslot

public org.powertac.common.Timeslot getTimeslot()
The timeslot in which energy commitments represented by cleared trades are due.


getBids

public SortedSet<VisualizerOrderbookOrder> getBids()
The set of bids (positive energy quantities) that were submitted and did not clear, ascending sort. Because bid prices are normally negative, the first element is the highest (most negative) price that did not clear. Null prices (market orders) sort ahead of non-null prices (limit orders).


addBid

public VisualizerOrderbook addBid(VisualizerOrderbookOrder bid)

getAsks

public SortedSet<VisualizerOrderbookOrder> getAsks()
The set of asks (negative energy quantities) that were submitted and did not clear, ascending sort. Null prices (market orders) sort ahead of non-null prices (limit orders).


addAsk

public VisualizerOrderbook addAsk(VisualizerOrderbookOrder ask)


Copyright © 2013 Power TAC. All Rights Reserved.