# prepare for matsim benchmark test
# prepare environment
if [ -z "$RUNDIR_BASENAME" ]; then
TEMPLATE_DIRNAME="matsim"
else
TEMPLATE_DIRNAME="$RUNDIR_BASENAME"
fi
STARTMSG="Starting matsim with arguments $RUN_ARGS"
id="$(($RUN_COUNT+1+$RUN_COUNT_OFFSET))"
mydir="$TEMPLATE_DIRNAME""$RUN_DIR_PREFIX""_run-""$id"
# move old dirs out of the way
if [ -e "$mydir/output" ]; then
$SPEAK && echo "Matsim directory exists: $mydir/output. Renaming directory."
mv "$mydir/$ARGS_LOG" "$mydir/output" 2>&1 > /dev/null
mv "$mydir/output" "$mydir/output.$(basename `mktemp -u`)"
elif [ ! -e "$mydir" ]; then
# create process home
mkdir "$mydir"
# create links
ln -s "../$TEMPLATE_DIRNAME/Benchmark.jar" "$mydir/Benchmark.jar"
ln -s "../$TEMPLATE_DIRNAME/MATSim_r6528.jar" "$mydir/MATSim_r6528.jar"
ln -s "../$TEMPLATE_DIRNAME/libs" "$mydir/libs"
# config file variation -> use matsim's command line switches
ln -s "../$TEMPLATE_DIRNAME/input" "$mydir/input"
fi
cd "$mydir"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>