#!/bin/bash

###################################
## LIFE model
###################################

## remove all previously generated files
#./clean -f
./clean

## make an archive from the sources
./dobackup

if [ ! -e rescal ]; then
  ln -s ../src/rescal .
fi

## parameters file (input)
PAR_FILE="life.par"
#PAR_FILE="life2.par"
#PAR_FILE="life3.par"
#PAR_FILE="life4f.par"
echo PAR_FILE=$PAR_FILE

## general log files (output)
GENESIS_LOG_FILE="GENESIS.log"
RESCAL_LOG_FILE="RESCAL.log"

## generation of a custom cellular space
#./genesis -f $PAR_FILE -s 2000 > $GENESIS_LOG_FILE

## generation of png images and info logs
nice ./rescal $PAR_FILE -dlog 10 -dpng 10 -dcsp 1 >> $RESCAL_LOG_FILE
#nice ./rescal $PAR_FILE -dlog 1t0 -dpng 1t0 >> $RESCAL_LOG_FILE


