Scippy

SCIP

Solving Constraint Integer Programs

struct_branch.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2016 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_branch.h
17  * @brief datastructures for branching rules and branching candidate storage
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_STRUCT_BRANCH_H__
24 #define __SCIP_STRUCT_BRANCH_H__
25 
26 
27 #include "scip/def.h"
28 #include "scip/type_var.h"
29 #include "scip/type_branch.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** branching candidate storage */
37 {
38  SCIP_VAR** lpcands; /**< candidates for branching on LP solution (fractional integer variables) */
39  SCIP_Real* lpcandssol; /**< solution values of LP candidates */
40  SCIP_Real* lpcandsfrac; /**< fractionalities of LP candidates */
41  SCIP_VAR** externcands; /**< external candidates for branching, e.g. given by relaxation */
42  SCIP_Real* externcandsscore; /**< scores of external candidates, e.g. infeasibilities */
43  SCIP_Real* externcandssol; /**< values in solution of external candidates */
44  SCIP_VAR** pseudocands; /**< candidates for branching on pseudo solution (non-fixed integer variables) */
45  SCIP_Longint validlpcandslp; /**< lp number for which lpcands are valid */
46  int lpcandssize; /**< number of available slots in lpcands array */
47  int nlpcands; /**< number of candidates for branching on LP solution */
48  int npriolpcands; /**< number of LP candidates with largest branch priority value */
49  int npriolpbins; /**< number of binary LP candidates with largest branch priority value */
50  int nimpllpfracs; /**< number of implicit variables with fractional LP solution value */
51  int lpmaxpriority; /**< maximal branch priority of all LP candidates */
52  int externcandssize; /**< number of available slots in externcands array */
53  int nexterncands; /**< number of external candidates for branching */
54  int nprioexterncands; /**< number of external candidates with largest branch priority value */
55  int nprioexternbins; /**< number of binary external candidates with largest branch priority value */
56  int nprioexternints; /**< number of integer external candidates with largest branch priority value */
57  int nprioexternimpls; /**< number of implicit integer external candidates with largest branch priority value */
58  int externmaxpriority; /**< maximal branch priority of all external candidates */
59  int pseudocandssize; /**< number of available slots in pseudocands array */
60  int npseudocands; /**< number of candidates for branching on pseudo solution */
61  int npriopseudocands; /**< number of pseudo candidates with largest branch priority value */
62  int npriopseudobins; /**< number of binary pseudo candidates with largest branch priority value */
63  int npriopseudoints; /**< number of integer pseudo candidates with largest branch priority value */
64  int pseudomaxpriority; /**< maximal branch priority of all pseudo candidates */
65 };
66 
67 /** branching rule */
69 {
70  SCIP_Real maxbounddist; /**< maximal relative distance from current node's dual bound to primal bound
71  * compared to best node's dual bound for applying branching rule
72  * (0.0: only on current best node, 1.0: on all nodes) */
73  SCIP_Longint nlpcalls; /**< number of times, this branching rule was called on an LP solution */
74  SCIP_Longint nexterncalls; /**< number of times, this branching rule was called on external candidates */
75  SCIP_Longint npseudocalls; /**< number of times, this branching rule was called on a pseudo solution */
76  SCIP_Longint ncutoffs; /**< number of cutoffs found so far by this branching rule */
77  SCIP_Longint ncutsfound; /**< number of cutting planes found so far by this branching rule */
78  SCIP_Longint nconssfound; /**< number of cutting constraints added so far by this branching rule (not
79  * counting constraint additions to child nodes used for branching) */
80  SCIP_Longint ndomredsfound; /**< number of domain reductions found so far by this branching rule */
81  SCIP_Longint nchildren; /**< number of children created so far by this branching rule */
82  char* name; /**< name of branching rule */
83  char* desc; /**< description of branching rule */
84  SCIP_DECL_BRANCHCOPY ((*branchcopy)); /**< copy method of branching rule or NULL if you don't want to copy your plugin into sub-SCIPs */
85  SCIP_DECL_BRANCHFREE ((*branchfree)); /**< destructor of branching rule */
86  SCIP_DECL_BRANCHINIT ((*branchinit)); /**< initialize branching rule */
87  SCIP_DECL_BRANCHEXIT ((*branchexit)); /**< deinitialize branching rule */
88  SCIP_DECL_BRANCHINITSOL((*branchinitsol));/**< solving process initialization method of branching rule */
89  SCIP_DECL_BRANCHEXITSOL((*branchexitsol));/**< solving process deinitialization method of branching rule */
90  SCIP_DECL_BRANCHEXECLP((*branchexeclp)); /**< branching execution method for fractional LP solutions */
91  SCIP_DECL_BRANCHEXECEXT((*branchexecext));/**< branching execution method for external candidates */
92  SCIP_DECL_BRANCHEXECPS((*branchexecps)); /**< branching execution method for not completely fixed pseudo solutions */
93  SCIP_BRANCHRULEDATA* branchruledata; /**< branching rule data */
94  SCIP_CLOCK* setuptime; /**< time spend for setting up this branchrule for the next stages */
95  SCIP_CLOCK* branchclock; /**< branching rule execution time */
96  int priority; /**< priority of the branching rule */
97  int maxdepth; /**< maximal depth level, up to which this branching rule should be used (or -1) */
98  SCIP_Bool initialized; /**< is branching rule initialized? */
99  SCIP_Bool isobjbranchrule; /**< is branching rule an obj branching rule? */
100 };
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif
SCIP_Real * lpcandssol
Definition: struct_branch.h:39
SCIP_Bool isobjbranchrule
Definition: struct_branch.h:99
SCIP_Longint ncutsfound
Definition: struct_branch.h:77
#define SCIP_DECL_BRANCHEXECPS(x)
Definition: type_branch.h:161
SCIP_Longint ndomredsfound
Definition: struct_branch.h:80
SCIP_BRANCHRULEDATA * branchruledata
Definition: struct_branch.h:93
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
Definition: type_branch.h:43
#define SCIP_DECL_BRANCHFREE(x)
Definition: type_branch.h:60
#define SCIP_DECL_BRANCHEXECEXT(x)
Definition: type_branch.h:140
#define SCIP_DECL_BRANCHEXITSOL(x)
Definition: type_branch.h:98
type definitions for branching rules
SCIP_Longint nexterncalls
Definition: struct_branch.h:74
#define SCIP_DECL_BRANCHINIT(x)
Definition: type_branch.h:68
#define SCIP_DECL_BRANCHCOPY(x)
Definition: type_branch.h:52
SCIP_VAR ** lpcands
Definition: struct_branch.h:38
SCIP_Real maxbounddist
Definition: struct_branch.h:70
#define SCIP_DECL_BRANCHINITSOL(x)
Definition: type_branch.h:87
#define SCIP_DECL_BRANCHEXECLP(x)
Definition: type_branch.h:119
SCIP_Real * externcandsscore
Definition: struct_branch.h:42
SCIP_Real * externcandssol
Definition: struct_branch.h:43
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:53
SCIP_Longint npseudocalls
Definition: struct_branch.h:75
SCIP_CLOCK * branchclock
Definition: struct_branch.h:95
SCIP_Longint nchildren
Definition: struct_branch.h:81
SCIP_CLOCK * setuptime
Definition: struct_branch.h:94
SCIP_Longint nconssfound
Definition: struct_branch.h:78
SCIP_Longint validlpcandslp
Definition: struct_branch.h:45
#define SCIP_Real
Definition: def.h:127
SCIP_VAR ** pseudocands
Definition: struct_branch.h:44
SCIP_Bool initialized
Definition: struct_branch.h:98
#define SCIP_Longint
Definition: def.h:112
common defines and data types used in all packages of SCIP
SCIP_Longint ncutoffs
Definition: struct_branch.h:76
SCIP_Longint nlpcalls
Definition: struct_branch.h:73
SCIP_Real * lpcandsfrac
Definition: struct_branch.h:40
#define SCIP_DECL_BRANCHEXIT(x)
Definition: type_branch.h:76
SCIP_VAR ** externcands
Definition: struct_branch.h:41