fp20_mps.c File Reference

#include "qs_config.h"
#include "fp20_iqsutil.h"
#include "fp20_mps.h"
#include "fp20_rawlp.h"
#include "fp20_lpdata.h"

Include dependency graph for fp20_mps.c:

Go to the source code of this file.

Functions

static int fp20_add_bounds (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_add_col (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_add_ranges (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_add_rhs (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_add_row (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_check_section_order (fp20_ILLread_mps_state *state, int sec)
int fp20_ILLread_mps (fp20_qsline_reader *file, const char *f, fp20_rawlpdata *lp)
int fp20_ILLwrite_mps (fp20_ILLlpdata *lp, fp20_qserror_collector *collector)
static int fp20_is_marker_line (fp20_ILLread_mps_state *state)
static int fp20_mps_fill_in (fp20_rawlpdata *lp, const char *obj)
static int fp20_mps_read_col_line (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_mps_read_marker_line (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static void fp20_mps_set_bound (fp20_rawlpdata *lp, fp20_ILLread_mps_state *state, int colind, const char *bndtype, EGfp20_t bnd)
static int fp20_mps_write_col (int i, int iorig, char *colname, fp20_ILLlpdata *lp, char **rownames, int intmode, char *objname)
static int fp20_read_mps_line_in_section (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_read_mps_name (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_read_mps_objname (fp20_ILLread_mps_state *state)
static int fp20_read_mps_objnamesense (ILLmps_section sec, fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_read_mps_objsense (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_read_mps_refrow (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)
static int fp20_read_mps_section (fp20_ILLread_mps_state *state, fp20_rawlpdata *lp)

Variables

const char * fp20_ILLmps_section_name [ILL_MPS_N_SECTIONS+2]
static const char * fp20_mps_bound_name []
static int TRACE = 0


Function Documentation

static int fp20_add_bounds ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 761 of file fp20_mps.c.

References fp20_rawlpdata::coltab, fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_bound(), fp20_ILLmps_next_field(), fp20_ILLmps_possibly_blank_name(), fp20_ILLmps_set_end_of_line(), fp20_ILLraw_set_bounds_name(), fp20_ILLutil_index(), fp20_mps_bound_name, fp20_mps_set_bound(), ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), and NULL.

Referenced by fp20_read_mps_line_in_section().

Here is the call graph for this function:

static int fp20_add_col ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 538 of file fp20_mps.c.

References fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_is_marker_line(), fp20_mps_read_col_line(), fp20_mps_read_marker_line(), ILL_FAILtrue, and ILL_RETURN.

Here is the call graph for this function:

static int fp20_add_ranges ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 900 of file fp20_mps.c.

References fp20_ILLread_mps_state_struct::field, fp20_ILLmps_error(), fp20_ILLmps_next_coef(), fp20_ILLmps_next_field(), fp20_ILLmps_possibly_blank_name(), fp20_ILLmps_set_end_of_line(), fp20_ILLmps_warn(), fp20_ILLraw_add_ranges_coef(), fp20_ILLraw_rowname(), fp20_ILLraw_set_ranges_name(), ILLsymboltab_lookup(), and fp20_rawlpdata::rowtab.

Referenced by fp20_read_mps_line_in_section().

Here is the call graph for this function:

static int fp20_add_rhs ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 695 of file fp20_mps.c.

References fp20_ILLread_mps_state_struct::field, fp20_ILLmps_error(), fp20_ILLmps_next_coef(), fp20_ILLmps_next_field(), fp20_ILLmps_possibly_blank_name(), fp20_ILLmps_set_end_of_line(), fp20_ILLmps_warn(), fp20_ILLraw_rowname(), fp20_ILLraw_set_rhs_name(), ILLsymboltab_lookup(), and fp20_rawlpdata::rowtab.

Referenced by fp20_read_mps_line_in_section().

Here is the call graph for this function:

static int fp20_add_row ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 491 of file fp20_mps.c.

References fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_field(), fp20_ILLraw_add_row(), ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), and fp20_rawlpdata::rowtab.

Here is the call graph for this function:

static int fp20_check_section_order ( fp20_ILLread_mps_state state,
int  sec 
) [static]

Definition at line 201 of file fp20_mps.c.

References fp20_ILLmps_error(), fp20_ILLmps_section_name, ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, and fp20_ILLread_mps_state_struct::section.

Referenced by fp20_read_mps_section().

Here is the call graph for this function:

int fp20_ILLread_mps ( fp20_qsline_reader file,
const char *  f,
fp20_rawlpdata lp 
)

Definition at line 132 of file fp20_mps.c.

References fp20_rawlpdata::coltab, fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_line(), fp20_ILLmps_section_name, fp20_ILLmps_state_init(), fp20_ILLmps_warn(), fp20_mps_fill_in(), fp20_read_mps_line_in_section(), fp20_read_mps_section(), ILL_IFTRACE, ILL_MPS_ENDATA, ILL_RESULT, ILLsymboltab_create(), and fp20_rawlpdata::rowtab.

Here is the call graph for this function:

int fp20_ILLwrite_mps ( fp20_ILLlpdata lp,
fp20_qserror_collector collector 
)

Definition at line 1084 of file fp20_mps.c.

References fp20_ILLlpdata::colnames, fp20_ILL_MIN, fp20_ILL_UTIL_STR, fp20_ILLdata_warn(), fp20_ILLlp_rows_init(), fp20_ILLprint_report(), ILL_CHECKnull, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_namebufsize, ILLsymboltab_uname(), fp20_ILLlpdata::nrows, NULL, fp20_ILLlpdata::objname, fp20_ILLlpdata::objsense, fp20_ILLlpdata::probname, fp20_ILLlpdata::refind, fp20_ILLlpdata::refrowname, fp20_ILLlp_rows::rowcnt, fp20_ILLlpdata::rownames, fp20_ILLlpdata::rowtab, and fp20_ILLlpdata::sense.

Here is the call graph for this function:

static int fp20_is_marker_line ( fp20_ILLread_mps_state state  )  [static]

Definition at line 630 of file fp20_mps.c.

References fp20_ILL_ISBLANK, fp20_ILLutil_strchr(), and fp20_ILLread_mps_state_struct::line.

Referenced by fp20_add_col().

Here is the call graph for this function:

static int fp20_mps_fill_in ( fp20_rawlpdata lp,
const char *  obj 
) [static]

Definition at line 966 of file fp20_mps.c.

References fp20_rawlpdata::error_collector, fp20_ILLdata_error(), fp20_ILLdata_warn(), ILLsymboltab_lookup(), fp20_rawlpdata::nrows, fp20_rawlpdata::objindex, fp20_rawlpdata::rowsense, and fp20_rawlpdata::rowtab.

Referenced by fp20_ILLread_mps().

Here is the call graph for this function:

static int fp20_mps_read_col_line ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 559 of file fp20_mps.c.

References fp20_rawlpdata::coltab, fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_coef(), fp20_ILLmps_next_field(), fp20_ILLraw_add_col(), fp20_ILLraw_add_col_coef(), fp20_ILLraw_add_sos_member(), fp20_ILLraw_colname(), fp20_ILLraw_is_mem_other_sos(), ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), fp20_rawlpdata::intmarker, fp20_rawlpdata::ncols, and fp20_rawlpdata::rowtab.

Referenced by fp20_add_col().

Here is the call graph for this function:

static int fp20_mps_read_marker_line ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 649 of file fp20_mps.c.

References fp20_ILLread_mps_state_struct::field, fp20_ILL_SOS_TYPE1, fp20_ILL_SOS_TYPE2, fp20_ILLmps_error(), fp20_ILLmps_int_sos_mode(), fp20_ILLmps_next_field(), fp20_ILLraw_add_sos(), ILL_RESULT, and fp20_ILLread_mps_state_struct::sosvar.

Referenced by fp20_add_col().

Here is the call graph for this function:

static void fp20_mps_set_bound ( fp20_rawlpdata lp,
fp20_ILLread_mps_state state,
int  colind,
const char *  bndtype,
EGfp20_t  bnd 
) [static]

Definition at line 833 of file fp20_mps.c.

References fp20_ILL_MAXDOUBLE, fp20_ILL_MINDOUBLE, fp20_ILLmps_warn(), fp20_ILLraw_set_binaryBound(), fp20_ILLraw_set_fixedBound(), fp20_ILLraw_set_lowerBound(), fp20_ILLraw_set_unbound(), fp20_ILLraw_set_upperBound(), ILL_CLEANUP, ILL_REPRT, fp20_rawlpdata::intmarker, and NULL.

Referenced by fp20_add_bounds().

Here is the call graph for this function:

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

Definition at line 1301 of file fp20_mps.c.

References fp20_ILLlpdata::A, fp20_ILLprint_report(), fp20_ILLlpdata::intmarker, fp20_ILLmatrix::matbeg, fp20_ILLmatrix::matcnt, fp20_ILLmatrix::matind, fp20_ILLmatrix::matval, and fp20_ILLlpdata::obj.

Here is the call graph for this function:

static int fp20_read_mps_line_in_section ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 442 of file fp20_mps.c.

References fp20_add_bounds(), fp20_add_col(), fp20_add_ranges(), fp20_add_rhs(), fp20_add_row(), fp20_ILLmps_check_end_of_line(), fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), ILL_CLEANUP, ILL_FAILtrue, ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_NONE, ILL_MPS_RANGES, ILL_MPS_RHS, ILL_MPS_ROWS, ILL_REPRT, and ILL_RESULT.

Referenced by fp20_ILLread_mps().

Here is the call graph for this function:

static int fp20_read_mps_name ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 311 of file fp20_mps.c.

References fp20_ILL_UTIL_STR, fp20_ILLmps_empty_field(), fp20_ILLmps_warn(), ILL_RESULT, and fp20_rawlpdata::name.

Referenced by fp20_read_mps_section().

Here is the call graph for this function:

static int fp20_read_mps_objname ( fp20_ILLread_mps_state state  )  [static]

Definition at line 431 of file fp20_mps.c.

References fp20_ILLread_mps_state_struct::field, fp20_ILL_UTIL_STR, ILL_FAILfalse, ILL_MPS_OBJNAME, ILL_RETURN, fp20_ILLread_mps_state_struct::obj, and fp20_ILLread_mps_state_struct::section.

Referenced by fp20_read_mps_objnamesense().

static int fp20_read_mps_objnamesense ( ILLmps_section  sec,
fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 355 of file fp20_mps.c.

References fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_line(), fp20_ILLmps_section_name, fp20_read_mps_objname(), fp20_read_mps_objsense(), fp20_read_mps_section(), ILL_MPS_OBJNAME, and fp20_ILLread_mps_state_struct::section.

Referenced by fp20_read_mps_section().

Here is the call graph for this function:

static int fp20_read_mps_objsense ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 399 of file fp20_mps.c.

References fp20_ILLread_mps_state_struct::field, fp20_ILL_MAX, fp20_ILL_MIN, fp20_ILLmps_error(), ILL_FAILfalse, ILL_MPS_OBJSENSE, ILL_RESULT, fp20_rawlpdata::objsense, and fp20_ILLread_mps_state_struct::section.

Referenced by fp20_read_mps_objnamesense().

Here is the call graph for this function:

static int fp20_read_mps_refrow ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 329 of file fp20_mps.c.

References fp20_ILL_UTIL_STR, fp20_ILLmps_empty_field(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_next_line(), ILL_MPS_REFROW, ILL_RETURN, fp20_rawlpdata::refrow, and fp20_ILLread_mps_state_struct::section.

Referenced by fp20_read_mps_section().

Here is the call graph for this function:

static int fp20_read_mps_section ( fp20_ILLread_mps_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 236 of file fp20_mps.c.

References fp20_check_section_order(), fp20_ILLmps_empty_key(), fp20_ILLmps_error(), fp20_ILLmps_section_name, fp20_ILLmps_set_section(), fp20_ILLraw_init_bounds(), fp20_ILLraw_init_ranges(), fp20_ILLraw_init_rhs(), fp20_ILLutil_index(), fp20_read_mps_name(), fp20_read_mps_objnamesense(), fp20_read_mps_refrow(), 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, and ILL_RESULT.

Referenced by fp20_ILLread_mps(), and fp20_read_mps_objnamesense().

Here is the call graph for this function:


Variable Documentation

const char* fp20_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 fp20_mps.c.

const char* fp20_mps_bound_name[] [static]

Initial value:

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

Definition at line 63 of file fp20_mps.c.

Referenced by fp20_add_bounds().

int TRACE = 0 [static]

Definition at line 55 of file fp20_mps.c.


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