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)
Called to evaluate tariffs.double
getBrokerSwitchFactor(boolean isSuperseding)
Returns a [0,1] value representing the inconvenience of switching brokers.double
getCapacityKWh()
CapacityProfile
getCapacityProfile(Tariff tariff)
Returns a capacity profile for the given tariff.double
getChargeEfficiency()
CustomerInfo
getCustomerInfo()
Returns the CustomerInfo instance for this customer model.double
getInertiaSample()
Returns a [0,1] random value used to choose whether individual customers evaluate tariffs or not.double
getMaxChargeKW()
double
getMaxDischargeKW()
String
getName()
Returns the name of this modeldouble
getSelfDischargeRate()
double
getShiftingInconvenienceFactor(Tariff tariff)
Returns a [0,1] value representing the inconvenience of dealing with curtailment in exchange for a lower price.double
getTariffChoiceSample()
Returns a [0,1] random value used to make choices using the logit choice model.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)
Sets the name for this modelvoid
setSelfDischargeRate(double value)
void
step()
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:
initialize
in classAbstractCustomer
-
getCustomerInfo
public CustomerInfo getCustomerInfo()
Description copied from interface:CustomerModelAccessor
Returns the CustomerInfo instance for this customer model.- Specified by:
getCustomerInfo
in interfaceCustomerModelAccessor
-
step
public void step()
Description copied from class:AbstractCustomer
Called to run the model forward one step.- Specified by:
step
in classAbstractCustomer
-
getName
public String getName()
Description copied from class:AbstractCustomer
Returns the name of this model- Overrides:
getName
in classAbstractCustomer
-
setName
public void setName(String name)
Description copied from class:AbstractCustomer
Sets the name for this model- 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)
Description copied from interface:CustomerModelAccessor
Returns 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:
getBrokerSwitchFactor
in interfaceCustomerModelAccessor
-
getTariffChoiceSample
public double getTariffChoiceSample()
Description copied from interface:CustomerModelAccessor
Returns a [0,1] random value used to make choices using the logit choice model.- Specified by:
getTariffChoiceSample
in interfaceCustomerModelAccessor
-
getInertiaSample
public double getInertiaSample()
Description copied from interface:CustomerModelAccessor
Returns a [0,1] random value used to choose whether individual customers evaluate tariffs or not.- Specified by:
getInertiaSample
in interfaceCustomerModelAccessor
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
Description copied from class:AbstractCustomer
Called to evaluate tariffs.- Specified by:
evaluateTariffs
in classAbstractCustomer
-
getShiftingInconvenienceFactor
public double getShiftingInconvenienceFactor(Tariff tariff)
Description copied from interface:CustomerModelAccessor
Returns a [0,1] value representing the inconvenience of dealing with curtailment in exchange for a lower price.- Specified by:
getShiftingInconvenienceFactor
in interfaceCustomerModelAccessor
-
getCapacityProfile
public CapacityProfile getCapacityProfile(Tariff tariff)
Description copied from interface:CustomerModelAccessor
Returns 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:
getCapacityProfile
in interfaceCustomerModelAccessor
-
-