read_lp.c File Reference

#include "qs_config.h"
#include "iqsutil.h"
#include "read_lp.h"
#include "lp.h"
#include "rawlp.h"
#include "lpdefs.h"
#include "format.h"

Include dependency graph for read_lp.c:

Go to the source code of this file.

Defines

#define END_LINE(p)   (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Functions

int ILLcheck_subject_to (ILLread_lp_state *state)
int ILLget_value (char *line, EGlpNum_t *coef)
int ILLlp_error (ILLread_lp_state *state, const char *format,...)
void ILLlp_warn (ILLread_lp_state *state, const char *format,...)
int ILLread_lp_state_bad_keyword (ILLread_lp_state *state)
int ILLread_lp_state_colon (ILLread_lp_state *state)
int ILLread_lp_state_has_colon (ILLread_lp_state *state)
int ILLread_lp_state_init (ILLread_lp_state *state, qsline_reader *file, const char *fname, int inter)
int ILLread_lp_state_keyword (ILLread_lp_state *state, const char *kwd[])
int ILLread_lp_state_next_constraint (ILLread_lp_state *state)
int ILLread_lp_state_next_field (ILLread_lp_state *state)
int ILLread_lp_state_next_field_on_line (ILLread_lp_state *state)
int ILLread_lp_state_next_line (ILLread_lp_state *state)
int ILLread_lp_state_next_var (ILLread_lp_state *state)
int ILLread_lp_state_possible_bound_value (ILLread_lp_state *state)
int ILLread_lp_state_possible_coef (ILLread_lp_state *state, EGlpNum_t *coef, const EGlpNum_t defValue)
void ILLread_lp_state_prev_field (ILLread_lp_state *state)
static void ILLread_lp_state_print_at (ILLread_lp_state *state)
int ILLread_lp_state_sense (ILLread_lp_state *state)
int ILLread_lp_state_sign (ILLread_lp_state *state, EGlpNum_t *sign)
int ILLread_lp_state_skip_blanks (ILLread_lp_state *state, int wrapLines)
int ILLread_lp_state_value (ILLread_lp_state *state, EGlpNum_t *coef)
void ILLtest_lp_state_bound_sense (ILLread_lp_state *state)
int ILLtest_lp_state_keyword (ILLread_lp_state *state, const char *kwd[])
int ILLtest_lp_state_next_is (ILLread_lp_state *state, const char *str)
int ILLtest_lp_state_sense (ILLread_lp_state *state, int all)
static void lp_err (ILLread_lp_state *state, int isError, const char *format, va_list args)
static int next_field (ILLread_lp_state *state, int acrossLines)

Variables

static const char * all_keyword []
static int all_keyword_len []
static int TRACE = 0


Define Documentation

#define END_LINE (  )     (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Definition at line 49 of file read_lp.c.

Referenced by ILLmps_check_end_of_line(), ILLmps_next_bound(), ILLread_lp_state_next_line(), ILLread_lp_state_possible_bound_value(), ILLread_lp_state_print_at(), ILLread_lp_state_sense(), and ILLread_lp_state_skip_blanks().


Function Documentation

int ILLcheck_subject_to ( ILLread_lp_state state  ) 

Definition at line 781 of file read_lp.c.

References ILL_ISBLANK, ILL_RESULT, ILLread_lp_state_bad_keyword(), ILLread_lp_state_next_field(), ILLread_lp_state_prev_field(), and ILLread_lp_state_skip_blanks().

Referenced by read_constraints().

Here is the call graph for this function:

int ILLget_value ( char *  line,
EGlpNum_t *  coef 
)

Definition at line 695 of file read_lp.c.

References ILL_IFTRACE, ILL_namebufsize, and ILL_RESULT.

Referenced by get_double(), and ILLread_lp_state_value().

int ILLlp_error ( ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 668 of file read_lp.c.

References lp_err(), and TRUE.

Referenced by add_var(), del_row_or_col(), fill_matrix(), get_row_col_name(), ILLread_constraint_expr(), ILLread_constraint_name(), ILLread_lp(), ILLread_lp_state_bad_keyword(), ILLread_lp_state_next_constraint(), ILLread_lp_state_sense(), ILLread_one_constraint(), read_bounds(), read_colname(), read_constraints(), read_integer(), read_minmax(), read_objective(), and read_problem_name().

Here is the call graph for this function:

void ILLlp_warn ( ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 680 of file read_lp.c.

References FALSE, lp_err(), and NULL.

Referenced by fill_matrix(), ILLread_constraint_expr(), read_bounds(), and read_objective().

Here is the call graph for this function:

int ILLread_lp_state_bad_keyword ( ILLread_lp_state state  ) 

Definition at line 268 of file read_lp.c.

References ILLread_lp_state::field, ILLread_lp_state::fieldOnFirstCol, and ILLlp_error().

Referenced by ILLcheck_subject_to(), and ILLread_lp_state_keyword().

Here is the call graph for this function:

int ILLread_lp_state_colon ( ILLread_lp_state state  ) 

Definition at line 311 of file read_lp.c.

References ILLread_lp_state_skip_blanks().

Referenced by ILLread_constraint_name(), and read_objective().

Here is the call graph for this function:

int ILLread_lp_state_has_colon ( ILLread_lp_state state  ) 

Definition at line 322 of file read_lp.c.

References ILLread_lp_state_skip_blanks(), and ILLread_lp_state::p.

Referenced by ILLread_constraint_name(), and read_objective().

Here is the call graph for this function:

int ILLread_lp_state_init ( ILLread_lp_state state,
qsline_reader file,
const char *  fname,
int  inter 
)

Definition at line 64 of file read_lp.c.

References ILLread_lp_state::bound_val, ILLread_lp_state::eof, ILLread_lp_state::field, ILLread_lp_state::fieldOnFirstCol, ILLread_lp_state::file, ILLread_lp_state::file_name, ILL_FAILtrue, ILL_RETURN, ILLread_lp_state_skip_blanks(), ILLread_lp_state::interactive, ILLread_lp_state::line, ILLread_lp_state::line_num, NULL, ILLread_lp_state::p, and ILLread_lp_state::realline.

Referenced by ILLeditor(), and ILLread_lp().

Here is the call graph for this function:

int ILLread_lp_state_keyword ( ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 299 of file read_lp.c.

References ILLread_lp_state::eof, ILLread_lp_state_bad_keyword(), and ILLtest_lp_state_keyword().

Referenced by ILLread_lp().

Here is the call graph for this function:

int ILLread_lp_state_next_constraint ( ILLread_lp_state state  ) 

Definition at line 338 of file read_lp.c.

References all_keyword, ILLread_lp_state::eof, ILLlp_error(), ILLread_lp_state_next_field(), ILLread_lp_state_prev_field(), ILLread_lp_state_skip_blanks(), ILLtest_lp_state_keyword(), and ILLread_lp_state::line_num.

Referenced by read_constraints().

Here is the call graph for this function:

int ILLread_lp_state_next_field ( ILLread_lp_state state  ) 

Definition at line 196 of file read_lp.c.

References next_field().

Referenced by ILLcheck_subject_to(), ILLeditor(), ILLread_lp(), ILLread_lp_state_next_constraint(), read_bounds(), read_constraints(), read_integer(), and read_problem_name().

Here is the call graph for this function:

int ILLread_lp_state_next_field_on_line ( ILLread_lp_state state  ) 

Definition at line 190 of file read_lp.c.

References next_field().

Referenced by del_row_or_col(), getCmd(), and ILLeditor().

Here is the call graph for this function:

int ILLread_lp_state_next_line ( ILLread_lp_state state  ) 

Definition at line 89 of file read_lp.c.

References END_LINE, ILLread_lp_state::eof, ILLread_lp_state::field, ILLread_lp_state::fieldOnFirstCol, ILLread_lp_state::file, ILLread_lp_state::file_name, ILL_IFTRACE, ILL_ISBLANK, ILL_namebufsize, ILLline_reader_get, ILLread_lp_state::interactive, ILLread_lp_state::line, ILLread_lp_state::line_num, NULL, ILLread_lp_state::p, and ILLread_lp_state::realline.

Referenced by add_col(), ILLeditor(), and ILLread_lp_state_skip_blanks().

int ILLread_lp_state_next_var ( ILLread_lp_state state  ) 

Definition at line 220 of file read_lp.c.

References all_keyword, all_keyword_len, ILLis_lp_name_char(), ILLread_lp_state_skip_blanks(), and NULL.

Referenced by ILLread_constraint_expr(), ILLread_constraint_name(), read_colname(), and read_objective().

Here is the call graph for this function:

int ILLread_lp_state_possible_bound_value ( ILLread_lp_state state  ) 

Definition at line 429 of file read_lp.c.

References END_LINE, ILL_MAXDOUBLE, ILL_MINDOUBLE, ILLread_lp_state_sign(), ILLread_lp_state_skip_blanks(), ILLread_lp_state_value(), and NULL.

Referenced by read_bounds().

Here is the call graph for this function:

int ILLread_lp_state_possible_coef ( ILLread_lp_state state,
EGlpNum_t *  coef,
const EGlpNum_t  defValue 
)

Definition at line 419 of file read_lp.c.

References ILLread_lp_state_value().

Referenced by ILLread_constraint_expr().

Here is the call graph for this function:

void ILLread_lp_state_prev_field ( ILLread_lp_state state  ) 

Definition at line 202 of file read_lp.c.

References ILLread_lp_state::fieldOnFirstCol, ILL_ISBLANK, ILLread_lp_state::line, and ILLread_lp_state::p.

Referenced by ILLcheck_subject_to(), ILLread_lp_state_next_constraint(), read_colname(), and read_minmax().

static void ILLread_lp_state_print_at ( ILLread_lp_state state  )  [static]

Definition at line 582 of file read_lp.c.

References END_LINE, ILLread_lp_state::eof, ILL_ISBLANK, and ILLread_lp_state::p.

Referenced by lp_err().

int ILLread_lp_state_sense ( ILLread_lp_state state  ) 

Definition at line 554 of file read_lp.c.

References END_LINE, ILLlp_error(), and ILLtest_lp_state_sense().

Referenced by ILLread_one_constraint().

Here is the call graph for this function:

int ILLread_lp_state_sign ( ILLread_lp_state state,
EGlpNum_t *  sign 
)

Definition at line 363 of file read_lp.c.

References ILLread_lp_state_skip_blanks().

Referenced by ILLread_constraint_expr(), and ILLread_lp_state_possible_bound_value().

Here is the call graph for this function:

int ILLread_lp_state_skip_blanks ( ILLread_lp_state state,
int  wrapLines 
)

Definition at line 141 of file read_lp.c.

References END_LINE, ILL_ISBLANK, ILLread_lp_state_next_line(), and ILLread_lp_state::p.

Referenced by ILLcheck_subject_to(), ILLread_lp_state_colon(), ILLread_lp_state_has_colon(), ILLread_lp_state_init(), ILLread_lp_state_next_constraint(), ILLread_lp_state_next_var(), ILLread_lp_state_possible_bound_value(), ILLread_lp_state_sign(), ILLread_lp_state_value(), ILLtest_lp_state_next_is(), ILLtest_lp_state_sense(), lp_err(), next_field(), and read_objective().

Here is the call graph for this function:

int ILLread_lp_state_value ( ILLread_lp_state state,
EGlpNum_t *  coef 
)

Definition at line 396 of file read_lp.c.

References ILL_RESULT, ILLget_value(), and ILLread_lp_state_skip_blanks().

Referenced by add_col(), ILLread_lp_state_possible_bound_value(), ILLread_lp_state_possible_coef(), and ILLread_one_constraint().

Here is the call graph for this function:

void ILLtest_lp_state_bound_sense ( ILLread_lp_state state  ) 

Definition at line 548 of file read_lp.c.

References ILLtest_lp_state_sense().

Referenced by read_bounds().

Here is the call graph for this function:

int ILLtest_lp_state_keyword ( ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 280 of file read_lp.c.

References ILLread_lp_state::eof, ILLread_lp_state::field, ILLread_lp_state::fieldOnFirstCol, and NULL.

Referenced by ILLread_lp_state_keyword(), and ILLread_lp_state_next_constraint().

int ILLtest_lp_state_next_is ( ILLread_lp_state state,
const char *  str 
)

Definition at line 383 of file read_lp.c.

References ILLread_lp_state_skip_blanks(), and ILLread_lp_state::p.

Referenced by read_bounds().

Here is the call graph for this function:

int ILLtest_lp_state_sense ( ILLread_lp_state state,
int  all 
)

Definition at line 487 of file read_lp.c.

References ILLread_lp_state_skip_blanks(), and ILLread_lp_state::sense_val.

Referenced by ILLread_lp_state_sense(), and ILLtest_lp_state_bound_sense().

Here is the call graph for this function:

static void lp_err ( ILLread_lp_state state,
int  isError,
const char *  format,
va_list  args 
) [static]

Definition at line 614 of file read_lp.c.

References qsline_reader::error_collector, ILLread_lp_state::file, ILLread_lp_state::file_name, ILL_FAILfalse, ILLformat_error, ILLformat_error_create(), ILLformat_error_delete(), ILLread_lp_state_print_at(), ILLread_lp_state_skip_blanks(), ILLread_lp_state::interactive, ILLread_lp_state::line, ILLread_lp_state::line_num, NULL, ILLread_lp_state::p, QS_LP_FORMAT_ERROR, QS_LP_FORMAT_WARN, and ILLread_lp_state::realline.

Referenced by ILLlp_error(), and ILLlp_warn().

Here is the call graph for this function:

static int next_field ( ILLread_lp_state state,
int  acrossLines 
) [static]

Definition at line 172 of file read_lp.c.

References ILLread_lp_state_skip_blanks().

Referenced by ILLread_lp_state_next_field(), and ILLread_lp_state_next_field_on_line().

Here is the call graph for this function:


Variable Documentation

const char* all_keyword[] [static]

Initial value:

 {
  "MIN", "MINIMUM", "MINIMIZE",
  "MAX", "MAXIMUM", "MAXIMIZE",
  "SUBJECT", "ST", "PROBLEM", "PROB",
  "BOUNDS", "BOUND", "INTEGER", "END", NULL
}

Definition at line 51 of file read_lp.c.

Referenced by ILLread_lp_state_next_constraint(), and ILLread_lp_state_next_var().

int all_keyword_len[] [static]

Initial value:

 {
  3, 7, 8,
  3, 7, 8,
  7, 2, 7, 4,
  6, 5, 7, 3, -1
}

Definition at line 57 of file read_lp.c.

Referenced by ILLread_lp_state_next_var().

int TRACE = 0 [static]

Definition at line 47 of file read_lp.c.


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