ldbl_mps.c File Reference

#include "qs_config.h"
#include "ldbl_iqsutil.h"
#include "ldbl_mps.h"
#include "ldbl_rawlp.h"
#include "ldbl_lpdata.h"

Include dependency graph for ldbl_mps.c:

Go to the source code of this file.

Functions

static int ldbl_add_bounds (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_add_col (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_add_ranges (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_add_rhs (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_add_row (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_check_section_order (ldbl_ILLread_mps_state *state, int sec)
int ldbl_ILLread_mps (ldbl_qsline_reader *file, const char *f, ldbl_rawlpdata *lp)
int ldbl_ILLwrite_mps (ldbl_ILLlpdata *lp, ldbl_qserror_collector *collector)
static int ldbl_is_marker_line (ldbl_ILLread_mps_state *state)
static int ldbl_mps_fill_in (ldbl_rawlpdata *lp, const char *obj)
static int ldbl_mps_read_col_line (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_mps_read_marker_line (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static void ldbl_mps_set_bound (ldbl_rawlpdata *lp, ldbl_ILLread_mps_state *state, int colind, const char *bndtype, long double bnd)
static int ldbl_mps_write_col (int i, int iorig, char *colname, ldbl_ILLlpdata *lp, char **rownames, int intmode, char *objname)
static int ldbl_read_mps_line_in_section (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_read_mps_name (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_read_mps_objname (ldbl_ILLread_mps_state *state)
static int ldbl_read_mps_objnamesense (ILLmps_section sec, ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_read_mps_objsense (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_read_mps_refrow (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)
static int ldbl_read_mps_section (ldbl_ILLread_mps_state *state, ldbl_rawlpdata *lp)

Variables

const char * ldbl_ILLmps_section_name [ILL_MPS_N_SECTIONS+2]
static const char * ldbl_mps_bound_name []
static int TRACE = 0


Function Documentation

static int ldbl_add_bounds ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 761 of file ldbl_mps.c.

References ldbl_rawlpdata::coltab, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_bound(), ldbl_ILLmps_next_field(), ldbl_ILLmps_possibly_blank_name(), ldbl_ILLmps_set_end_of_line(), ldbl_ILLraw_set_bounds_name(), ldbl_ILLutil_index(), ldbl_mps_bound_name, ldbl_mps_set_bound(), and NULL.

Referenced by ldbl_read_mps_line_in_section().

Here is the call graph for this function:

static int ldbl_add_col ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 538 of file ldbl_mps.c.

References ILL_FAILtrue, ILL_RETURN, ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_is_marker_line(), ldbl_mps_read_col_line(), and ldbl_mps_read_marker_line().

Here is the call graph for this function:

static int ldbl_add_ranges ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 900 of file ldbl_mps.c.

References ldbl_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), ldbl_ILLmps_error(), ldbl_ILLmps_next_coef(), ldbl_ILLmps_next_field(), ldbl_ILLmps_possibly_blank_name(), ldbl_ILLmps_set_end_of_line(), ldbl_ILLmps_warn(), ldbl_ILLraw_add_ranges_coef(), ldbl_ILLraw_rowname(), ldbl_ILLraw_set_ranges_name(), and ldbl_rawlpdata::rowtab.

Referenced by ldbl_read_mps_line_in_section().

Here is the call graph for this function:

static int ldbl_add_rhs ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 695 of file ldbl_mps.c.

References ldbl_ILLread_mps_state_struct::field, ILLsymboltab_lookup(), ldbl_ILLmps_error(), ldbl_ILLmps_next_coef(), ldbl_ILLmps_next_field(), ldbl_ILLmps_possibly_blank_name(), ldbl_ILLmps_set_end_of_line(), ldbl_ILLmps_warn(), ldbl_ILLraw_rowname(), ldbl_ILLraw_set_rhs_name(), and ldbl_rawlpdata::rowtab.

Referenced by ldbl_read_mps_line_in_section().

Here is the call graph for this function:

static int ldbl_add_row ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 491 of file ldbl_mps.c.

References ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_field(), ldbl_ILLraw_add_row(), and ldbl_rawlpdata::rowtab.

Here is the call graph for this function:

static int ldbl_check_section_order ( ldbl_ILLread_mps_state state,
int  sec 
) [static]

Definition at line 201 of file ldbl_mps.c.

References ILL_MPS_BOUNDS, ILL_MPS_COLS, ILL_MPS_RANGES, ILL_MPS_REFROW, ILL_MPS_RHS, ILL_MPS_ROWS, ldbl_ILLmps_error(), ldbl_ILLmps_section_name, and ldbl_ILLread_mps_state_struct::section.

Referenced by ldbl_read_mps_section().

Here is the call graph for this function:

int ldbl_ILLread_mps ( ldbl_qsline_reader file,
const char *  f,
ldbl_rawlpdata lp 
)

Definition at line 132 of file ldbl_mps.c.

References ldbl_rawlpdata::coltab, ILL_IFTRACE, ILL_MPS_ENDATA, ILL_RESULT, ILLsymboltab_create(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_line(), ldbl_ILLmps_section_name, ldbl_ILLmps_state_init(), ldbl_ILLmps_warn(), ldbl_mps_fill_in(), ldbl_read_mps_line_in_section(), ldbl_read_mps_section(), and ldbl_rawlpdata::rowtab.

Referenced by ldbl_ILLread().

Here is the call graph for this function:

int ldbl_ILLwrite_mps ( ldbl_ILLlpdata lp,
ldbl_qserror_collector collector 
)

Definition at line 1084 of file ldbl_mps.c.

References ldbl_ILLlpdata::colnames, ILL_CHECKnull, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_namebufsize, ILLsymboltab_uname(), ldbl_ILL_MIN, ldbl_ILLdata_warn(), ldbl_ILLlp_rows_init(), ldbl_ILLprint_report(), ldbl_ILLlpdata::nrows, NULL, ldbl_ILLlpdata::objname, ldbl_ILLlpdata::objsense, ldbl_ILLlpdata::probname, ldbl_ILLlpdata::refind, ldbl_ILLlpdata::refrowname, ldbl_ILLlp_rows::rowcnt, ldbl_ILLlpdata::rownames, ldbl_ILLlpdata::rowtab, and ldbl_ILLlpdata::sense.

Referenced by ldbl_QSreport_prob().

Here is the call graph for this function:

static int ldbl_is_marker_line ( ldbl_ILLread_mps_state state  )  [static]

Definition at line 630 of file ldbl_mps.c.

References ldbl_ILL_ISBLANK, ldbl_ILLutil_strchr(), and ldbl_ILLread_mps_state_struct::line.

Referenced by ldbl_add_col().

Here is the call graph for this function:

static int ldbl_mps_fill_in ( ldbl_rawlpdata lp,
const char *  obj 
) [static]

Definition at line 966 of file ldbl_mps.c.

References ldbl_rawlpdata::error_collector, ILLsymboltab_lookup(), ldbl_ILLdata_error(), ldbl_ILLdata_warn(), ldbl_rawlpdata::nrows, ldbl_rawlpdata::objindex, ldbl_rawlpdata::rowsense, and ldbl_rawlpdata::rowtab.

Referenced by ldbl_ILLread_mps().

Here is the call graph for this function:

static int ldbl_mps_read_col_line ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 559 of file ldbl_mps.c.

References ldbl_rawlpdata::coltab, ILL_CLEANUP_IF, ILL_FAILfalse, ILL_FAILtrue, ILL_RESULT, ILLsymboltab_lookup(), ldbl_rawlpdata::intmarker, ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_coef(), ldbl_ILLmps_next_field(), ldbl_ILLraw_add_col(), ldbl_ILLraw_add_col_coef(), ldbl_ILLraw_add_sos_member(), ldbl_ILLraw_colname(), ldbl_ILLraw_is_mem_other_sos(), ldbl_rawlpdata::ncols, and ldbl_rawlpdata::rowtab.

Referenced by ldbl_add_col().

Here is the call graph for this function:

static int ldbl_mps_read_marker_line ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 649 of file ldbl_mps.c.

References ldbl_ILLread_mps_state_struct::field, ILL_RESULT, ldbl_ILL_SOS_TYPE1, ldbl_ILL_SOS_TYPE2, ldbl_ILLmps_error(), ldbl_ILLmps_int_sos_mode(), ldbl_ILLmps_next_field(), ldbl_ILLraw_add_sos(), and ldbl_ILLread_mps_state_struct::sosvar.

Referenced by ldbl_add_col().

Here is the call graph for this function:

static void ldbl_mps_set_bound ( ldbl_rawlpdata lp,
ldbl_ILLread_mps_state state,
int  colind,
const char *  bndtype,
long double  bnd 
) [static]

Definition at line 833 of file ldbl_mps.c.

References ILL_CLEANUP, ILL_REPRT, ldbl_rawlpdata::intmarker, ldbl_ILL_MAXDOUBLE, ldbl_ILL_MINDOUBLE, ldbl_ILLmps_warn(), ldbl_ILLraw_set_binaryBound(), ldbl_ILLraw_set_fixedBound(), ldbl_ILLraw_set_lowerBound(), ldbl_ILLraw_set_unbound(), ldbl_ILLraw_set_upperBound(), and NULL.

Referenced by ldbl_add_bounds().

Here is the call graph for this function:

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

Definition at line 1301 of file ldbl_mps.c.

References ldbl_ILLlpdata::A, ldbl_ILLlpdata::intmarker, ldbl_ILLprint_report(), ldbl_ILLmatrix::matbeg, ldbl_ILLmatrix::matcnt, ldbl_ILLmatrix::matind, ldbl_ILLmatrix::matval, and ldbl_ILLlpdata::obj.

Here is the call graph for this function:

static int ldbl_read_mps_line_in_section ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 442 of file ldbl_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, ldbl_add_bounds(), ldbl_add_col(), ldbl_add_ranges(), ldbl_add_rhs(), ldbl_add_row(), ldbl_ILLmps_check_end_of_line(), ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), and ldbl_ILLmps_error().

Referenced by ldbl_ILLread_mps().

Here is the call graph for this function:

static int ldbl_read_mps_name ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 311 of file ldbl_mps.c.

References ILL_RESULT, ldbl_ILLmps_empty_field(), ldbl_ILLmps_warn(), and ldbl_rawlpdata::name.

Referenced by ldbl_read_mps_section().

Here is the call graph for this function:

static int ldbl_read_mps_objname ( ldbl_ILLread_mps_state state  )  [static]

Definition at line 431 of file ldbl_mps.c.

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

Referenced by ldbl_read_mps_objnamesense().

static int ldbl_read_mps_objnamesense ( ILLmps_section  sec,
ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 355 of file ldbl_mps.c.

References ILL_MPS_OBJNAME, ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_line(), ldbl_ILLmps_section_name, ldbl_read_mps_objname(), ldbl_read_mps_objsense(), ldbl_read_mps_section(), and ldbl_ILLread_mps_state_struct::section.

Referenced by ldbl_read_mps_section().

Here is the call graph for this function:

static int ldbl_read_mps_objsense ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 399 of file ldbl_mps.c.

References ldbl_ILLread_mps_state_struct::field, ILL_FAILfalse, ILL_MPS_OBJSENSE, ILL_RESULT, ldbl_ILL_MAX, ldbl_ILL_MIN, ldbl_ILLmps_error(), ldbl_rawlpdata::objsense, and ldbl_ILLread_mps_state_struct::section.

Referenced by ldbl_read_mps_objnamesense().

Here is the call graph for this function:

static int ldbl_read_mps_refrow ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 329 of file ldbl_mps.c.

References ILL_MPS_REFROW, ILL_RETURN, ldbl_ILLmps_empty_field(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_next_line(), ldbl_rawlpdata::refrow, and ldbl_ILLread_mps_state_struct::section.

Referenced by ldbl_read_mps_section().

Here is the call graph for this function:

static int ldbl_read_mps_section ( ldbl_ILLread_mps_state state,
ldbl_rawlpdata lp 
) [static]

Definition at line 236 of file ldbl_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, ldbl_check_section_order(), ldbl_ILLmps_empty_key(), ldbl_ILLmps_error(), ldbl_ILLmps_section_name, ldbl_ILLmps_set_section(), ldbl_ILLraw_init_bounds(), ldbl_ILLraw_init_ranges(), ldbl_ILLraw_init_rhs(), ldbl_ILLutil_index(), ldbl_read_mps_name(), ldbl_read_mps_objnamesense(), and ldbl_read_mps_refrow().

Referenced by ldbl_ILLread_mps(), and ldbl_read_mps_objnamesense().

Here is the call graph for this function:


Variable Documentation

const char* ldbl_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 ldbl_mps.c.

Referenced by ldbl_check_section_order(), ldbl_ILLlib_readbasis(), ldbl_ILLmps_set_section(), ldbl_ILLread_mps(), ldbl_read_mps_objnamesense(), and ldbl_read_mps_section().

const char* ldbl_mps_bound_name[] [static]

Initial value:

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

Definition at line 63 of file ldbl_mps.c.

Referenced by ldbl_add_bounds().

int TRACE = 0 [static]

Definition at line 55 of file ldbl_mps.c.


Generated on Thu Mar 29 09:40:11 2012 for QSopt_ex by  doxygen 1.4.7