public interface Agent extends de.cesr.more.basic.agent.MoreObservingNetworkAgent<Agent>
| Modifier and Type | Field and Description |
|---|---|
static Agent |
NOT_MANAGED
The NOT_MANAGED agent is used for all cells without a manager
|
static double |
NOT_MANAGED_COMPETITION |
static String |
NOT_MANAGED_ID |
| Modifier and Type | Method and Description |
|---|---|
void |
addCell(Cell c)
Adds the cell to the cells this agent manages.
|
boolean |
canTakeOver(Cell c,
double competitiveness)
Return true if this agent is happy to cede to an agent with the given
level of competitiveness
|
void |
considerGivingUp()
Asks this agent if it wants to give up
|
void |
die()
Called to remove the agent instance from the system.
|
int |
getAge()
Returns the agent's current age in years
|
Set<Cell> |
getCells()
Returns all the cells the agent manages
|
double |
getCompetitiveness()
Returns the agents current competitiveness.
|
double |
getGivingIn() |
double |
getGivingUp() |
Cell |
getHomeCell() |
String |
getID()
Returns the agent's ID/type
|
ProductionModel |
getProductionModel()
Returns the production model of this agent.
|
Region |
getRegion() |
PotentialAgent |
getType() |
String |
infoString()
Returns useful descriptive information about this agent
|
void |
removeCell(Cell c)
Removes the cell from the set the agent manages
|
void |
setAge(int age)
Sets the agent's current age
|
void |
setGivingIn(double threshold) |
void |
setGivingUp(double threshold) |
void |
setRegion(Region r) |
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> |
supply(Cell c)
Returns what this agent could supply on the given cell
|
void |
tickEndUpdate()
Called at the ending of each tick to allow the agent to do any internal
housekeeping
|
void |
tickStartUpdate()
Called at the beginning of each tick to allow the agent to do any internal housekeeping
|
boolean |
toRemove()
Returns true if this agent has lost all its cells and should be removed
|
void |
updateCompetitiveness()
Updates the agent's competitiveness, in response to demand changes etc.
|
void |
updateSupply()
Recalculates the services this agent can supply
|
static final Agent NOT_MANAGED
static final String NOT_MANAGED_ID
static final double NOT_MANAGED_COMPETITION
Set<Cell> getCells()
Cell getHomeCell()
void removeCell(Cell c)
c - double getCompetitiveness()
ProductionModel getProductionModel()
void updateCompetitiveness()
void updateSupply()
void considerGivingUp()
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply(Cell c)
c - void addCell(Cell c)
Region.setOwnership(Agent, Cell...) to add cells since this
method is called by Region.setOwnership(Agent, Cell...)!c - boolean toRemove()
void die()
String getID()
boolean canTakeOver(Cell c, double competitiveness)
c - competitiveness - String infoString()
int getAge()
void setAge(int age)
age - void tickStartUpdate()
void tickEndUpdate()
PotentialAgent getType()
void setGivingUp(double threshold)
double getGivingUp()
void setGivingIn(double threshold)
double getGivingIn()
void setRegion(Region r)
Region getRegion()