Package teamwork :: Package examples :: Package Thespian :: Module ThespianGenericSociety :: Class ThespianGenericSociety
[hide private]
[frames] | no frames]

Class ThespianGenericSociety

source code

                        object --+            
                                 |            
                              dict --+        
                                     |        
multiagent.Multiagent.MultiagentSystem --+    
                                         |    
  multiagent.GenericSociety.GenericSociety --+
                                             |
                                            ThespianGenericSociety

Instance Methods [hide private]
 
__copyGeneric(self, generic)
Copies top-level generic values onto nested belief models
source code
 
importDict(self, hierarchy)
Updates society from dictionary-style hierarchy
source code
 
instantiate(self, className, instanceName, objClass=ThespianAgent)
Returns a new instantiated agent model
source code

Inherited from multiagent.GenericSociety.GenericSociety: __delitem__, __init__, __xml__, addMember, descendents, leafModels, leaves, merge, parse, renameEntity

Inherited from multiagent.Multiagent.MultiagentSystem: __str__, getMember, initialize, members, save

Inherited from dict: __cmp__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Instance Variables [hide private]

Inherited from multiagent.GenericSociety.GenericSociety: network, root

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

importDict(self, hierarchy)

source code 

Updates society from dictionary-style hierarchy

Parameters:
  • hierarchy - the specification of the generic society
  • modelClass - the class for the individual generic agent models (default is GenericModel
Overrides: multiagent.GenericSociety.GenericSociety.importDict

instantiate(self, className, instanceName, objClass=ThespianAgent)

source code 

Returns a new instantiated agent model

className: The string name of the relevant generic model instanceName: The string name for the new instance objClass: (Optional) Class to create agent object from

Parameters:
  • className - name of the relevant generic model
  • instanceName - name for the new instance
Overrides: multiagent.GenericSociety.GenericSociety.instantiate