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)doublegetBrokerSwitchFactor(boolean isSuperseding)doublegetCapacityKWh()CapacityProfilegetCapacityProfile(Tariff tariff)doublegetChargeEfficiency()CustomerInfogetCustomerInfo()doublegetInertiaSample()doublegetMaxChargeKW()doublegetMaxDischargeKW()StringgetName()doublegetSelfDischargeRate()doublegetShiftingInconvenienceFactor(Tariff tariff)doublegetTariffChoiceSample()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)voidsetSelfDischargeRate(double value)voidstep()-
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()
- Specified by:
getCustomerInfoin interfaceCustomerModelAccessor
-
step
public void step()
- Specified by:
stepin classAbstractCustomer
-
getName
public String getName()
- Overrides:
getNamein classAbstractCustomer
-
setName
public void setName(String name)
- 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)
- Specified by:
getBrokerSwitchFactorin interfaceCustomerModelAccessor
-
getTariffChoiceSample
public double getTariffChoiceSample()
- Specified by:
getTariffChoiceSamplein interfaceCustomerModelAccessor
-
getInertiaSample
public double getInertiaSample()
- Specified by:
getInertiaSamplein interfaceCustomerModelAccessor
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
- Specified by:
evaluateTariffsin classAbstractCustomer
-
getShiftingInconvenienceFactor
public double getShiftingInconvenienceFactor(Tariff tariff)
- Specified by:
getShiftingInconvenienceFactorin interfaceCustomerModelAccessor
-
getCapacityProfile
public CapacityProfile getCapacityProfile(Tariff tariff)
- Specified by:
getCapacityProfilein interfaceCustomerModelAccessor
-
-