|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Basic batch runningI have been playing around with running Repast Simphony in batch mode
and, as I hadn't found this documented in detail anywhere, I thought it might be useful to post the basics that I am using. My purposes are two-fold: + If I am doing anything incorrectly then hopefully someone will point that out. + If anyone has been struggling to work out just which folders and JAR files are needed for basic operation then this might serve as a basic reference. ======= These instructions are written assuming command-line execution in a Windows (DOS cmd) environment, but it should be relatively easy to adjust for Unix/Linux/Cygwin, say. As the Reference guide says, the basic batch command is: java -cp ... repast.batch.BatchMain [options] target the tricky bit is working out what is hidden behind the ... (i.e. Java's classpath)! For generality, I will assume that the plugins folder containing Repast files within the Eclipse distribution is called %PLUGINS% and that the current version of Repast is %VERSION%. + The following system folders and JAR files appear to be required in the classpath: %PLUGINS%/repast.simphony.batch_%VERSION%/bin %PLUGINS%/repast.simphony.runtime_%VERSION%/lib/* %PLUGINS%/repast.simphony.core_%VERSION%/lib/* %PLUGINS%/repast.simphony.core_%VERSION%/bin %PLUGINS%/repast.simphony.bin_and_src_%VERSION%/* %PLUGINS%/repast.simphony.score.runtime_%VERSION%/lib/* %PLUGINS%/repast.simphony.data_%VERSION%/lib/* In addition, the "bin" folder of the particular Repast project folder (%MODELFOLDER%) must be included: %MODELFOLDER%/bin + For basic operation, the [options] arguments should include the path to an XML file of sweep parameters. There is a skeleton version called batch_params.xml in the batch folder of the Repast project folder, and this file seems as good as any to use, so: -params %MODELFOLDER%\batch\batch_params.xml The Reference document adequately describes what goes in the sweep parameters file. + Finally, the target is the ".rs" folder beneath %MODELFOLDER%: %MODELFOLDER%\%MODELNAME%.rs Depending on the case-sensitivity of the operating system, %MODELNAME% may be the same name as the folder at the end of the %MODELFOLDER% path. + Attached is a Windows .bat script as a .txt file that captures these basics. ====== Comments and corrections welcomed. David ===== David J. Barnes (d.j.barnes@...) Lecturer in Computer Science http://www.cs.kent.ac.uk/~djb/ @echo off rem The version of Repast Simphony being used. set VERSION=1.2.0 rem The installed path of Repast. set REPAST=c:\progra~1\RepastSimphony-%VERSION% rem The installed path of Eclipse. set ECLIPSE=c:\progra~1\RepastSimphony-%VERSION%\eclipse rem The plugins path of Eclipse. set PLUGINS=%ECLIPSE%\plugins rem The workspace containing the Repast model. set WORKSPACE=%REPAST%\workspace rem The name of the model. This might be case-sensitive. set MODELNAME=MalariaModelBatch rem The folder of the model. This might be case-sensitive. set MODELFOLDER=%WORKSPACE%\%MODELNAME% rem The file containing the batch parameters. set BATCHPARAMS=%MODEL%\batch\batch_params.xml rem Execute in batch mode. java -cp %PLUGINS%/repast.simphony.batch_%VERSION%/bin;%PLUGINS%/repast.simphony.runtime_%VERSION%/lib/*;%PLUGINS%/repast.simphony.core_%VERSION%/lib/*;%PLUGINS%/repast.simphony.core_%VERSION%/bin;%PLUGINS%/repast.simphony.bin_and_src_%VERSION%/*;%PLUGINS%/repast.simphony.score.runtime_%VERSION%/lib/*;%PLUGINS%/repast.simphony.data_%VERSION%/lib/*;%MODEL%/bin repast.simphony.batch.BatchMain -params %BATCHPARAMS% %MODELFOLDER%\%MODELNAME%.rs ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Repast-interest mailing list Repast-interest@... https://lists.sourceforge.net/lists/listinfo/repast-interest |
| Free embeddable forum powered by Nabble | Forum Help |