fp20_basis.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "qs_config.h"
#include "config.h"
#include "fp20_sortrus.h"
#include "fp20_iqsutil.h"
#include "fp20_lpdefs.h"
#include "fp20_qstruct.h"
#include "fp20_qsopt.h"
#include "fp20_basis.h"
#include "fp20_fct.h"
#include "fp20_lp.h"
#include "fp20_lib.h"

Include dependency graph for fp20_basis.c:

Go to the source code of this file.

Defines

#define fp20_BASIS_DEBUG   0
#define fp20_BASIS_STATS   0

Functions

static int fp20_choose_basis (int algorithm, EGfp20_t pinf1, EGfp20_t dinf1, EGfp20_t pinf2, EGfp20_t dinf2)
static int fp20_get_initial_basis1 (fp20_lpinfo *lp, int *vstat)
static int fp20_get_initial_basis2 (fp20_lpinfo *lp, int *vstat)
static void fp20_get_var_info (fp20_lpinfo *lp, fp20_var_data *v)
int fp20_ILLbasis_build_basisinfo (fp20_lpinfo *lp)
void fp20_ILLbasis_clear_vardata (fp20_var_data *vd)
void fp20_ILLbasis_column_solve (fp20_lpinfo *lp, fp20_svector *rhs, fp20_svector *soln)
void fp20_ILLbasis_column_solve_update (fp20_lpinfo *lp, fp20_svector *rhs, fp20_svector *upd, fp20_svector *soln)
int fp20_ILLbasis_factor (fp20_lpinfo *lp, int *singular)
void fp20_ILLbasis_free_basisinfo (fp20_lpinfo *lp)
int fp20_ILLbasis_get_cinitial (fp20_lpinfo *lp, int algorithm)
int fp20_ILLbasis_get_initial (fp20_lpinfo *lp, int algorithm)
void fp20_ILLbasis_init_basisinfo (fp20_lpinfo *lp)
void fp20_ILLbasis_init_vardata (fp20_var_data *vd)
int fp20_ILLbasis_load (fp20_lpinfo *lp, fp20_ILLlp_basis *B)
int fp20_ILLbasis_refactor (fp20_lpinfo *lp)
void fp20_ILLbasis_row_solve (fp20_lpinfo *lp, fp20_svector *rhs, fp20_svector *soln)
int fp20_ILLbasis_tableau_row (fp20_lpinfo *lp, int row, EGfp20_t *brow, EGfp20_t *trow, EGfp20_t *rhs, int strict)
int fp20_ILLbasis_update (fp20_lpinfo *lp, fp20_svector *y, int lindex, int *refactor, int *singular)
static int fp20_init_slack_basis (fp20_lpinfo *lp, int *vstat, int *irow, int *rrow, int *unitcol, int *icol, int *rcol)
static int fp20_primal_col_select (fp20_lpinfo *lp, int *vstat, int *irow, int *rrow, int *unitcol, EGfp20_t *v, int *perm, int *porder, int nbelem, int pcols)
static int fp20_set_basis_indices (fp20_lpinfo *lp, int *vstat)

Variables

static int TRACE = 0


Define Documentation

#define fp20_BASIS_DEBUG   0

Definition at line 47 of file fp20_basis.c.

#define fp20_BASIS_STATS   0

Definition at line 45 of file fp20_basis.c.


Function Documentation

static int fp20_choose_basis ( int  algorithm,
EGfp20_t  pinf1,
EGfp20_t  dinf1,
EGfp20_t  pinf2,
EGfp20_t  dinf2 
)

Definition at line 1155 of file fp20_basis.c.

References fp20_CB_EPS, fp20_CB_INF_RATIO, fp20_CB_PRI_RLIMIT, ILL_IFTRACE, and PRIMAL_SIMPLEX.

Referenced by fp20_ILLbasis_get_cinitial().

static int fp20_get_initial_basis1 ( fp20_lpinfo lp,
int *  vstat 
)

Definition at line 636 of file fp20_basis.c.

References fp20_var_data::cmax, fp20_lpinfo::cz, E_SIMPLEX_ERROR, fp20_get_var_info(), fp20_ILLbasis_init_vardata(), fp20_INFTY, fp20_init_slack_basis(), ILL_CLEANUP, ILL_SAFE_MALLOC, fp20_lpinfo::lz, fp20_var_data::nbndone, fp20_var_data::nbounded, fp20_lpinfo::ncols, fp20_var_data::nfree, fp20_lpinfo::nrows, fp20_var_data::nslacks, NULL, STAT_BASIC, fp20_lpinfo::uz, VBOUNDED, VFIXED, VFREE, VLOWER, fp20_lpinfo::vtype, and VUPPER.

Referenced by fp20_ILLbasis_get_cinitial(), and fp20_ILLbasis_get_initial().

Here is the call graph for this function:

static int fp20_get_initial_basis2 ( fp20_lpinfo lp,
int *  vstat 
)

Definition at line 798 of file fp20_basis.c.

References fp20_var_data::cmax, fp20_lpinfo::cz, E_SIMPLEX_ERROR, fp20_BD_TOLER, fp20_get_var_info(), fp20_ILLbasis_clear_vardata(), fp20_ILLbasis_free_basisinfo(), fp20_ILLbasis_init_vardata(), fp20_ILLutil_EGlpNum_perm_quicksort(), fp20_INFTY, fp20_init_slack_basis(), fp20_primal_col_select(), ILL_CLEANUP, ILL_IFFREE, ILL_SAFE_MALLOC, ILLutil_int_perm_quicksort(), fp20_lpinfo::lz, fp20_lpinfo::matcnt, fp20_var_data::nbndone, fp20_lpinfo::ncols, fp20_var_data::nfree, fp20_lpinfo::nrows, fp20_var_data::nslacks, NULL, fp20_lpinfo::rowbeg, fp20_lpinfo::rowcnt, fp20_lpinfo::rowind, fp20_lpinfo::rowval, STAT_BASIC, fp20_lpinfo::uz, VBOUNDED, VFIXED, VFREE, VLOWER, fp20_lpinfo::vtype, and VUPPER.

Referenced by fp20_ILLbasis_get_cinitial(), and fp20_ILLbasis_get_initial().

Here is the call graph for this function:

static void fp20_get_var_info ( fp20_lpinfo lp,
fp20_var_data v 
) [static]

Definition at line 405 of file fp20_basis.c.

References CLASS_LOGICAL, fp20_var_data::cmax, fp20_lpinfo::cz, fp20_NINFTY, fp20_var_data::nartif, fp20_var_data::nbndone, fp20_var_data::nbounded, fp20_lpinfo::ncols, fp20_var_data::nfixed, fp20_var_data::nfree, fp20_var_data::nslacks, VARTIFICIAL, VBOUNDED, fp20_lpinfo::vclass, VFIXED, VFREE, VLOWER, fp20_lpinfo::vtype, and VUPPER.

Referenced by fp20_get_initial_basis1(), and fp20_get_initial_basis2().

int fp20_ILLbasis_build_basisinfo ( fp20_lpinfo lp  ) 

Definition at line 123 of file fp20_basis.c.

References fp20_lpinfo::baz, fp20_lpinfo::fbasisid, fp20_ILLbasis_free_basisinfo(), ILL_SAFE_MALLOC, fp20_lpinfo::nbaz, fp20_ILLlpdata::ncols, fp20_ILLlpdata::nrows, fp20_lpinfo::O, fp20_lpinfo::vindex, and fp20_lpinfo::vstat.

Here is the call graph for this function:

void fp20_ILLbasis_clear_vardata ( fp20_var_data vd  ) 

Definition at line 56 of file fp20_basis.c.

References fp20_var_data::cmax.

void fp20_ILLbasis_column_solve ( fp20_lpinfo lp,
fp20_svector rhs,
fp20_svector soln 
)

Definition at line 1445 of file fp20_basis.c.

References fp20_lpinfo::f, and fp20_ILLfactor_ftran().

Here is the call graph for this function:

void fp20_ILLbasis_column_solve_update ( fp20_lpinfo lp,
fp20_svector rhs,
fp20_svector upd,
fp20_svector soln 
)

Definition at line 1453 of file fp20_basis.c.

References fp20_lpinfo::f, and fp20_ILLfactor_ftran_update().

Here is the call graph for this function:

int fp20_ILLbasis_factor ( fp20_lpinfo lp,
int *  singular 
)

Definition at line 1352 of file fp20_basis.c.

References __QS_SB_VERB, fp20_lpinfo::basisid, fp20_lpinfo::baz, fp20_lpinfo::f, fp20_lpinfo::fbasisid, fp20_ILLfactor(), fp20_ILLfactor_create_factor_work(), fp20_ILLfactor_free_factor_work(), fp20_ILLfactor_init_factor_work(), fp20_ILLfct_update_basis_info(), fp20_factor_work::fzero_tol, ILL_IFFREE, ILL_SAFE_MALLOC, fp20_lpinfo::matbeg, fp20_lpinfo::matcnt, fp20_lpinfo::matind, fp20_lpinfo::matval, fp20_factor_work::maxelem_cur, fp20_factor_work::maxelem_factor, fp20_factor_work::maxelem_orig, fp20_ILLlpdata::nrows, fp20_lpinfo::O, fp20_factor_work::partial_cur, fp20_factor_work::partial_tol, fp20_ILLlpdata::rowmap, STAT_LOWER, STAT_UPPER, STAT_ZERO, fp20_factor_work::szero_tol, VARTIFICIAL, VBOUNDED, fp20_lpinfo::vindex, VLOWER, fp20_lpinfo::vtype, and VUPPER.

Here is the call graph for this function:

void fp20_ILLbasis_free_basisinfo ( fp20_lpinfo lp  ) 

Definition at line 101 of file fp20_basis.c.

References fp20_lpinfo::baz, fp20_lpinfo::f, fp20_ILLfactor_free_factor_work(), fp20_factor_work::fzero_tol, ILL_IFFREE, fp20_factor_work::maxelem_cur, fp20_factor_work::maxelem_factor, fp20_factor_work::maxelem_orig, fp20_lpinfo::nbaz, fp20_factor_work::partial_cur, fp20_factor_work::partial_tol, fp20_factor_work::szero_tol, fp20_lpinfo::vindex, and fp20_lpinfo::vstat.

Here is the call graph for this function:

int fp20_ILLbasis_get_cinitial ( fp20_lpinfo lp,
int  algorithm 
)

Definition at line 1213 of file fp20_basis.c.

References __QS_SB_VERB, fp20_lpinfo::basisid, fp20_lpinfo::baz, fp20_tol_struct::dfeas_tol, fp20_lpinfo::dinfeas, E_SIMPLEX_ERROR, fp20_lpinfo::fbasisid, fp20_choose_basis(), fp20_get_initial_basis1(), fp20_get_initial_basis2(), fp20_ILLbasis_build_basisinfo(), fp20_ILLbasis_factor(), fp20_ILLbasis_free_basisinfo(), fp20_ILLbasis_init_basisinfo(), fp20_ILLfct_check_dfeasible(), fp20_ILLfct_check_pfeasible(), fp20_ILLfct_compute_dz(), fp20_ILLfct_compute_piz(), fp20_ILLfct_compute_xbz(), fp20_ILLfct_dual_adjust(), fp20_ILLwrite_lp_file(), fp20_set_basis_indices(), ILL_CLEANUP, ILL_IFFREE, ILL_SAFE_MALLOC, fp20_lpinfo::matcnt, fp20_lpinfo::ncols, fp20_lpinfo::nrows, NULL, fp20_lpinfo::O, fp20_tol_struct::pfeas_tol, fp20_lpinfo::pinfeas, PRIMAL_SIMPLEX, fp20_lpinfo::tol, and fp20_feas_info::totinfeas.

Here is the call graph for this function:

int fp20_ILLbasis_get_initial ( fp20_lpinfo lp,
int  algorithm 
)

Definition at line 1105 of file fp20_basis.c.

References fp20_lpinfo::basisid, E_SIMPLEX_ERROR, fp20_get_initial_basis1(), fp20_get_initial_basis2(), fp20_ILLbasis_build_basisinfo(), fp20_ILLbasis_free_basisinfo(), fp20_ILLbasis_init_basisinfo(), fp20_ILLwrite_lp_file(), fp20_set_basis_indices(), ILL_IFFREE, ILL_SAFE_MALLOC, fp20_lpinfo::ncols, NULL, fp20_lpinfo::O, and PRIMAL_SIMPLEX.

Here is the call graph for this function:

void fp20_ILLbasis_init_basisinfo ( fp20_lpinfo lp  ) 

Definition at line 91 of file fp20_basis.c.

References fp20_lpinfo::baz, fp20_lpinfo::f, fp20_lpinfo::nbaz, fp20_lpinfo::vindex, and fp20_lpinfo::vstat.

void fp20_ILLbasis_init_vardata ( fp20_var_data vd  ) 

Definition at line 49 of file fp20_basis.c.

References fp20_var_data::cmax.

int fp20_ILLbasis_load ( fp20_lpinfo lp,
fp20_ILLlp_basis B 
)

Definition at line 141 of file fp20_basis.c.

References fp20_lpinfo::basisid, fp20_lpinfo::baz, fp20_ILLlp_basis::cstat, fp20_lpinfo::fbasisid, fp20_ILLbasis_build_basisinfo(), fp20_ILLbasis_free_basisinfo(), fp20_ILLbasis_init_basisinfo(), fp20_lpinfo::nbaz, fp20_ILLlpdata::ncols, fp20_ILLlpdata::nrows, fp20_ILLlpdata::nstruct, fp20_lpinfo::O, QS_COL_BSTAT_BASIC, QS_COL_BSTAT_FREE, QS_COL_BSTAT_LOWER, QS_COL_BSTAT_UPPER, QS_ROW_BSTAT_BASIC, QS_ROW_BSTAT_LOWER, QS_ROW_BSTAT_UPPER, fp20_ILLlpdata::rowmap, fp20_ILLlp_basis::rstat, fp20_ILLlpdata::sense, STAT_BASIC, STAT_LOWER, STAT_UPPER, STAT_ZERO, fp20_ILLlpdata::structmap, fp20_lpinfo::vindex, and fp20_lpinfo::vstat.

Here is the call graph for this function:

int fp20_ILLbasis_refactor ( fp20_lpinfo lp  ) 

Definition at line 1429 of file fp20_basis.c.

References __QS_SB_VERB, fp20_ILLbasis_factor(), and QS_LP_CHANGE_PREC.

Here is the call graph for this function:

void fp20_ILLbasis_row_solve ( fp20_lpinfo lp,
fp20_svector rhs,
fp20_svector soln 
)

Definition at line 1462 of file fp20_basis.c.

References fp20_lpinfo::f, and fp20_ILLfactor_btran().

Here is the call graph for this function:

int fp20_ILLbasis_tableau_row ( fp20_lpinfo lp,
int  row,
EGfp20_t *  brow,
EGfp20_t *  trow,
EGfp20_t *  rhs,
int  strict 
)

Definition at line 266 of file fp20_basis.c.

References __QS_SB_VERB, fp20_lpinfo::basisid, fp20_lpinfo::baz, fp20_lpinfo::bz, fp20_svector::coef, E_BASIS_SINGULAR, E_GENERAL_ERROR, fp20_lpinfo::fbasisid, fp20_ILLbasis_factor(), fp20_ILLfct_compute_vA(), fp20_ILLfct_compute_zA(), fp20_ILLfct_compute_zz(), fp20_ILLsvector_alloc(), fp20_ILLsvector_free(), fp20_ILLsvector_init(), fp20_PIVZ_TOLER, ILL_CLEANUP, ILL_IFTRACE, fp20_svector::indx, fp20_lpinfo::lz, fp20_lpinfo::nbaz, fp20_lpinfo::ncols, fp20_ILLlpdata::nrows, fp20_lpinfo::nrows, NULL, fp20_svector::nzcnt, fp20_lpinfo::O, STAT_BASIC, STAT_LOWER, STAT_UPPER, fp20_lpinfo::uz, fp20_lpinfo::vindex, fp20_lpinfo::vstat, and fp20_lpinfo::xbz.

Here is the call graph for this function:

int fp20_ILLbasis_update ( fp20_lpinfo lp,
fp20_svector y,
int  lindex,
int *  refactor,
int *  singular 
)

Definition at line 1470 of file fp20_basis.c.

References __QS_SB_VERB, E_FACTOR_BLOWUP, E_UPDATE_NOSPACE, E_UPDATE_SINGULAR_COL, E_UPDATE_SINGULAR_ROW, fp20_lpinfo::f, fp20_ILLbasis_factor(), fp20_ILLfactor_update(), fp20_ILLlib_writebasis(), fp20_ILLwrite_lp_file(), NULL, and fp20_lpinfo::O.

Here is the call graph for this function:

static int fp20_init_slack_basis ( fp20_lpinfo lp,
int *  vstat,
int *  irow,
int *  rrow,
int *  unitcol,
int *  icol,
int *  rcol 
) [static]

Definition at line 457 of file fp20_basis.c.

References CLASS_LOGICAL, fp20_lpinfo::lz, fp20_lpinfo::matbeg, fp20_lpinfo::matind, fp20_lpinfo::ncols, NULL, STAT_BASIC, STAT_LOWER, STAT_UPPER, STAT_ZERO, fp20_lpinfo::uz, VARTIFICIAL, VBOUNDED, fp20_lpinfo::vclass, VFIXED, VFREE, VLOWER, fp20_lpinfo::vtype, and VUPPER.

Referenced by fp20_get_initial_basis1(), and fp20_get_initial_basis2().

static int fp20_primal_col_select ( fp20_lpinfo lp,
int *  vstat,
int *  irow,
int *  rrow,
int *  unitcol,
EGfp20_t *  v,
int *  perm,
int *  porder,
int  nbelem,
int  pcols 
) [static]

Definition at line 511 of file fp20_basis.c.

References fp20_INFTY, fp20_NINFTY, fp20_PARAM_IBASIS_RPIVOT, fp20_PARAM_IBASIS_RTRIANG, fp20_lpinfo::matbeg, fp20_lpinfo::matcnt, fp20_lpinfo::matind, fp20_lpinfo::matval, fp20_lpinfo::nrows, and STAT_BASIC.

Referenced by fp20_get_initial_basis2().

static int fp20_set_basis_indices ( fp20_lpinfo lp,
int *  vstat 
)

Definition at line 1062 of file fp20_basis.c.

References fp20_lpinfo::baz, E_SIMPLEX_ERROR, fp20_lpinfo::nbaz, fp20_lpinfo::ncols, fp20_lpinfo::nnbasic, fp20_lpinfo::nrows, STAT_BASIC, STAT_LOWER, STAT_UPPER, STAT_ZERO, fp20_lpinfo::vindex, and fp20_lpinfo::vstat.

Referenced by fp20_ILLbasis_get_cinitial(), and fp20_ILLbasis_get_initial().


Variable Documentation

int TRACE = 0 [static]

Definition at line 24 of file fp20_basis.c.


Generated on Thu Mar 29 09:37:27 2012 for QSopt_ex by  doxygen 1.4.7