Class EvSocialClass
- java.lang.Object
-
- org.powertac.customer.AbstractCustomer
-
- org.powertac.evcustomer.customers.EvSocialClass
-
@ConfigurableInstance public class EvSocialClass extends AbstractCustomer
Instances represent identifiable "classes" of EV customers. Each EvSocialClass aggregates a collection if EvCustomer instances, as determined by configuration. However, this class and not the EvCustomer class implements the AbstractCustomer interface, which means that each instance of EvSocialClass is specified in the configuration. This scheme allows dynamic configuration of the EvCustomer instances, each of which has a specific gender, social group, and car type, and the probabilities and other attributes of the various activities are a function of social class, as specified in the configuration. The configuration setup uses a set of tables: social class, social group, activity, and car type. Join tables add attributes between classes and groups, between classes and car types, and between groups and activities (for example, we expect the wealthier classes to be more likely to own a Tesla-80, and full-time workers are more likely to commute regularly). Because of the dynamic configuration, it is necessary to preserve the configuration between a boot session and a sim session. This is done by recording the attributes of individual customers created by the initial configuration at the start of a boot session, recording those attributes in the boot record, and re-loading the configuration from the boot record at the start of a sim session. In other words, the dynamic configuration happens only at the start of a boot session.- Author:
- Konstantina Valogianni, Govert Buijs, John Collins
-
-
Field Summary
-
Fields inherited from class org.powertac.customer.AbstractCustomer
allCustomerInfos, customerInfos, name, rs1, service
-
-
Constructor Summary
Constructors Constructor Description EvSocialClass()
Default constructor, requires manual setting of nameEvSocialClass(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluateTariffs(List<Tariff> tariffs)
This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern.double
getHomeChargerProbability()
void
initialize()
Hooks up data structures, creates EvCustomers and corresponding CustomerInfo instances.void
saveBootstrapState()
Saves state of EvCustomer instancesvoid
step()
Called to run the model forward one step.String
toString()
-
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
-
-
-
-
Constructor Detail
-
EvSocialClass
public EvSocialClass()
Default constructor, requires manual setting of name
-
EvSocialClass
public EvSocialClass(String name)
-
-
Method Detail
-
initialize
public void initialize()
Hooks up data structures, creates EvCustomers and corresponding CustomerInfo instances.- Overrides:
initialize
in classAbstractCustomer
-
getHomeChargerProbability
public double getHomeChargerProbability()
-
saveBootstrapState
public void saveBootstrapState()
Saves state of EvCustomer instances- Overrides:
saveBootstrapState
in classAbstractCustomer
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> tariffs)
This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern. The better tariffs have more chances to be chosen.- Specified by:
evaluateTariffs
in classAbstractCustomer
-
step
public void step()
Description copied from class:AbstractCustomer
Called to run the model forward one step.- Specified by:
step
in classAbstractCustomer
-
toString
public String toString()
- Overrides:
toString
in classAbstractCustomer
-
-