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-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 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 */
47  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
48  );
49 
50 /** frees pricing storage */
52  SCIP_PRICESTORE** pricestore /**< pointer to store pricing storage */
53  );
54 
55 /** informs pricing storage, that the setup of the initial LP starts now */
57  SCIP_PRICESTORE* pricestore /**< pricing storage */
58  );
59 
60 /** informs pricing storage, that the setup of the initial LP is now finished */
62  SCIP_PRICESTORE* pricestore /**< pricing storage */
63  );
64 
65 /** adds variable to pricing storage and capture it */
67  SCIP_PRICESTORE* pricestore, /**< pricing storage */
68  BMS_BLKMEM* blkmem, /**< block memory */
69  SCIP_SET* set, /**< global SCIP settings */
70  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
71  SCIP_LP* lp, /**< LP data */
72  SCIP_VAR* var, /**< priced variable */
73  SCIP_Real score, /**< pricing score of variable (the larger, the better the variable) */
74  SCIP_Bool root /**< are we at the root node? */
75  );
76 
77 /** adds variable where zero violates the bounds to pricing storage, capture it */
79  SCIP_PRICESTORE* pricestore, /**< pricing storage */
80  BMS_BLKMEM* blkmem, /**< block memory */
81  SCIP_SET* set, /**< global SCIP settings */
82  SCIP_STAT* stat, /**< problem statistics */
83  SCIP_LP* lp, /**< LP data */
84  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
85  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
86  SCIP_VAR* var /**< variable, where zero violates the bounds */
87  );
88 
89 /** adds problem variables with negative reduced costs to pricing storage */
91  SCIP_PRICESTORE* pricestore, /**< pricing storage */
92  BMS_BLKMEM* blkmem, /**< block memory buffers */
93  SCIP_SET* set, /**< global SCIP settings */
94  SCIP_STAT* stat, /**< dynamic problem statistics */
95  SCIP_PROB* prob, /**< transformed problem after presolve */
96  SCIP_TREE* tree, /**< branch and bound tree */
97  SCIP_LP* lp, /**< LP data */
98  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
99  SCIP_EVENTQUEUE* eventqueue /**< event queue */
100  );
101 
102 /** adds priced variables to the LP */
104  SCIP_PRICESTORE* pricestore, /**< pricing storage */
105  BMS_BLKMEM* blkmem, /**< block memory buffers */
106  SCIP_SET* set, /**< global SCIP settings */
107  SCIP_STAT* stat, /**< dynamic problem statistics */
108  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
109  SCIP_PROB* prob, /**< transformed problem after presolve */
110  SCIP_TREE* tree, /**< branch and bound tree */
111  SCIP_LP* lp /**< LP data */
112  );
113 
114 /** reset variables' bounds violated by zero to its original value */
116  SCIP_PRICESTORE* pricestore, /**< pricing storage */
117  BMS_BLKMEM* blkmem, /**< block memory */
118  SCIP_SET* set, /**< global SCIP settings */
119  SCIP_STAT* stat, /**< problem statistics */
120  SCIP_LP* lp, /**< LP data */
121  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
122  SCIP_EVENTQUEUE* eventqueue /**< event queue */
123  );
124 
125 /** gets number of variables in pricing storage */
127  SCIP_PRICESTORE* pricestore /**< pricing storage */
128  );
129 
130 /** gets number of variables in pricing storage whose bounds must be reset */
132  SCIP_PRICESTORE* pricestore /**< pricing storage */
133  );
134 
135 /** gets time needed to price existing problem variables */
137  SCIP_PRICESTORE* pricestore /**< pricing storage */
138  );
139 
140 /** gets total number of calls to problem variable pricing */
142  SCIP_PRICESTORE* pricestore /**< pricing storage */
143  );
144 
145 /** gets total number of times, a problem variable was priced in */
147  SCIP_PRICESTORE* pricestore /**< pricing storage */
148  );
149 
150 /** get total number of variables found so far in pricing */
152  SCIP_PRICESTORE* pricestore /**< pricing storage */
153  );
154 
155 /** get total number of variables priced into the LP so far */
157  SCIP_PRICESTORE* pricestore /**< pricing storage */
158  );
159 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif
int SCIPpricestoreGetNProbPricings(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:634
void SCIPpricestoreEndInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:159
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:244
int SCIPpricestoreGetNProbvarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:644
SCIP_RETCODE SCIPpricestoreCreate(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:97
int SCIPpricestoreGetNVars(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:602
SCIP_Real SCIPpricestoreGetProbPricingTime(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:624
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:613
void SCIPpricestoreStartInitialLP(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:147
int SCIPpricestoreGetNVarsApplied(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:664
type definitions for problem variables
SCIP_RETCODE SCIPpricestoreFree(SCIP_PRICESTORE **pricestore)
Definition: pricestore.c:126
type definitions for managing events
#define SCIP_Bool
Definition: def.h:70
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:171
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:473
type definitions for branch and bound tree
int SCIPpricestoreGetNVarsFound(SCIP_PRICESTORE *pricestore)
Definition: pricestore.c:654
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:344
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:562
#define SCIP_Real
Definition: def.h:164
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:427
memory allocation routines