#include <stdio.h>
#include "econfig.h"
#include "dbl_iqsutil.h"
#include "dbl_lp.h"
#include "dbl_rawlp.h"
#include "dbl_read_lp.h"
#include "dbl_write_lp.h"
Include dependency graph for dbl_lp.c:

Go to the source code of this file.
Functions | |
| static int | dbl_add_var (dbl_rawlpdata *lp, dbl_ILLread_lp_state *state, double coef, int row, int allowNew) |
| static int | dbl_fix_names (dbl_qserror_collector *collector, char **names, int nnames, const char *extra, int prefix, char ***newnames) |
| int | dbl_ILLis_lp_name_char (int c, int pos) |
| int | dbl_ILLread_constraint_expr (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp, int rowind, int allowNew) |
| int | dbl_ILLread_constraint_name (dbl_ILLread_lp_state *state, char **rowname) |
| int | dbl_ILLread_lp (dbl_qsline_reader *file, const char *dbl_fname, dbl_rawlpdata *lp) |
| int | dbl_ILLread_one_constraint (dbl_ILLread_lp_state *state, const char *rowname, dbl_rawlpdata *lp, int allowNewCols) |
| int | dbl_ILLwrite_lp (dbl_ILLlpdata *lp, dbl_qserror_collector *collector) |
| static int | dbl_read_bounds (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp) |
| static int | dbl_read_colname (dbl_ILLread_lp_state *state, ILLsymboltab *coltab, int mustHave) |
| static int | dbl_read_constraints (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp, int allowNewCols) |
| static int | dbl_read_integer (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp) |
| static int | dbl_read_minmax (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp) |
| static int | dbl_read_objective (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp) |
| static int | dbl_read_problem_name (dbl_ILLread_lp_state *state, dbl_rawlpdata *lp) |
| static int | dbl_write_bounds (dbl_ILLlpdata *lp, char **colnames) |
| static void | dbl_write_intvars (dbl_ILLlpdata *lp, char **colnames) |
| static void | dbl_write_objective (dbl_ILLlpdata *lp, const char *objname, char **colnames) |
| static int | dbl_write_row (dbl_ILLlpdata *lp, dbl_ILLlp_rows *lprows, int i, char **rownames, char **colnames, int *colInRow, double *colCoef) |
| static void | dbl_write_the_expr (dbl_ILLlpdata *lp, dbl_ILLwrite_lp_state *line, char *rowname, dbl_ILLlp_rows *lprows, int row, char **colnames, int *colInRow, double *colCoef, int ncols) |
Variables | |
| static const int | dbl_LINE_LEN = 64 |
| static int | TRACE = 0 |
| static int dbl_add_var | ( | dbl_rawlpdata * | lp, | |
| dbl_ILLread_lp_state * | state, | |||
| double | coef, | |||
| int | row, | |||
| int | allowNew | |||
| ) | [static] |
Definition at line 1243 of file dbl_lp.c.
References CHECKRVALG, dbl_rawlpdata::coltab, dbl_EGlpNumToLf, dbl_ILLlp_error(), dbl_ILLraw_add_col(), dbl_ILLraw_add_col_coef(), dbl_ILLraw_rowname(), EG_RETURN, dbl_ILLread_lp_state::field, ILL_IFTRACE, ILLsymboltab_lookup(), and dbl_rawlpdata::ncols.
Referenced by dbl_ILLread_constraint_expr().
Here is the call graph for this function:

| static int dbl_fix_names | ( | dbl_qserror_collector * | collector, | |
| char ** | names, | |||
| int | nnames, | |||
| const char * | extra, | |||
| int | prefix, | |||
| char *** | newnames | |||
| ) | [static] |
Definition at line 584 of file dbl_lp.c.
References CHECKRVALG, dbl_ILL_UTIL_STR, dbl_ILLis_lp_name_char(), EG_RETURN, ILL_FAILfalse, ILL_namebufsize, ILL_SAFE_MALLOC, ILLsymboltab_create(), ILLsymboltab_free(), ILLsymboltab_init(), ILLsymboltab_register(), ILLsymboltab_rename(), ILLsymboltab_uname(), and NULL.
Referenced by dbl_ILLwrite_lp().
Here is the call graph for this function:

| int dbl_ILLis_lp_name_char | ( | int | c, | |
| int | pos | |||
| ) |
Definition at line 74 of file dbl_lp.c.
References NULL.
Referenced by dbl_fix_names(), and dbl_ILLread_lp_state_next_var().
| int dbl_ILLread_constraint_expr | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp, | |||
| int | rowind, | |||
| int | allowNew | |||
| ) |
Definition at line 853 of file dbl_lp.c.
References CHECKRVALG, dbl_add_var(), dbl_EGlpNumClearVar, dbl_EGlpNumCopy, dbl_EGlpNumInitVar, dbl_EGlpNumMultTo, dbl_ILLlp_error(), dbl_ILLlp_warn(), dbl_ILLraw_rowname(), dbl_ILLread_lp_state_next_var(), dbl_ILLread_lp_state_possible_coef(), dbl_ILLread_lp_state_sign(), dbl_oneLpNum, EG_RETURN, and NULL.
Referenced by dbl_ILLread_one_constraint(), and dbl_read_objective().
Here is the call graph for this function:

| int dbl_ILLread_constraint_name | ( | dbl_ILLread_lp_state * | state, | |
| char ** | rowname | |||
| ) |
Definition at line 973 of file dbl_lp.c.
References dbl_ILLlp_error(), dbl_ILLread_lp_state_colon(), dbl_ILLread_lp_state_has_colon(), dbl_ILLread_lp_state_next_var(), and NULL.
Referenced by dbl_get_row_col_name(), and dbl_read_constraints().
Here is the call graph for this function:

| int dbl_ILLread_lp | ( | dbl_qsline_reader * | file, | |
| const char * | dbl_fname, | |||
| dbl_rawlpdata * | lp | |||
| ) |
Definition at line 687 of file dbl_lp.c.
References dbl_ILLread_lp_state::bound_val, CHECKRVALG, dbl_rawlpdata::coltab, dbl_EGlpNumClearVar, dbl_ILLinit_rawlpdata(), dbl_ILLlp_error(), dbl_ILLraw_fill_in_bounds(), dbl_ILLraw_fill_in_rownames(), dbl_ILLread_lp_state_init(), dbl_ILLread_lp_state_keyword(), dbl_ILLread_lp_state_next_field(), dbl_read_bounds(), dbl_read_constraints(), dbl_read_integer(), dbl_read_minmax(), dbl_read_objective(), dbl_read_problem_name(), EG_RETURN, dbl_qsline_reader::error_collector, ILLsymboltab_create(), dbl_rawlpdata::ncols, dbl_rawlpdata::nrows, NULL, and dbl_rawlpdata::rowtab.
Referenced by dbl_ILLread().
Here is the call graph for this function:

| int dbl_ILLread_one_constraint | ( | dbl_ILLread_lp_state * | state, | |
| const char * | rowname, | |||
| dbl_rawlpdata * | lp, | |||
| int | allowNewCols | |||
| ) |
Definition at line 1000 of file dbl_lp.c.
References CHECKRVALG, dbl_EGlpNumClearVar, dbl_EGlpNumCopy, dbl_EGlpNumInitVar, dbl_EGlpNumToLf, dbl_ILLlp_error(), dbl_ILLraw_add_row(), dbl_ILLraw_rowname(), dbl_ILLread_constraint_expr(), dbl_ILLread_lp_state_sense(), dbl_ILLread_lp_state_value(), dbl_zeroLpNum, EG_RETURN, ILL_IFTRACE, ILLsymboltab_lookup(), dbl_rawlpdata::nrows, NULL, dbl_rawlpdata::rhs, dbl_rawlpdata::rowsense, dbl_rawlpdata::rowtab, and dbl_ILLread_lp_state::sense_val.
Referenced by dbl_add_col(), dbl_add_row(), and dbl_read_constraints().
Here is the call graph for this function:

| int dbl_ILLwrite_lp | ( | dbl_ILLlpdata * | lp, | |
| dbl_qserror_collector * | collector | |||
| ) |
Definition at line 173 of file dbl_lp.c.
References CHECKRVALG, dbl_ILLlpdata::colnames, dbl_ILLlpdata::coltab, dbl_EGlpNumAllocArray, dbl_fix_names(), dbl_ILLdata_error(), dbl_ILLlp_rows_init(), dbl_ILLprint_report(), dbl_write_objective(), dbl_write_row(), EG_RETURN, ILL_FAILfalse, ILL_FAILtrue, ILL_SAFE_MALLOC, ILLsymboltab_contains(), dbl_ILLmatrix::matcols, dbl_ILLlpdata::nrows, dbl_ILLlpdata::nstruct, NULL, dbl_ILLlpdata::objname, dbl_ILLlpdata::rownames, dbl_ILLlpdata::rowtab, dbl_ILLlpdata::sos, and ILLsymboltab::tablesize.
Referenced by dbl_ILLlib_optimize(), dbl_ILLwrite_lp_file(), and dbl_QSreport_prob().
Here is the call graph for this function:

| static int dbl_read_bounds | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp | |||
| ) | [static] |
Definition at line 1135 of file dbl_lp.c.
References dbl_rawlpdata::coltab, dbl_EGlpNumToLf, dbl_ILLlp_error(), dbl_ILLlp_warn(), dbl_ILLraw_colname(), dbl_ILLraw_init_bounds(), dbl_ILLraw_set_fixedBound(), dbl_ILLraw_set_lowerBound(), dbl_ILLraw_set_unbound(), dbl_ILLraw_set_upperBound(), dbl_ILLread_lp_state_next_field(), dbl_ILLread_lp_state_possible_bound_value(), dbl_ILLtest_lp_state_bound_sense(), dbl_ILLtest_lp_state_next_is(), dbl_read_colname(), EG_RETURN, ILL_FAILtrue, ILL_IFTRACE, dbl_rawlpdata::lower, and dbl_rawlpdata::upper.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_read_colname | ( | dbl_ILLread_lp_state * | state, | |
| ILLsymboltab * | coltab, | |||
| int | mustHave | |||
| ) | [static] |
Definition at line 1082 of file dbl_lp.c.
References dbl_ILLread_lp_state::column_index, dbl_ILLlp_error(), dbl_ILLread_lp_state_next_var(), dbl_ILLread_lp_state_prev_field(), dbl_ILLread_lp_state::field, ILL_SYM_NOINDEX, and ILLsymboltab_lookup().
Referenced by dbl_read_bounds(), and dbl_read_integer().
Here is the call graph for this function:

| static int dbl_read_constraints | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp, | |||
| int | allowNewCols | |||
| ) | [static] |
Definition at line 1045 of file dbl_lp.c.
References dbl_ILLcheck_subject_to(), dbl_ILLlp_error(), dbl_ILLread_constraint_name(), dbl_ILLread_lp_state_next_constraint(), dbl_ILLread_lp_state_next_field(), dbl_ILLread_one_constraint(), EG_RETURN, and NULL.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_read_integer | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp | |||
| ) | [static] |
Definition at line 1108 of file dbl_lp.c.
References dbl_rawlpdata::coltab, dbl_ILLlp_error(), dbl_ILLread_lp_state_next_field(), dbl_read_colname(), EG_RETURN, ILL_FAILfalse, ILL_FAILtrue, ILL_SYM_NOINDEX, and dbl_rawlpdata::intmarker.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_read_minmax | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp | |||
| ) | [static] |
Definition at line 817 of file dbl_lp.c.
References dbl_ILL_MAX, dbl_ILL_MIN, dbl_ILLlp_error(), dbl_ILLread_lp_state_prev_field(), dbl_ILLutil_strcasecmp(), EG_RETURN, dbl_ILLread_lp_state::field, dbl_ILLread_lp_state::fieldOnFirstCol, and dbl_rawlpdata::objsense.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_read_objective | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp | |||
| ) | [static] |
Definition at line 921 of file dbl_lp.c.
References CHECKRVALG, dbl_ILLlp_error(), dbl_ILLlp_warn(), dbl_ILLraw_add_row(), dbl_ILLread_constraint_expr(), dbl_ILLread_lp_state_colon(), dbl_ILLread_lp_state_has_colon(), dbl_ILLread_lp_state_next_var(), dbl_ILLread_lp_state_skip_blanks(), dbl_zeroLpNum, EG_RETURN, ILL_FAILfalse, ILL_namebufsize, dbl_rawlpdata::nrows, NULL, dbl_rawlpdata::objindex, dbl_rawlpdata::rowtab, and ILLsymboltab::tablesize.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_read_problem_name | ( | dbl_ILLread_lp_state * | state, | |
| dbl_rawlpdata * | lp | |||
| ) | [static] |
Definition at line 785 of file dbl_lp.c.
References dbl_ILL_UTIL_STR, dbl_ILLlp_error(), dbl_ILLread_lp_state_next_field(), dbl_ILLutil_strcasecmp(), EG_RETURN, dbl_ILLread_lp_state::field, dbl_ILLread_lp_state::fieldOnFirstCol, ILL_IFFREE, ILL_IFTRACE, and dbl_rawlpdata::name.
Referenced by dbl_ILLread_lp().
Here is the call graph for this function:

| static int dbl_write_bounds | ( | dbl_ILLlpdata * | lp, | |
| char ** | colnames | |||
| ) | [static] |
Definition at line 474 of file dbl_lp.c.
References dbl_ILLwrite_lp_state::buf, dbl_EGlpNumIsEqqual, dbl_ILL_MAXDOUBLE, dbl_ILL_MINDOUBLE, dbl_ILLprint_report(), dbl_ILLraw_default_lower(), dbl_ILLraw_default_upper(), dbl_ILLraw_first_nondefault_bound(), dbl_ILLwrite_lp_state_append(), dbl_ILLwrite_lp_state_append_number(), dbl_ILLwrite_lp_state_init(), dbl_ILLwrite_lp_state_save_start(), dbl_ILLwrite_lp_state_start(), ILL_FAILtrue, dbl_ILLlpdata::lower, dbl_ILLlpdata::nstruct, NULL, dbl_ILLlpdata::structmap, and dbl_ILLlpdata::upper.
Here is the call graph for this function:

| static void dbl_write_intvars | ( | dbl_ILLlpdata * | lp, | |
| char ** | colnames | |||
| ) | [static] |
Definition at line 538 of file dbl_lp.c.
References dbl_ILLwrite_lp_state::buf, dbl_ILLprint_report(), dbl_ILLwrite_lp_state_append(), dbl_ILLwrite_lp_state_init(), dbl_ILLwrite_lp_state_save_start(), dbl_LINE_LEN, dbl_ILLlpdata::intmarker, dbl_ILLlpdata::nstruct, and dbl_ILLwrite_lp_state::total.
Here is the call graph for this function:

| static void dbl_write_objective | ( | dbl_ILLlpdata * | lp, | |
| const char * | objname, | |||
| char ** | colnames | |||
| ) | [static] |
Definition at line 279 of file dbl_lp.c.
References dbl_EGlpNumIsGreatZero, dbl_EGlpNumIsLessZero, dbl_EGlpNumIsNeqqZero, dbl_ILL_MIN, dbl_ILLprint_report(), dbl_ILLwrite_lp_state_append(), dbl_ILLwrite_lp_state_append_coef(), dbl_ILLwrite_lp_state_init(), dbl_ILLwrite_lp_state_save_start(), dbl_ILLwrite_lp_state_start(), dbl_LINE_LEN, dbl_ILLlpdata::nstruct, NULL, dbl_ILLlpdata::obj, dbl_ILLlpdata::objsense, dbl_ILLlpdata::probname, and dbl_ILLlpdata::structmap.
Referenced by dbl_ILLwrite_lp().
Here is the call graph for this function:

| static int dbl_write_row | ( | dbl_ILLlpdata * | lp, | |
| dbl_ILLlp_rows * | lprows, | |||
| int | i, | |||
| char ** | rownames, | |||
| char ** | colnames, | |||
| int * | colInRow, | |||
| double * | colCoef | |||
| ) | [static] |
Definition at line 415 of file dbl_lp.c.
References dbl_ILLwrite_lp_state::buf, dbl_EGlpNumClearVar, dbl_EGlpNumCopySum, dbl_EGlpNumInitVar, dbl_ILLprint_report(), dbl_ILLwrite_lp_state_append(), dbl_ILLwrite_lp_state_append_number(), dbl_write_the_expr(), EG_RETURN, ILL_FAILtrue, dbl_ILLlpdata::nstruct, NULL, dbl_ILLlpdata::rangeval, dbl_ILLlpdata::rhs, and dbl_ILLlpdata::sense.
Referenced by dbl_ILLwrite_lp().
Here is the call graph for this function:

| static void dbl_write_the_expr | ( | dbl_ILLlpdata * | lp, | |
| dbl_ILLwrite_lp_state * | line, | |||
| char * | rowname, | |||
| dbl_ILLlp_rows * | lprows, | |||
| int | row, | |||
| char ** | colnames, | |||
| int * | colInRow, | |||
| double * | colCoef, | |||
| int | ncols | |||
| ) | [static] |
Definition at line 351 of file dbl_lp.c.
References dbl_ILLwrite_lp_state::buf, dbl_EGlpNumCopy, dbl_EGlpNumIsLessZero, dbl_EGlpNumIsNeqqZero, dbl_ILLprint_report(), dbl_ILLwrite_lp_state_append(), dbl_ILLwrite_lp_state_append_coef(), dbl_ILLwrite_lp_state_init(), dbl_ILLwrite_lp_state_save_start(), dbl_ILLwrite_lp_state_start(), dbl_LINE_LEN, NULL, dbl_ILLlp_rows::rowbeg, dbl_ILLlp_rows::rowcnt, dbl_ILLlp_rows::rowind, dbl_ILLlp_rows::rowval, and dbl_ILLwrite_lp_state::total.
Referenced by dbl_write_row().
Here is the call graph for this function:

const int dbl_LINE_LEN = 64 [static] |
Definition at line 98 of file dbl_lp.c.
Referenced by dbl_write_intvars(), dbl_write_objective(), and dbl_write_the_expr().
1.5.2