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 void
evaluateTariffs(List<Tariff> tariffs)
double
getBrokerSwitchFactor(boolean isSuperseding)
double
getCapacityKWh()
CapacityProfile
getCapacityProfile(Tariff tariff)
double
getChargeEfficiency()
CustomerInfo
getCustomerInfo()
double
getInertiaSample()
double
getMaxChargeKW()
double
getMaxDischargeKW()
String
getName()
double
getSelfDischargeRate()
double
getShiftingInconvenienceFactor(Tariff tariff)
double
getTariffChoiceSample()
void
initialize()
Initialization must provide accessor to Customer instance and time.void
setCapacityKWh(double value)
void
setChargeEfficiency(double value)
void
setMaxChargeKW(double value)
void
setMaxDischargeKW(double value)
void
setName(String name)
void
setSelfDischargeRate(double value)
void
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:
initialize
in classAbstractCustomer
-
getCustomerInfo
public CustomerInfo getCustomerInfo()
- Specified by:
getCustomerInfo
in interfaceCustomerModelAccessor
-
step
public void step()
- Specified by:
step
in classAbstractCustomer
-
getName
public String getName()
- Overrides:
getName
in classAbstractCustomer
-
setName
public void setName(String name)
- Overrides:
setName
in 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:
getBrokerSwitchFactor
in interfaceCustomerModelAccessor
-
getTariffChoiceSample
public double getTariffChoiceSample()
- Specified by:
getTariffChoiceSample
in interfaceCustomerModelAccessor
-
getInertiaSample
public double getInertiaSample()
- Specified by:
getInertiaSample
in interfaceCustomerModelAccessor
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
- Specified by:
evaluateTariffs
in classAbstractCustomer
-
getShiftingInconvenienceFactor
public double getShiftingInconvenienceFactor(Tariff tariff)
- Specified by:
getShiftingInconvenienceFactor
in interfaceCustomerModelAccessor
-
getCapacityProfile
public CapacityProfile getCapacityProfile(Tariff tariff)
- Specified by:
getCapacityProfile
in interfaceCustomerModelAccessor
-
-