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