turtlekit.simulations.hunt2CyanVsOrange
Class HuntLauncher

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by madkit.kernel.Agent
          extended by turtlekit.kernel.Launcher
              extended by turtlekit.simulations.hunt2CyanVsOrange.HuntLauncher
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class HuntLauncher
extends Launcher

Hunt simulation launcher

Version:
2.1 03/2008
Author:
Fabien MICHEL
See Also:
Serialized Form

Field Summary
static java.lang.String team1Class
           
static java.lang.String team2Class
           
 
Fields inherited from class turtlekit.kernel.Launcher
COMMUNITY
 
Constructor Summary
HuntLauncher()
           
 
Method Summary
 void addSimulationAgents()
          Override this method is compulsory (abstract).
 double getDensity()
           
 int getNbOfpredator()
           
 int getNbOfprey()
           
 int getPredatorInitLife()
           
 int getPredatorVision()
           
 int getPreyInitLife()
           
 int getPreyVision()
           
static java.lang.String getTeam1Class()
           
static java.lang.String getTeam2Class()
           
protected  void initializePatchVariables()
          override this method is not compulsory, but it is where you have to initialize the patch variables and their properties(evaporation, diffusion...): Once you have created a new PatchVariable object and set its properties with the methods of the class PatchVariable(setEvapCoef, setDiffuseCoef and setDefaultValue) You have to add it to the simulation using the addPatchVariable method: protected void initializePatchVariables() { PatchVariable p = new PatchVariable("flavor"); p.setDiffuseCoef(0.3153); //Optional p.setEvapCoef(0.025); //Optional p.setDefaultValue(32); //Optional addPatchVariable(a); }
 boolean isWithResource()
           
 void setDensity(double density)
           
 void setNbOfpredator(int add)
           
 void setNbOfprey(int add)
           
 void setPredatorInitLife(int predatorInitLife)
           
 void setPredatorVision(int add)
           
 void setPreyInitLife(int preyInitLife)
           
 void setPreyVision(int preyVision)
           
 void setWithResource(boolean withResource)
           
 
Methods inherited from class turtlekit.kernel.Launcher
activate, addMyScheduler, addObserver, addObserver, addPatchVariable, addTurtle, addTurtle, addViewer, addViewer, addViewer, addViewer, addViewer, addViewer, end, getCellSize, getHeight, getSimulationName, getWidth, initGUI, launchPython, live, setCellSize, setCyclePause, setHeight, setSimulationName, setWidth, setWrapModeOn, stopOrResumeSimulation
 
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, destroyGroup, disposeMyGUI, foundGroup, getAddress, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, hideMyGUI, 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

team1Class

public static java.lang.String team1Class

team2Class

public static java.lang.String team2Class
Constructor Detail

HuntLauncher

public HuntLauncher()
Method Detail

setNbOfprey

public void setNbOfprey(int add)

getNbOfprey

public int getNbOfprey()

setPredatorVision

public void setPredatorVision(int add)

getPredatorVision

public int getPredatorVision()

setNbOfpredator

public void setNbOfpredator(int add)

getNbOfpredator

public int getNbOfpredator()

initializePatchVariables

protected void initializePatchVariables()
Description copied from class: Launcher
override this method is not compulsory, but it is where you have to initialize the patch variables and their properties(evaporation, diffusion...): Once you have created a new PatchVariable object and set its properties with the methods of the class PatchVariable(setEvapCoef, setDiffuseCoef and setDefaultValue) You have to add it to the simulation using the addPatchVariable method: protected void initializePatchVariables() { PatchVariable p = new PatchVariable("flavor"); p.setDiffuseCoef(0.3153); //Optional p.setEvapCoef(0.025); //Optional p.setDefaultValue(32); //Optional addPatchVariable(a); }

Overrides:
initializePatchVariables in class Launcher

addSimulationAgents

public void addSimulationAgents()
Description copied from class: Launcher
Override this method is compulsory (abstract). It is in this method that the optional agents of the simulation (turtles, viewers and observers) have to be added. To add these agents you have to use the "add" methods of a Launcher: - addTurtle - addViewer - addObserver

Specified by:
addSimulationAgents in class Launcher

getDensity

public double getDensity()
Returns:
the density

setDensity

public void setDensity(double density)
Parameters:
density - the density to set

isWithResource

public final boolean isWithResource()
Returns:
the withResource

setWithResource

public final void setWithResource(boolean withResource)
Parameters:
withResource - the withResource to set

getPreyVision

public final int getPreyVision()
Returns:
the preyVision

setPreyVision

public final void setPreyVision(int preyVision)
Parameters:
preyVision - the preyVision to set

getPreyInitLife

public final int getPreyInitLife()
Returns:
the preyInitLife

setPreyInitLife

public final void setPreyInitLife(int preyInitLife)
Parameters:
preyInitLife - the preyInitLife to set

getPredatorInitLife

public final int getPredatorInitLife()
Returns:
the predatorInitLife

setPredatorInitLife

public final void setPredatorInitLife(int predatorInitLife)
Parameters:
predatorInitLife - the predatorInitLife to set

getTeam1Class

public static final java.lang.String getTeam1Class()
Returns:
the team1Class

getTeam2Class

public static final java.lang.String getTeam2Class()
Returns:
the team2Class


Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.