This file contains a step-by-step example of running your agents. It assumes that you have set your PATH and CLASSPATH appropriately (you can copy the example.profile file to your home directory and rename it .profile if you like. Don't forget to change the CLASSPATH value to make it point to the right place). First, start the simulator by following the instructions in starting_the_simulator. Lines beginning with a % show what you actually type on the prompt. After logging in we see this: Last login: Wed Aug 13 11:49:08 2003 from medusa01.cs.auckland.ac.nz Welcome to Hydra A openMosix cluster of 4 Nodes. Each with two PIII 1.3GHz processors and 5GB of RAM To learn how-to control your process in this cluster see: /usr/doc/mosix/README.MOSIX % pwd /afs/ec.auckland.ac.nz/users/c/s/cski001/unixhome % cd rescue_agents % ls example.agents MyAmbulanceTeam.java MyCenter.java MyFireStation.java MyPoliceForce.java % javac *.java % java -Xmx256m rescuecore.AgentSystem --port 6002 --agents example.agents Arguments: --port 6002 --agents example.agents Reading agents from example.agents Simulation server is localhost/127.0.0.1:6002 Exiting 10 seconds after seeing timestep 301 Starting agents Starting agents of class MyFireBrigade Connecting agent 0 Connect succeeded for 0. Kernel assigned id:2402 Connecting agent 1 Connect succeeded for 1. Kernel assigned id:2403 Connecting agent 2 Connect succeeded for 2. Kernel assigned id:2404 Connecting agent 3 Connect succeeded for 3. Kernel assigned id:2405 Connecting agent 4 Connect succeeded for 4. Kernel assigned id:2406 Connecting agent 5 Connect succeeded for 5. Kernel assigned id:2407 Connecting agent 6 Connect succeeded for 6. Kernel assigned id:2408 Connecting agent 7 Connect succeeded for 7. Kernel assigned id:2409 Connecting agent 8 Connect succeeded for 8. Kernel assigned id:2410 Connecting agent 9 Connect succeeded for 9. Kernel assigned id:2411 Connecting agent 10 no more agentd for 10: Starting agents of class MyPoliceForce Connecting agent 11 Connect succeeded for 11. Kernel assigned id:2412 Connecting agent 12 Connect succeeded for 12. Kernel assigned id:2413 Connecting agent 13 Connect succeeded for 13. Kernel assigned id:2414 Connecting agent 14 Connect succeeded for 14. Kernel assigned id:2415 Connecting agent 15 Connect succeeded for 15. Kernel assigned id:2416 Connecting agent 16 Connect succeeded for 16. Kernel assigned id:2417 Connecting agent 17 Connect succeeded for 17. Kernel assigned id:2418 Connecting agent 18 Connect succeeded for 18. Kernel assigned id:2419 Connecting agent 19 Connect succeeded for 19. Kernel assigned id:2420 Connecting agent 20 Connect succeeded for 20. Kernel assigned id:2421 Connecting agent 21 no more agentd for 21: Starting agents of class MyAmbulanceTeam Connecting agent 22 Connect succeeded for 22. Kernel assigned id:2397 Connecting agent 23 Connect succeeded for 23. Kernel assigned id:2398 Connecting agent 24 Connect succeeded for 24. Kernel assigned id:2399 Connecting agent 25 Connect succeeded for 25. Kernel assigned id:2400 Connecting agent 26 Connect succeeded for 26. Kernel assigned id:2401 Connecting agent 27 no more agentd for 27: Starting agents of class MyCenter Connecting agent 28 Connect succeeded for 28. Kernel assigned id:1878 Connecting agent 29 Connect succeeded for 29. Kernel assigned id:2263 Connecting agent 30 Connect succeeded for 30. Kernel assigned id:1720 Connecting agent 31 no more agentd for 31: Finished starting agents Timestep 2 Timestep 3 Timestep 4 Timestep 5 Timestep 6 Timestep 7 Timestep 8 Timestep 9 Timestep 10 Timestep 11 Timestep 12 Once the simulator reaches timestep 301 the AgentSystem will terminate. You can now stop the simulation by pressing return twice on the other terminal. To view the log, type: "view_log.sh rescue.log" in the directory where you started to simulator.