Package org.powertac.customer.evcharger
Class EvCharger
- java.lang.Object
-
- org.powertac.customer.AbstractCustomer
-
- org.powertac.customer.evcharger.EvCharger
-
- All Implemented Interfaces:
CustomerModelAccessor
@Domain @ConfigurableInstance public class EvCharger extends AbstractCustomer implements CustomerModelAccessor
This is a population model of Electric Vehicle chargers.- Author:
- John Collins, Philipp Page
-
-
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)CapacityProfilegetCapacityProfile(Tariff tariff)CustomerInfogetCustomerInfo()CapacityProfilegetDefaultCapacityProfile()Creates, if necessary, and returns the configured default capacity profile, presumably suitable for a flat-rate tariff.List<org.powertac.customer.evcharger.DemandElement>getDemandInfo(org.joda.time.DateTime time)Returns a vector of DemandElement instances representing the number of vehicles that plug in now and unplug in a future timeslot, and how needed energy is distributed.List<ArrayList<org.powertac.customer.evcharger.DemandElement>>getDemandInfoMean()RandomSeedgetDemandSeed()Returns the random seed for generating demanddoublegetInertiaSample()doublegetMeanDefaultCapacity()Returns the mean hourly capacity per-charger, or the mean value of the defaultCapacityProfiledoublegetShiftingInconvenienceFactor(Tariff tariff)doublegetTariffChoiceSample()voidhandleInitialSubscription(List<TariffSubscription> subscriptions)voidinitialize()voidnotifyCustomer(TariffSubscription oldsub, TariffSubscription newsub, int count)Called when some portion of the population switches from one tariff to another.voidsaveBootstrapState()Bootstrap data is just the content of the StorageState.voidstep()-
Methods inherited from class org.powertac.customer.AbstractCustomer
addCustomerInfo, changeSubscription, createTariffEvaluator, getCurrentSubscriptions, getCurrentSubscriptions, getCustId, getCustomerInfo, getCustomerInfoList, getCustomerInfos, getId, getName, getPopulation, lastSunday, nextStartOfDay, setName, setServiceAccessor, setTariffMarket, startOfDay, toString
-
-
-
-
Constructor Detail
-
EvCharger
public EvCharger()
Default constructor, requires manual setting of name
-
EvCharger
public EvCharger(String name)
Constructor with name
-
-
Method Detail
-
initialize
public void initialize()
- Overrides:
initializein classAbstractCustomer
-
handleInitialSubscription
public void handleInitialSubscription(List<TariffSubscription> subscriptions)
- Overrides:
handleInitialSubscriptionin classAbstractCustomer
-
getCustomerInfo
public CustomerInfo getCustomerInfo()
- Specified by:
getCustomerInfoin interfaceCustomerModelAccessor
-
getDefaultCapacityProfile
public CapacityProfile getDefaultCapacityProfile()
Creates, if necessary, and returns the configured default capacity profile, presumably suitable for a flat-rate tariff.
-
getMeanDefaultCapacity
public double getMeanDefaultCapacity()
Returns the mean hourly capacity per-charger, or the mean value of the defaultCapacityProfile
-
getCapacityProfile
public CapacityProfile getCapacityProfile(Tariff tariff)
- Specified by:
getCapacityProfilein interfaceCustomerModelAccessor
-
getDemandSeed
public RandomSeed getDemandSeed()
Returns the random seed for generating demand
-
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
-
getShiftingInconvenienceFactor
public double getShiftingInconvenienceFactor(Tariff tariff)
- Specified by:
getShiftingInconvenienceFactorin interfaceCustomerModelAccessor
-
notifyCustomer
public void notifyCustomer(TariffSubscription oldsub, TariffSubscription newsub, int count)
Called when some portion of the population switches from one tariff to another. This is a customer model, so after the initial subscription (see handleInitialSubscription) every member of the population is always subscribed to some tariff or another.- Specified by:
notifyCustomerin interfaceCustomerModelAccessor
-
step
public void step()
- Specified by:
stepin classAbstractCustomer
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
- Specified by:
evaluateTariffsin classAbstractCustomer
-
saveBootstrapState
public void saveBootstrapState()
Bootstrap data is just the content of the StorageState. For this we need to know the timeslot index of the first timeslot in the sim session.- Overrides:
saveBootstrapStatein classAbstractCustomer
-
getDemandInfo
public List<org.powertac.customer.evcharger.DemandElement> getDemandInfo(org.joda.time.DateTime time)
Returns a vector of DemandElement instances representing the number of vehicles that plug in now and unplug in a future timeslot, and how needed energy is distributed.
-
-