powertac/powertac-server — Issue #383: TimeslotUpdate message type is confusing, marginally useful
Author: jecollins
Created: 2011-10-13 03:14:08+00:00
State: open

The TimeslotUpdate message type is used to communicate enabled/disabled status of timeslots so brokers can know which slots will be considered in the next market clearing. This message is the last message sent to brokers in the per-timeslot processing in the server, and so brokers are encouraged to use it to trigger their processing that results in new Shouts being sent to the server.

There are actually two kinds of TimeslotUpdate message, distinguished only by the number of timeslots communicated. During the sim initialization, before the beginning of timeslot 0, a message is sent out giving a (usually single) set of disabled timeslots, and a list of enabled timeslots, nominally 23 of them. These are communicated as two lists. The second kind also communicates two lists, but both have a single element: the newly disabled timeslot, which starts at the next clock tick, and a newly-enabled timeslot that starts 23 hours later.

So there are two problems here:

* Two of these messages are communicated before the first clock tick, during "timeslot 0" - one giving a multi-element list of enabled timeslots, and the other that disables one of these and enables a new one at the end. Only the second type should be used to trigger market bidding.
* The form of these messages forces brokers to keep track of exactly which timeslots are open on their own; the full list is sent only once. If a broker drops and reconnects, it will lose this context.

It seems that the first should probably does not server a useful purpose and should not be used, and the second really only needs to list the set of enabled timeslots, since those are the ones open for bidding.