CCL Home Page
Up Directory CCL enter
#include "simplex.h"
#include "rxn.h"
int NSF, NPF;
int *splst, *plist;
extern int splist();

double **matrix(nr,nc)
{
int i;
double **m;
m = (double **) malloc((unsigned) (nr+1)*sizeof(double *));
for(i = 0; i <= nr; i++){
  m[i] = (double *)malloc((unsigned)(nc+1)*sizeof(double));
  if (!m[i]){
    printf("out of memory\n"); exit(0);
  }
}
return m;
}

int M, NVPP, N, *h, *l;
double *next, *mean, *error, *maxerr, *step, **data, **simp;

enter(name)
char *name;
{
     register int   i, j;

   if ((fpdata = fopen(name, "r")) == NULL) {
      fprintf(stderr, "simplex: can't open %s\n", name);
      exit(1);
   }

     printf("SIMPLEX Optimization\n\n");

     fscanf(fpdata, "%d", &maxiter);
     fscanf(fpdata, "%d %d", &NPF, &NSF);
     plist = (int *)malloc((NPF+1)*sizeof(int));
     splst = (int *)malloc((NSF+1)*sizeof(int));
     for (i=0 ; i
  
Modified: Fri May 31 16:00:00 1991 GMT
Page accessed 4429 times since Sat Apr 17 22:30:00 1999 GMT