Scippy

SCIP

Solving Constraint Integer Programs

pricestore.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-2017 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 pricestore.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing priced variables
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PRICESTORE_H__
25 #define __SCIP_PRICESTORE_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_event.h"
34 #include "scip/type_lp.h"
35 #include "scip/type_var.h"
36 #include "scip/type_prob.h"
37 #include "scip/type_tree.h"
38 #include "scip/type_pricestore.h"
39 #include "scip/type_branch.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /** creates pricing storage */
46 extern
48  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
49  );
50 
51 /** frees pricing storage */
52 extern
54  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
55  );
56 
57 /** informs pricing storage, that the setup of the initial LP starts now */
58 extern
60  SCIP_PRICESTORE* pricestore /**< pricing storage */
61  );
62 
63 /** informs pricing storage, that the setup of the initial LP is now finished */
64 extern
66  SCIP_PRICESTORE* pricestore /**< pricing storage */
67  );
68 
69 /** adds variable to pricing storage and capture it */
70 extern
72  SCIP_PRICESTORE* pricestore, /**< pricing storage */
73  BMS_BLKMEM* blkmem, /**< block memory */
74  SCIP_SET* set, /**< global SCIP settings */
75  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
76  SCIP_LP* lp, /**< LP data */
77  SCIP_VAR* var, /**< priced variable */
78  SCIP_Real score, /**< pricing score of variable (the larger, the better the variable) */
79  SCIP_Bool root /**< are we at the root node? */
80  );
81 
82 /** adds variable where zero violates the bounds to pricing storage, capture it */
83 extern
85  SCIP_PRICESTORE* pricestore, /**< pricing storage */
86  BMS_BLKMEM* blkmem, /**< block memory */
87  SCIP_SET* set, /**< global SCIP settings */
88  SCIP_STAT* stat, /**< problem statistics */
89  SCIP_LP* lp, /**< LP data */
90  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
91  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
92  SCIP_VAR* var /**< variable, where zero violates the bounds */
93  );
94 
95 /** adds problem variables with negative reduced costs to pricing storage */
96 extern
98  SCIP_PRICESTORE* pricestore, /**< pricing storage */
99  BMS_BLKMEM* blkmem, /**< block memory buffers */
100  SCIP_SET* set, /**< global SCIP settings */
101  SCIP_STAT* stat, /**< dynamic problem statistics */
102  SCIP_PROB* prob, /**< transformed problem after presolve */
103  SCIP_TREE* tree, /**< branch and bound tree */
104  SCIP_LP* lp, /**< LP data */
105  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
106  SCIP_EVENTQUEUE* eventqueue /**< event queue */
107  );
108 
109 /** adds priced variables to the LP */
110 extern
112  SCIP_PRICESTORE* pricestore, /**< pricing storage */
113  BMS_BLKMEM* blkmem, /**< block memory buffers */
114  SCIP_SET* set, /**< global SCIP settings */
115  SCIP_STAT* stat, /**< dynamic problem statistics */
116  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
117  SCIP_PROB* prob, /**< transformed problem after presolve */
118  SCIP_TREE* tree, /**< branch and bound tree */
119  SCIP_LP* lp /**< LP data */
120  );
121 
122 /** reset variables' bounds violated by zero to its original value */
123 extern
125  SCIP_PRICESTORE* pricestore, /**< pricing storage */
126  BMS_BLKMEM* blkmem, /**< block memory */
127  SCIP_SET* set, /**< global SCIP settings */
128  SCIP_STAT* stat, /**< problem statistics */
129  SCIP_LP* lp, /**< LP data */
130  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
131  SCIP_EVENTQUEUE* eventqueue /**< event queue */
132  );
133 
134 /** gets number of variables in pricing storage */
135 extern
137  SCIP_PRICESTORE* pricestore /**< pricing storage */
138  );
139 
140 /** gets number of variables in pricing storage whose bounds must be reset */
141 extern
143  SCIP_PRICESTORE* pricestore /**< pricing storage */
144  );
145 
146 /** gets time needed to price existing problem variables */
147 extern
149  SCIP_PRICESTORE* pricestore /**< pricing storage */
150  );
151 
152 /** gets total number of calls to problem variable pricing */
153 extern
155  SCIP_PRICESTORE* pricestore /**< pricing storage */
156  );
157 
158 /** gets total number of times, a problem variable was priced in */
159 extern
161  SCIP_PRICESTORE* pricestore /**< pricing storage */
162  );
163 
164 /** get total number of variables found so far in pricing */
165 extern
167  SCIP_PRICESTORE* pricestore /**< pricing storage */
168  );
169 
170 /** get total number of variables priced into the LP so far */
171 extern
173  SCIP_PRICESTORE* pricestore /**< pricing storage */
174  );
175 
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif
int SCIPpricestoreGetNProbPricings(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:633
void SCIPpricestoreEndInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:158
SCIP_RETCODE SCIPpricestoreAddBdviolvar(SCIP_PRICESTORE *pricestore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var)
Definition: pricestore.c:243
int SCIPpricestoreGetNProbvarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:643
SCIP_RETCODE SCIPpricestoreCreate(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:96
int SCIPpricestoreGetNVars(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:601
SCIP_Real SCIPpricestoreGetProbPricingTime(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:623
type definitions for storing priced variables
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
type definitions for return codes for SCIP methods
type definitions for branching rules
type definitions for problem statistics
type definitions for LP management
int SCIPpricestoreGetNBoundResets(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:612
void SCIPpricestoreStartInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:146
int SCIPpricestoreGetNVarsApplied(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:663
type definitions for problem variables
SCIP_RETCODE SCIPpricestoreFree(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:125
type definitions for managing events
#define SCIP_Bool
Definition: def.h:61
SCIP_RETCODE SCIPpricestoreAddVar(SCIP_PRICESTORE *pricestore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var, SCIP_Real score, SCIP_Bool root)
Definition: pricestore.c:170
SCIP_RETCODE SCIPpricestoreApplyVars(SCIP_PRICESTORE *pricestore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
Definition: pricestore.c:472
type definitions for branch and bound tree
int SCIPpricestoreGetNVarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:653
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPpricestoreAddProbVars(SCIP_PRICESTORE *pricestore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue)
Definition: pricestore.c:343
SCIP_RETCODE SCIPpricestoreResetBounds(SCIP_PRICESTORE *pricestore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue)
Definition: pricestore.c:561
#define SCIP_Real
Definition: def.h:149
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:419
memory allocation routines