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