Class Order


@Domain(fields={"broker","timeslot","MWh","limitPrice"})
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.

Note that the limitPrice field is a Double, not a double. A market order will have null in this field, and will be sorted first by the auctioneer for both buy and sell orders.

State log fields for readResolve():
new(long brokerId, long timeslotId, double mwh, Double limitPrice)

Author:
Carsten Block, John Collins
  • Constructor Details

    • Order

      public Order​(Broker broker, int 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.
    • Order

      @Deprecated @ChainedConstructor public Order​(Broker broker, Timeslot timeslot, double mWh, Double limitPrice)
      Deprecated.
      Creates a new order using a Timeslot rather than a timeslot index value. New code should not use this method.
    • Order

      protected Order()
  • Method Details