mpf_read_lp.c File Reference

#include "qs_config.h"
#include "mpf_iqsutil.h"
#include "mpf_read_lp.h"
#include "mpf_lp.h"
#include "mpf_rawlp.h"
#include "mpf_lpdefs.h"
#include "mpf_format.h"

Include dependency graph for mpf_read_lp.c:

Go to the source code of this file.

Defines

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

Functions

int mpf_ILLcheck_subject_to (mpf_ILLread_lp_state *state)
int mpf_ILLget_value (char *line, mpf_t *coef)
int mpf_ILLlp_error (mpf_ILLread_lp_state *state, const char *format,...)
void mpf_ILLlp_warn (mpf_ILLread_lp_state *state, const char *format,...)
int mpf_ILLread_lp_state_bad_keyword (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_colon (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_has_colon (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_init (mpf_ILLread_lp_state *state, mpf_qsline_reader *file, const char *mpf_fname, int inter)
int mpf_ILLread_lp_state_keyword (mpf_ILLread_lp_state *state, const char *kwd[])
int mpf_ILLread_lp_state_next_constraint (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_next_field (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_next_field_on_line (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_next_line (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_next_var (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_possible_bound_value (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_possible_coef (mpf_ILLread_lp_state *state, mpf_t *coef, const mpf_t defValue)
void mpf_ILLread_lp_state_prev_field (mpf_ILLread_lp_state *state)
static void mpf_ILLread_lp_state_print_at (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_sense (mpf_ILLread_lp_state *state)
int mpf_ILLread_lp_state_sign (mpf_ILLread_lp_state *state, mpf_t *sign)
int mpf_ILLread_lp_state_skip_blanks (mpf_ILLread_lp_state *state, int wrapLines)
int mpf_ILLread_lp_state_value (mpf_ILLread_lp_state *state, mpf_t *coef)
void mpf_ILLtest_lp_state_bound_sense (mpf_ILLread_lp_state *state)
int mpf_ILLtest_lp_state_keyword (mpf_ILLread_lp_state *state, const char *kwd[])
int mpf_ILLtest_lp_state_next_is (mpf_ILLread_lp_state *state, const char *str)
int mpf_ILLtest_lp_state_sense (mpf_ILLread_lp_state *state, int all)
static void mpf_lp_err (mpf_ILLread_lp_state *state, int isError, const char *format, va_list args)
static int mpf_next_field (mpf_ILLread_lp_state *state, int acrossLines)

Variables

static const char * mpf_all_keyword []
static int mpf_all_keyword_len []
static int TRACE = 0


Define Documentation

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

Definition at line 49 of file mpf_read_lp.c.

Referenced by mpf_ILLmps_check_end_of_line(), mpf_ILLmps_next_bound(), mpf_ILLread_lp_state_next_line(), mpf_ILLread_lp_state_possible_bound_value(), mpf_ILLread_lp_state_print_at(), mpf_ILLread_lp_state_sense(), and mpf_ILLread_lp_state_skip_blanks().


Function Documentation

int mpf_ILLcheck_subject_to ( mpf_ILLread_lp_state state  ) 

Definition at line 781 of file mpf_read_lp.c.

References ILL_RESULT, mpf_ILL_ISBLANK, mpf_ILLread_lp_state_bad_keyword(), mpf_ILLread_lp_state_next_field(), mpf_ILLread_lp_state_prev_field(), and mpf_ILLread_lp_state_skip_blanks().

Referenced by mpf_read_constraints().

Here is the call graph for this function:

int mpf_ILLget_value ( char *  line,
mpf_t *  coef 
)

Definition at line 695 of file mpf_read_lp.c.

References ILL_IFTRACE, ILL_namebufsize, and ILL_RESULT.

Referenced by mpf_get_double(), and mpf_ILLread_lp_state_value().

int mpf_ILLlp_error ( mpf_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 668 of file mpf_read_lp.c.

References mpf_lp_err().

Referenced by mpf_add_var(), mpf_del_row_or_col(), mpf_fill_matrix(), mpf_get_row_col_name(), mpf_ILLread_constraint_expr(), mpf_ILLread_constraint_name(), mpf_ILLread_lp(), mpf_ILLread_lp_state_bad_keyword(), mpf_ILLread_lp_state_next_constraint(), mpf_ILLread_lp_state_sense(), mpf_ILLread_one_constraint(), mpf_read_bounds(), mpf_read_colname(), mpf_read_constraints(), mpf_read_integer(), mpf_read_minmax(), mpf_read_objective(), and mpf_read_problem_name().

Here is the call graph for this function:

void mpf_ILLlp_warn ( mpf_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 680 of file mpf_read_lp.c.

References mpf_lp_err(), and NULL.

Referenced by mpf_fill_matrix(), mpf_ILLread_constraint_expr(), mpf_read_bounds(), and mpf_read_objective().

Here is the call graph for this function:

int mpf_ILLread_lp_state_bad_keyword ( mpf_ILLread_lp_state state  ) 

Definition at line 268 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::field, mpf_ILLread_lp_state::fieldOnFirstCol, and mpf_ILLlp_error().

Referenced by mpf_ILLcheck_subject_to(), and mpf_ILLread_lp_state_keyword().

Here is the call graph for this function:

int mpf_ILLread_lp_state_colon ( mpf_ILLread_lp_state state  ) 

Definition at line 311 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks().

Referenced by mpf_ILLread_constraint_name(), and mpf_read_objective().

Here is the call graph for this function:

int mpf_ILLread_lp_state_has_colon ( mpf_ILLread_lp_state state  ) 

Definition at line 322 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks(), and mpf_ILLread_lp_state::p.

Referenced by mpf_ILLread_constraint_name(), and mpf_read_objective().

Here is the call graph for this function:

int mpf_ILLread_lp_state_init ( mpf_ILLread_lp_state state,
mpf_qsline_reader file,
const char *  mpf_fname,
int  inter 
)

Definition at line 64 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::bound_val, mpf_ILLread_lp_state::eof, mpf_ILLread_lp_state::field, mpf_ILLread_lp_state::fieldOnFirstCol, mpf_ILLread_lp_state::file, mpf_ILLread_lp_state::file_name, ILL_FAILtrue, ILL_RETURN, mpf_ILLread_lp_state::line, mpf_ILLread_lp_state::line_num, mpf_ILLread_lp_state_skip_blanks(), mpf_ILLread_lp_state::mpf_interactive, NULL, mpf_ILLread_lp_state::p, and mpf_ILLread_lp_state::realline.

Referenced by mpf_ILLeditor(), and mpf_ILLread_lp().

Here is the call graph for this function:

int mpf_ILLread_lp_state_keyword ( mpf_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 299 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::eof, mpf_ILLread_lp_state_bad_keyword(), and mpf_ILLtest_lp_state_keyword().

Here is the call graph for this function:

int mpf_ILLread_lp_state_next_constraint ( mpf_ILLread_lp_state state  ) 

Definition at line 338 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::eof, mpf_ILLread_lp_state::line_num, mpf_all_keyword, mpf_ILLlp_error(), mpf_ILLread_lp_state_next_field(), mpf_ILLread_lp_state_prev_field(), mpf_ILLread_lp_state_skip_blanks(), and mpf_ILLtest_lp_state_keyword().

Referenced by mpf_read_constraints().

Here is the call graph for this function:

int mpf_ILLread_lp_state_next_field ( mpf_ILLread_lp_state state  ) 

Definition at line 196 of file mpf_read_lp.c.

References mpf_next_field().

Referenced by mpf_ILLcheck_subject_to(), mpf_ILLeditor(), mpf_ILLread_lp(), mpf_ILLread_lp_state_next_constraint(), mpf_read_bounds(), mpf_read_constraints(), mpf_read_integer(), and mpf_read_problem_name().

Here is the call graph for this function:

int mpf_ILLread_lp_state_next_field_on_line ( mpf_ILLread_lp_state state  ) 

Definition at line 190 of file mpf_read_lp.c.

References mpf_next_field().

Referenced by mpf_del_row_or_col(), mpf_getCmd(), and mpf_ILLeditor().

Here is the call graph for this function:

int mpf_ILLread_lp_state_next_line ( mpf_ILLread_lp_state state  ) 

Definition at line 89 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::eof, mpf_ILLread_lp_state::field, mpf_ILLread_lp_state::fieldOnFirstCol, mpf_ILLread_lp_state::file, mpf_ILLread_lp_state::file_name, ILL_IFTRACE, ILL_namebufsize, mpf_ILLread_lp_state::line, mpf_ILLread_lp_state::line_num, mpf_END_LINE, mpf_ILL_ISBLANK, mpf_ILLline_reader_get, mpf_ILLread_lp_state::mpf_interactive, NULL, mpf_ILLread_lp_state::p, and mpf_ILLread_lp_state::realline.

Referenced by mpf_add_col(), mpf_ILLeditor(), and mpf_ILLread_lp_state_skip_blanks().

int mpf_ILLread_lp_state_next_var ( mpf_ILLread_lp_state state  ) 

Definition at line 220 of file mpf_read_lp.c.

References mpf_all_keyword, mpf_all_keyword_len, mpf_ILLis_lp_name_char(), mpf_ILLread_lp_state_skip_blanks(), and NULL.

Referenced by mpf_ILLread_constraint_expr(), mpf_ILLread_constraint_name(), mpf_read_colname(), and mpf_read_objective().

Here is the call graph for this function:

int mpf_ILLread_lp_state_possible_bound_value ( mpf_ILLread_lp_state state  ) 

Definition at line 429 of file mpf_read_lp.c.

References mpf_END_LINE, mpf_ILL_MAXDOUBLE, mpf_ILL_MINDOUBLE, mpf_ILLread_lp_state_sign(), mpf_ILLread_lp_state_skip_blanks(), mpf_ILLread_lp_state_value(), and NULL.

Referenced by mpf_read_bounds().

Here is the call graph for this function:

int mpf_ILLread_lp_state_possible_coef ( mpf_ILLread_lp_state state,
mpf_t *  coef,
const mpf_t  defValue 
)

Definition at line 419 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_value().

Referenced by mpf_ILLread_constraint_expr().

Here is the call graph for this function:

void mpf_ILLread_lp_state_prev_field ( mpf_ILLread_lp_state state  ) 

Definition at line 202 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::fieldOnFirstCol, mpf_ILLread_lp_state::line, mpf_ILL_ISBLANK, and mpf_ILLread_lp_state::p.

Referenced by mpf_ILLcheck_subject_to(), mpf_ILLread_lp_state_next_constraint(), mpf_read_colname(), and mpf_read_minmax().

static void mpf_ILLread_lp_state_print_at ( mpf_ILLread_lp_state state  )  [static]

Definition at line 582 of file mpf_read_lp.c.

References mpf_ILLread_lp_state::eof, mpf_END_LINE, mpf_ILL_ISBLANK, and mpf_ILLread_lp_state::p.

Referenced by mpf_lp_err().

int mpf_ILLread_lp_state_sense ( mpf_ILLread_lp_state state  ) 

Definition at line 554 of file mpf_read_lp.c.

References mpf_END_LINE, mpf_ILLlp_error(), and mpf_ILLtest_lp_state_sense().

Referenced by mpf_ILLread_one_constraint().

Here is the call graph for this function:

int mpf_ILLread_lp_state_sign ( mpf_ILLread_lp_state state,
mpf_t *  sign 
)

Definition at line 363 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks().

Referenced by mpf_ILLread_constraint_expr(), and mpf_ILLread_lp_state_possible_bound_value().

Here is the call graph for this function:

int mpf_ILLread_lp_state_skip_blanks ( mpf_ILLread_lp_state state,
int  wrapLines 
)

Definition at line 141 of file mpf_read_lp.c.

References mpf_END_LINE, mpf_ILL_ISBLANK, mpf_ILLread_lp_state_next_line(), and mpf_ILLread_lp_state::p.

Referenced by mpf_ILLcheck_subject_to(), mpf_ILLread_lp_state_colon(), mpf_ILLread_lp_state_has_colon(), mpf_ILLread_lp_state_init(), mpf_ILLread_lp_state_next_constraint(), mpf_ILLread_lp_state_next_var(), mpf_ILLread_lp_state_possible_bound_value(), mpf_ILLread_lp_state_sign(), mpf_ILLread_lp_state_value(), mpf_ILLtest_lp_state_next_is(), mpf_ILLtest_lp_state_sense(), mpf_lp_err(), mpf_next_field(), and mpf_read_objective().

Here is the call graph for this function:

int mpf_ILLread_lp_state_value ( mpf_ILLread_lp_state state,
mpf_t *  coef 
)

Definition at line 396 of file mpf_read_lp.c.

References ILL_RESULT, mpf_ILLget_value(), and mpf_ILLread_lp_state_skip_blanks().

Referenced by mpf_add_col(), mpf_ILLread_lp_state_possible_bound_value(), mpf_ILLread_lp_state_possible_coef(), and mpf_ILLread_one_constraint().

Here is the call graph for this function:

void mpf_ILLtest_lp_state_bound_sense ( mpf_ILLread_lp_state state  ) 

Definition at line 548 of file mpf_read_lp.c.

References mpf_ILLtest_lp_state_sense().

Referenced by mpf_read_bounds().

Here is the call graph for this function:

int mpf_ILLtest_lp_state_keyword ( mpf_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 280 of file mpf_read_lp.c.

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

Referenced by mpf_ILLread_lp_state_keyword(), and mpf_ILLread_lp_state_next_constraint().

int mpf_ILLtest_lp_state_next_is ( mpf_ILLread_lp_state state,
const char *  str 
)

Definition at line 383 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks(), and mpf_ILLread_lp_state::p.

Referenced by mpf_read_bounds().

Here is the call graph for this function:

int mpf_ILLtest_lp_state_sense ( mpf_ILLread_lp_state state,
int  all 
)

Definition at line 487 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks(), and mpf_ILLread_lp_state::sense_val.

Referenced by mpf_ILLread_lp_state_sense(), and mpf_ILLtest_lp_state_bound_sense().

Here is the call graph for this function:

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

Definition at line 614 of file mpf_read_lp.c.

References mpf_qsline_reader::error_collector, mpf_ILLread_lp_state::file, mpf_ILLread_lp_state::file_name, ILL_FAILfalse, mpf_ILLread_lp_state::line, mpf_ILLread_lp_state::line_num, mpf_ILLformat_error, mpf_ILLformat_error_create(), mpf_ILLformat_error_delete(), mpf_ILLread_lp_state_print_at(), mpf_ILLread_lp_state_skip_blanks(), mpf_ILLread_lp_state::mpf_interactive, NULL, mpf_ILLread_lp_state::p, QS_LP_FORMAT_ERROR, QS_LP_FORMAT_WARN, and mpf_ILLread_lp_state::realline.

Referenced by mpf_ILLlp_error(), and mpf_ILLlp_warn().

Here is the call graph for this function:

static int mpf_next_field ( mpf_ILLread_lp_state state,
int  acrossLines 
) [static]

Definition at line 172 of file mpf_read_lp.c.

References mpf_ILLread_lp_state_skip_blanks().

Referenced by mpf_ILLread_lp_state_next_field(), and mpf_ILLread_lp_state_next_field_on_line().

Here is the call graph for this function:


Variable Documentation

const char* mpf_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 mpf_read_lp.c.

Referenced by mpf_ILLread_lp_state_next_constraint(), and mpf_ILLread_lp_state_next_var().

int mpf_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 mpf_read_lp.c.

Referenced by mpf_ILLread_lp_state_next_var().

int TRACE = 0 [static]

Definition at line 47 of file mpf_read_lp.c.


Generated on Thu Mar 29 09:43:08 2012 for QSopt_ex by  doxygen 1.4.7