@Domain public class Competition extends Object
Modifier and Type | Method and Description |
---|---|
Competition |
addBroker(String brokerUsername)
Adds a broker to the Competition.
|
Competition |
addCustomer(CustomerInfo customer)
Adds a customer to the Competition.
|
static Competition |
currentCompetition()
Returns the current Competition instance.
|
int |
getBootstrapDiscardedTimeslots()
Length of bootstrap interval in msec.
|
int |
getBootstrapTimeslotCount()
Number of timeslots in the bootstrap data report for a normal sim.
|
List<String> |
getBrokers()
The Brokers who are participating in this Competion.
|
Map<String,Long> |
getClockParameters()
Returns the clock parameters for the start of a normal sim session
as a simple Map, to simplify code that
must mediate between Competition and TimeService instances.
|
List<CustomerInfo> |
getCustomers()
The list of customers (or more precisely, customer models) in the
simulation environment.
|
int |
getDeactivateTimeslotsAhead()
Number of timeslots, starting with the current timeslot, that are closed
for trading.
|
String |
getDescription()
Uninterpreted text that further describes the competition.
|
double |
getDownRegulationDiscount()
Discount rate for overpriced down-regulation.
|
double |
getEstimatedConsumptionPremium()
Brokers typically pay less for production than they charge for consumption.
|
int |
getExpectedTimeslotCount()
Expected value of timeslot count for a normal sim session.
|
Integer |
getFixedTimeslotCount()
Fixed value for timeslot count, allows external tools such as tournament scheduler to
compute game lengths externally.
|
long |
getId() |
int |
getLatitude()
Returns approximate latitude in degrees for sim locale.
|
double |
getMaxDownRegulationPaymentRatio()
If a tariff offers a down-regulation price larger (more negative) than the
consumption price times this ratio, customers will not offer down-regulation,
and will ignore down-regulation during tariff evaluation.
|
double |
getMaxUpRegulationPaymentRatio()
Customers assume up-regulation will never clear if the regulation price
is higher than the consumption price times this ratio, and so up-regulation
will be ignored during tariff evaluation.
|
double |
getMinimumOrderQuantity()
Minimum order quantity in MWh.
|
int |
getMinimumTimeslotCount()
Minimum number of timeslots for this competition.
|
String |
getName()
Returns the competition name
|
String |
getPomId()
Returns the pom version id from the server on which this Competition
was created.
|
org.joda.time.Instant |
getSimulationBaseTime()
Start time of a sim session in the sim world.
|
long |
getSimulationModulo()
Minimum value in milliseconds by which time advances in a simulation,
or in other words, the size of a clock tick.
|
long |
getSimulationRate()
The time-compression factor for the simulation.
|
int |
getSimulationTimeslotSeconds()
Returns the number of seconds in wall-clock time per timeslot, truncated
to an integer.
|
long |
getTimeslotDuration()
Returns the duration of a timeslot in milliseconds sim-time.
|
int |
getTimeslotLength()
Returns the length of a timeslot in minutes (sim time).
|
int |
getTimeslotsOpen()
Number of timeslots simultaneously open for trading.
|
int |
getTimezoneOffset()
Returns timezone offset for sim locale.
|
double |
getUpRegulationDiscount()
Discount rate for overpriced up-regulation.
|
static Competition |
newInstance(String name) |
static void |
setCurrent(Competition newCurrent)
Makes a Competition instance be the "current" competition - this is
needed in a broker when the Competition instance arrives from the
server.
|
String |
toString() |
void |
update(Competition template)
Updates selected fields of this Competition from a template.
|
Competition |
withBootstrapDiscardedTimeslots(int count)
Fluent setter for bootstrap interval.
|
Competition |
withBootstrapTimeslotCount(int bootstrapTimeslotCount)
Fluent setter for the bootstrap timeslot count.
|
Competition |
withDeactivateTimeslotsAhead(int deactivateTimeslotsAhead)
Fluent setter for number of timeslots, starting with the current timeslot,
that are closed for trading.
|
Competition |
withDescription(String description)
Fluent setter for competition description.
|
Competition |
withDownRegulationDiscount(double value)
Fluent setter for overpriced down-regulation discount rate.
|
Competition |
withEstimatedConsumptionPremium(double value)
Fluent setter for the estimated consumption price premium.
|
Competition |
withExpectedTimeslotCount(int expectedTimeslotCount)
Fluent setter for the expected length of a normal sim session.
|
Competition |
withFixedTimeslotCount(Integer fixedTimeslotCount)
Fluent setter for the expected length of a normal sim session.
|
Competition |
withLatitude(int latitude)
Fluent setter for latitude value
|
Competition |
withMaxDownRegulationPaymentRatio(double value)
Fluent setter for the maximum down-regulation payment ratio.
|
Competition |
withMaxUpRegulationPaymentRatio(double value)
Fluent setter for the maximum ratio between consumption price and up-regulation
price for which customers will include up-regulation in tariff evaluation.
|
Competition |
withMinimumOrderQuantity(double minOrderQty)
Fluent setter for minimum order quantity.
|
Competition |
withMinimumTimeslotCount(int minimumTimeslotCount)
Fluent setter for minimumTimeslotCount.
|
Competition |
withPomId(String id)
Fluent setter for Pom ID.
|
Competition |
withSimulationBaseTime(org.joda.time.Instant simulationBaseTime)
Fluent setter for simulation base time.
|
Competition |
withSimulationBaseTime(long baseTime)
Fluent setter for simulation base time that takes a long.
|
Competition |
withSimulationBaseTime(String baseTime)
Fluent setter for simulation base time that takes a String, interpreted
as a standard DateTimeFormat as yyyy-MM-dd.
|
Competition |
withSimulationModulo(long simulationModulo)
Fluent setter for simulation modulo.
|
Competition |
withSimulationRate(long simulationRate)
Fluent setter for time compression ratio.
|
Competition |
withSimulationTimeslotSeconds(int seconds)
Fluent setter for controlling simulation rate by setting the number of
wall-clock seconds per timeslot.
|
Competition |
withTimeslotLength(int timeslotLength)
Fluent setter for timeslot length, interpreted as minutes in sim time.
|
Competition |
withTimeslotsOpen(int timeslotsOpen)
Fluent setter for the open timeslot count.
|
Competition |
withTimezoneOffset(int offset)
Fluent setter for timezone offset
|
Competition |
withUpRegulationDiscount(double value)
Fluent setter for overpriced up-regulation discount rate.
|
public static Competition newInstance(String name)
public static Competition currentCompetition()
public static void setCurrent(Competition newCurrent)
public long getId()
public String getName()
public String getDescription()
@ConfigurableValue(description="user-readable description of the Competition", valueType="String") @StateChange public Competition withDescription(String description)
public String getPomId()
@ConfigurableValue(description="maven version identifier from server", valueType="String") @StateChange public Competition withPomId(String id)
public int getTimeslotLength()
public long getTimeslotDuration()
@ConfigurableValue(name="timeslotLength", description="length of timeslot in minutes sim time", valueType="Integer") @StateChange public Competition withTimeslotLength(int timeslotLength)
public int getMinimumTimeslotCount()
@ConfigurableValue(valueType="Integer", description="minimum number of timeslots in simulation run") @StateChange public Competition withMinimumTimeslotCount(int minimumTimeslotCount)
public int getExpectedTimeslotCount()
@ConfigurableValue(valueType="Integer", description="expected number of timeslots in simulation run") @StateChange public Competition withExpectedTimeslotCount(int expectedTimeslotCount)
public Integer getFixedTimeslotCount()
@ConfigurableValue(valueType="Integer", description="If given, overrides min and expected timeslot count values") @StateChange public Competition withFixedTimeslotCount(Integer fixedTimeslotCount)
public int getTimeslotsOpen()
@ConfigurableValue(valueType="Integer", description="expected number of timeslots in simulation run") @StateChange public Competition withTimeslotsOpen(int timeslotsOpen)
public int getDeactivateTimeslotsAhead()
@ConfigurableValue(valueType="Integer", description="expected number of timeslots in simulation run") @StateChange public Competition withDeactivateTimeslotsAhead(int deactivateTimeslotsAhead)
public double getMinimumOrderQuantity()
public double getMaxUpRegulationPaymentRatio()
@ConfigurableValue(valueType="Double", description="Limit on up-regulation payment ratio") public Competition withMaxUpRegulationPaymentRatio(double value)
public double getUpRegulationDiscount()
@ConfigurableValue(valueType="Double", description="Discount rate on overpriced up-regulation") public Competition withUpRegulationDiscount(double value)
public double getMaxDownRegulationPaymentRatio()
@ConfigurableValue(valueType="Double", description="Limit on down-regulation payment") public Competition withMaxDownRegulationPaymentRatio(double value)
public double getDownRegulationDiscount()
@ConfigurableValue(valueType="Double", description="Discount rate on overpriced down-regulation") public Competition withDownRegulationDiscount(double value)
public double getEstimatedConsumptionPremium()
@ConfigurableValue(valueType="Double", description="Estimated ratio of consumption prices over production prices") public Competition withEstimatedConsumptionPremium(double value)
@ConfigurableValue(valueType="Double", description="Minimum order quantity in MWh") @StateChange public Competition withMinimumOrderQuantity(double minOrderQty)
public org.joda.time.Instant getSimulationBaseTime()
@ConfigurableValue(valueType="String", description="Scenario start time of the bootstrap portion of a simulation") public Competition withSimulationBaseTime(String baseTime)
public Competition withSimulationBaseTime(org.joda.time.Instant simulationBaseTime)
@StateChange public Competition withSimulationBaseTime(long baseTime)
public int getTimezoneOffset()
@ConfigurableValue(valueType="Integer", description="Timezone offset from UTC for sim locale") @StateChange public Competition withTimezoneOffset(int offset)
public int getLatitude()
@ConfigurableValue(valueType="Integer", description="Approximate latitude of sim locale") @StateChange public Competition withLatitude(int latitude)
public int getBootstrapTimeslotCount()
@ConfigurableValue(valueType="Integer", description="Number of timeslots in bootstrap session during which data is collected") @StateChange public Competition withBootstrapTimeslotCount(int bootstrapTimeslotCount)
public int getBootstrapDiscardedTimeslots()
@ConfigurableValue(valueType="Integer", description="Number of timeslots in bootstrap session that are discardedbefore data collection begins") @StateChange public Competition withBootstrapDiscardedTimeslots(int count)
public long getSimulationRate()
@ConfigurableValue(valueType="Integer", description="Time compression ratio for simulation clock") @StateChange public Competition withSimulationRate(long simulationRate)
public int getSimulationTimeslotSeconds()
@ConfigurableValue(valueType="Integer", description="Time compression ratio for simulation clock") public Competition withSimulationTimeslotSeconds(int seconds)
public long getSimulationModulo()
@ConfigurableValue(valueType="Long", description="Size, in milliseconds, of a simulation clock tick.Normally, this is the same as a timeslot.") @StateChange public Competition withSimulationModulo(long simulationModulo)
public Map<String,Long> getClockParameters()
@StateChange public Competition addBroker(String brokerUsername)
public List<CustomerInfo> getCustomers()
@StateChange public Competition addCustomer(CustomerInfo customer)
public void update(Competition template)
Copyright © 2019 Power TAC. All rights reserved.