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-2023 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file pricestore.h
26  * @ingroup INTERNALAPI
27  * @brief internal methods for storing priced variables
28  * @author Tobias Achterberg
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_PRICESTORE_H__
34 #define __SCIP_PRICESTORE_H__
35 
36 
37 #include "scip/def.h"
38 #include "blockmemshell/memory.h"
39 #include "scip/type_retcode.h"
40 #include "scip/type_set.h"
41 #include "scip/type_stat.h"
42 #include "scip/type_event.h"
43 #include "scip/type_lp.h"
44 #include "scip/type_var.h"
45 #include "scip/type_prob.h"
46 #include "scip/type_tree.h"
47 #include "scip/type_pricestore.h"
48 #include "scip/type_branch.h"
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /** creates pricing storage */
56  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
57  );
58 
59 /** frees pricing storage */
61  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
62  );
63 
64 /** informs pricing storage, that the setup of the initial LP starts now */
66  SCIP_PRICESTORE* pricestore /**< pricing storage */
67  );
68 
69 /** informs pricing storage, that the setup of the initial LP is now finished */
71  SCIP_PRICESTORE* pricestore /**< pricing storage */
72  );
73 
74 /** adds variable to pricing storage and capture it */
76  SCIP_PRICESTORE* pricestore, /**< pricing storage */
77  BMS_BLKMEM* blkmem, /**< block memory */
78  SCIP_SET* set, /**< global SCIP settings */
79  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
80  SCIP_LP* lp, /**< LP data */
81  SCIP_VAR* var, /**< priced variable */
82  SCIP_Real score, /**< pricing score of variable (the larger, the better the variable) */
83  SCIP_Bool root /**< are we at the root node? */
84  );
85 
86 /** adds variable where zero violates the bounds to pricing storage, capture it */
88  SCIP_PRICESTORE* pricestore, /**< pricing storage */
89  BMS_BLKMEM* blkmem, /**< block memory */
90  SCIP_SET* set, /**< global SCIP settings */
91  SCIP_STAT* stat, /**< problem statistics */
92  SCIP_LP* lp, /**< LP data */
93  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
94  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
95  SCIP_VAR* var /**< variable, where zero violates the bounds */
96  );
97 
98 /** adds problem variables with negative reduced costs to pricing storage */
100  SCIP_PRICESTORE* pricestore, /**< pricing storage */
101  BMS_BLKMEM* blkmem, /**< block memory buffers */
102  SCIP_SET* set, /**< global SCIP settings */
103  SCIP_STAT* stat, /**< dynamic problem statistics */
104  SCIP_PROB* prob, /**< transformed problem after presolve */
105  SCIP_TREE* tree, /**< branch and bound tree */
106  SCIP_LP* lp, /**< LP data */
107  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
108  SCIP_EVENTQUEUE* eventqueue /**< event queue */
109  );
110 
111 /** adds priced variables to the LP */
113  SCIP_PRICESTORE* pricestore, /**< pricing storage */
114  BMS_BLKMEM* blkmem, /**< block memory buffers */
115  SCIP_SET* set, /**< global SCIP settings */
116  SCIP_STAT* stat, /**< dynamic problem statistics */
117  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
118  SCIP_PROB* prob, /**< transformed problem after presolve */
119  SCIP_TREE* tree, /**< branch and bound tree */
120  SCIP_LP* lp /**< LP data */
121  );
122 
123 /** reset variables' bounds violated by zero to its original value */
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 */
136  SCIP_PRICESTORE* pricestore /**< pricing storage */
137  );
138 
139 /** gets number of variables in pricing storage whose bounds must be reset */
141  SCIP_PRICESTORE* pricestore /**< pricing storage */
142  );
143 
144 /** gets time needed to price existing problem variables */
146  SCIP_PRICESTORE* pricestore /**< pricing storage */
147  );
148 
149 /** gets total number of calls to problem variable pricing */
151  SCIP_PRICESTORE* pricestore /**< pricing storage */
152  );
153 
154 /** gets total number of times, a problem variable was priced in */
156  SCIP_PRICESTORE* pricestore /**< pricing storage */
157  );
158 
159 /** get total number of variables found so far in pricing */
161  SCIP_PRICESTORE* pricestore /**< pricing storage */
162  );
163 
164 /** get total number of variables priced into the LP so far */
166  SCIP_PRICESTORE* pricestore /**< pricing storage */
167  );
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
173 #endif
int SCIPpricestoreGetNProbPricings(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:641
void SCIPpricestoreEndInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:169
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:254
int SCIPpricestoreGetNProbvarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:651
SCIP_RETCODE SCIPpricestoreCreate(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:107
int SCIPpricestoreGetNVars(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:609
SCIP_Real SCIPpricestoreGetProbPricingTime(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:631
type definitions for storing priced variables
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
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:620
void SCIPpricestoreStartInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:157
int SCIPpricestoreGetNVarsApplied(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:671
type definitions for problem variables
SCIP_RETCODE SCIPpricestoreFree(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:136
type definitions for managing events
#define SCIP_Bool
Definition: def.h:93
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:181
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:480
type definitions for branch and bound tree
int SCIPpricestoreGetNVarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:661
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:354
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:569
#define SCIP_Real
Definition: def.h:186
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:439
memory allocation routines