Package org.powertac.common
Class CustomerInfo
java.lang.Object
org.powertac.common.CustomerInfo
@Domain public class CustomerInfo extends Object
A CustomerInfo instance represents a customer model (i.e. a consumer or a producer)
within a specific competition. The customer data stored is published to all brokers in
the Competition in order to provide them with an brief overview on what type
of customers participate in the specific competition. The collection of CustomerInfo
instances are serialized and sent to brokers at the beginning of a game, allowing brokers
to correlate tariff subscriptions and power consumption/production with individual customers.
- Author:
- Carsten Block, John Collins
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomerInfo.CustomerClass -
Constructor Summary
Constructors Constructor Description CustomerInfo(String name, int population)Creates a new CustomerInfo, with default power type set to CONSUMPTION. -
Method Summary
Modifier and Type Method Description doublegetControllableKW()Returns total controllable capacity in kW per member.doublegetControllableKWh()Deprecated.CustomerInfo.CustomerClassgetCustomerClass()Returns the customer class of this customer.doublegetDownRegulationKW()Returns the maximum down-regulation rate in kW per member.longgetId()StringgetName()Display name for this CustomerInfo instance.intgetPopulation()Returns the population of the model represented by this CustomerInfo.PowerTypegetPowerType()Returns the type of power consumption and/or production available in this customer model.doublegetStorageCapacity()Returns the maximum energy storage capacity in kWh per member.doublegetUpRegulationKW()Returns the maximum up-regulation rate in kW per member, beyond the curtailment of its load.booleanisCanNegotiate()True just in case the underlying Customer model can negotiate individual contracts.booleanisMultiContracting()True if this customer can subscribe to multiple contracts.voidsetPopulation(Integer population)Updates the population for the underlying model.StringtoString()CustomerInfowithCanNegotiate(boolean value)Fluent setter for the canNegotiate flag.CustomerInfowithControllableKW(double value)Fluent setter for controllable kWh.CustomerInfowithCustomerClass(CustomerInfo.CustomerClass cClass)Fluent setter for customerClass attribute.CustomerInfowithDownRegulationKW(double value)Fluent setter for down-regulation kW.CustomerInfowithMultiContracting(boolean value)Fluent setter for the multiContracting property.CustomerInfowithPowerType(PowerType type)Fluent setter to set PowerType for this CustomerInfo.CustomerInfowithStorageCapacity(double value)Fluent setter for storage capacity.CustomerInfowithUpRegulationKW(double value)Fluent setter for up-regulation kW.
-
Constructor Details
-
CustomerInfo
Creates a new CustomerInfo, with default power type set to CONSUMPTION. Chain a call to withPowerType() to set the correct power types.
-
-
Method Details
-
getId
public long getId() -
getName
Display name for this CustomerInfo instance. -
getPopulation
public int getPopulation()Returns the population of the model represented by this CustomerInfo. This is not necessarily the number of people represented, but the number of potential tariff subscribers. -
setPopulation
Updates the population for the underlying model. Depending on when this method is called, it may or may not have any impact. There is also no guarantee that the underlying model refers to this value in any useful way. -
getPowerType
Returns the type of power consumption and/or production available in this customer model. -
withPowerType
Fluent setter to set PowerType for this CustomerInfo. Default value is PowerType.CONSUMPTION. -
getCustomerClass
Returns the customer class of this customer. This value determines the amount of the periodic per-customer "meter charge" if this feature is used. -
withCustomerClass
Fluent setter for customerClass attribute. -
isMultiContracting
public boolean isMultiContracting()True if this customer can subscribe to multiple contracts. This is normally true for population models, false for models of individual entities. -
withMultiContracting
Fluent setter for the multiContracting property. Default is false - all entities in the model will subscribe to the same tariff. -
isCanNegotiate
public boolean isCanNegotiate()True just in case the underlying Customer model can negotiate individual contracts. -
withCanNegotiate
Fluent setter for the canNegotiate flag. Should be called only by the model itself. -
getControllableKW
public double getControllableKW()Returns total controllable capacity in kW per member. This is the maximum possible response to curtailment request. For a consumption power type, this results in up-regulation and the value is <= 0, because it represents less energy being delivered to the customer. Brokers should assume that curtailment will result in shifting of load (or supply, for a production power type) to a later timeslot. -
getControllableKWh
Deprecated.Deprecated synonym for getControllableKW(). -
withControllableKW
Fluent setter for controllable kWh. Intended to be called only by the customer model itself. Must be non-positive. -
getUpRegulationKW
public double getUpRegulationKW()Returns the maximum up-regulation rate in kW per member, beyond the curtailment of its load. Value is zero for thermal storage or no storage, and negative for a battery (because energy is flowing away from the customer). -
withUpRegulationKW
Fluent setter for up-regulation kW. Intended to be called only by the customer model itself. Must be non-positive. -
getDownRegulationKW
public double getDownRegulationKW()Returns the maximum down-regulation rate in kW per member. This is energy the customer can absorb in a timeslot, beyond its normal usage. A positive value represents charging a battery or dumping heat (or cold) into some type of thermal storage system. -
withDownRegulationKW
Fluent setter for down-regulation kW. Intended to be called only by the customer model itself. Must be non-negative. -
getStorageCapacity
public double getStorageCapacity()Returns the maximum energy storage capacity in kWh per member. If a 2 kWh battery can be charged at 1 kW, it's maximum down-regulation would be 1 kW, and its storage capacity would be 2 kWh. -
withStorageCapacity
Fluent setter for storage capacity. Intended to be called only by the customer model itself. Value must be non-negative. -
toString
-