|
__init__(self,
scenario=None,
classes=None,
agentClass=None,
multiagentClass=None,
debug=0) |
source code
|
|
|
|
multiagentClass
|
setupEntities(self,
entities=None,
progress=None,
compileDynamics=True,
compilePolicies=None,
distill=False)
Creates a scenario instance from a list of entities and applies the
default values across the board |
source code
|
|
|
initEntities(self,
progress=None)
A method, to be overridden by subclass, that is invoked whenever
there is a new set of entities |
source code
|
|
str
|
getCommand(self)
Abstract method for getting a command from user. |
source code
|
|
|
|
|
|
|
save(self,
filename=None,
results=None)
Saves the state of the current simulation to the named file |
source code
|
|
|
saveSociety(self,
filename=None,
results=None)
Saves the current generic society to the named file |
source code
|
|
|
load(self,
filename=None,
results=None)
Loads in a scenario object from the specified file |
source code
|
|
|
loadSociety(self,
filename=None,
overwrite=True,
results=None)
Loads in a GenericSociety object from the specified file |
source code
|
|
|
export(self,
filename=None,
results=None)
Writes a Web page representation of the current scenario |
source code
|
|
|
distill(self,
filename=None,
results=None)
Writes a lightweight representation of the current scenario |
source code
|
|
|
revert(self)
Reverts the current scenario to the last loaded/saved scenario |
source code
|
|
|
step(self,
length=1,
results=None)
Steps the simulation the specified number of micro-steps into the
future (default is 1) |
source code
|
|
|
|
|
|
|
applyPolicy(self,
name,
results=None)
Returns the action that <entity> will perform, following its
policy of behavior |
source code
|
|
|
setDebugLevel(self,
level,
results=None)
Sets the debug level to the specified integer |
source code
|
|
|
|
|
help(self,
results=None)
Prints descriptions of available commands |
source code
|
|
|
|
|
|
|
getEntity(self,
name,
results=None)
Returns a string representation of the named entity. |
source code
|
|
|
getBelief(self,
entityName,
beliefName,
results=None)
Returns a string representation of the belief that the first entity
has about the second. |
source code
|
|
|
setModel(self,
entityName,
beliefName,
modelName,
results=None)
Sets the mental model that 'entityName' holds in regard to
'beliefName' to be 'modelName' |
source code
|
|
|
performAct(self,
name,
actType,
obj,
results=None)
Performs the action of the specified type by the named entity on the
specified object (use 'nil' if no object) |
source code
|
|
|
doActions(self,
actions,
results=None)
Performs the actions, provided in dictionary form |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iterateModels(self,
eList,
pIndex,
cIndex,
modelsUsed) |
source code
|
|
|
resetSociety(self)
Clears any classes in the current generic society |
source code
|
|
|
|
|
|