public abstract class ConsumerAgent extends SpatialInformationAgent
associatedSimulationContainer
Constructor and Description |
---|
ConsumerAgent(SimulationContainer simulationContainer,
java.util.Set<ConsumerAgentAttribute> attributes,
java.util.Set<Preference> preferences,
SNConsumerNode correspondingNodeInSN,
java.util.Set<Product> adoptedProducts,
java.util.Map<ProductAttribute,ProductAttributePerceptionScheme> perceivedProductAttributeValues,
java.util.Map<Product,java.lang.Boolean> productAwarenessMap,
ConsumerAgentGroup correspondingConsumerAgentGroup,
ConsumerAgentAdoptionDecisionProcess decisionProcessEmployed,
java.awt.geom.Point2D spatialPosition,
java.lang.String agentID)
Since ConsumerAgents intend to cover numerous, heterogeneous aspects of the simulation, a variety of concepts if found in their attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
addPerceivedProductAttributeValue(ProductAttribute productAttributeToChange,
double productAttributeValuePerception,
double timestamp,
double informationWeight)
processes a perception of a product attribute value through the ProductAttributePerceptionScheme
|
void |
adoptProduct(Product productToAdopt)
Causes the corresponding actor (this) to adopt the product in question.
|
void |
forgetProduct(Product productToBeRemoved)
Being a milder form of disconnecting a product from an agent than wiping, the actor will 'only' forget the product in the sense that he will not adopt it again.
|
java.util.Set<AdoptedProduct> |
getAdoptedProducts() |
java.lang.String |
getAgentID() |
java.util.Set<ConsumerAgentAttribute> |
getAttributes() |
ConsumerAgentGroup |
getCorrespondingConsumerAgentGroup() |
SNConsumerNode |
getCorrespondingNodeInSN() |
ConsumerAgentAdoptionDecisionProcess |
getDecisionProcessEmployed() |
java.util.Map<ProductAttribute,ProductAttributePerceptionScheme> |
getPerceivedProductAttributeValues() |
java.util.Set<Preference> |
getPreferences() |
java.util.Map<Product,java.lang.Boolean> |
getProductAwarenessMap() |
boolean |
isAwareOfProduct(Product productConcerned) |
void |
makeAwareOfProduct(Product product)
Makes the actor aware of the product in question (changes the product awareness for this product to true
|
void |
manipulatePreferenceAbsolute(Preference preferenceConcerned,
double amount)
Changes the preference of the agent by an absolute value given by amount
|
void |
manipulatePreferenceAbsolute(Value valueConcerned,
double amount)
Changes the preference of the agent for the given value by an absolute value given by amount
|
void |
manipulatePreferenceRelative(Preference preferenceConcerned,
double amount)
Changes the preference of the agent by a fraction of its value given by amount
|
void |
manipulatePreferenceRelative(Value valueConcerned,
double amount)
Changes the preference of the agent for the given value by an a fraction of the value given by amount
|
boolean |
needAlreadySatisfied(Need need)
Checks whether the need in question is already satisfied through any product already adopted
|
void |
processInformation(Information respectiveInformation,
double systemTime)
Method to model how information is processed by the ConsumerAgent.
|
void |
removeAdoptedProduct(AdoptedProduct adoptedProduct)
Removes the adoptedProduct from the list of adoptedProducts.
|
void |
wipeProduct(Product productToBeRemoved)
Wipes a product from the knowledge of the actor, meaning the actor will
- unadopt the product
- cease to be aware of the product
- for all product attributes lose the perception of these
Should only be called when a product is taken out of the simulation
|
getCoordinates, setCoordinates
getAssociatedSimulationContainer
public ConsumerAgent(SimulationContainer simulationContainer, java.util.Set<ConsumerAgentAttribute> attributes, java.util.Set<Preference> preferences, SNConsumerNode correspondingNodeInSN, java.util.Set<Product> adoptedProducts, java.util.Map<ProductAttribute,ProductAttributePerceptionScheme> perceivedProductAttributeValues, java.util.Map<Product,java.lang.Boolean> productAwarenessMap, ConsumerAgentGroup correspondingConsumerAgentGroup, ConsumerAgentAdoptionDecisionProcess decisionProcessEmployed, java.awt.geom.Point2D spatialPosition, java.lang.String agentID)
simulationContainer
- The SimulationContainer the ConsumerAgent is to be part of (as a way to reference to other objects in the simulation)attributes
- ConsumerAgentAttributes the ConsumerAgent is to be initialized withpreferences
- A set of preferences of the actorcorrespondingNodeInSN
- SNConsumerNode the actor corresponds to in the social network; used in order to dereference the social environment and position of the actoradoptedProducts
- Set of (initially) adopted Products of the ConsumerAgentperceivedProductAttributeValues
- A map to map each ProductAttribute to the perception the actor has of this product attributeproductAwarenessMap
- A map for each product to indicate whether the actor is aware of this product or notcorrespondingConsumerAgentGroup
- The ConsumerAgentGroup the actor is part ofdecisionProcessEmployed
- The (default) decision process the actor uses in order to make decisionsspatialPosition
- The initial position of the actor in simulation spaceagentID
- The ID to be refered to (String)public java.util.Set<ConsumerAgentAttribute> getAttributes()
public java.util.Set<Preference> getPreferences()
public SNConsumerNode getCorrespondingNodeInSN()
public java.util.Set<AdoptedProduct> getAdoptedProducts()
public java.util.Map<ProductAttribute,ProductAttributePerceptionScheme> getPerceivedProductAttributeValues()
public java.util.Map<Product,java.lang.Boolean> getProductAwarenessMap()
public ConsumerAgentGroup getCorrespondingConsumerAgentGroup()
public ConsumerAgentAdoptionDecisionProcess getDecisionProcessEmployed()
public java.lang.String getAgentID()
public void manipulatePreferenceAbsolute(Value valueConcerned, double amount)
valueConcerned
- the value corresponding to the preference to be changedamount
- The amount by which the preference is to be increased/decreased (depending on the sign of amount)public void manipulatePreferenceAbsolute(Preference preferenceConcerned, double amount)
preferenceConcerned
- the preference to be changedamount
- The amount by which the preference is to be increased/decreased (depending on the sign of amount)public void manipulatePreferenceRelative(Value valueConcerned, double amount)
valueConcerned
- the value corresponding to the preference to be changedamount
- The fraction by which the preference is to be increased/decreased (depending on the sign of amount)public void manipulatePreferenceRelative(Preference preferenceConcerned, double amount)
preferenceConcerned
- the preference to be changedamount
- The fraction by which the preference is to be increased/decreased (depending on the sign of amount)public void adoptProduct(Product productToAdopt) throws java.lang.IllegalArgumentException
productToAdopt
- product the agent is to adoptjava.lang.IllegalArgumentException
public void removeAdoptedProduct(AdoptedProduct adoptedProduct) throws java.lang.IllegalArgumentException
adoptedProduct
- The product to unadoptjava.lang.IllegalArgumentException
- Will be thrown when the adoptedProduct is not adopted by the agent.public void addPerceivedProductAttributeValue(ProductAttribute productAttributeToChange, double productAttributeValuePerception, double timestamp, double informationWeight)
productAttributeToChange
- The product attribute the perception is related toproductAttributeValuePerception
- The perception of the repective product attribute valuepublic void makeAwareOfProduct(Product product) throws java.lang.IllegalArgumentException
product
- The product the actor is made aware ofjava.lang.IllegalArgumentException
- Is thrown when product is not part of a ConsumerAgents productAwarenessMappublic boolean isAwareOfProduct(Product productConcerned)
public boolean needAlreadySatisfied(Need need)
need
- The need to be checkedpublic void wipeProduct(Product productToBeRemoved) throws java.lang.IllegalArgumentException
productToBeRemoved
- the product that is to be wipedjava.lang.IllegalArgumentException
- Will be throws when productToBeRemoved is not in the consumers productAwarenessMap or contains an attribute not in its perceivedProductAttributeValuespublic void forgetProduct(Product productToBeRemoved) throws java.lang.IllegalArgumentException
productToBeRemoved
- product that is forgotten by the actorjava.lang.IllegalArgumentException
- Will be throws when productToBeRemoved is not in the consumers productAwarenessMap or contains an attribute not in its perceivedProductAttributeValuespublic void processInformation(Information respectiveInformation, double systemTime) throws java.lang.UnsupportedOperationException
respectiveInformation
- The information to be processedsystemTime
- The time the information is processed atjava.lang.UnsupportedOperationException
- Will be thrown when information is of an unimplemented type (currently everything but ProductAttributeInformation)