Package org.powertac.genco
Class CpGenco
- java.lang.Object
-
- org.powertac.common.Broker
-
- org.powertac.genco.CpGenco
-
@Domain @ConfigurableInstance public class CpGenco extends Broker
Represents a set of bulk producers distributed across the transmission domain. The assumption is that there will be exactly one of these operating in the wholesale side of the Power TAC day-ahead market. This instance submits bids in a way that is intended to mimic the price curve at a load node subject to congestion pricing. The function is a polynomial. Its coefficients are configurable, as are the nominal interval between bid prices (to create the piecewise-linear supply curve) and the variability of price and quantity per bid.- Author:
- John Collins
-
-
Field Summary
Fields Modifier and Type Field Description protected BrokerProxybrokerProxyServiceprotected RandomSeedseed
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateOrders(org.joda.time.Instant now, List<Timeslot> openSlots)Generates Orders in the market to sell remaining available capacity.double[]getCoefficientArray()Returns coefficients as a array.List<String>getCoefficients()Returns function coefficients as an array of StringsdoublegetKneeDemand()Congestion threshold at which slope increasesdoublegetKneeSlope()Congestion threshold at which slope increasesdoublegetMinQuantity()Minimum total quantity to offer.doublegetPriceInterval()Difference between sequential nominal bid pricesdoublegetPSigma()Std deviation ratio for bid price.doublegetQSigma()Std deviation ratio for bid quantity.doublegetRwaOffset()Random-walk offset for the quadratic coefficientdoublegetRwaSigma()Random-walk sigma for the quadratic coefficientdoublegetRwcOffset()Random-walk offset for the constant coefficientdoublegetRwcSigma()Random-walk sigma for the constant coefficientvoidinit(BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo)voidsaveBootstrapState(ServerConfiguration serverConfig)Saves coefficients for the current timeslot in the form needed for configuration at the start of the sim session, then adds them to the bootstrap state.CpGencowithCoefficients(List<String> coeff)Fluent setter for coefficient arrayCpGencowithKneeDemand(double demand)Fluent setter for the congestion thresholdCpGencowithKneeSlope(double mult)Fluent setter for the congestion thresholdCpGencowithMinQuantity(double qty)Fluent setter for minimum total quantity.CpGencowithPriceInterval(double interval)Fluent setter for price interval.CpGencowithPSigma(double var)Fluent setter for price variability.CpGencowithQSigma(double var)Fluent setter for price variability.CpGencowithRwaOffset(double var)Fluent setter for the random-walk offset value applied to the quadratic coefficient.CpGencowithRwaSigma(double var)Fluent setter for the random-walk sigma value applied to the quadratic coefficient.CpGencowithRwcOffset(double var)Fluent setter for the random-walk offset value applied to the constant coefficient.CpGencowithRwcSigma(double var)Fluent setter for the random-walk sigma value applied to the constant coefficient.-
Methods inherited from class org.powertac.common.Broker
addMarketPosition, addMarketPosition, findMarketPositionByTimeslot, findMarketPositionByTimeslot, getCashBalance, getId, getIdPrefix, getKey, getPassword, getUsername, isEnabled, isLocal, isWholesale, receiveMessage, setEnabled, setIdPrefix, setKey, setLocal, setPassword, setQueueName, setWholesale, toQueueName, toString, updateCash
-
-
-
-
Field Detail
-
brokerProxyService
protected BrokerProxy brokerProxyService
-
seed
protected RandomSeed seed
-
-
Constructor Detail
-
CpGenco
public CpGenco(String username)
-
-
Method Detail
-
init
public void init(BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo)
-
generateOrders
public void generateOrders(org.joda.time.Instant now, List<Timeslot> openSlots)Generates Orders in the market to sell remaining available capacity.
-
saveBootstrapState
public void saveBootstrapState(ServerConfiguration serverConfig)
Saves coefficients for the current timeslot in the form needed for configuration at the start of the sim session, then adds them to the bootstrap state.
-
getCoefficients
public List<String> getCoefficients()
Returns function coefficients as an array of Strings
-
getCoefficientArray
public double[] getCoefficientArray()
Returns coefficients as a array.
-
withCoefficients
@ConfigurableValue(valueType="List", bootstrapState=true, dump=false, description="Coefficients for the specified function type") @StateChange public CpGenco withCoefficients(List<String> coeff)
Fluent setter for coefficient array
-
getPSigma
public double getPSigma()
Std deviation ratio for bid price.
-
withPSigma
@ConfigurableValue(valueType="Double", dump=false, description="Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma(double var)
Fluent setter for price variability. The value is ratio of the standard deviation to the nominal bid price for a given bid.
-
getQSigma
public double getQSigma()
Std deviation ratio for bid quantity.
-
withQSigma
@ConfigurableValue(valueType="Double", dump=false, description="Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma(double var)
Fluent setter for price variability. The value is ratio of the standard deviation to the nominal bid quantity for a given bid.
-
getRwaSigma
public double getRwaSigma()
Random-walk sigma for the quadratic coefficient
-
withRwaSigma
@ConfigurableValue(valueType="Double", dump=false, description="Random-walk std dev ratio for quadratic coefficient") @StateChange public CpGenco withRwaSigma(double var)
Fluent setter for the random-walk sigma value applied to the quadratic coefficient.
-
getRwaOffset
public double getRwaOffset()
Random-walk offset for the quadratic coefficient
-
withRwaOffset
@ConfigurableValue(valueType="Double", dump=false, description="Random-walk offset ratio for quadratic coefficient") @StateChange public CpGenco withRwaOffset(double var)
Fluent setter for the random-walk offset value applied to the quadratic coefficient.
-
getRwcSigma
public double getRwcSigma()
Random-walk sigma for the constant coefficient
-
withRwcSigma
@ConfigurableValue(valueType="Double", dump=false, description="Random-walk std dev ratio for constant coefficient") @StateChange public CpGenco withRwcSigma(double var)
Fluent setter for the random-walk sigma value applied to the constant coefficient.
-
getRwcOffset
public double getRwcOffset()
Random-walk offset for the constant coefficient
-
withRwcOffset
@ConfigurableValue(valueType="Double", dump=false, description="Random-walk offset ratio for constant coefficient") @StateChange public CpGenco withRwcOffset(double var)
Fluent setter for the random-walk offset value applied to the constant coefficient.
-
getPriceInterval
public double getPriceInterval()
Difference between sequential nominal bid prices
-
withPriceInterval
@ConfigurableValue(valueType="Double", description="Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval(double interval)
Fluent setter for price interval. Bigger values create a more coarse piecewise approximation of the supply curve.
-
getMinQuantity
public double getMinQuantity()
Minimum total quantity to offer. The generation function will be run until it hits this value.
-
withMinQuantity
@ConfigurableValue(valueType="Double", description="minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity(double qty)
Fluent setter for minimum total quantity.
-
getKneeDemand
public double getKneeDemand()
Congestion threshold at which slope increases
-
withKneeDemand
@ConfigurableValue(valueType="Double", description="congestion demand threshold") @StateChange public CpGenco withKneeDemand(double demand)
Fluent setter for the congestion threshold
-
getKneeSlope
public double getKneeSlope()
Congestion threshold at which slope increases
-
withKneeSlope
@ConfigurableValue(valueType="Double", description="congestion demand slope multiplier") @StateChange public CpGenco withKneeSlope(double mult)
Fluent setter for the congestion threshold
-
-