mpf_mps.c File Reference

#include "qs_config.h"
#include "mpf_iqsutil.h"
#include "mpf_mps.h"
#include "mpf_rawlp.h"
#include "mpf_lpdata.h"

Include dependency graph for mpf_mps.c:

Go to the source code of this file.

Functions

static int mpf_add_bounds (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_add_col (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_add_ranges (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_add_rhs (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_add_row (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_check_section_order (mpf_ILLread_mps_state *state, int sec)
int mpf_ILLread_mps (mpf_qsline_reader *file, const char *f, mpf_rawlpdata *lp)
int mpf_ILLwrite_mps (mpf_ILLlpdata *lp, mpf_qserror_collector *collector)
static int mpf_is_marker_line (mpf_ILLread_mps_state *state)
static int mpf_mps_fill_in (mpf_rawlpdata *lp, const char *obj)
static int mpf_mps_read_col_line (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_mps_read_marker_line (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static void mpf_mps_set_bound (mpf_rawlpdata *lp, mpf_ILLread_mps_state *state, int colind, const char *bndtype, mpf_t bnd)
static int mpf_mps_write_col (int i, int iorig, char *colname, mpf_ILLlpdata *lp, char **rownames, int intmode, char *objname)
static int mpf_read_mps_line_in_section (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_read_mps_name (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_read_mps_objname (mpf_ILLread_mps_state *state)
static int mpf_read_mps_objnamesense (ILLmps_section sec, mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_read_mps_objsense (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_read_mps_refrow (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)
static int mpf_read_mps_section (mpf_ILLread_mps_state *state, mpf_rawlpdata *lp)

Variables

const char * mpf_ILLmps_section_name [ILL_MPS_N_SECTIONS+2]
static const char * mpf_mps_bound_name []
static int TRACE = 0


Function Documentation

static int mpf_add_bounds ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 761 of file mpf_mps.c.

References mpf_rawlpdata::coltab, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_bound(), mpf_ILLmps_next_field(), mpf_ILLmps_possibly_blank_name(), mpf_ILLmps_set_end_of_line(), mpf_ILLraw_set_bounds_name(), mpf_ILLutil_index(), mpf_mps_bound_name, mpf_mps_set_bound(), and NULL.

Referenced by mpf_read_mps_line_in_section().

Here is the call graph for this function:

static int mpf_add_col ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 538 of file mpf_mps.c.

References ILL_FAILtrue, ILL_RETURN, mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_is_marker_line(), mpf_mps_read_col_line(), and mpf_mps_read_marker_line().

Here is the call graph for this function:

static int mpf_add_ranges ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 900 of file mpf_mps.c.

References mpf_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), mpf_ILLmps_error(), mpf_ILLmps_next_coef(), mpf_ILLmps_next_field(), mpf_ILLmps_possibly_blank_name(), mpf_ILLmps_set_end_of_line(), mpf_ILLmps_warn(), mpf_ILLraw_add_ranges_coef(), mpf_ILLraw_rowname(), mpf_ILLraw_set_ranges_name(), and mpf_rawlpdata::rowtab.

Referenced by mpf_read_mps_line_in_section().

Here is the call graph for this function:

static int mpf_add_rhs ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 695 of file mpf_mps.c.

References mpf_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), mpf_ILLmps_error(), mpf_ILLmps_next_coef(), mpf_ILLmps_next_field(), mpf_ILLmps_possibly_blank_name(), mpf_ILLmps_set_end_of_line(), mpf_ILLmps_warn(), mpf_ILLraw_rowname(), mpf_ILLraw_set_rhs_name(), and mpf_rawlpdata::rowtab.

Referenced by mpf_read_mps_line_in_section().

Here is the call graph for this function:

static int mpf_add_row ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 491 of file mpf_mps.c.

References ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_field(), mpf_ILLraw_add_row(), and mpf_rawlpdata::rowtab.

Here is the call graph for this function:

static int mpf_check_section_order ( mpf_ILLread_mps_state state,
int  sec 
) [static]

Definition at line 201 of file mpf_mps.c.

References ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, mpf_ILLmps_error(), mpf_ILLmps_section_name, and mpf_ILLread_mps_state_struct::section.

Referenced by mpf_read_mps_section().

Here is the call graph for this function:

int mpf_ILLread_mps ( mpf_qsline_reader file,
const char *  f,
mpf_rawlpdata lp 
)

Definition at line 132 of file mpf_mps.c.

References mpf_rawlpdata::coltab, ILL_IFTRACE, ILL_MPS_ENDATA, ILL_RESULT, ILLsymboltab_create(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_line(), mpf_ILLmps_section_name, mpf_ILLmps_state_init(), mpf_ILLmps_warn(), mpf_mps_fill_in(), mpf_read_mps_line_in_section(), mpf_read_mps_section(), and mpf_rawlpdata::rowtab.

Referenced by mpf_ILLread().

Here is the call graph for this function:

int mpf_ILLwrite_mps ( mpf_ILLlpdata lp,
mpf_qserror_collector collector 
)

Definition at line 1084 of file mpf_mps.c.

References mpf_ILLlpdata::colnames, ILL_CHECKnull, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_namebufsize, ILLsymboltab_uname(), mpf_ILL_MIN, mpf_ILLdata_warn(), mpf_ILLlp_rows_init(), mpf_ILLprint_report(), mpf_ILLlpdata::nrows, NULL, mpf_ILLlpdata::objname, mpf_ILLlpdata::objsense, mpf_ILLlpdata::probname, mpf_ILLlpdata::refind, mpf_ILLlpdata::refrowname, mpf_ILLlp_rows::rowcnt, mpf_ILLlpdata::rownames, mpf_ILLlpdata::rowtab, and mpf_ILLlpdata::sense.

Referenced by mpf_QSreport_prob().

Here is the call graph for this function:

static int mpf_is_marker_line ( mpf_ILLread_mps_state state  )  [static]

Definition at line 630 of file mpf_mps.c.

References mpf_ILLread_mps_state_struct::line, mpf_ILL_ISBLANK, and mpf_ILLutil_strchr().

Referenced by mpf_add_col().

Here is the call graph for this function:

static int mpf_mps_fill_in ( mpf_rawlpdata lp,
const char *  obj 
) [static]

Definition at line 966 of file mpf_mps.c.

References mpf_rawlpdata::error_collector, ILLsymboltab_lookup(), mpf_ILLdata_error(), mpf_ILLdata_warn(), mpf_rawlpdata::nrows, mpf_rawlpdata::objindex, mpf_rawlpdata::rowsense, and mpf_rawlpdata::rowtab.

Referenced by mpf_ILLread_mps().

Here is the call graph for this function:

static int mpf_mps_read_col_line ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 559 of file mpf_mps.c.

References mpf_rawlpdata::coltab, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), mpf_rawlpdata::intmarker, mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_coef(), mpf_ILLmps_next_field(), mpf_ILLraw_add_col(), mpf_ILLraw_add_col_coef(), mpf_ILLraw_add_sos_member(), mpf_ILLraw_colname(), mpf_ILLraw_is_mem_other_sos(), mpf_rawlpdata::ncols, and mpf_rawlpdata::rowtab.

Referenced by mpf_add_col().

Here is the call graph for this function:

static int mpf_mps_read_marker_line ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 649 of file mpf_mps.c.

References mpf_ILLread_mps_state_struct::field, ILL_RESULT, mpf_ILL_SOS_TYPE1, mpf_ILL_SOS_TYPE2, mpf_ILLmps_error(), mpf_ILLmps_int_sos_mode(), mpf_ILLmps_next_field(), mpf_ILLraw_add_sos(), and mpf_ILLread_mps_state_struct::sosvar.

Referenced by mpf_add_col().

Here is the call graph for this function:

static void mpf_mps_set_bound ( mpf_rawlpdata lp,
mpf_ILLread_mps_state state,
int  colind,
const char *  bndtype,
mpf_t  bnd 
) [static]

Definition at line 833 of file mpf_mps.c.

References ILL_CLEANUP, ILL_REPRT, mpf_rawlpdata::intmarker, mpf_ILL_MAXDOUBLE, mpf_ILL_MINDOUBLE, mpf_ILLmps_warn(), mpf_ILLraw_set_binaryBound(), mpf_ILLraw_set_fixedBound(), mpf_ILLraw_set_lowerBound(), mpf_ILLraw_set_unbound(), mpf_ILLraw_set_upperBound(), and NULL.

Referenced by mpf_add_bounds().

Here is the call graph for this function:

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

Definition at line 1301 of file mpf_mps.c.

References mpf_ILLlpdata::A, mpf_ILLlpdata::intmarker, mpf_ILLmatrix::matbeg, mpf_ILLmatrix::matcnt, mpf_ILLmatrix::matind, mpf_ILLmatrix::matval, mpf_ILLprint_report(), and mpf_ILLlpdata::obj.

Here is the call graph for this function:

static int mpf_read_mps_line_in_section ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 442 of file mpf_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, mpf_add_bounds(), mpf_add_col(), mpf_add_ranges(), mpf_add_rhs(), mpf_add_row(), mpf_ILLmps_check_end_of_line(), mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), and mpf_ILLmps_error().

Referenced by mpf_ILLread_mps().

Here is the call graph for this function:

static int mpf_read_mps_name ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 311 of file mpf_mps.c.

References ILL_RESULT, mpf_ILLmps_empty_field(), mpf_ILLmps_warn(), and mpf_rawlpdata::name.

Referenced by mpf_read_mps_section().

Here is the call graph for this function:

static int mpf_read_mps_objname ( mpf_ILLread_mps_state state  )  [static]

Definition at line 431 of file mpf_mps.c.

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

Referenced by mpf_read_mps_objnamesense().

static int mpf_read_mps_objnamesense ( ILLmps_section  sec,
mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 355 of file mpf_mps.c.

References ILL_MPS_OBJNAME, mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_line(), mpf_ILLmps_section_name, mpf_read_mps_objname(), mpf_read_mps_objsense(), mpf_read_mps_section(), and mpf_ILLread_mps_state_struct::section.

Referenced by mpf_read_mps_section().

Here is the call graph for this function:

static int mpf_read_mps_objsense ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 399 of file mpf_mps.c.

References mpf_ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MPS_OBJSENSE, ILL_RESULT, mpf_ILL_MAX, mpf_ILL_MIN, mpf_ILLmps_error(), mpf_rawlpdata::objsense, and mpf_ILLread_mps_state_struct::section.

Referenced by mpf_read_mps_objnamesense().

Here is the call graph for this function:

static int mpf_read_mps_refrow ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 329 of file mpf_mps.c.

References ILL_MPS_REFROW, ILL_RETURN, mpf_ILLmps_empty_field(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_next_line(), mpf_rawlpdata::refrow, and mpf_ILLread_mps_state_struct::section.

Referenced by mpf_read_mps_section().

Here is the call graph for this function:

static int mpf_read_mps_section ( mpf_ILLread_mps_state state,
mpf_rawlpdata lp 
) [static]

Definition at line 236 of file mpf_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, mpf_check_section_order(), mpf_ILLmps_empty_key(), mpf_ILLmps_error(), mpf_ILLmps_section_name, mpf_ILLmps_set_section(), mpf_ILLraw_init_bounds(), mpf_ILLraw_init_ranges(), mpf_ILLraw_init_rhs(), mpf_ILLutil_index(), mpf_read_mps_name(), mpf_read_mps_objnamesense(), and mpf_read_mps_refrow().

Referenced by mpf_ILLread_mps(), and mpf_read_mps_objnamesense().

Here is the call graph for this function:


Variable Documentation

const char* mpf_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 mpf_mps.c.

Referenced by mpf_check_section_order(), mpf_ILLlib_readbasis(), mpf_ILLmps_set_section(), mpf_ILLread_mps(), mpf_read_mps_objnamesense(), and mpf_read_mps_section().

const char* mpf_mps_bound_name[] [static]

Initial value:

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

Definition at line 63 of file mpf_mps.c.

Referenced by mpf_add_bounds().

int TRACE = 0 [static]

Definition at line 55 of file mpf_mps.c.


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