public class Timeslot extends Object
currentCompetition.getTimeslotLength()
.
Timeslots are uniquely identified
by their serial numbers, which is the number of timeslots since
currentCompetition.getSimulationBaseTime()
.
Timeslots are used (i) to correlate tradeable products (energy futures) and trades in the market with a future time interval where settlement (i.e. delivery / consumption) has to take place, (ii) to correlate meter readings with a duration in time, (iii) to allow tariffs to define different consumption / production prices for different times of a day. Timeslots are represented in server-broker communications by serial number.
This is an immutable type, so no state logging is needed. Creation events are logged by the repository.
Constructor and Description |
---|
Timeslot(int serial,
org.joda.time.Instant start)
Constructor is intended to be called by repository.
|
Modifier and Type | Method and Description |
---|---|
int |
dayOfWeek()
Returns the day of week for the start of this timeslot, starting at
Monday = 1.
|
org.joda.time.Instant |
getEndInstant() |
long |
getId() |
int |
getSerialNumber() |
org.joda.time.Instant |
getStartInstant() |
org.joda.time.DateTime |
getStartTime()
Returns the DateTime representation of the start time for this timeslot
|
int |
slotInDay()
Returns the timeslot index since the most recent midnight, starting at
zero.
|
String |
toString() |
public Timeslot(int serial, org.joda.time.Instant start)
public int getSerialNumber()
public long getId()
public org.joda.time.Instant getStartInstant()
public org.joda.time.Instant getEndInstant()
public org.joda.time.DateTime getStartTime()
public int slotInDay()
public int dayOfWeek()
Copyright © 2019 Power TAC. All rights reserved.