dbl_read_mps.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /*                                                                          */
00003 /*  This file is part of QSopt_ex.                                          */
00004 /*                                                                          */
00005 /*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
00006 /*  and Daniel Espinoza                                                     */
00007 /*                                                                          */
00008 /*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
00009 /*  copyright in QSopt.                                                     */
00010 /*                                                                          */
00011 /*  This code may be used under the terms of the GNU General Public License */
00012 /*  (Version 2.1 or later) as published by the Free Software Foundation.    */
00013 /*                                                                          */
00014 /*  Alternatively, use is granted for research purposes only.               */
00015 /*                                                                          */
00016 /*  It is your choice of which of these two licenses you are operating      */
00017 /*  under.                                                                  */
00018 /*                                                                          */
00019 /*  We make no guarantees about the correctness or usefulness of this code. */
00020 /*                                                                          */
00021 /****************************************************************************/
00022 
00023 /* $RCSfile: rd_mps.h,v $ $Revision: 1.2 $ $Date: 2003/11/05 16:57:39 $ */
00024 #ifndef dbl_READ_MPS_STATE_H
00025 #define dbl_READ_MPS_STATE_H
00026 
00027 #include "dbl_iqsutil.h"
00028 
00029 #include "dbl_mps.h"
00030 
00031 typedef struct dbl_ILLread_mps_state_struct
00032 {
00033   int section[ILL_MPS_N_SECTIONS];
00034   ILLmps_section active;
00035   const char *file_name;
00036   dbl_qsline_reader *file;
00037   unsigned int line_num;
00038   unsigned int field_num;       /* number of successfully read fields on line */
00039   int intvar;
00040   int sosvar;
00041   char line[ILL_namebufsize];
00042   char key[ILL_namebufsize];
00043   char field[ILL_namebufsize];
00044   char *obj;
00045   char *p;                      /* ptr to next 'unread' character */
00046 }
00047 dbl_ILLread_mps_state;
00048 
00049 extern int dbl_ILLmps_state_init (
00050   dbl_ILLread_mps_state * state,
00051   dbl_qsline_reader * file,
00052   const char *dbl_fname);
00053 extern void dbl_ILLmps_state_clear (
00054   dbl_ILLread_mps_state * state);
00055 extern int dbl_ILLmps_set_section (
00056   dbl_ILLread_mps_state * state,
00057   const ILLmps_section sec);
00058 
00059 extern int dbl_ILLmps_next_line (
00060   dbl_ILLread_mps_state * state);
00061 extern int dbl_ILLmps_next_field (
00062   dbl_ILLread_mps_state * state);
00063 extern int dbl_ILLmps_next_coef (
00064   dbl_ILLread_mps_state * state,
00065   double * coef);
00066 extern int dbl_ILLmps_next_bound (
00067   dbl_ILLread_mps_state * state,
00068   double * coef);
00069 extern void dbl_ILLmps_check_end_of_line (
00070   dbl_ILLread_mps_state * state);
00071 extern void dbl_ILLmps_set_end_of_line (
00072   dbl_ILLread_mps_state * state);
00073 
00074 extern int dbl_ILLmps_int_sos_mode (
00075   dbl_ILLread_mps_state * state);
00076 
00077 extern const char *dbl_ILLmps_possibly_blank_name (
00078   const char *field,
00079   dbl_ILLread_mps_state * state,
00080   ILLsymboltab * tab);
00081 extern int dbl_ILLmps_empty_key (
00082   dbl_ILLread_mps_state * state);
00083 extern int dbl_ILLmps_empty_field (
00084   dbl_ILLread_mps_state * state);
00085 
00086 extern int dbl_ILLmps_error (
00087   dbl_ILLread_mps_state * state,
00088   const char *format,
00089   ...);
00090 extern void dbl_ILLmps_warn (
00091   dbl_ILLread_mps_state * state,
00092   const char *format,
00093   ...);
00094 
00095 #endif

Generated on Thu Mar 29 09:32:29 2012 for QSopt_ex by  doxygen 1.4.7