# read_XLI Create an lprec structure and read a model via the External Language Interface. lprec *read_XLI(char *xliname, char *modelname, char *dataname, char *options, int verbose); Return Value Returns a pointer to a new lprec structure. This must be provided to almost all lp_solve functions. A NULL return value indicates an error. Parameters xliname Filename of the XLI package. modelname Filename to read the model from. dataname Filename to read the data from. This may be optional. In that case, set the parameter to NULL. options Extra options that can be used by the reader. verbose The verbose level. Can be one of the following values: CRITICAL (1), SEVERE (2), IMPORTANT (3), NORMAL (4), DETAILED (5), FULL (6) See also set_verbose and get_verbose. Remarks The read_XLI function constructs a new lprec structure and reads the model from filename via the specified XLI. See External Language Interfaces for a complete description on XLIs. Example
    #include <stdio.h>
    #include <stdlib.h>
    #include "lp_lib.h"
    int main(void)
    {
      lprec *lp;

      /* Read LP model */
      lp = read_XLI("xli_MathProg", "model.mat", NULL, "", NORMAL);
      if(lp == NULL) {
        fprintf(stderr, "Unable to read model\n");
        return(1);
      }

      /* Model read */

      /*
      .
      .
      .
      */

      delete_lp(lp);
      return(0);
    }
lp_solve API reference See Also delete_lp, free_lp, make_lp, copy_lp, write_lp, write_LP, write_lpex, read_mps, read_freemps, read_MPS, read_freeMPS, write_mps, write_freemps, write_MPS, write_freeMPS, MPS_writefileex, write_XLI, has_XLI, is_nativeXLI, set_XLI