float128_binary.c File Reference

#include "qs_config.h"
#include "float128_priority.h"
#include "float128_sortrus.h"
#include "float128_iqsutil.h"
#include "float128_lpdata.h"
#include "float128_lpdefs.h"
#include "float128_simplex.h"
#include "float128_binary.h"
#include "float128_price.h"
#include "float128_lib.h"
#include "float128_qstruct.h"
#include "float128_qsopt.h"

Include dependency graph for float128_binary.c:

Go to the source code of this file.

Data Structures

struct  float128_bbnode
struct  float128_mipinfo

Defines

#define float128_FIRSTBRANCH   1
#define float128_ILL_BRANCH_PENALTY_VAL(v0, v1, f)
#define float128_ILL_BRANCH_PENALTY_WEIGHT   (2)
#define float128_ILL_BRANCH_STRONG_VAL(v0, v1)
#define float128_ILL_BRANCH_STRONG_WEIGHT   (10)
#define float128_ILL_INTTOL   float128_PFEAS_TOLER
#define float128_MIDDLEBRANCH   2
#define float128_PENALTYBRANCH   4
#define float128_STRONG_CANDIDATES   (10)
#define float128_STRONG_PIVOTS   (50)
#define float128_STRONGBRANCH   3

Functions

static void float128_best_bbnode (float128_mipinfo *minf, float128_bbnode **best)
static void float128_check_integral (float128_lpinfo *lp, float128 *x, int *yesno)
static int float128_child_work (float128_mipinfo *minf, float128_bbnode *active, int bvar, int bdir, float128 *cval, int *cp, itcnt_t *itcnt)
static void float128_cleanup_mip (float128_mipinfo *minf)
static void float128_copy_x (int nstruct, float128 *from_x, float128 *to_x)
static int float128_find_branch (float128_mipinfo *minf, float128 *x, float128 *lpval, int *bvar, itcnt_t *itcnt)
static void float128_find_first_branch (float128_lpinfo *lp, float128 *x, int *bvar)
static void float128_find_middle_branch (float128_lpinfo *lp, float128 *x, int *bvar)
static int float128_find_penalty_branch (float128_lpinfo *lp, float128_price_info *pinf, float128 *x, float128 *downpen, float128 *uppen, float128 *lpval, int *bvar, itcnt_t *itcnt)
static int float128_find_strong_branch (float128_lpinfo *lp, float128_price_info *pinf, float128 *x, int *bvar, itcnt_t *itcnt)
static int float128_fix_variables (float128_lpinfo *lp, float128 *bestval, float128_bbnode *b, float128 *wupper, float128 *wlower, int *hit)
static void float128_free_bbnode (float128_bbnode *b)
static void float128_free_mipinfo (float128_mipinfo *minf)
int float128_ILLmip_bfs (float128_lpinfo *lp, float128 *val, float128 *x, itcnt_t *itcnt)
static void float128_init_bbnode (float128_bbnode *b)
static void float128_init_mipinfo (float128_mipinfo *minf)
static int float128_plunge (float128_mipinfo *minf, itcnt_t *itcnt)
static int float128_plunge_work (float128_mipinfo *minf, int depth, itcnt_t *itcnt)
static int float128_process_bfs_bbnode (float128_mipinfo *minf, float128_bbnode *active, itcnt_t *itcnt)
static void float128_put_bbnode (float128_mipinfo *minf, float128_bbnode *b)
static void float128_remove_bbnode (float128_bbnode *b)
static int float128_round_variables (float128_mipinfo *minf, int *count, float128 *tol)
static int float128_run_bfs (float128_mipinfo *minf, itcnt_t *itcnt)
static int float128_startup_mip (float128_mipinfo *minf, float128_lpinfo *lp, float128_price_info *pinf, float128 *lpval, itcnt_t *itcnt)
 ILL_PTRWORLD_ROUTINES (ILL_PTRWORLD_LISTFREE_ROUTINE(float128_bbnode, bbnodealloc, bbnode_bulkalloc, bbnodefree)

Variables

static int TRACE = 0


Define Documentation

#define float128_FIRSTBRANCH   1

Definition at line 76 of file float128_binary.c.

Referenced by float128_find_branch().

#define float128_ILL_BRANCH_PENALTY_VAL ( v0,
v1,
 ) 

Value:

(((v0)*(f) < (v1)*(1.0-(f)) ?                                    \
        (float128_ILL_BRANCH_PENALTY_WEIGHT * (v0)*(f) + (v1)*(1.0-(f)))    \
      : (float128_ILL_BRANCH_PENALTY_WEIGHT * (v1)*(1.0-(f)) + (v0)*(f)))    \
                    / (float128_ILL_BRANCH_PENALTY_WEIGHT + 1.0))

Definition at line 68 of file float128_binary.c.

#define float128_ILL_BRANCH_PENALTY_WEIGHT   (2)

Definition at line 67 of file float128_binary.c.

#define float128_ILL_BRANCH_STRONG_VAL ( v0,
v1   ) 

Value:

(((v0) < (v1) ? (float128_ILL_BRANCH_STRONG_WEIGHT * (v0) + (v1))         \
                  : (float128_ILL_BRANCH_STRONG_WEIGHT * (v1) + (v0)))        \
                    / (float128_ILL_BRANCH_STRONG_WEIGHT + 1.0))

Definition at line 62 of file float128_binary.c.

#define float128_ILL_BRANCH_STRONG_WEIGHT   (10)

Definition at line 61 of file float128_binary.c.

#define float128_ILL_INTTOL   float128_PFEAS_TOLER

Definition at line 56 of file float128_binary.c.

Referenced by float128_check_integral(), float128_child_work(), float128_find_first_branch(), float128_find_penalty_branch(), float128_find_strong_branch(), float128_fix_variables(), and float128_plunge_work().

#define float128_MIDDLEBRANCH   2

Definition at line 77 of file float128_binary.c.

Referenced by float128_find_branch().

#define float128_PENALTYBRANCH   4

Definition at line 79 of file float128_binary.c.

Referenced by float128_find_branch(), and float128_ILLmip_bfs().

#define float128_STRONG_CANDIDATES   (10)

Definition at line 59 of file float128_binary.c.

Referenced by float128_find_strong_branch().

#define float128_STRONG_PIVOTS   (50)

Definition at line 58 of file float128_binary.c.

#define float128_STRONGBRANCH   3

Definition at line 78 of file float128_binary.c.

Referenced by float128_find_branch(), and float128_init_mipinfo().


Function Documentation

static void float128_best_bbnode ( float128_mipinfo minf,
float128_bbnode **  best 
) [static]

Definition at line 955 of file float128_binary.c.

References float128_bbnode::bound, float128_ILL_MAXDOUBLE, float128_ILLutil_priority_deletemin(), float128_mipinfo::head_bbnode, float128_bbnode::next, and float128_mipinfo::que.

Referenced by float128_run_bfs().

Here is the call graph for this function:

static void float128_check_integral ( float128_lpinfo lp,
float128 *  x,
int *  yesno 
) [static]

Definition at line 1373 of file float128_binary.c.

References float128_ILL_INTTOL, float128_ILLlpdata::intmarker, float128_ILLlpdata::nstruct, and float128_lpinfo::O.

Referenced by float128_child_work().

static int float128_child_work ( float128_mipinfo minf,
float128_bbnode active,
int  bvar,
int  bdir,
float128 *  cval,
int *  cp,
itcnt_t itcnt 
) [static]

Definition at line 691 of file float128_binary.c.

References float128_mipinfo::bestx, float128_bbnode::bound, float128_bbnode::bound_cnt, float128_bbnode::bound_indx, float128_bbnode::bounds, float128_bbnode::cstat, float128_bbnode::depth, float128_price_info::dII_price, DUAL_SIMPLEX, float128_check_integral(), float128_copy_x(), float128_ILL_INTTOL, float128_ILL_MAXDOUBLE, float128_ILLlib_chgbnd(), float128_ILLlib_getbasis(), float128_ILLlib_getbnd(), float128_ILLlib_getrownorms(), float128_ILLlib_iter(), float128_ILLlib_objval(), float128_ILLlib_optimize(), float128_ILLutil_priority_insert(), float128_init_bbnode(), float128_put_bbnode(), float128_bbnode::id, ILL_CLEANUP, ILL_CLEANUP_IF, ILL_SAFE_MALLOC, float128_mipinfo::lastpivots, float128_mipinfo::lp, float128_bbnode::lu, float128_lpinfo::nrows, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::objectivebound, float128_mipinfo::pinf, float128_mipinfo::ptrworld, QS_LP_INFEASIBLE, QS_LP_UNSOLVED, QS_PRICE_DSTEEP, float128_mipinfo::que, float128_bbnode::rownorms, float128_bbnode::rstat, float128_mipinfo::totalnodes, float128_mipinfo::totalpivots, float128_mipinfo::value, and float128_mipinfo::x.

Here is the call graph for this function:

static void float128_cleanup_mip ( float128_mipinfo minf  )  [static]

Definition at line 389 of file float128_binary.c.

References float128_ILL_MAX, float128_ILL_MIN, float128_mipinfo::lp, float128_lpinfo::ncols, float128_lpinfo::O, float128_ILLlpdata::obj, float128_ILLlpdata::objsense, and float128_mipinfo::objsense.

Referenced by float128_ILLmip_bfs().

static void float128_copy_x ( int  nstruct,
float128 *  from_x,
float128 *  to_x 
) [static]

Definition at line 1656 of file float128_binary.c.

Referenced by float128_child_work(), float128_ILLmip_bfs(), and float128_plunge_work().

static int float128_find_branch ( float128_mipinfo minf,
float128 *  x,
float128 *  lpval,
int *  bvar,
itcnt_t itcnt 
) [static]

Definition at line 999 of file float128_binary.c.

References float128_mipinfo::branching_rule, float128_mipinfo::downpen, float128_find_first_branch(), float128_find_middle_branch(), float128_find_penalty_branch(), float128_find_strong_branch(), float128_FIRSTBRANCH, float128_MIDDLEBRANCH, float128_PENALTYBRANCH, float128_STRONGBRANCH, ILL_CLEANUP_IF, ILL_RETURN, float128_mipinfo::lp, float128_mipinfo::pinf, and float128_mipinfo::uppen.

Here is the call graph for this function:

static void float128_find_first_branch ( float128_lpinfo lp,
float128 *  x,
int *  bvar 
) [static]

Definition at line 1037 of file float128_binary.c.

References float128_ILL_INTTOL, float128_ILLlpdata::intmarker, float128_ILLlpdata::nstruct, float128_lpinfo::O, and t.

Referenced by float128_find_branch().

static void float128_find_middle_branch ( float128_lpinfo lp,
float128 *  x,
int *  bvar 
) [static]

Definition at line 1068 of file float128_binary.c.

References float128_ILLlpdata::intmarker, float128_ILLlpdata::nstruct, float128_lpinfo::O, and t.

Referenced by float128_find_branch(), and float128_plunge_work().

static int float128_find_penalty_branch ( float128_lpinfo lp,
float128_price_info pinf,
float128 *  x,
float128 *  downpen,
float128 *  uppen,
float128 *  lpval,
int *  bvar,
itcnt_t itcnt 
) [static]

Definition at line 1117 of file float128_binary.c.

References float128_ILL_INTTOL, float128_ILL_MINDOUBLE, ILL_SAFE_MALLOC, float128_ILLlpdata::intmarker, float128_ILLlpdata::nstruct, float128_lpinfo::O, and t.

Referenced by float128_find_branch().

static int float128_find_strong_branch ( float128_lpinfo lp,
float128_price_info pinf,
float128 *  x,
int *  bvar,
itcnt_t itcnt 
) [static]

Definition at line 1238 of file float128_binary.c.

References float128_ILL_INTTOL, float128_ILL_MINDOUBLE, float128_STRONG_CANDIDATES, ILL_SAFE_MALLOC, ILLutil_sprand(), float128_ILLlpdata::intmarker, float128_ILLlpdata::nstruct, and float128_lpinfo::O.

Referenced by float128_find_branch().

Here is the call graph for this function:

static int float128_fix_variables ( float128_lpinfo lp,
float128 *  bestval,
float128_bbnode b,
float128 *  wupper,
float128 *  wlower,
int *  hit 
) [static]

Definition at line 846 of file float128_binary.c.

References float128_bbnode::bound_cnt, float128_bbnode::bound_indx, float128_bbnode::bounds, float128_ILL_INTTOL, float128_ILL_MAXDOUBLE, float128_ILLlib_chgbnd(), float128_ILLlib_objval(), float128_ILLlib_solution(), ILL_CLEANUP_IF, ILL_SAFE_MALLOC, float128_ILLlpdata::intmarker, float128_bbnode::lu, float128_ILLlpdata::nstruct, and float128_lpinfo::O.

Here is the call graph for this function:

static void float128_free_bbnode ( float128_bbnode b  )  [static]

Definition at line 1748 of file float128_binary.c.

References float128_bbnode::bound, float128_bbnode::bound_indx, float128_bbnode::bounds, float128_bbnode::cstat, ILL_IFFREE, float128_bbnode::lu, float128_bbnode::rownorms, and float128_bbnode::rstat.

Referenced by float128_run_bfs().

static void float128_free_mipinfo ( float128_mipinfo minf  )  [static]

Definition at line 1700 of file float128_binary.c.

References float128_mipinfo::bestx, float128_mipinfo::downpen, float128_mipinfo::head_bbnode, ILLptrworld_delete(), float128_mipinfo::lower, float128_bbnode::next, float128_mipinfo::objectivebound, float128_mipinfo::ptrworld, float128_mipinfo::uppen, float128_mipinfo::upper, float128_mipinfo::value, and float128_mipinfo::x.

Referenced by float128_ILLmip_bfs().

Here is the call graph for this function:

int float128_ILLmip_bfs ( float128_lpinfo lp,
float128 *  val,
float128 *  x,
itcnt_t itcnt 
)

Definition at line 176 of file float128_binary.c.

References float128_mipinfo::activenodes, float128_mipinfo::bestx, float128_bbnode::bound, float128_mipinfo::branching_rule, float128_bbnode::cstat, float128_bbnode::depth, float128_price_info::dII_price, float128_cleanup_mip(), float128_copy_x(), float128_free_mipinfo(), float128_ILL_MAX, float128_ILL_MAXDOUBLE, float128_ILLlib_getbasis(), float128_ILLlib_getrownorms(), float128_ILLprice_free_pricing_info(), float128_ILLprice_init_pricing_info(), float128_ILLutil_priority_free(), float128_ILLutil_priority_init(), float128_ILLutil_priority_insert(), float128_init_bbnode(), float128_init_mipinfo(), float128_PENALTYBRANCH, float128_run_bfs(), float128_startup_mip(), float128_mipinfo::head_bbnode, float128_price_info::htrigger, float128_bbnode::id, ILL_CLEANUP_IF, ILL_IFFREE, ILL_RETURN, ILL_SAFE_MALLOC, ILLutil_zeit(), float128_bbnode::next, float128_lpinfo::nrows, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::objsense, float128_mipinfo::ptrworld, QS_PRICE_DSTEEP, float128_mipinfo::que, float128_bbnode::rownorms, float128_bbnode::rstat, float128_mipinfo::totalnodes, float128_mipinfo::totalpivots, and float128_mipinfo::value.

Referenced by float128_solver_main().

Here is the call graph for this function:

static void float128_init_bbnode ( float128_bbnode b  )  [static]

Definition at line 1726 of file float128_binary.c.

References float128_bbnode::bound, float128_bbnode::bound_cnt, float128_bbnode::bound_indx, float128_bbnode::bounds, float128_bbnode::cstat, float128_bbnode::depth, float128_ILL_MINDOUBLE, float128_bbnode::handle, float128_bbnode::id, float128_bbnode::lu, float128_bbnode::next, float128_bbnode::prev, float128_bbnode::rownorms, and float128_bbnode::rstat.

Referenced by float128_child_work(), and float128_ILLmip_bfs().

static void float128_init_mipinfo ( float128_mipinfo minf  )  [static]

Definition at line 1669 of file float128_binary.c.

References float128_mipinfo::activenodes, float128_mipinfo::bestx, float128_mipinfo::branching_rule, float128_mipinfo::depth, float128_mipinfo::downpen, float128_ILL_MAXDOUBLE, float128_STRONGBRANCH, float128_mipinfo::head_bbnode, ILLptrworld_init(), float128_mipinfo::lastpivots, float128_mipinfo::lower, float128_mipinfo::lp, float128_bbnode::next, float128_mipinfo::objectivebound, float128_mipinfo::pinf, float128_bbnode::prev, float128_mipinfo::ptrworld, float128_mipinfo::que, float128_mipinfo::totalnodes, float128_mipinfo::totalpivots, float128_mipinfo::uppen, float128_mipinfo::upper, float128_mipinfo::value, float128_mipinfo::watch, and float128_mipinfo::x.

Referenced by float128_ILLmip_bfs().

Here is the call graph for this function:

static int float128_plunge ( float128_mipinfo minf,
itcnt_t itcnt 
) [static]

Definition at line 1407 of file float128_binary.c.

References DUAL_SIMPLEX, float128_ILLlib_chgbnd(), float128_ILLlib_optimize(), float128_plunge_work(), ILL_CLEANUP_IF, ILL_RETURN, float128_mipinfo::lower, float128_mipinfo::lp, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::pinf, float128_mipinfo::upper, and float128_mipinfo::watch.

Here is the call graph for this function:

static int float128_plunge_work ( float128_mipinfo minf,
int  depth,
itcnt_t itcnt 
) [static]

Definition at line 1458 of file float128_binary.c.

References float128_mipinfo::bestx, DUAL_SIMPLEX, float128_copy_x(), float128_find_middle_branch(), float128_ILL_INTTOL, float128_ILL_MAXDOUBLE, float128_ILLlib_chgbnd(), float128_ILLlib_get_x(), float128_ILLlib_objval(), float128_ILLlib_optimize(), float128_round_variables(), ILL_CLEANUP, ILL_CLEANUP_IF, ILL_RETURN, float128_mipinfo::lower, float128_mipinfo::lp, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::objectivebound, float128_mipinfo::pinf, QS_LP_INFEASIBLE, QS_LP_OPTIMAL, QS_LP_UNSOLVED, float128_mipinfo::upper, float128_mipinfo::value, and float128_mipinfo::x.

Referenced by float128_plunge().

Here is the call graph for this function:

static int float128_process_bfs_bbnode ( float128_mipinfo minf,
float128_bbnode active,
itcnt_t itcnt 
) [static]

Definition at line 432 of file float128_binary.c.

References float128_mipinfo::activenodes, float128_bbnode::bound, float128_bbnode::bound_cnt, float128_bbnode::bound_indx, float128_bbnode::bounds, float128_ILL_MAXDOUBLE, float128_ILLlib_chgbnds(), float128_ILLlp_basis_init(), float128_bbnode::id, ILL_CLEANUP_IF, float128_mipinfo::lastpivots, float128_mipinfo::lp, float128_bbnode::lu, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::objectivebound, float128_mipinfo::orig_lower, float128_mipinfo::orig_upper, t, float128_mipinfo::totalpivots, float128_mipinfo::value, and float128_mipinfo::watch.

Referenced by float128_run_bfs().

Here is the call graph for this function:

static void float128_put_bbnode ( float128_mipinfo minf,
float128_bbnode b 
) [static]

Definition at line 980 of file float128_binary.c.

References float128_mipinfo::head_bbnode, float128_bbnode::next, and float128_bbnode::prev.

Referenced by float128_child_work().

static void float128_remove_bbnode ( float128_bbnode b  )  [static]

Definition at line 991 of file float128_binary.c.

References float128_bbnode::next, and float128_bbnode::prev.

Referenced by float128_run_bfs().

static int float128_round_variables ( float128_mipinfo minf,
int *  count,
float128 *  tol 
) [static]

Definition at line 1614 of file float128_binary.c.

References float128_ILLlib_chgbnd(), ILL_CLEANUP_IF, float128_ILLlpdata::intmarker, float128_mipinfo::lower, float128_mipinfo::lp, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_mipinfo::upper, and float128_mipinfo::x.

Referenced by float128_plunge_work().

Here is the call graph for this function:

static int float128_run_bfs ( float128_mipinfo minf,
itcnt_t itcnt 
) [static]

Definition at line 409 of file float128_binary.c.

References float128_mipinfo::activenodes, float128_best_bbnode(), float128_free_bbnode(), float128_process_bfs_bbnode(), float128_remove_bbnode(), float128_mipinfo::head_bbnode, ILL_CLEANUP_IF, ILL_RETURN, float128_bbnode::next, and float128_mipinfo::ptrworld.

Referenced by float128_ILLmip_bfs().

Here is the call graph for this function:

static int float128_startup_mip ( float128_mipinfo minf,
float128_lpinfo lp,
float128_price_info pinf,
float128 *  lpval,
itcnt_t itcnt 
) [static]

Definition at line 274 of file float128_binary.c.

References DUAL_SIMPLEX, float128_ILL_MAXDOUBLE, float128_ILL_MINDOUBLE, float128_ILLlib_iter(), float128_ILLlib_objval(), float128_ILLlib_optimize(), ILL_CLEANUP_IF, float128_ILLlpdata::intmarker, float128_ILLlpdata::lower, float128_ILLlpdata::nstruct, float128_lpinfo::O, float128_ILLlpdata::structmap, float128_mipinfo::totalpivots, and float128_ILLlpdata::upper.

Referenced by float128_ILLmip_bfs().

Here is the call graph for this function:

ILL_PTRWORLD_ROUTINES ( ILL_PTRWORLD_LISTFREE_ROUTINE (  float128_bbnode,
bbnodealloc  ,
bbnode_bulkalloc  ,
bbnodefree   
)

Definition at line 132 of file float128_binary.c.

References QS_PRICE_DSTEEP, and QS_PRICE_PSTEEP.


Variable Documentation

int TRACE = 0 [static]

Definition at line 24 of file float128_binary.c.


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