/* amplmain.c **********************************************

   Steven Dirkse
   Computer Sciences Department
   UW-Madison

********************************************************/

#include <stdio.h>
#include <ctype.h>

#include "jacdim.h"		/* AMPL interface header */
#include "mcp.h"		/* AMPL/MCP interface header */

void main (int argc, char **argv)
{
  INT n,			/* dimension of system to solve */
  nnz,				/* number of nonzeroes in Jacobian */
  status;

  fprintf (stdout, "Sample solver programmed by Steve Dirkse");
  Fortran = 1;			/* indices start with 1 */
  if ((status = mcp_init (argv[1], TRUE, &n, &nnz)) != OK) { 	
    fprintf (stdout, "Routine mcp_init returns error.\n");
    exit (-1);
  }
  projected_gradient (n);	/* this is actually the call to solve */
}				/* end main */
