fp20_lp.c File Reference

#include <stdio.h>
#include "qs_config.h"
#include "fp20_iqsutil.h"
#include "fp20_lp.h"
#include "fp20_rawlp.h"
#include "fp20_read_lp.h"
#include "fp20_write_lp.h"

Include dependency graph for fp20_lp.c:

Go to the source code of this file.

Functions

static int fp20_add_var (fp20_rawlpdata *lp, fp20_ILLread_lp_state *state, EGfp20_t coef, int row, int allowNew)
static int fp20_fix_names (fp20_qserror_collector *collector, char **names, int nnames, const char *extra, int prefix, char ***newnames)
int fp20_ILLis_lp_name_char (int c, int pos)
int fp20_ILLread_constraint_expr (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp, int rowind, int allowNew)
int fp20_ILLread_constraint_name (fp20_ILLread_lp_state *state, char **rowname)
int fp20_ILLread_lp (fp20_qsline_reader *file, const char *fp20_fname, fp20_rawlpdata *lp)
int fp20_ILLread_one_constraint (fp20_ILLread_lp_state *state, const char *rowname, fp20_rawlpdata *lp, int allowNewCols)
int fp20_ILLwrite_lp (fp20_ILLlpdata *lp, fp20_qserror_collector *collector)
static int fp20_read_bounds (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp)
static int fp20_read_colname (fp20_ILLread_lp_state *state, ILLsymboltab *coltab, int mustHave)
static int fp20_read_constraints (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp, int allowNewCols)
static int fp20_read_integer (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp)
static int fp20_read_minmax (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp)
static int fp20_read_objective (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp)
static int fp20_read_problem_name (fp20_ILLread_lp_state *state, fp20_rawlpdata *lp)
static int fp20_write_bounds (fp20_ILLlpdata *lp, char **colnames)
static void fp20_write_intvars (fp20_ILLlpdata *lp, char **colnames)
static void fp20_write_objective (fp20_ILLlpdata *lp, const char *objname, char **colnames)
static int fp20_write_row (fp20_ILLlpdata *lp, fp20_ILLlp_rows *lprows, int i, char **rownames, char **colnames, int *colInRow, EGfp20_t *colCoef)
static void fp20_write_the_expr (fp20_ILLlpdata *lp, fp20_ILLwrite_lp_state *line, char *rowname, fp20_ILLlp_rows *lprows, int row, char **colnames, int *colInRow, EGfp20_t *colCoef, int ncols)

Variables

static const int fp20_LINE_LEN = 256
static int TRACE = 0


Function Documentation

static int fp20_add_var ( fp20_rawlpdata lp,
fp20_ILLread_lp_state state,
EGfp20_t  coef,
int  row,
int  allowNew 
) [static]

Definition at line 1241 of file fp20_lp.c.

References fp20_rawlpdata::coltab, fp20_ILLread_lp_state::field, fp20_ILLlp_error(), fp20_ILLraw_add_col(), fp20_ILLraw_add_col_coef(), fp20_ILLraw_rowname(), ILL_IFTRACE, ILLsymboltab_lookup(), and fp20_rawlpdata::ncols.

Referenced by fp20_ILLread_constraint_expr().

Here is the call graph for this function:

static int fp20_fix_names ( fp20_qserror_collector collector,
char **  names,
int  nnames,
const char *  extra,
int  prefix,
char ***  newnames 
) [static]

Definition at line 584 of file fp20_lp.c.

References fp20_ILL_UTIL_STR, fp20_ILLdata_warn(), fp20_ILLis_lp_name_char(), ILL_FAILfalse, ILL_namebufsize, ILL_SAFE_MALLOC, ILLsymboltab_create(), ILLsymboltab_free(), ILLsymboltab_init(), ILLsymboltab_register(), ILLsymboltab_rename(), ILLsymboltab_uname(), and NULL.

Referenced by fp20_ILLwrite_lp().

Here is the call graph for this function:

int fp20_ILLis_lp_name_char ( int  c,
int  pos 
)

Definition at line 74 of file fp20_lp.c.

References NULL.

Referenced by fp20_fix_names(), and fp20_ILLread_lp_state_next_var().

int fp20_ILLread_constraint_expr ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp,
int  rowind,
int  allowNew 
)

Definition at line 851 of file fp20_lp.c.

References fp20_add_var(), fp20_ILLlp_error(), fp20_ILLlp_warn(), fp20_ILLraw_rowname(), fp20_ILLread_lp_state_next_var(), fp20_ILLread_lp_state_possible_coef(), fp20_ILLread_lp_state_sign(), and NULL.

Referenced by fp20_ILLread_one_constraint(), and fp20_read_objective().

Here is the call graph for this function:

int fp20_ILLread_constraint_name ( fp20_ILLread_lp_state state,
char **  rowname 
)

Definition at line 971 of file fp20_lp.c.

References fp20_ILLlp_error(), fp20_ILLread_lp_state_colon(), fp20_ILLread_lp_state_has_colon(), fp20_ILLread_lp_state_next_var(), and NULL.

Referenced by fp20_get_row_col_name(), and fp20_read_constraints().

Here is the call graph for this function:

int fp20_ILLread_lp ( fp20_qsline_reader file,
const char *  fp20_fname,
fp20_rawlpdata lp 
)

Definition at line 685 of file fp20_lp.c.

References fp20_ILLread_lp_state::bound_val, fp20_rawlpdata::coltab, fp20_qsline_reader::error_collector, fp20_ILLinit_rawlpdata(), fp20_ILLlp_error(), fp20_ILLraw_fill_in_bounds(), fp20_ILLraw_fill_in_rownames(), fp20_ILLread_lp_state_init(), fp20_ILLread_lp_state_keyword(), fp20_ILLread_lp_state_next_field(), fp20_read_bounds(), fp20_read_constraints(), fp20_read_integer(), fp20_read_minmax(), fp20_read_objective(), fp20_read_problem_name(), ILLsymboltab_create(), fp20_rawlpdata::ncols, fp20_rawlpdata::nrows, NULL, and fp20_rawlpdata::rowtab.

Referenced by fp20_ILLread().

Here is the call graph for this function:

int fp20_ILLread_one_constraint ( fp20_ILLread_lp_state state,
const char *  rowname,
fp20_rawlpdata lp,
int  allowNewCols 
)

Definition at line 998 of file fp20_lp.c.

References fp20_ILLlp_error(), fp20_ILLraw_add_row(), fp20_ILLraw_rowname(), fp20_ILLread_constraint_expr(), fp20_ILLread_lp_state_sense(), fp20_ILLread_lp_state_value(), ILL_IFTRACE, ILLsymboltab_lookup(), fp20_rawlpdata::nrows, NULL, fp20_rawlpdata::rhs, fp20_rawlpdata::rowsense, fp20_rawlpdata::rowtab, and fp20_ILLread_lp_state::sense_val.

Referenced by fp20_add_col(), fp20_add_row(), and fp20_read_constraints().

Here is the call graph for this function:

int fp20_ILLwrite_lp ( fp20_ILLlpdata lp,
fp20_qserror_collector collector 
)

Definition at line 173 of file fp20_lp.c.

References fp20_ILLlpdata::colnames, fp20_ILLlpdata::coltab, fp20_fix_names(), fp20_ILLdata_error(), fp20_ILLlp_rows_init(), fp20_ILLprint_report(), fp20_write_objective(), fp20_write_row(), ILL_FAILfalse, ILL_FAILtrue, ILL_SAFE_MALLOC, ILLsymboltab_contains(), fp20_ILLmatrix::matcols, fp20_ILLlpdata::nrows, fp20_ILLlpdata::nstruct, NULL, fp20_ILLlpdata::objname, fp20_ILLlpdata::rownames, fp20_ILLlpdata::rowtab, fp20_ILLlpdata::sos, and ILLsymboltab::tablesize.

Referenced by fp20_ILLlib_optimize(), fp20_ILLwrite_lp_file(), and fp20_QSreport_prob().

Here is the call graph for this function:

static int fp20_read_bounds ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 1133 of file fp20_lp.c.

References fp20_rawlpdata::coltab, fp20_ILLlp_error(), fp20_ILLlp_warn(), fp20_ILLraw_colname(), fp20_ILLraw_init_bounds(), fp20_ILLraw_set_fixedBound(), fp20_ILLraw_set_lowerBound(), fp20_ILLraw_set_unbound(), fp20_ILLraw_set_upperBound(), fp20_ILLread_lp_state_next_field(), fp20_ILLread_lp_state_possible_bound_value(), fp20_ILLtest_lp_state_bound_sense(), fp20_ILLtest_lp_state_next_is(), fp20_read_colname(), ILL_FAILtrue, ILL_IFTRACE, fp20_rawlpdata::lower, and fp20_rawlpdata::upper.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_read_colname ( fp20_ILLread_lp_state state,
ILLsymboltab coltab,
int  mustHave 
) [static]

Definition at line 1080 of file fp20_lp.c.

References fp20_ILLread_lp_state::column_index, fp20_ILLread_lp_state::field, fp20_ILLlp_error(), fp20_ILLread_lp_state_next_var(), fp20_ILLread_lp_state_prev_field(), ILL_SYM_NOINDEX, and ILLsymboltab_lookup().

Referenced by fp20_read_bounds(), and fp20_read_integer().

Here is the call graph for this function:

static int fp20_read_constraints ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp,
int  allowNewCols 
) [static]

Definition at line 1043 of file fp20_lp.c.

References fp20_ILLcheck_subject_to(), fp20_ILLlp_error(), fp20_ILLread_constraint_name(), fp20_ILLread_lp_state_next_constraint(), fp20_ILLread_lp_state_next_field(), fp20_ILLread_one_constraint(), and NULL.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_read_integer ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 1106 of file fp20_lp.c.

References fp20_rawlpdata::coltab, fp20_ILLlp_error(), fp20_ILLread_lp_state_next_field(), fp20_read_colname(), ILL_FAILfalse, ILL_FAILtrue, ILL_SYM_NOINDEX, and fp20_rawlpdata::intmarker.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_read_minmax ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 815 of file fp20_lp.c.

References fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, fp20_ILL_MAX, fp20_ILL_MIN, fp20_ILLlp_error(), fp20_ILLread_lp_state_prev_field(), fp20_ILLutil_strcasecmp(), and fp20_rawlpdata::objsense.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_read_objective ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 919 of file fp20_lp.c.

References fp20_ILLlp_error(), fp20_ILLlp_warn(), fp20_ILLraw_add_row(), fp20_ILLread_constraint_expr(), fp20_ILLread_lp_state_colon(), fp20_ILLread_lp_state_has_colon(), fp20_ILLread_lp_state_next_var(), fp20_ILLread_lp_state_skip_blanks(), ILL_FAILfalse, ILL_namebufsize, fp20_rawlpdata::nrows, NULL, fp20_rawlpdata::objindex, fp20_rawlpdata::rowtab, and ILLsymboltab::tablesize.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_read_problem_name ( fp20_ILLread_lp_state state,
fp20_rawlpdata lp 
) [static]

Definition at line 783 of file fp20_lp.c.

References fp20_ILLread_lp_state::field, fp20_ILLread_lp_state::fieldOnFirstCol, fp20_ILL_UTIL_STR, fp20_ILLlp_error(), fp20_ILLread_lp_state_next_field(), fp20_ILLutil_strcasecmp(), ILL_IFFREE, ILL_IFTRACE, and fp20_rawlpdata::name.

Referenced by fp20_ILLread_lp().

Here is the call graph for this function:

static int fp20_write_bounds ( fp20_ILLlpdata lp,
char **  colnames 
) [static]

Definition at line 474 of file fp20_lp.c.

References fp20_ILLwrite_lp_state::buf, fp20_ILL_MAXDOUBLE, fp20_ILL_MINDOUBLE, fp20_ILLprint_report(), fp20_ILLraw_default_lower(), fp20_ILLraw_default_upper(), fp20_ILLraw_first_nondefault_bound(), fp20_ILLwrite_lp_state_append(), fp20_ILLwrite_lp_state_append_number(), fp20_ILLwrite_lp_state_init(), fp20_ILLwrite_lp_state_save_start(), fp20_ILLwrite_lp_state_start(), ILL_FAILtrue, fp20_ILLlpdata::lower, fp20_ILLlpdata::nstruct, NULL, fp20_ILLlpdata::structmap, and fp20_ILLlpdata::upper.

Here is the call graph for this function:

static void fp20_write_intvars ( fp20_ILLlpdata lp,
char **  colnames 
) [static]

Definition at line 538 of file fp20_lp.c.

References fp20_ILLwrite_lp_state::buf, fp20_ILLprint_report(), fp20_ILLwrite_lp_state_append(), fp20_ILLwrite_lp_state_init(), fp20_ILLwrite_lp_state_save_start(), fp20_LINE_LEN, fp20_ILLlpdata::intmarker, fp20_ILLlpdata::nstruct, and fp20_ILLwrite_lp_state::total.

Here is the call graph for this function:

static void fp20_write_objective ( fp20_ILLlpdata lp,
const char *  objname,
char **  colnames 
) [static]

Definition at line 279 of file fp20_lp.c.

References fp20_ILL_MIN, fp20_ILLprint_report(), fp20_ILLwrite_lp_state_append(), fp20_ILLwrite_lp_state_append_coef(), fp20_ILLwrite_lp_state_init(), fp20_ILLwrite_lp_state_save_start(), fp20_ILLwrite_lp_state_start(), fp20_LINE_LEN, fp20_ILLlpdata::nstruct, NULL, fp20_ILLlpdata::obj, fp20_ILLlpdata::objsense, fp20_ILLlpdata::probname, and fp20_ILLlpdata::structmap.

Referenced by fp20_ILLwrite_lp().

Here is the call graph for this function:

static int fp20_write_row ( fp20_ILLlpdata lp,
fp20_ILLlp_rows lprows,
int  i,
char **  rownames,
char **  colnames,
int *  colInRow,
EGfp20_t *  colCoef 
) [static]

Definition at line 415 of file fp20_lp.c.

References fp20_ILLwrite_lp_state::buf, fp20_ILLprint_report(), fp20_ILLwrite_lp_state_append(), fp20_ILLwrite_lp_state_append_number(), fp20_write_the_expr(), ILL_FAILtrue, fp20_ILLlpdata::nstruct, NULL, fp20_ILLlpdata::rangeval, fp20_ILLlpdata::rhs, and fp20_ILLlpdata::sense.

Referenced by fp20_ILLwrite_lp().

Here is the call graph for this function:

static void fp20_write_the_expr ( fp20_ILLlpdata lp,
fp20_ILLwrite_lp_state line,
char *  rowname,
fp20_ILLlp_rows lprows,
int  row,
char **  colnames,
int *  colInRow,
EGfp20_t *  colCoef,
int  ncols 
) [static]

Definition at line 351 of file fp20_lp.c.

References fp20_ILLwrite_lp_state::buf, fp20_ILLprint_report(), fp20_ILLwrite_lp_state_append(), fp20_ILLwrite_lp_state_append_coef(), fp20_ILLwrite_lp_state_init(), fp20_ILLwrite_lp_state_save_start(), fp20_ILLwrite_lp_state_start(), fp20_LINE_LEN, NULL, fp20_ILLlp_rows::rowbeg, fp20_ILLlp_rows::rowcnt, fp20_ILLlp_rows::rowind, fp20_ILLlp_rows::rowval, and fp20_ILLwrite_lp_state::total.

Referenced by fp20_write_row().

Here is the call graph for this function:


Variable Documentation

const int fp20_LINE_LEN = 256 [static]

Definition at line 98 of file fp20_lp.c.

Referenced by fp20_write_intvars(), fp20_write_objective(), and fp20_write_the_expr().

int TRACE = 0 [static]

Definition at line 109 of file fp20_lp.c.


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