
org.powertac.common.Timeslot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common Show documentation
Show all versions of common Show documentation
Domain types, services, utilities shared by Power TAC server and agents
The newest version!
/*
* Copyright 2009-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.powertac.common;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Instant;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
/**
* A timeslot instance describes an interval of time (slot) for which power may be
* traded in the wholesale market. The duration of a timeslot is given by
* 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.
*
* @author Carsten Block, John Collins
*/
//@Domain
@XStreamAlias("slot")
public class Timeslot implements Comparable
© 2015 - 2025 Weber Informatics LLC | Privacy Policy