mpq_mps.c File Reference

#include "qs_config.h"
#include "mpq_iqsutil.h"
#include "mpq_mps.h"
#include "mpq_rawlp.h"
#include "mpq_lpdata.h"

Include dependency graph for mpq_mps.c:

Go to the source code of this file.

Functions

static int mpq_add_bounds (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_add_col (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_add_ranges (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_add_rhs (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_add_row (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_check_section_order (mpq_ILLread_mps_state *state, int sec)
int mpq_ILLread_mps (mpq_qsline_reader *file, const char *f, mpq_rawlpdata *lp)
int mpq_ILLwrite_mps (mpq_ILLlpdata *lp, mpq_qserror_collector *collector)
static int mpq_is_marker_line (mpq_ILLread_mps_state *state)
static int mpq_mps_fill_in (mpq_rawlpdata *lp, const char *obj)
static int mpq_mps_read_col_line (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_mps_read_marker_line (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static void mpq_mps_set_bound (mpq_rawlpdata *lp, mpq_ILLread_mps_state *state, int colind, const char *bndtype, mpq_t bnd)
static int mpq_mps_write_col (int i, int iorig, char *colname, mpq_ILLlpdata *lp, char **rownames, int intmode, char *objname)
static int mpq_read_mps_line_in_section (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_read_mps_name (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_read_mps_objname (mpq_ILLread_mps_state *state)
static int mpq_read_mps_objnamesense (ILLmps_section sec, mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_read_mps_objsense (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_read_mps_refrow (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)
static int mpq_read_mps_section (mpq_ILLread_mps_state *state, mpq_rawlpdata *lp)

Variables

const char * mpq_ILLmps_section_name [ILL_MPS_N_SECTIONS+2]
static const char * mpq_mps_bound_name []
static int TRACE = 0


Function Documentation

static int mpq_add_bounds ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 761 of file mpq_mps.c.

References mpq_rawlpdata::coltab, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_bound(), mpq_ILLmps_next_field(), mpq_ILLmps_possibly_blank_name(), mpq_ILLmps_set_end_of_line(), mpq_ILLraw_set_bounds_name(), mpq_ILLutil_index(), mpq_mps_bound_name, mpq_mps_set_bound(), and NULL.

Referenced by mpq_read_mps_line_in_section().

Here is the call graph for this function:

static int mpq_add_col ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 538 of file mpq_mps.c.

References ILL_FAILtrue, ILL_RETURN, mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_is_marker_line(), mpq_mps_read_col_line(), and mpq_mps_read_marker_line().

Here is the call graph for this function:

static int mpq_add_ranges ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 900 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), mpq_ILLmps_error(), mpq_ILLmps_next_coef(), mpq_ILLmps_next_field(), mpq_ILLmps_possibly_blank_name(), mpq_ILLmps_set_end_of_line(), mpq_ILLmps_warn(), mpq_ILLraw_add_ranges_coef(), mpq_ILLraw_rowname(), mpq_ILLraw_set_ranges_name(), and mpq_rawlpdata::rowtab.

Referenced by mpq_read_mps_line_in_section().

Here is the call graph for this function:

static int mpq_add_rhs ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 695 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), mpq_ILLmps_error(), mpq_ILLmps_next_coef(), mpq_ILLmps_next_field(), mpq_ILLmps_possibly_blank_name(), mpq_ILLmps_set_end_of_line(), mpq_ILLmps_warn(), mpq_ILLraw_rowname(), mpq_ILLraw_set_rhs_name(), and mpq_rawlpdata::rowtab.

Referenced by mpq_read_mps_line_in_section().

Here is the call graph for this function:

static int mpq_add_row ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 491 of file mpq_mps.c.

References ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_field(), mpq_ILLraw_add_row(), and mpq_rawlpdata::rowtab.

Here is the call graph for this function:

static int mpq_check_section_order ( mpq_ILLread_mps_state state,
int  sec 
) [static]

Definition at line 201 of file mpq_mps.c.

References ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, mpq_ILLmps_error(), mpq_ILLmps_section_name, and mpq_ILLread_mps_state_struct::section.

Referenced by mpq_read_mps_section().

Here is the call graph for this function:

int mpq_ILLread_mps ( mpq_qsline_reader file,
const char *  f,
mpq_rawlpdata lp 
)

Definition at line 132 of file mpq_mps.c.

References mpq_rawlpdata::coltab, ILL_IFTRACE, ILL_MPS_ENDATA, ILL_RESULT, ILLsymboltab_create(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_line(), mpq_ILLmps_section_name, mpq_ILLmps_state_init(), mpq_ILLmps_warn(), mpq_mps_fill_in(), mpq_read_mps_line_in_section(), mpq_read_mps_section(), and mpq_rawlpdata::rowtab.

Referenced by mpq_ILLread().

Here is the call graph for this function:

int mpq_ILLwrite_mps ( mpq_ILLlpdata lp,
mpq_qserror_collector collector 
)

Definition at line 1084 of file mpq_mps.c.

References mpq_ILLlpdata::colnames, ILL_CHECKnull, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_namebufsize, ILLsymboltab_uname(), mpq_ILL_MIN, mpq_ILLdata_warn(), mpq_ILLlp_rows_init(), mpq_ILLprint_report(), mpq_ILLlpdata::nrows, NULL, mpq_ILLlpdata::objname, mpq_ILLlpdata::objsense, mpq_ILLlpdata::probname, mpq_ILLlpdata::refind, mpq_ILLlpdata::refrowname, mpq_ILLlp_rows::rowcnt, mpq_ILLlpdata::rownames, mpq_ILLlpdata::rowtab, and mpq_ILLlpdata::sense.

Referenced by mpq_QSreport_prob().

Here is the call graph for this function:

static int mpq_is_marker_line ( mpq_ILLread_mps_state state  )  [static]

Definition at line 630 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::line, mpq_ILL_ISBLANK, and mpq_ILLutil_strchr().

Referenced by mpq_add_col().

Here is the call graph for this function:

static int mpq_mps_fill_in ( mpq_rawlpdata lp,
const char *  obj 
) [static]

Definition at line 966 of file mpq_mps.c.

References mpq_rawlpdata::error_collector, ILLsymboltab_lookup(), mpq_ILLdata_error(), mpq_ILLdata_warn(), mpq_rawlpdata::nrows, mpq_rawlpdata::objindex, mpq_rawlpdata::rowsense, and mpq_rawlpdata::rowtab.

Referenced by mpq_ILLread_mps().

Here is the call graph for this function:

static int mpq_mps_read_col_line ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 559 of file mpq_mps.c.

References mpq_rawlpdata::coltab, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpq_rawlpdata::intmarker, mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_coef(), mpq_ILLmps_next_field(), mpq_ILLraw_add_col(), mpq_ILLraw_add_col_coef(), mpq_ILLraw_add_sos_member(), mpq_ILLraw_colname(), mpq_ILLraw_is_mem_other_sos(), mpq_rawlpdata::ncols, and mpq_rawlpdata::rowtab.

Referenced by mpq_add_col().

Here is the call graph for this function:

static int mpq_mps_read_marker_line ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 649 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::field, ILL_RESULT, mpq_ILL_SOS_TYPE1, mpq_ILL_SOS_TYPE2, mpq_ILLmps_error(), mpq_ILLmps_int_sos_mode(), mpq_ILLmps_next_field(), mpq_ILLraw_add_sos(), and mpq_ILLread_mps_state_struct::sosvar.

Referenced by mpq_add_col().

Here is the call graph for this function:

static void mpq_mps_set_bound ( mpq_rawlpdata lp,
mpq_ILLread_mps_state state,
int  colind,
const char *  bndtype,
mpq_t  bnd 
) [static]

Definition at line 833 of file mpq_mps.c.

References ILL_CLEANUP, ILL_REPRT, mpq_rawlpdata::intmarker, mpq_ILL_MAXDOUBLE, mpq_ILL_MINDOUBLE, mpq_ILLmps_warn(), mpq_ILLraw_set_binaryBound(), mpq_ILLraw_set_fixedBound(), mpq_ILLraw_set_lowerBound(), mpq_ILLraw_set_unbound(), mpq_ILLraw_set_upperBound(), and NULL.

Referenced by mpq_add_bounds().

Here is the call graph for this function:

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

Definition at line 1301 of file mpq_mps.c.

References mpq_ILLlpdata::A, mpq_ILLlpdata::intmarker, mpq_ILLmatrix::matbeg, mpq_ILLmatrix::matcnt, mpq_ILLmatrix::matind, mpq_ILLmatrix::matval, mpq_ILLprint_report(), and mpq_ILLlpdata::obj.

Here is the call graph for this function:

static int mpq_read_mps_line_in_section ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 442 of file mpq_mps.c.

References 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, mpq_add_bounds(), mpq_add_col(), mpq_add_ranges(), mpq_add_rhs(), mpq_add_row(), mpq_ILLmps_check_end_of_line(), mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), and mpq_ILLmps_error().

Referenced by mpq_ILLread_mps().

Here is the call graph for this function:

static int mpq_read_mps_name ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 311 of file mpq_mps.c.

References ILL_RESULT, mpq_ILLmps_empty_field(), mpq_ILLmps_warn(), and mpq_rawlpdata::name.

Referenced by mpq_read_mps_section().

Here is the call graph for this function:

static int mpq_read_mps_objname ( mpq_ILLread_mps_state state  )  [static]

Definition at line 431 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MPS_OBJNAME, ILL_RETURN, mpq_ILLread_mps_state_struct::obj, and mpq_ILLread_mps_state_struct::section.

Referenced by mpq_read_mps_objnamesense().

static int mpq_read_mps_objnamesense ( ILLmps_section  sec,
mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 355 of file mpq_mps.c.

References ILL_MPS_OBJNAME, mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_line(), mpq_ILLmps_section_name, mpq_read_mps_objname(), mpq_read_mps_objsense(), mpq_read_mps_section(), and mpq_ILLread_mps_state_struct::section.

Referenced by mpq_read_mps_section().

Here is the call graph for this function:

static int mpq_read_mps_objsense ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 399 of file mpq_mps.c.

References mpq_ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MPS_OBJSENSE, ILL_RESULT, mpq_ILL_MAX, mpq_ILL_MIN, mpq_ILLmps_error(), mpq_rawlpdata::objsense, and mpq_ILLread_mps_state_struct::section.

Referenced by mpq_read_mps_objnamesense().

Here is the call graph for this function:

static int mpq_read_mps_refrow ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 329 of file mpq_mps.c.

References ILL_MPS_REFROW, ILL_RETURN, mpq_ILLmps_empty_field(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_next_line(), mpq_rawlpdata::refrow, and mpq_ILLread_mps_state_struct::section.

Referenced by mpq_read_mps_section().

Here is the call graph for this function:

static int mpq_read_mps_section ( mpq_ILLread_mps_state state,
mpq_rawlpdata lp 
) [static]

Definition at line 236 of file mpq_mps.c.

References 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, mpq_check_section_order(), mpq_ILLmps_empty_key(), mpq_ILLmps_error(), mpq_ILLmps_section_name, mpq_ILLmps_set_section(), mpq_ILLraw_init_bounds(), mpq_ILLraw_init_ranges(), mpq_ILLraw_init_rhs(), mpq_ILLutil_index(), mpq_read_mps_name(), mpq_read_mps_objnamesense(), and mpq_read_mps_refrow().

Referenced by mpq_ILLread_mps(), and mpq_read_mps_objnamesense().

Here is the call graph for this function:


Variable Documentation

const char* mpq_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 mpq_mps.c.

Referenced by mpq_check_section_order(), mpq_ILLlib_readbasis(), mpq_ILLmps_set_section(), mpq_ILLread_mps(), mpq_read_mps_objnamesense(), and mpq_read_mps_section().

const char* mpq_mps_bound_name[] [static]

Initial value:

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

Definition at line 63 of file mpq_mps.c.

Referenced by mpq_add_bounds().

int TRACE = 0 [static]

Definition at line 55 of file mpq_mps.c.


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