|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.CustomerInfo
public class CustomerInfo
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.
| Constructor Summary | |
|---|---|
CustomerInfo(String name,
int population)
Creates a new CustomerInfo, with default power type set to CONSUMPTION. |
|
| Method Summary | |
|---|---|
long |
getId()
|
String |
getName()
Display name for this CustomerInfo instance. |
int |
getPopulation()
Population of the model represented by the CustomerInfo. |
PowerType |
getPowerType()
The types of power consumption and/or production modalities available in the customer model. |
boolean |
isCanNegotiate()
True just in case the underlying Customer model can negotiate individual contracts. |
boolean |
isMultiContracting()
True if this customer can subscribe to multiple contracts. |
void |
setPopulation(Integer population)
Updates the population for the underlying model. |
String |
toString()
|
CustomerInfo |
withCanNegotiate(boolean value)
Fluent setter for the canNegotiate flag. |
CustomerInfo |
withMultiContracting(boolean value)
Fluent setter for the multiContracting property. |
CustomerInfo |
withPowerType(PowerType type)
Fluent setter to set PowerType fpr this CustomerInfo. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CustomerInfo(String name,
int population)
| Method Detail |
|---|
public long getId()
public String getName()
public int getPopulation()
public void setPopulation(Integer population)
public PowerType getPowerType()
public CustomerInfo withPowerType(PowerType type)
public boolean isMultiContracting()
public CustomerInfo withMultiContracting(boolean value)
public boolean isCanNegotiate()
public CustomerInfo withCanNegotiate(boolean value)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||