Package svs_simulation :: Package world :: Module worlds :: Class SimWorld
[show private | hide private]
[frames | no frames]

Class SimWorld


The simulation world is the root for an entire simulation.

It provides terrain data, simulation time and event management.
Method Summary
  __init__(self)
  addProcessHandler(self, procHandler)
Adds new proces shandler to world ensuring that it is unique.
  decode(self, data)
Applies encoded data to self.
  encode(self)
Returns encoded representation of self.
  getAgentContainingPoint(self, x, y)
Returns agent containing specified point.
  getAgentGroup(self, groupName)
Returns specified agent group.
  getAgentGroups(self)
Returns list of agent groups.
  getChanges(self)
Returns list of changes within simulation that have occurred during the last update.
  getCurrentTime(self)
Returns current simulation time in world.
  getObjectContainingPoint(self, x, y)
Returns object containing specified point.
  getObjectGroup(self, groupName)
Returns specified object group.
  getObjectGroups(self)
Returns list of object groups.
  getTargetForAction(self, targetID)
Tries to find agent or object, matching target ID.
  reset(self)
Resets playback time to start.
  setTerrain(self, terrain)
Sets new terrain on world.
  setup(self, name, clock, schedule)
  startWorld(self, timeStep)
Starts playback.
  stopWorld(self)
Stops playback.
  updateSchedule(self, simTime)
Updates schedule.
  updateWorld(self)
Updates world.

Method Details

addProcessHandler(self, procHandler)

Adds new proces shandler to world ensuring that it is unique.

decode(self, data)

Applies encoded data to self.

encode(self)

Returns encoded representation of self.

@rtype:dict

getAgentContainingPoint(self, x, y)

Returns agent containing specified point.

getAgentGroup(self, groupName)

Returns specified agent group.

getAgentGroups(self)

Returns list of agent groups.

getChanges(self)

Returns list of changes within simulation that have occurred during the last update.

getCurrentTime(self)

Returns current simulation time in world.

getObjectContainingPoint(self, x, y)

Returns object containing specified point.

getObjectGroup(self, groupName)

Returns specified object group.

getObjectGroups(self)

Returns list of object groups.

getTargetForAction(self, targetID)

Tries to find agent or object, matching target ID.

Target ID format: ('entity type', 'group name' , 'entity name')

reset(self)

Resets playback time to start.

setTerrain(self, terrain)

Sets new terrain on world.

startWorld(self, timeStep=None)

Starts playback. If time step is specified uses this instead of default value (time_const.DEFAULT_TIMESTEP).

stopWorld(self)

Stops playback.

updateSchedule(self, simTime)

Updates schedule.

updateWorld(self)

Updates world.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:29 2005 http://epydoc.sf.net