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
  • Constructor Details

    • CustomerInfo

      public CustomerInfo​(String name, int population)
      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

      public String 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

      @StateChange public void setPopulation​(Integer population)
      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

      public PowerType getPowerType()
      Returns the type of power consumption and/or production available in this customer model.
    • withPowerType

      @StateChange public CustomerInfo withPowerType​(PowerType type)
      Fluent setter to set PowerType for this CustomerInfo. Default value is PowerType.CONSUMPTION.
    • getCustomerClass

      public CustomerInfo.CustomerClass 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

      @StateChange public CustomerInfo withCustomerClass​(CustomerInfo.CustomerClass cClass)
      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

      @StateChange public CustomerInfo withMultiContracting​(boolean value)
      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

      @StateChange public CustomerInfo withCanNegotiate​(boolean value)
      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 public double getControllableKWh()
      Deprecated.
      Deprecated synonym for getControllableKW().
    • withControllableKW

      @StateChange public CustomerInfo withControllableKW​(double value)
      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

      @StateChange public CustomerInfo withUpRegulationKW​(double value)
      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

      @StateChange public CustomerInfo withDownRegulationKW​(double value)
      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

      @StateChange public CustomerInfo withStorageCapacity​(double value)
      Fluent setter for storage capacity. Intended to be called only by the customer model itself. Value must be non-negative.
    • toString

      public String toString()
      Overrides:
      toString in class Object