#!/bin/sh

if [ "$1" == "" -o "$1" == "-h" -o "$1" == "--help" -o "$acro" == "" ]
then
   echo "run [options]"
   echo "A utility for running this SUCASA example."
   echo ""
   echo "options:"
   echo ""
   echo "  -g       Generate customized PICO code"
   echo "  -m       Build the customized PICO solver"
   echo "  -o       Optimize an AMPL model with the customized PICO solver"
   echo ""
   echo "The 'acro' environmental variable needs to be set to the root"
   echo "directory of the Acro installation that is being used."
   echo ""
   exit 1
elif [ "$1" == "-g" ]
then
   $acro/bin/sucasa --acro=$acro -g simple-sched.mod
elif [ "$1" == "-m" ]
then
   make
elif [ "$1" == "-o" ]
then
   $acro/bin/sucasa -k --solver-options="--debug 11" simple-sched.mod simple-sched.dat
fi
