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

Module svs_simulation.world.worlds

Root class for simulation.

Author: Simon Yuill

Contact: simon@lipparosa.org

Copyright: 2005 Simon Yuill

License: GNU GPL version 2 or any later version

Classes
SimWorld The simulation world is the root for an entire simulation.

Exceptions
SimWorldException  

Function Summary
  createWorldFromSVSFile(filename, worldClass, incSchedules, incTerrain, incAgents, incObjects, incBehaviours, incProcessHandlers)
Reads in data file for world and creates it.
  saveWorldToFile(world, filename)
Writes world data to file.
  __createAgentsForWorld(agentDir, world)
Creates agents from data in structured directory and applies them to the world.
  __createBehavioursForWorld(behaviourDir, world)
Creates behaviours from data in structured directory and applies them to the world.
  __createDeafultProcessHandlerForWorld(world)
Creates default process handler and applies it to world.
  __createProcessHandlersForWorld(processDir, world)
Creates process handlers from data in structured directory and applies them to the world.
  __createSchedulesForWorld(scheduleDir, world)
Creates schedules from data in directory.
  __createSimObjectsForWorld(objectDir, world)
Creates objects from data in structured directory and applies them to the world.

Function Details

createWorldFromSVSFile(filename, worldClass=None, incSchedules=True, incTerrain=True, incAgents=True, incObjects=True, incBehaviours=True, incProcessHandlers=True)

Reads in data file for world and creates it.

World data is stored in an hierachical file structure:

- root
        - world
                - world_data.svs
                - schedules
        - terrain
                - terrain data
                - partitions
                - paths
        - agents
                for each agent type:
                        - classes
                        - instances
                        - schedules
        - objects
                for each object type:
                        - classes
                        - instances
                        - schedules
        - behaviours
                for each behaviour type:
                        - classes
                        - instances
                        - schedules

@rtype: L{SimWorld}

saveWorldToFile(world, filename)

Writes world data to file.

__createAgentsForWorld(agentDir, world)

Creates agents from data in structured directory and applies them to the world.

__createBehavioursForWorld(behaviourDir, world)

Creates behaviours from data in structured directory and applies them to the world.

__createDeafultProcessHandlerForWorld(world)

Creates default process handler and applies it to world.

The default process handler is svs_simulation.world.processes.StandaloneProcessHandler.

__createProcessHandlersForWorld(processDir, world)

Creates process handlers from data in structured directory and applies them to the world.

__createSchedulesForWorld(scheduleDir, world)

Creates schedules from data in directory.

__createSimObjectsForWorld(objectDir, world)

Creates objects from data in structured directory and applies them to the world.

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