org.powertac.common
Class Order

java.lang.Object
  extended by org.powertac.common.state.XStreamStateLoggable
      extended by org.powertac.common.Order

public class Order
extends XStreamStateLoggable

A Order instance represents a market (no price specified) or a limit (min/max price specified) order in the PowerTAC wholesale market. Each Order specifies an amount of energy in MWh, and a price in units. The quantities represent the broker's view of the proposed transaction in terms of the broker's energy and money accounts: positive quantities of energy represent a proposal to buy power from another party and transfer it to the broker. A positive quantity of energy is almost always accompanied by a negative price, which in turn represents money to be transfered out of the broker's account to the other party in the transaction. So a buy order is indicated by a positive energy quantity, and a sell order is indicated by a negative energy quantity.

Author:
Carsten Block, John Collins

Constructor Summary
Order(Broker broker, Timeslot timeslot, double mWh, Double limitPrice)
          Creates a new Order for Broker to buy or sell a quantity of energy in Timeslot.
 
Method Summary
 Broker getBroker()
           
 long getId()
           
 Double getLimitPrice()
           
 double getMWh()
           
 Timeslot getTimeslot()
           
 String toString()
           
 
Methods inherited from class org.powertac.common.state.XStreamStateLoggable
readResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Order

public Order(Broker broker,
             Timeslot timeslot,
             double mWh,
             Double limitPrice)
Creates a new Order for Broker to buy or sell a quantity of energy in Timeslot. A positive value for mWh indicates a buy order (because the broker's energy account will increase), and a negative value for mWh indicates an offer to sell. Similarly, a negative value for limitPrice indicates a willingness to pay the given amount, while a positive value indicates a demand to be paid at least that amount. A null value for limitPrice indicates an unlimited price. In the clearing process, null values will be considered last for both buy and sell orders, and the price-setting algorithm may not be advantageous for the broker in this case.

Method Detail

getId

public long getId()

getBroker

public Broker getBroker()

getTimeslot

public Timeslot getTimeslot()

getMWh

public double getMWh()

getLimitPrice

public Double getLimitPrice()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.