1 Star 2 Fork 1

沉默的忧伤/lp_solve

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lp_mipbb.h 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
沉默的忧伤 提交于 2021-05-29 19:59 . first commit
#ifndef HEADER_lp_mipbb
#define HEADER_lp_mipbb
#include "lp_types.h"
#include "lp_utils.h"
/* Bounds storage for B&B routines */
typedef struct _BBrec
{
struct _BBrec *parent;
struct _BBrec *child;
lprec *lp;
int varno;
int vartype;
int lastvarcus; /* Count of non-int variables of the previous branch */
int lastrcf;
int nodesleft;
int nodessolved;
int nodestatus;
REAL noderesult;
REAL lastsolution; /* Optimal solution of the previous branch */
REAL sc_bound;
REAL *upbo, *lowbo;
REAL UPbound, LObound;
int UBtrack, LBtrack; /* Signals that incoming bounds were changed */
MYBOOL contentmode; /* Flag indicating if we "own" the bound vectors */
MYBOOL sc_canset;
MYBOOL isSOS;
MYBOOL isGUB;
int *varmanaged; /* Extended list of variables managed by this B&B level */
MYBOOL isfloor; /* State variable indicating the active B&B bound */
MYBOOL UBzerobased; /* State variable indicating if bounds have been rebased */
} BBrec;
#ifdef __cplusplus
extern "C" {
#endif
STATIC BBrec *create_BB(lprec *lp, BBrec *parentBB, MYBOOL dofullcopy);
STATIC BBrec *push_BB(lprec *lp, BBrec *parentBB, int varno, int vartype, int varcus);
STATIC MYBOOL initbranches_BB(BBrec *BB);
STATIC MYBOOL fillbranches_BB(BBrec *BB);
STATIC MYBOOL nextbranch_BB(BBrec *BB);
STATIC MYBOOL strongbranch_BB(lprec *lp, BBrec *BB, int varno, int vartype, int varcus);
STATIC MYBOOL initcuts_BB(lprec *lp);
STATIC int updatecuts_BB(lprec *lp);
STATIC MYBOOL freecuts_BB(lprec *lp);
STATIC BBrec *findself_BB(BBrec *BB);
STATIC int solve_LP(lprec *lp, BBrec *BB);
STATIC int rcfbound_BB(BBrec *BB, int varno, MYBOOL isINT, REAL *newbound, MYBOOL *isfeasible);
STATIC MYBOOL findnode_BB(BBrec *BB, int *varno, int *vartype, int *varcus);
STATIC int solve_BB(BBrec *BB);
STATIC MYBOOL free_BB(BBrec **BB);
STATIC BBrec *pop_BB(BBrec *BB);
STATIC int run_BB(lprec *lp);
#ifdef __cplusplus
}
#endif
#endif /* HEADER_lp_mipbb */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/lishaojing/lp_solve.git
git@gitee.com:lishaojing/lp_solve.git
lishaojing
lp_solve
lp_solve
master

搜索帮助