wholesale market logfile

classic Classic list List threaded Threaded
6 messages Options
GL
Reply | Threaded
Open this post in threaded view
|

wholesale market logfile

GL
Hi,

I'm trying to understand the wholesale market data. My questions are based on the logfile named "broker1.trace" created during a sample run of the simulator. Besides the default broker, I'm only using a single broker.

My question is about the mapping between clearing price and timeslot. I enumerated my questions, hopefully it is easier to follow.

1) In the second line of the file extract it can be read : firstEnabled="448" lastEnabled="471". Nevertheless, right after the weather forecast data the log data shows the clearing price for the timeslot 447 which according to the previous statement is no longer enabled. I thought this clearing price might have been the result of the previous market clearing but the value (i.e. 50.485158718799376)  doesn't match the previous one.
Could you please help me understand what's the meaning of this clearing price in the current timeslot=447?

2) The bids and asks logged (e.g. <bid limitPrice="-3.4477487086467984" mWh="145.02217019065878"/>
  <ask limitPrice="42.07096559899948" mWh="-85.48270539872605"/>
  <ask limitPrice="48.787262774673984" mWh="-32.22805908280205"/> ) are all brokers uncleared bids and asks?

3) In which java class are the previous referred bids and ask being logged?

4) In the web visualizer, which data is used to calculate the average clearing price of the wholesale market?

Thanks.

Genaro

Extract of broker1.trace:
456963 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<timeslot-update id="201768" firstEnabled="448" lastEnabled="471">
  <postedTime>
    <iMillis>1256742000000</iMillis>
  </postedTime>
</timeslot-update>
456963 INFO  core.PowerTacBroker: TimeslotUpdate at 2009-10-28T15:00:00.000Z
456964 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<weather-report id="4919" currentTimeslot="447" temperature="13.4" windSpeed="2.0" windDirection="260.0" cloudCover="0.625"/>
456964 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<weather-forecast id="5729" currentTimeslot="447">
***********************************************************************
*******weather forecast data that I intentionally removed********
***********************************************************************
</weather-forecast>
456966 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<orderbook id="201771" timeslot="447" clearingPrice="50.485158718799376">
  <dateExecuted>
    <iMillis>1256742000000</iMillis>
  </dateExecuted>
  <bid limitPrice="-3.4477487086467984" mWh="145.02217019065878"/>
  <ask limitPrice="42.07096559899948" mWh="-85.48270539872605"/>
  <ask limitPrice="48.787262774673984" mWh="-32.22805908280205"/>
  <ask limitPrice="60.61922918434252" mWh="-30.83448484664825"/>
  <ask limitPrice="72.36623016330714" mWh="-30.216338899733422"/>
  <ask limitPrice="84.45153885686663" mWh="-29.531265785489957"/>
  <ask limitPrice="96.39995993026332" mWh="-28.631675199698062"/>
  <ask limitPrice="108.69445284371521" mWh="-28.135273590863846"/>
  <ask limitPrice="120.52485503560838" mWh="-27.067174650984"/>
  <ask limitPrice="132.39502866229395" mWh="-26.76569826420155"/>
  <ask limitPrice="144.6655704761185" mWh="-25.896342455643875"/>
  <ask limitPrice="156.64405293894802" mWh="-25.519766131742372"/>
  <ask limitPrice="168.6468843046176" mWh="-24.79920596063836"/>
  <ask limitPrice="180.51523342155983" mWh="-24.350866357801255"/>
  <ask limitPrice="192.60550520812578" mWh="-23.842800874790072"/>
  <ask limitPrice="204.6482880327452" mWh="-23.449637874500453"/>
  <ask limitPrice="216.65362661472335" mWh="-23.15844804789184"/>
  <ask limitPrice="228.54844962780282" mWh="-22.780253156515887"/>
  <ask limitPrice="240.56680029425056" mWh="-22.203986148444756"/>
  <ask limitPrice="252.6739803335055" mWh="-21.94183937976785"/>
  <ask limitPrice="264.64507000919804" mWh="-21.648134423056256"/>
  <ask limitPrice="276.57447188990886" mWh="-21.24679805064804"/>
  <ask limitPrice="288.4660226162786" mWh="-20.774768422493352"/>
  <ask limitPrice="300.3428453738201" mWh="-20.68658450744011"/>
  <ask limitPrice="312.498785286774" mWh="-20.231886495648308"/>
  <ask limitPrice="324.50532619005344" mWh="-19.97769361786112"/>
  <ask limitPrice="336.05853427923313" mWh="-19.89949437199"/>
</orderbook>
456966 INFO  core.BrokerMessageReceiver: onMessage(String) - received message:
<trade id="201799" timeslot="447" executionPrice="50.485158718799376" executionMWh="0.4331599999999298">
  <dateExecuted>
    <iMillis>1256742000000</iMillis>
  </dateExecuted>
</trade>
Reply | Threaded
Open this post in threaded view
|

Re: wholesale market logfile

grampajohn
Administrator
Hello, Genaro -
GL wrote
I'm trying to understand the wholesale market data. ... My question is about the mapping between clearing price and timeslot. I enumerated my questions, hopefully it is easier to follow.

1) In the second line of the file extract it can be read : firstEnabled="448" lastEnabled="471". Nevertheless, right after the weather forecast data the log data shows the clearing price for the timeslot 447
If you look at Fig 2 of the spec, you will see the cycle of events in each timeslot. However, the first event in timeslot n is bids and asks arriving from brokers. These actually arrive any time during timeslot n-1, or in the tiny part of timeslot n before the market clearing, which happens within a millisecond or two of the start of the timeslot. This is a small shortcut in the implementation; it's easier to think of the market clearing as taking place at the end of timeslot n-1. We probably could have made the timeslot-update message arrive after the market clearing, but that would have made the market a special case, further complicating an already complex control scheme. Note that first action of the market is to pull all unprocessed orders, so any orders arriving after this point will be included in the subsequent clearing.
2) The bids and asks logged (e.g. <bid limitPrice="-3.4477487086467984" mWh="145.02217019065878"/>
  <ask limitPrice="42.07096559899948" mWh="-85.48270539872605"/>
  <ask limitPrice="48.787262774673984" mWh="-32.22805908280205"/> ) are all brokers uncleared bids and asks?
Yes. This is the orderbook described in the spec, section 5.2. We are thinking about combining the orderbook with the cleared-trade info -- see Issue #927. That would be done after the 2017 finals if at all.
3) In which java class are the previous referred bids and ask being logged?
That would be org.powertac.auctioneer.AuctionService.
 
4) In the web visualizer, which data is used to calculate the average clearing price of the wholesale market?
I assume it is the most recent cleared-trade for the given timeslot, but Erik might have a more nuanced explanation.

Does this help?

John
GL
Reply | Threaded
Open this post in threaded view
|

Re: wholesale market logfile

GL
Hi John,

It does helps.

w.r.t. question 1:

In the very specific example I quoted, the clearing price value 50.485158718799376 during timeslot 477 corresponds to what you called "the tiny part of timeslot n before the market clearing" with n being 477?

Thanks a lot.

Genaro
Reply | Threaded
Open this post in threaded view
|

Re: wholesale market logfile

grampajohn
Administrator
GL wrote
In the very specific example I quoted, the clearing price value 50.485158718799376 during timeslot 477 corresponds to what you called "the tiny part of timeslot n before the market clearing" with n being 477?
I think you mean 447, but yes, think of this as happening at the end of TS 447, rather than at the start of 448.
GL
Reply | Threaded
Open this post in threaded view
|

Re: wholesale market logfile

GL
Yes, I meant 447.

Ok, then the current time slots enabled are 448 to 471, in addition to the current one, in this case, 447.

Thank you very much !
Reply | Threaded
Open this post in threaded view
|

Re: wholesale market logfile

grampajohn
Administrator
GL wrote
Ok, then the current time slots enabled are 448 to 471, in addition to the current one, in this case, 447.
Yes, the current timeslot is 447, but once the timeslot-update message arrives stating that the open timeslots are 448-471, 447 is no longer open. In other words, new orders for TS 447 will not be accepted at this point. Although the market clearing happens after the timeslot-update message is sent, it's extremely unlikely that a broker could send a new order for TS 447 after receiving the timeslot-update message and have it arrive at the server before the AuctionService pulls orders in preparation for the clearing process.

Cheers -

John