#! /bin/bash
#
if ( test -f serenity.sol ); then
  echo "Removing old copy of serenity.sol"
  rm serenity.sol
fi
#
#  Point to cplex.
#
export PATH="/opt/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/:$PATH"
#
cplex < serenity_cplex_input.txt > serenity_cplex_output.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
#
rm *.log
#
echo "Normal end of execution."
