dbl_read_lp.c File Reference

#include "qs_config.h"
#include "dbl_iqsutil.h"
#include "dbl_read_lp.h"
#include "dbl_lp.h"
#include "dbl_rawlp.h"
#include "dbl_lpdefs.h"
#include "dbl_format.h"

Include dependency graph for dbl_read_lp.c:

Go to the source code of this file.

Defines

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

Functions

int dbl_ILLcheck_subject_to (dbl_ILLread_lp_state *state)
int dbl_ILLget_value (char *line, double *coef)
int dbl_ILLlp_error (dbl_ILLread_lp_state *state, const char *format,...)
void dbl_ILLlp_warn (dbl_ILLread_lp_state *state, const char *format,...)
int dbl_ILLread_lp_state_bad_keyword (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_colon (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_has_colon (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_init (dbl_ILLread_lp_state *state, dbl_qsline_reader *file, const char *dbl_fname, int inter)
int dbl_ILLread_lp_state_keyword (dbl_ILLread_lp_state *state, const char *kwd[])
int dbl_ILLread_lp_state_next_constraint (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_next_field (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_next_field_on_line (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_next_line (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_next_var (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_possible_bound_value (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_possible_coef (dbl_ILLread_lp_state *state, double *coef, const double defValue)
void dbl_ILLread_lp_state_prev_field (dbl_ILLread_lp_state *state)
static void dbl_ILLread_lp_state_print_at (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_sense (dbl_ILLread_lp_state *state)
int dbl_ILLread_lp_state_sign (dbl_ILLread_lp_state *state, double *sign)
int dbl_ILLread_lp_state_skip_blanks (dbl_ILLread_lp_state *state, int wrapLines)
int dbl_ILLread_lp_state_value (dbl_ILLread_lp_state *state, double *coef)
void dbl_ILLtest_lp_state_bound_sense (dbl_ILLread_lp_state *state)
int dbl_ILLtest_lp_state_keyword (dbl_ILLread_lp_state *state, const char *kwd[])
int dbl_ILLtest_lp_state_next_is (dbl_ILLread_lp_state *state, const char *str)
int dbl_ILLtest_lp_state_sense (dbl_ILLread_lp_state *state, int all)
static void dbl_lp_err (dbl_ILLread_lp_state *state, int isError, const char *format, va_list args)
static int dbl_next_field (dbl_ILLread_lp_state *state, int acrossLines)

Variables

static const char * dbl_all_keyword []
static int dbl_all_keyword_len []
static int TRACE = 0


Define Documentation

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

Definition at line 49 of file dbl_read_lp.c.

Referenced by dbl_ILLmps_check_end_of_line(), dbl_ILLmps_next_bound(), dbl_ILLread_lp_state_next_line(), dbl_ILLread_lp_state_possible_bound_value(), dbl_ILLread_lp_state_print_at(), dbl_ILLread_lp_state_sense(), and dbl_ILLread_lp_state_skip_blanks().


Function Documentation

int dbl_ILLcheck_subject_to ( dbl_ILLread_lp_state state  ) 

Definition at line 781 of file dbl_read_lp.c.

References dbl_ILL_ISBLANK, dbl_ILLread_lp_state_bad_keyword(), dbl_ILLread_lp_state_next_field(), dbl_ILLread_lp_state_prev_field(), dbl_ILLread_lp_state_skip_blanks(), and ILL_RESULT.

Here is the call graph for this function:

int dbl_ILLget_value ( char *  line,
double *  coef 
)

Definition at line 695 of file dbl_read_lp.c.

References ILL_IFTRACE, ILL_namebufsize, and ILL_RESULT.

int dbl_ILLlp_error ( dbl_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 668 of file dbl_read_lp.c.

References dbl_lp_err(), and dbl_TRUE.

Here is the call graph for this function:

void dbl_ILLlp_warn ( dbl_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 680 of file dbl_read_lp.c.

References dbl_FALSE, dbl_lp_err(), and NULL.

Here is the call graph for this function:

int dbl_ILLread_lp_state_bad_keyword ( dbl_ILLread_lp_state state  ) 

Definition at line 268 of file dbl_read_lp.c.

References dbl_ILLlp_error(), dbl_ILLread_lp_state::field, and dbl_ILLread_lp_state::fieldOnFirstCol.

Here is the call graph for this function:

int dbl_ILLread_lp_state_colon ( dbl_ILLread_lp_state state  ) 

Definition at line 311 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks().

Here is the call graph for this function:

int dbl_ILLread_lp_state_has_colon ( dbl_ILLread_lp_state state  ) 

Definition at line 322 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks(), and dbl_ILLread_lp_state::p.

Here is the call graph for this function:

int dbl_ILLread_lp_state_init ( dbl_ILLread_lp_state state,
dbl_qsline_reader file,
const char *  dbl_fname,
int  inter 
)

Definition at line 64 of file dbl_read_lp.c.

References dbl_ILLread_lp_state::bound_val, dbl_ILLread_lp_state_skip_blanks(), dbl_ILLread_lp_state::dbl_interactive, dbl_ILLread_lp_state::eof, dbl_ILLread_lp_state::field, dbl_ILLread_lp_state::fieldOnFirstCol, dbl_ILLread_lp_state::file, dbl_ILLread_lp_state::file_name, ILL_FAILtrue, ILL_RETURN, dbl_ILLread_lp_state::line, dbl_ILLread_lp_state::line_num, NULL, dbl_ILLread_lp_state::p, and dbl_ILLread_lp_state::realline.

Here is the call graph for this function:

int dbl_ILLread_lp_state_keyword ( dbl_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 299 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_bad_keyword(), dbl_ILLtest_lp_state_keyword(), and dbl_ILLread_lp_state::eof.

Here is the call graph for this function:

int dbl_ILLread_lp_state_next_constraint ( dbl_ILLread_lp_state state  ) 

Definition at line 338 of file dbl_read_lp.c.

References dbl_all_keyword, dbl_ILLlp_error(), dbl_ILLread_lp_state_next_field(), dbl_ILLread_lp_state_prev_field(), dbl_ILLread_lp_state_skip_blanks(), dbl_ILLtest_lp_state_keyword(), dbl_ILLread_lp_state::eof, and dbl_ILLread_lp_state::line_num.

Here is the call graph for this function:

int dbl_ILLread_lp_state_next_field ( dbl_ILLread_lp_state state  ) 

Definition at line 196 of file dbl_read_lp.c.

References dbl_next_field().

Here is the call graph for this function:

int dbl_ILLread_lp_state_next_field_on_line ( dbl_ILLread_lp_state state  ) 

Definition at line 190 of file dbl_read_lp.c.

References dbl_next_field().

Here is the call graph for this function:

int dbl_ILLread_lp_state_next_line ( dbl_ILLread_lp_state state  ) 

Definition at line 89 of file dbl_read_lp.c.

References dbl_END_LINE, dbl_ILL_ISBLANK, dbl_ILLline_reader_get, dbl_ILLread_lp_state::dbl_interactive, dbl_ILLread_lp_state::eof, dbl_ILLread_lp_state::field, dbl_ILLread_lp_state::fieldOnFirstCol, dbl_ILLread_lp_state::file, dbl_ILLread_lp_state::file_name, ILL_IFTRACE, ILL_namebufsize, dbl_ILLread_lp_state::line, dbl_ILLread_lp_state::line_num, NULL, dbl_ILLread_lp_state::p, and dbl_ILLread_lp_state::realline.

int dbl_ILLread_lp_state_next_var ( dbl_ILLread_lp_state state  ) 

Definition at line 220 of file dbl_read_lp.c.

References dbl_all_keyword, dbl_all_keyword_len, dbl_ILLis_lp_name_char(), dbl_ILLread_lp_state_skip_blanks(), and NULL.

Here is the call graph for this function:

int dbl_ILLread_lp_state_possible_bound_value ( dbl_ILLread_lp_state state  ) 

Definition at line 429 of file dbl_read_lp.c.

References dbl_END_LINE, dbl_ILL_MAXDOUBLE, dbl_ILL_MINDOUBLE, dbl_ILLread_lp_state_sign(), dbl_ILLread_lp_state_skip_blanks(), dbl_ILLread_lp_state_value(), and NULL.

Here is the call graph for this function:

int dbl_ILLread_lp_state_possible_coef ( dbl_ILLread_lp_state state,
double *  coef,
const double  defValue 
)

Definition at line 419 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_value().

Here is the call graph for this function:

void dbl_ILLread_lp_state_prev_field ( dbl_ILLread_lp_state state  ) 

Definition at line 202 of file dbl_read_lp.c.

References dbl_ILL_ISBLANK, dbl_ILLread_lp_state::fieldOnFirstCol, dbl_ILLread_lp_state::line, and dbl_ILLread_lp_state::p.

static void dbl_ILLread_lp_state_print_at ( dbl_ILLread_lp_state state  )  [static]

Definition at line 582 of file dbl_read_lp.c.

References dbl_END_LINE, dbl_ILL_ISBLANK, dbl_ILLread_lp_state::eof, and dbl_ILLread_lp_state::p.

Referenced by dbl_lp_err().

int dbl_ILLread_lp_state_sense ( dbl_ILLread_lp_state state  ) 

Definition at line 554 of file dbl_read_lp.c.

References dbl_END_LINE, dbl_ILLlp_error(), and dbl_ILLtest_lp_state_sense().

Here is the call graph for this function:

int dbl_ILLread_lp_state_sign ( dbl_ILLread_lp_state state,
double *  sign 
)

Definition at line 363 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks().

Here is the call graph for this function:

int dbl_ILLread_lp_state_skip_blanks ( dbl_ILLread_lp_state state,
int  wrapLines 
)

Definition at line 141 of file dbl_read_lp.c.

References dbl_END_LINE, dbl_ILL_ISBLANK, dbl_ILLread_lp_state_next_line(), and dbl_ILLread_lp_state::p.

Here is the call graph for this function:

int dbl_ILLread_lp_state_value ( dbl_ILLread_lp_state state,
double *  coef 
)

Definition at line 396 of file dbl_read_lp.c.

References dbl_ILLget_value(), dbl_ILLread_lp_state_skip_blanks(), and ILL_RESULT.

Here is the call graph for this function:

void dbl_ILLtest_lp_state_bound_sense ( dbl_ILLread_lp_state state  ) 

Definition at line 548 of file dbl_read_lp.c.

References dbl_ILLtest_lp_state_sense().

Here is the call graph for this function:

int dbl_ILLtest_lp_state_keyword ( dbl_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 280 of file dbl_read_lp.c.

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

int dbl_ILLtest_lp_state_next_is ( dbl_ILLread_lp_state state,
const char *  str 
)

Definition at line 383 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks(), and dbl_ILLread_lp_state::p.

Here is the call graph for this function:

int dbl_ILLtest_lp_state_sense ( dbl_ILLread_lp_state state,
int  all 
)

Definition at line 487 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks(), and dbl_ILLread_lp_state::sense_val.

Here is the call graph for this function:

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

Definition at line 614 of file dbl_read_lp.c.

References dbl_ILLformat_error, dbl_ILLformat_error_create(), dbl_ILLformat_error_delete(), dbl_ILLread_lp_state_print_at(), dbl_ILLread_lp_state_skip_blanks(), dbl_ILLread_lp_state::dbl_interactive, dbl_qsline_reader::error_collector, dbl_ILLread_lp_state::file, dbl_ILLread_lp_state::file_name, ILL_FAILfalse, dbl_ILLread_lp_state::line, dbl_ILLread_lp_state::line_num, NULL, dbl_ILLread_lp_state::p, QS_LP_FORMAT_ERROR, QS_LP_FORMAT_WARN, and dbl_ILLread_lp_state::realline.

Referenced by dbl_ILLlp_error(), and dbl_ILLlp_warn().

Here is the call graph for this function:

static int dbl_next_field ( dbl_ILLread_lp_state state,
int  acrossLines 
) [static]

Definition at line 172 of file dbl_read_lp.c.

References dbl_ILLread_lp_state_skip_blanks().

Referenced by dbl_ILLread_lp_state_next_field(), and dbl_ILLread_lp_state_next_field_on_line().

Here is the call graph for this function:


Variable Documentation

const char* dbl_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 dbl_read_lp.c.

Referenced by dbl_ILLread_lp_state_next_constraint(), and dbl_ILLread_lp_state_next_var().

int dbl_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 dbl_read_lp.c.

Referenced by dbl_ILLread_lp_state_next_var().

int TRACE = 0 [static]

Definition at line 47 of file dbl_read_lp.c.


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