read_mps.c File Reference

#include "qs_config.h"
#include "iqsutil.h"
#include "rawlp.h"
#include "read_mps.h"
#include "read_lp.h"
#include "format.h"

Include dependency graph for read_mps.c:

Go to the source code of this file.

Defines

#define END_LINE(p)   (((*(p)) == '$' || (*(p)) == '\n' || (*(p)) == '\0') ? 1 : 0)

Functions

static char get_double (ILLread_mps_state *state, int peek, EGlpNum_t *coef)
void ILLmps_check_end_of_line (ILLread_mps_state *state)
int ILLmps_empty_field (ILLread_mps_state *state)
int ILLmps_empty_key (ILLread_mps_state *state)
int ILLmps_error (ILLread_mps_state *state, const char *format,...)
int ILLmps_int_sos_mode (ILLread_mps_state *state)
int ILLmps_next_bound (ILLread_mps_state *state, EGlpNum_t *coef)
int ILLmps_next_coef (ILLread_mps_state *state, EGlpNum_t *coef)
int ILLmps_next_field (ILLread_mps_state *state)
static char ILLmps_next_field_is_number (ILLread_mps_state *state)
int ILLmps_next_line (ILLread_mps_state *state)
const char * ILLmps_possibly_blank_name (const char *field, ILLread_mps_state *state, ILLsymboltab *tab)
void ILLmps_set_end_of_line (ILLread_mps_state *state)
int ILLmps_set_section (ILLread_mps_state *state, const ILLmps_section sec)
int ILLmps_state_init (ILLread_mps_state *state, qsline_reader *file, const char *fname)
void ILLmps_warn (ILLread_mps_state *state, const char *format,...)
static void mps_err (ILLread_mps_state *state, int isError, const char *format, va_list args)
static int mps_skip_comment (ILLread_mps_state *state)

Variables

static int TRACE = 0


Define Documentation

#define END_LINE (  )     (((*(p)) == '$' || (*(p)) == '\n' || (*(p)) == '\0') ? 1 : 0)

Definition at line 42 of file read_mps.c.


Function Documentation

static char get_double ( ILLread_mps_state state,
int  peek,
EGlpNum_t *  coef 
) [static]

Definition at line 186 of file read_mps.c.

References ILL_FAILfalse, ILL_RESULT, ILLget_value(), and mps_skip_comment().

Referenced by ILLmps_next_bound(), ILLmps_next_coef(), and ILLmps_next_field_is_number().

Here is the call graph for this function:

void ILLmps_check_end_of_line ( ILLread_mps_state state  ) 

Definition at line 306 of file read_mps.c.

References END_LINE, ILLmps_warn(), and mps_skip_comment().

Referenced by read_mps_line_in_section().

Here is the call graph for this function:

int ILLmps_empty_field ( ILLread_mps_state state  ) 

Definition at line 427 of file read_mps.c.

References ILLread_mps_state_struct::field.

Referenced by add_bounds(), add_col(), add_row(), ILLlib_readbasis(), mps_read_col_line(), read_mps_line_in_section(), read_mps_name(), read_mps_objnamesense(), and read_mps_refrow().

int ILLmps_empty_key ( ILLread_mps_state state  ) 

Definition at line 421 of file read_mps.c.

References ILLread_mps_state_struct::key.

Referenced by add_bounds(), add_col(), add_row(), ILLlib_readbasis(), ILLread_mps(), mps_read_col_line(), read_mps_line_in_section(), read_mps_objnamesense(), read_mps_refrow(), and read_mps_section().

int ILLmps_error ( ILLread_mps_state state,
const char *  format,
  ... 
)

Definition at line 491 of file read_mps.c.

References mps_err(), and TRUE.

Referenced by add_bounds(), add_ranges(), add_rhs(), add_row(), check_section_order(), ILLlib_readbasis(), ILLmps_int_sos_mode(), ILLmps_set_section(), ILLread_mps(), mps_read_col_line(), mps_read_marker_line(), read_mps_line_in_section(), read_mps_objnamesense(), read_mps_objsense(), read_mps_refrow(), and read_mps_section().

Here is the call graph for this function:

int ILLmps_int_sos_mode ( ILLread_mps_state state  ) 

Definition at line 341 of file read_mps.c.

References ILLread_mps_state_struct::field, ILL_RESULT, ILLmps_error(), ILLread_mps_state_struct::intvar, and ILLread_mps_state_struct::sosvar.

Referenced by mps_read_marker_line().

Here is the call graph for this function:

int ILLmps_next_bound ( ILLread_mps_state state,
EGlpNum_t *  coef 
)

Definition at line 224 of file read_mps.c.

References END_LINE, get_double(), ILL_MAXDOUBLE, ILL_MINDOUBLE, ILL_RESULT, ILL_RETURN, and mps_skip_comment().

Referenced by add_bounds().

Here is the call graph for this function:

int ILLmps_next_coef ( ILLread_mps_state state,
EGlpNum_t *  coef 
)

Definition at line 211 of file read_mps.c.

References get_double(), ILL_RESULT, and mps_skip_comment().

Referenced by add_ranges(), add_rhs(), and mps_read_col_line().

Here is the call graph for this function:

int ILLmps_next_field ( ILLread_mps_state state  ) 

Definition at line 170 of file read_mps.c.

References ILLread_mps_state_struct::field, and mps_skip_comment().

Referenced by add_bounds(), add_ranges(), add_rhs(), add_row(), ILLlib_readbasis(), mps_read_col_line(), and mps_read_marker_line().

Here is the call graph for this function:

static char ILLmps_next_field_is_number ( ILLread_mps_state state  )  [static]

Definition at line 291 of file read_mps.c.

References get_double(), and mps_skip_comment().

Referenced by ILLmps_possibly_blank_name().

Here is the call graph for this function:

int ILLmps_next_line ( ILLread_mps_state state  ) 

Definition at line 80 of file read_mps.c.

References ILLread_mps_state_struct::field, ILLread_mps_state_struct::field_num, ILLread_mps_state_struct::file, ILL_FAILfalse, ILL_ISBLANK, ILL_namebufsize, ILLline_reader_get, ILLread_mps_state_struct::key, ILLread_mps_state_struct::line, ILLread_mps_state_struct::line_num, and ILLread_mps_state_struct::p.

Referenced by ILLlib_readbasis(), ILLread_mps(), read_mps_objnamesense(), and read_mps_refrow().

const char* ILLmps_possibly_blank_name ( const char *  field,
ILLread_mps_state state,
ILLsymboltab tab 
)

Definition at line 395 of file read_mps.c.

References ILLmps_next_field_is_number(), and ILLsymboltab_lookup().

Referenced by add_bounds(), add_ranges(), and add_rhs().

Here is the call graph for this function:

void ILLmps_set_end_of_line ( ILLread_mps_state state  ) 

Definition at line 318 of file read_mps.c.

References ILLread_mps_state_struct::p.

Referenced by add_bounds(), add_ranges(), and add_rhs().

int ILLmps_set_section ( ILLread_mps_state state,
const ILLmps_section  sec 
)

Definition at line 324 of file read_mps.c.

References ILLread_mps_state_struct::active, ILL_FAILfalse, ILL_MPS_NONE, ILL_RESULT, ILLmps_error(), ILLmps_section_name, and ILLread_mps_state_struct::section.

Referenced by read_mps_section().

Here is the call graph for this function:

int ILLmps_state_init ( ILLread_mps_state state,
qsline_reader file,
const char *  fname 
)

Definition at line 49 of file read_mps.c.

References ILLread_mps_state_struct::active, ILLread_mps_state_struct::field, ILLread_mps_state_struct::file, ILLread_mps_state_struct::file_name, ILL_FAILtrue, ILL_MPS_N_SECTIONS, ILL_MPS_NONE, ILL_RESULT, ILLread_mps_state_struct::intvar, ILLread_mps_state_struct::key, ILLread_mps_state_struct::line, ILLread_mps_state_struct::line_num, ILLread_mps_state_struct::obj, ILLread_mps_state_struct::p, ILLread_mps_state_struct::section, and ILLread_mps_state_struct::sosvar.

Referenced by ILLlib_readbasis(), and ILLread_mps().

void ILLmps_warn ( ILLread_mps_state state,
const char *  format,
  ... 
)

Definition at line 504 of file read_mps.c.

References FALSE, and mps_err().

Referenced by add_ranges(), add_rhs(), ILLlib_readbasis(), ILLmps_check_end_of_line(), ILLread_mps(), mps_set_bound(), and read_mps_name().

Here is the call graph for this function:

static void mps_err ( ILLread_mps_state state,
int  isError,
const char *  format,
va_list  args 
) [static]

Definition at line 433 of file read_mps.c.

References qsline_reader::error_collector, ILLread_mps_state_struct::file, ILLread_mps_state_struct::file_name, ILL_FAILfalse, ILL_FAILfalse_no_rval, ILLformat_error, ILLformat_error_create(), ILLformat_error_delete(), ILLread_mps_state_struct::line, ILLread_mps_state_struct::line_num, ILLread_mps_state_struct::p, QS_MPS_FORMAT_ERROR, and QS_MPS_FORMAT_WARN.

Referenced by ILLmps_error(), and ILLmps_warn().

Here is the call graph for this function:

static int mps_skip_comment ( ILLread_mps_state state  )  [static]

Definition at line 156 of file read_mps.c.

References ILLread_mps_state_struct::field_num, ILL_ISBLANK, and ILLread_mps_state_struct::p.

Referenced by get_double(), ILLmps_check_end_of_line(), ILLmps_next_bound(), ILLmps_next_coef(), ILLmps_next_field(), and ILLmps_next_field_is_number().


Variable Documentation

int TRACE = 0 [static]

Definition at line 40 of file read_mps.c.


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