Package org.powertac.customer.model
Class Battery
- java.lang.Object
-
- org.powertac.customer.AbstractCustomer
-
- org.powertac.customer.model.Battery
-
- All Implemented Interfaces:
CustomerModelAccessor
@Domain @ConfigurableInstance public class Battery extends AbstractCustomer implements CustomerModelAccessor
Models a single grid-connected storage battery with configurable capacity, max charge rate, max discharge rate, and efficiency. Batteries do not charge unless used for regulation, so repeated use for up-regulation will leave them discharged, and repeated use for down-regulation will leave them fully charged. If not used at all, they will eventually end up completely discharged just in case their selfDischargeRate values are non-zero. The initial state-of-charge is always 0.0;- Author:
- John Collins
-
-
Field Summary
-
Fields inherited from class org.powertac.customer.AbstractCustomer
allCustomerInfos, customerInfos, name, rs1, service
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevaluateTariffs(List<Tariff> tariffs)Called to evaluate tariffs.doublegetBrokerSwitchFactor(boolean isSuperseding)Returns a [0,1] value representing the inconvenience of switching brokers.doublegetCapacityKWh()CapacityProfilegetCapacityProfile(Tariff tariff)Returns a capacity profile for the given tariff.doublegetChargeEfficiency()CustomerInfogetCustomerInfo()Returns the CustomerInfo instance for this customer model.doublegetInertiaSample()Returns a [0,1] random value used to choose whether individual customers evaluate tariffs or not.doublegetMaxChargeKW()doublegetMaxDischargeKW()StringgetName()Returns the name of this modeldoublegetSelfDischargeRate()doublegetShiftingInconvenienceFactor(Tariff tariff)Returns a [0,1] value representing the inconvenience of dealing with curtailment in exchange for a lower price.doublegetTariffChoiceSample()Returns a [0,1] random value used to make choices using the logit choice model.voidinitialize()Initialization must provide accessor to Customer instance and time.voidsetCapacityKWh(double value)voidsetChargeEfficiency(double value)voidsetMaxChargeKW(double value)voidsetMaxDischargeKW(double value)voidsetName(String name)Sets the name for this modelvoidsetSelfDischargeRate(double value)voidstep()Called to run the model forward one step.-
Methods inherited from class org.powertac.customer.AbstractCustomer
addCustomerInfo, changeSubscription, createTariffEvaluator, getCurrentSubscriptions, getCurrentSubscriptions, getCustId, getCustomerInfo, getCustomerInfoList, getCustomerInfos, getId, getPopulation, lastSunday, nextStartOfDay, saveBootstrapState, setServiceAccessor, setTariffMarket, startOfDay, toString
-
-
-
-
Constructor Detail
-
Battery
public Battery()
Default constructor, requires manual setting of name
-
Battery
public Battery(String name)
Standard constructor for named configurable type
-
-
Method Detail
-
initialize
public void initialize()
Initialization must provide accessor to Customer instance and time. We assume configuration has already happened. We start with the battery at its targetSOC.- Overrides:
initializein classAbstractCustomer
-
getCustomerInfo
public CustomerInfo getCustomerInfo()
Description copied from interface:CustomerModelAccessorReturns the CustomerInfo instance for this customer model.- Specified by:
getCustomerInfoin interfaceCustomerModelAccessor
-
step
public void step()
Description copied from class:AbstractCustomerCalled to run the model forward one step.- Specified by:
stepin classAbstractCustomer
-
getName
public String getName()
Description copied from class:AbstractCustomerReturns the name of this model- Overrides:
getNamein classAbstractCustomer
-
setName
public void setName(String name)
Description copied from class:AbstractCustomerSets the name for this model- Overrides:
setNamein classAbstractCustomer
-
setCapacityKWh
@ConfigurableValue(valueType="Double", dump=false, description="size of battery in kWh") @StateChange public void setCapacityKWh(double value)
-
getCapacityKWh
public double getCapacityKWh()
-
setMaxChargeKW
@ConfigurableValue(valueType="Double", dump=false, description="maximum charge rate") @StateChange public void setMaxChargeKW(double value)
-
getMaxChargeKW
public double getMaxChargeKW()
-
setMaxDischargeKW
@ConfigurableValue(valueType="Double", dump=false, description="Maximum discharge rate") public void setMaxDischargeKW(double value)
-
getMaxDischargeKW
public double getMaxDischargeKW()
-
setChargeEfficiency
@ConfigurableValue(valueType="Double", dump=false, description="ratio of charge energy to battery energy") @StateChange public void setChargeEfficiency(double value)
-
getChargeEfficiency
public double getChargeEfficiency()
-
setSelfDischargeRate
@ConfigurableValue(valueType="Double", dump=false, description="hourly charge lost as proportion of capacity") public void setSelfDischargeRate(double value)
-
getSelfDischargeRate
public double getSelfDischargeRate()
-
getBrokerSwitchFactor
public double getBrokerSwitchFactor(boolean isSuperseding)
Description copied from interface:CustomerModelAccessorReturns a [0,1] value representing the inconvenience of switching brokers. The value may depend on whether the current subscription is being switched to a superseding tariff as a result of revocation.- Specified by:
getBrokerSwitchFactorin interfaceCustomerModelAccessor
-
getTariffChoiceSample
public double getTariffChoiceSample()
Description copied from interface:CustomerModelAccessorReturns a [0,1] random value used to make choices using the logit choice model.- Specified by:
getTariffChoiceSamplein interfaceCustomerModelAccessor
-
getInertiaSample
public double getInertiaSample()
Description copied from interface:CustomerModelAccessorReturns a [0,1] random value used to choose whether individual customers evaluate tariffs or not.- Specified by:
getInertiaSamplein interfaceCustomerModelAccessor
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
Description copied from class:AbstractCustomerCalled to evaluate tariffs.- Specified by:
evaluateTariffsin classAbstractCustomer
-
getShiftingInconvenienceFactor
public double getShiftingInconvenienceFactor(Tariff tariff)
Description copied from interface:CustomerModelAccessorReturns a [0,1] value representing the inconvenience of dealing with curtailment in exchange for a lower price.- Specified by:
getShiftingInconvenienceFactorin interfaceCustomerModelAccessor
-
getCapacityProfile
public CapacityProfile getCapacityProfile(Tariff tariff)
Description copied from interface:CustomerModelAccessorReturns a capacity profile for the given tariff. This must represent the usage of a single individual in a population model over some model-specific time period.- Specified by:
getCapacityProfilein interfaceCustomerModelAccessor
-
-