|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ntnu.ecosim.agents.consumers.Memory
public class Memory
This class represents the memory of the consumers.
Constructor Summary | |
---|---|
protected |
Memory()
Constructor of the memory. |
Method Summary | |
---|---|
protected void |
addCalculatedProviderValue(int sp,
double value)
Method to add a value to the "calculatedProviderValue" list |
protected void |
addInnovationKnowledge(java.util.HashMap<java.lang.String,java.lang.String> newInnovations)
Method that may be used to add knowledge about a range of innovations (represented through a HashMap) |
protected void |
addInnovationKnowledge(java.lang.String uniqueID,
java.lang.String spUniqueID)
Method to add knowledge about an innovation |
protected void |
addKnowledge(java.lang.String uniqueID,
int persuation)
Method used to add knowledge about a service provider. |
protected void |
addTriedProvider(java.lang.String uniqueID,
int time)
Method used when a new provider is tried out. |
protected void |
eraseOldMemory(int time)
Method to erase memory older than the "memory time". |
protected double |
getCalculatedProviderValue(int sp)
Mehtod to get the calculated value of a specified service provider |
protected java.util.HashMap<java.lang.String,java.lang.String> |
getInnovationsOfProvider(java.lang.String spUniqueID)
Method used to get the list of all the innovations this memory contains about a specified provider |
protected java.util.ArrayList<java.lang.String> |
getKnownProviders()
Method to get the list of known providers. |
protected boolean |
isTried(java.lang.String uniqueID)
This method can be used to check whether or not a provider is tried out earlier |
protected boolean |
knowsInnovation(java.lang.String uniqueID)
Method to check whether this memory contains information about an innovation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Memory()
Method Detail |
---|
protected void addCalculatedProviderValue(int sp, double value)
sp
- the service providers place in the market listvalue
- the value of the providerprotected void addInnovationKnowledge(java.util.HashMap<java.lang.String,java.lang.String> newInnovations)
newInnovations
- a HashMap containing the new innovationsprotected void addInnovationKnowledge(java.lang.String uniqueID, java.lang.String spUniqueID)
uniqueID
- the unique ID of the innovationspUniqueID
- the unique ID of the service provider providing the innovationprotected void addKnowledge(java.lang.String uniqueID, int persuation)
persuation
- the persuation force of this knowledgeuniqueID
- The unique ID of the service providerprotected void addTriedProvider(java.lang.String uniqueID, int time)
time
- the time at which the provider was chosenuniqueID
- the unique ID of the tried providerprotected void eraseOldMemory(int time)
time
- The current timeprotected double getCalculatedProviderValue(int sp)
sp
- the service providers place in the market list
protected java.util.HashMap<java.lang.String,java.lang.String> getInnovationsOfProvider(java.lang.String spUniqueID)
spUniqueID
- the unique ID of the service provider
protected java.util.ArrayList<java.lang.String> getKnownProviders()
protected boolean isTried(java.lang.String uniqueID)
uniqueID
- the unique id of the provider
protected boolean knowsInnovation(java.lang.String uniqueID)
uniqueID
- the unique id of the innovation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |