|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object agent.Environment pacworld.PackageWorld
public class PackageWorld
A simulator for the package delivery world environment.
Field Summary | |
---|---|
static java.io.PrintStream |
actLog
|
static int |
DEFAULT_NUM_AGENTS
|
static int |
DEFAULT_NUM_DESTINATIONS
Number of destinations. |
static int |
DEFAULT_NUM_PACKAGES
Number of packages. |
static int |
DEFAULT_WORLD_SIZE
The length (and width) of the world. |
static int |
MAX_NUM_DESTINATIONS
|
Constructor Summary | |
---|---|
PackageWorld()
|
|
PackageWorld(java.io.PrintStream actLog)
|
Method Summary | |
---|---|
void |
addAgent(Agent agent)
Add a new agent to the environment. |
java.util.List<Agent> |
getAgents()
Returns a list of the agents in the environment. |
int |
getNumAgents()
Return the number of agents in the environment. |
int |
getPerformanceMeasure(Agent a)
Return the performance measure of the agent in the current environment. |
int |
getTeamPerformanceMeasure()
Return the performance measure of a team of agents in a cooperative environment. |
int |
getWorldSize()
Return the size of the grid for the environment. |
static void |
main(java.lang.String[] args)
Starts the program. |
void |
resetAgents()
Clears all agents from the environment. |
void |
setGUI(PacGUI gui)
Associate a GUI with the environment. |
void |
start(State initState)
Run the simulation starting from a given state. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.io.PrintStream actLog
public static int DEFAULT_NUM_AGENTS
public static int DEFAULT_NUM_DESTINATIONS
public static int DEFAULT_NUM_PACKAGES
public static int DEFAULT_WORLD_SIZE
public static int MAX_NUM_DESTINATIONS
Constructor Detail |
---|
public PackageWorld()
public PackageWorld(java.io.PrintStream actLog)
Method Detail |
---|
public void addAgent(Agent agent)
addAgent
in class Environment
public java.util.List<Agent> getAgents()
public int getNumAgents()
public int getPerformanceMeasure(Agent a)
getPerformanceMeasure
in class Environment
public int getTeamPerformanceMeasure()
getTeamPerformanceMeasure
in class Environment
public int getWorldSize()
public static void main(java.lang.String[] args)
public void resetAgents()
public void setGUI(PacGUI gui)
public void start(State initState)
start
in class Environment
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |