-
Notifications
You must be signed in to change notification settings - Fork 7
Running Rovers
Swen E Gaudl edited this page Oct 30, 2015
·
11 revisions
To run agentscape you need a file containing your information on the world, a second file containing your agents and preferably a logback configuration file. It is also beneficial to open two terminals, one for the agentscape server and one for your agents.
Required files (already provided with the Bath image):
- agentscape world file
- agentscape agents configuration
- logback file
- get a scenario pack or build your own one using the
rover.services.ScenarioFactory
(not needed when using the Bath VM)
- open a Terminal
- navigate into your agentscape directory, e.g.
/home/[user]/Documents/projects/agentscape/2.0.0
- copy the world configuration file, e.g.
RoverWorld.xml
, into your agentscape directory - if you do not need logging or have no logback configuration use following command to run agentscape
java -jar lib/boot.jar ./RoverWorld.xml
- if you want to enable logging download the logback configuration and copy into agentscape directory
- if you have a logback file start your world
java -Dlogback.configurationFile=logback-stats.xml -jar lib/boot.jar ./RoverWorld.xml
this way
When you start your agents the Agentscape configuration tool will open up asking you if you have a configuration file. Simply click yes
and point to your agents configuration file. Running the agents will open up the RoverMonitor
offering you a view of the world and a status dialogue for your agents.
- copy your agents configuration, e.g.
RoverAgent.xml
, into your agentscape folder to make it easier later on - open a second Terminal (presuming you have opened one for the server already)
- navigate into your agentscape folder
- start the agentscape configuration tool
java -jar lib/config.jar
- you are now asked if you have a configuration file:
- if you have an agent configuration file say Yes and then select your agents configuration
- if not, say No and have a look at the requirements
- you should now see the "AgentScape Configuration Editor"
- on the left side a small tree containing your agents is given. If you click on one agent you can configure additional parameters or the amount of agents of this type you want to instantiate.
- the current simulation should ONLY have one monitor, however you can add as many other agents as you want
- Now Select Run -> Run
- If the server is not running you will presented with a warning otherwise you get a lift of different locations on the server.
- If you want to run agents your own agents select the "Individual World" if you want to run against another server select the appropriate other :)
- Now two windows open
- a status window containing the connection information
- a
RoverMonitor
window
- If everything worked you can now you can run your simulations
Assuming you started a server and started the agents, this should haven opened the Rovermonitor.
- You are now set to run your agent simulation.
- In the RoverMonitor you can set the simulation speed and pick a specific scenario.
- the important part is that after you picked a scenario you need to click the "Select Scenario" button to confirm your choice if you press "Start" the scenario will not be changed
- Start your simulation
- Now the agents should start moving
- when running the simulation logs files are created for the agents and for the system
- the logs are saved in your agentscape folder
- the stats subfolder contains statistical information about the performance of each team of rovers
- the agent subfolder contains the agent logs plus their connection information and is useful when it comes to crashes
- the service folder contains the server side information and the world logic part of your simulation
- the
middleware.log
contains information about agentscape and its internal processes. Meaning everything which is higher up in the execution chain than your world and agent logs
- if you want to modify the logback file have a look at the logback manual and at the
RoverStats
class within therover.service
module for an example