mps.c File Reference

#include "qs_config.h"
#include "iqsutil.h"
#include "mps.h"
#include "rawlp.h"
#include "lpdata.h"

Include dependency graph for mps.c:

Go to the source code of this file.

Functions

static int add_bounds (ILLread_mps_state *state, rawlpdata *lp)
static int add_col (ILLread_mps_state *state, rawlpdata *lp)
static int add_ranges (ILLread_mps_state *state, rawlpdata *lp)
static int add_rhs (ILLread_mps_state *state, rawlpdata *lp)
static int add_row (ILLread_mps_state *state, rawlpdata *lp)
static int check_section_order (ILLread_mps_state *state, int sec)
int ILLread_mps (qsline_reader *file, const char *f, rawlpdata *lp)
int ILLwrite_mps (ILLlpdata *lp, qserror_collector *collector)
static int is_marker_line (ILLread_mps_state *state)
static int mps_fill_in (rawlpdata *lp, const char *obj)
static int mps_read_col_line (ILLread_mps_state *state, rawlpdata *lp)
static int mps_read_marker_line (ILLread_mps_state *state, rawlpdata *lp)
static void mps_set_bound (rawlpdata *lp, ILLread_mps_state *state, int colind, const char *bndtype, EGlpNum_t bnd)
static int mps_write_col (int i, int iorig, char *colname, ILLlpdata *lp, char **rownames, int intmode, char *objname)
static int read_mps_line_in_section (ILLread_mps_state *state, rawlpdata *lp)
static int read_mps_name (ILLread_mps_state *state, rawlpdata *lp)
static int read_mps_objname (ILLread_mps_state *state)
static int read_mps_objnamesense (ILLmps_section sec, ILLread_mps_state *state, rawlpdata *lp)
static int read_mps_objsense (ILLread_mps_state *state, rawlpdata *lp)
static int read_mps_refrow (ILLread_mps_state *state, rawlpdata *lp)
static int read_mps_section (ILLread_mps_state *state, rawlpdata *lp)

Variables

const char * ILLmps_section_name [ILL_MPS_N_SECTIONS+2]
static const char * mps_bound_name []
static int TRACE = 0


Function Documentation

static int add_bounds ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 761 of file mps.c.

References rawlpdata::coltab, ILL_FAILtrue, ILL_RESULT, ILLmps_empty_field(), ILLmps_empty_key(), ILLmps_error(), ILLmps_next_bound(), ILLmps_next_field(), ILLmps_possibly_blank_name(), ILLmps_set_end_of_line(), ILLraw_set_bounds_name(), ILLsymboltab_lookup(), ILLutil_index(), mps_bound_name, mps_set_bound(), and NULL.

Referenced by read_mps_line_in_section().

Here is the call graph for this function:

static int add_col ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 538 of file mps.c.

References ILL_FAILtrue, ILL_RETURN, ILLmps_empty_field(), ILLmps_empty_key(), is_marker_line(), mps_read_col_line(), and mps_read_marker_line().

Here is the call graph for this function:

static int add_ranges ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 900 of file mps.c.

References ILLread_mps_state_struct::field, ILLmps_error(), ILLmps_next_coef(), ILLmps_next_field(), ILLmps_possibly_blank_name(), ILLmps_set_end_of_line(), ILLmps_warn(), ILLraw_add_ranges_coef(), ILLraw_rowname(), ILLraw_set_ranges_name(), ILLsymboltab_lookup(), and rawlpdata::rowtab.

Referenced by read_mps_line_in_section().

Here is the call graph for this function:

static int add_rhs ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 695 of file mps.c.

References ILLread_mps_state_struct::field, ILLmps_error(), ILLmps_next_coef(), ILLmps_next_field(), ILLmps_possibly_blank_name(), ILLmps_set_end_of_line(), ILLmps_warn(), ILLraw_rowname(), ILLraw_set_rhs_name(), ILLsymboltab_lookup(), and rawlpdata::rowtab.

Referenced by read_mps_line_in_section().

Here is the call graph for this function:

static int add_row ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 491 of file mps.c.

References ILL_FAILtrue, ILL_RESULT, ILLmps_empty_field(), ILLmps_empty_key(), ILLmps_error(), ILLmps_next_field(), ILLraw_add_row(), ILLsymboltab_lookup(), and rawlpdata::rowtab.

Here is the call graph for this function:

static int check_section_order ( ILLread_mps_state state,
int  sec 
) [static]

Definition at line 201 of file mps.c.

References ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, 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 ILLread_mps ( qsline_reader file,
const char *  f,
rawlpdata lp 
)

Definition at line 132 of file mps.c.

References rawlpdata::coltab, ILL_IFTRACE, ILL_MPS_ENDATA, ILL_RESULT, ILLmps_empty_key(), ILLmps_error(), ILLmps_next_line(), ILLmps_section_name, ILLmps_state_init(), ILLmps_warn(), ILLsymboltab_create(), mps_fill_in(), read_mps_line_in_section(), read_mps_section(), and rawlpdata::rowtab.

Referenced by ILLread().

Here is the call graph for this function:

int ILLwrite_mps ( ILLlpdata lp,
qserror_collector collector 
)

Definition at line 1084 of file mps.c.

References ILLlpdata::colnames, ILL_CHECKnull, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_MIN, ILL_namebufsize, ILL_UTIL_STR, ILLdata_warn(), ILLlp_rows_init(), ILLprint_report(), ILLsymboltab_uname(), ILLlpdata::nrows, NULL, ILLlpdata::objname, ILLlpdata::objsense, ILLlpdata::probname, ILLlpdata::refind, ILLlpdata::refrowname, ILLlp_rows::rowcnt, ILLlpdata::rownames, ILLlpdata::rowtab, and ILLlpdata::sense.

Referenced by QSreport_prob().

Here is the call graph for this function:

static int is_marker_line ( ILLread_mps_state state  )  [static]

Definition at line 630 of file mps.c.

References ILL_ISBLANK, ILLutil_strchr(), and ILLread_mps_state_struct::line.

Referenced by add_col().

Here is the call graph for this function:

static int mps_fill_in ( rawlpdata lp,
const char *  obj 
) [static]

Definition at line 966 of file mps.c.

References rawlpdata::error_collector, ILLdata_error(), ILLdata_warn(), ILLsymboltab_lookup(), rawlpdata::nrows, rawlpdata::objindex, rawlpdata::rowsense, and rawlpdata::rowtab.

Referenced by ILLread_mps().

Here is the call graph for this function:

static int mps_read_col_line ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 559 of file mps.c.

References rawlpdata::coltab, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_RESULT, ILLmps_empty_field(), ILLmps_empty_key(), ILLmps_error(), ILLmps_next_coef(), ILLmps_next_field(), ILLraw_add_col(), ILLraw_add_col_coef(), ILLraw_add_sos_member(), ILLraw_colname(), ILLraw_is_mem_other_sos(), ILLsymboltab_lookup(), rawlpdata::intmarker, rawlpdata::ncols, and rawlpdata::rowtab.

Referenced by add_col().

Here is the call graph for this function:

static int mps_read_marker_line ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 649 of file mps.c.

References ILLread_mps_state_struct::field, ILL_RESULT, ILL_SOS_TYPE1, ILL_SOS_TYPE2, ILLmps_error(), ILLmps_int_sos_mode(), ILLmps_next_field(), ILLraw_add_sos(), and ILLread_mps_state_struct::sosvar.

Referenced by add_col().

Here is the call graph for this function:

static void mps_set_bound ( rawlpdata lp,
ILLread_mps_state state,
int  colind,
const char *  bndtype,
EGlpNum_t  bnd 
) [static]

Definition at line 833 of file mps.c.

References ILL_CLEANUP, ILL_MAXDOUBLE, ILL_MINDOUBLE, ILL_REPRT, ILLmps_warn(), ILLraw_set_binaryBound(), ILLraw_set_fixedBound(), ILLraw_set_lowerBound(), ILLraw_set_unbound(), ILLraw_set_upperBound(), rawlpdata::intmarker, and NULL.

Referenced by add_bounds().

Here is the call graph for this function:

static int mps_write_col ( int  i,
int  iorig,
char *  colname,
ILLlpdata lp,
char **  rownames,
int  intmode,
char *  objname 
) [static]

Definition at line 1301 of file mps.c.

References ILLlpdata::A, ILLprint_report(), ILLlpdata::intmarker, ILLmatrix::matbeg, ILLmatrix::matcnt, ILLmatrix::matind, ILLmatrix::matval, and ILLlpdata::obj.

Here is the call graph for this function:

static int read_mps_line_in_section ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 442 of file mps.c.

References add_bounds(), add_col(), add_ranges(), add_rhs(), add_row(), ILL_CLEANUP, ILL_FAILtrue, ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_NONE, ILL_MPS_RANGES, ILL_MPS_RHS, ILL_MPS_ROWS, ILL_REPRT, ILL_RESULT, ILLmps_check_end_of_line(), ILLmps_empty_field(), ILLmps_empty_key(), and ILLmps_error().

Referenced by ILLread_mps().

Here is the call graph for this function:

static int read_mps_name ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 311 of file mps.c.

References ILL_RESULT, ILL_UTIL_STR, ILLmps_empty_field(), ILLmps_warn(), and rawlpdata::name.

Referenced by read_mps_section().

Here is the call graph for this function:

static int read_mps_objname ( ILLread_mps_state state  )  [static]

Definition at line 431 of file mps.c.

References ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MPS_OBJNAME, ILL_RETURN, ILL_UTIL_STR, ILLread_mps_state_struct::obj, and ILLread_mps_state_struct::section.

Referenced by read_mps_objnamesense().

static int read_mps_objnamesense ( ILLmps_section  sec,
ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 355 of file mps.c.

References ILL_MPS_OBJNAME, ILLmps_empty_field(), ILLmps_empty_key(), ILLmps_error(), ILLmps_next_line(), ILLmps_section_name, read_mps_objname(), read_mps_objsense(), read_mps_section(), and ILLread_mps_state_struct::section.

Referenced by read_mps_section().

Here is the call graph for this function:

static int read_mps_objsense ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 399 of file mps.c.

References ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MAX, ILL_MIN, ILL_MPS_OBJSENSE, ILL_RESULT, ILLmps_error(), rawlpdata::objsense, and ILLread_mps_state_struct::section.

Referenced by read_mps_objnamesense().

Here is the call graph for this function:

static int read_mps_refrow ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 329 of file mps.c.

References ILL_MPS_REFROW, ILL_RETURN, ILL_UTIL_STR, ILLmps_empty_field(), ILLmps_empty_key(), ILLmps_error(), ILLmps_next_line(), rawlpdata::refrow, and ILLread_mps_state_struct::section.

Referenced by read_mps_section().

Here is the call graph for this function:

static int read_mps_section ( ILLread_mps_state state,
rawlpdata lp 
) [static]

Definition at line 236 of file mps.c.

References check_section_order(), ILL_FAILtrue, ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_NAME, ILL_MPS_NONE, ILL_MPS_OBJNAME, ILL_MPS_OBJSENSE, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, ILL_REPRT, ILL_RESULT, ILLmps_empty_key(), ILLmps_error(), ILLmps_section_name, ILLmps_set_section(), ILLraw_init_bounds(), ILLraw_init_ranges(), ILLraw_init_rhs(), ILLutil_index(), read_mps_name(), read_mps_objnamesense(), and read_mps_refrow().

Referenced by ILLread_mps(), and read_mps_objnamesense().

Here is the call graph for this function:


Variable Documentation

const char* ILLmps_section_name[ILL_MPS_N_SECTIONS+2]

Initial value:

 {
  "NAME", "OBJSENSE", "OBJNAME", "ROWS", "COLUMNS",
  "RHS", "RANGES", "BOUNDS", "REFROW", "ENDATA",
  NULL
}

Definition at line 57 of file mps.c.

Referenced by check_section_order(), ILLlib_readbasis(), ILLmps_set_section(), ILLread_mps(), read_mps_objnamesense(), and read_mps_section().

const char* mps_bound_name[] [static]

Initial value:

 {
  "LO", "UP", "FX", "FR", "MI", "PL", "BV", "UI", "LI", NULL
}

Definition at line 63 of file mps.c.

Referenced by add_bounds().

int TRACE = 0 [static]

Definition at line 55 of file mps.c.


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