160 likes | 174 Views
Setting Up for RePast, and Running a Repast Stand Alone Example 06/21/2004. by Deddy Koesrindartoto Department of Economics Iowa State University. BASIC SETUP : Requirements, Software, and Setup Process. Systems requirements: Windows
E N D
Setting Up for RePast, and Running a Repast Stand Alone Example 06/21/2004 by Deddy Koesrindartoto Department of Economics Iowa State University
BASIC SETUP : Requirements, Software, and Setup Process Systems requirements: • Windows • Intel Pentium III/800 MHz or higher (or compatible) • Microsoft Windows 2003/XP/2000/NT 4.0 SP6a • Linux • Intel Pentium III/800 MHz or higher (or compatible) • Red Hat Linux Fedora/9.x/8.x (Debian, SuSe, Mandrake, Slackware, Gentoo • and other distributions with JDK 1.4.2 should also work) • GNOME or KDE desktop • MacOS X • 1 GHz G4, G5 recommended • Mac OS X 10.3 (Panther) Software sufficient to use Repast library: • Java SDK 1.4.* • Java IDE : JBuilder or Eclipse • Repast
Obtaining Java SDK Download java SDK http://java.sun.com/j2se/1.4.2/download.html
Obtaining JAVA IDE : JBUILDER X Foundation Go to : http://www.borland.com/products/downloads/download_jbuilder.html
Obtaining JAVA IDE : Eclipse • Information about eclipse can be found at : http://eclipse.org • To download eclipse IDE, go to http://www.eclipse.org/downloads/index.php
Obtaining Repast … (1) • Information about RePast can be found at : http://repast.sourceforge.net/
How to run the Repast example program • To run repast, click the repast.jar file at the assigned directory: …repast-2.20\lib\repast.jar
The following main GUI will be shown: Load Model Start Step Initialize Stop Pause Setup Exit Load Model: pops up a dialog allowing the user to choose any model . Start: starts the simulation, or continues the simulation after pause button is pressed. Step: runs the simulation through a single iteration /loop of the scheduled behavior or activities. Initialize : executes only initializing code. Stop : stops the simulation. Pause : pauses the simulation. Setup : executes the user defined setup code. Only can be accessed after the simulations is stopped by stop button. Usually used for changing some parameters.
(1) (2) Running Repast Example To load particular model, click the Load Model button from the main GUI (see slide # 9, first button). This will show : Select any model and click the Load button (1). Note: The directory of any necessary file related to the model (config, data, etc) can be assigned here (2).
Running Repast Example (contd.) • Once loading process is done, (for example choose SugarScape model) , main GUI appears with SugarSpace tag: • GUI for model setting is also shown. The following show different GUI for different • settings folders : Parameters (default view), Repast Actions, and Custom Actions
(1) (2) (3) (4) Make a Movie • Repast Actions Folder : Creating a movie • From Repast Actions folder (slide # 11, picture in the middle), select Make Movie. It shows the following dialog box (left side). Fill in the file name and the directory (SSmovie) (1), and choose what kind of movie to display. In this case I choose “SugarScape” simulation (2). Other possible choices are “Histogram” and “Plot” . Click the Next button (3). • The next dialog box (right side) will ask when and how the movie is recorded. Click the Finished button (4) after choosing the way movie being recorded . • When the simulation is executed, SSmovie.mov is created. The file is located in the assigned directory (1).
(1) (3) (4) Take a Snapshot • Repast Actions Folder : Take a Snapshot • From Repast Actions folder (slide # 11, picture in the middle), select Snap Shot . It shows the following dialog box (left side). Fill in the file name and the directory (TestHist) (1), then choose what kind of information wanted to be captured. In this case I choose Histogram (2). Other possible choices are SugarScape and Plot. Click the Next button (3). • The next dialog box (right side) will ask when and how the snap shot is taken. Click the Finished button to proceed (4). (2)
(1) Create/Edit Charts • Repast Actions Folder : Create / Edit Charts • From repast actions folder, (slide # 11, picture in the middle), select Create / Edit Charts. The following dialog box (left side) will appear. Click the Add button (1), the dialog box (right side) will appear. In this dialog box, fill in the new chart information i.e. title name, axis’ name and their axis’ range. • Click Next button to proceed (2) the dialog box in the next slide will appear. (2)
(2) (3) (4) (5) Create/Edit Charts (contd.) While the previous slide is to set up the name and the range of the new chart, this slide is to select the source of data that will be used in the new chart. The list on the left side column shows the available data to use for the new chart. Select particular data (1) from the left column list and click . (2) To remove added data, select the data (3) from the right column list and click (4) (1) To proceed select the Next button (5). The dialog box shown in the next slide will appear :
(5) (6) (7) (1) (2) (4) (3) (8) Create/Edit Charts (contd.) This dialog box can be used to set up the color and mark style on the chart. Choose your preferred style by selecting (1) and (2). Click Finished button (3). A new dialog box will appear, confirming a new graph has been created (4). Up to this point we can add a new graph (5) and edit (6) or delete(7) the existing one. Click the OK button (8) to finish the charts creation process. This Test Chart 1 will be created when the simulation is run.