edu.turtlekit2.kernel.agents
Class SimulationRunner

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by madkit.kernel.Agent
          extended by edu.turtlekit2.kernel.agents.SimulationRunner
All Implemented Interfaces:
Serializable, Runnable

public class SimulationRunner
extends madkit.kernel.Agent

This class launch every agents of a simulation then run it by calling the Scheduler at each step.

Version:
0.9 - 8/2008
Author:
G.Beurier
See Also:
TurtleScheduler, Serialized Form

Field Summary
 TurtleEnvironment environment
           
 boolean run
           
 TurtleScheduler sch
           
 Element simuDescription
           
 String simulationGroup
           
 boolean start
           
 
Constructor Summary
SimulationRunner(Element simuDescription, String simulationName)
           
 
Method Summary
 void activate()
          MadKit usage
 void end()
          MadKit kernel usage.
 void launchPython()
           
 void launchViewer(XMLAttributes att)
           
 void live()
          MadKit kernel usage
 void pauseSimulation()
           
 void setReset()
          reseting the simulation.
 void setStop()
           
 void setWrapModeOn(boolean b)
          setter for toroidal world usage
 void stepByStep()
           
 
Methods inherited from class madkit.kernel.Agent
connectAgencyToAgency, createPlace, createPlace, enableMobility, enableMobility, exitImmediatlyOnKill, getAgencyNamed, joinPlace, joinPlace, joinPlace, pause, receiveMessage, run, waitNextMessage, waitNextMessage
 
Methods inherited from class madkit.kernel.AbstractAgent
broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, disposeMyGUI, foundGroup, getAddress, getAgentInformation, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, initGUI, isBelongingToGroup, isBelongingToGroup, isCommunity, isGroup, isGroup, isMemberOf, isMemberOf, isMessageBoxEmpty, isRole, isRole, joinGroup, killAgent, launchAgent, launchAgent, leaveGroup, leaveGroup, leaveRole, leaveRole, nextMessage, print, println, redisplayMyGUI, requestRole, requestRole, requestRole, restoreAgent, sendMessage, sendMessage, sendMessage, setBean, setController, setDebug, setGUIObject, setName, setOutput, setOutputWriter, toString, windowClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

simulationGroup

public String simulationGroup

simuDescription

public Element simuDescription

environment

public TurtleEnvironment environment

sch

public TurtleScheduler sch

start

public boolean start

run

public boolean run
Constructor Detail

SimulationRunner

public SimulationRunner(Element simuDescription,
                        String simulationName)
Method Detail

launchViewer

public void launchViewer(XMLAttributes att)

launchPython

public void launchPython()
                  throws Exception
Throws:
Exception

activate

public void activate()
MadKit usage

Overrides:
activate in class madkit.kernel.AbstractAgent

live

public final void live()
MadKit kernel usage

Overrides:
live in class madkit.kernel.Agent

end

public final void end()
MadKit kernel usage. No redefinition. Closing the simulation.

Overrides:
end in class madkit.kernel.AbstractAgent

setReset

public final void setReset()
reseting the simulation. Unstable in genetic Mode


setWrapModeOn

public final void setWrapModeOn(boolean b)
setter for toroidal world usage


setStop

public void setStop()

stepByStep

public final void stepByStep()

pauseSimulation

public void pauseSimulation()