Scippy

GCG

Branch-and-Price & Column Generation for Everyone

pricingprob.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Column Generation */
5 /* a Dantzig-Wolfe decomposition based extension */
6 /* of the branch-cut-and-price framework */
7 /* SCIP --- Solving Constraint Integer Programs */
8 /* */
9 /* Copyright (C) 2010-2021 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
28 /**@file pricingprob.h
29  * @brief private methods for working with pricing problems, to be used by the pricing controller only
30  * @author Christian Puchert
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 #ifndef GCG_PRICINGPROB_H__
35 #define GCG_PRICINGPROB_H__
36 
37 #include "struct_pricingprob.h"
38 #include "type_pricingprob.h"
39 
40 #include "pricer_gcg.h"
41 #include "type_colpool.h"
42 #include "type_pricestore_gcg.h"
43 #include "type_pricingjob.h"
44 #include "type_solver.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /** create a pricing problem */
51 SCIP_EXPORT
52 SCIP_RETCODE GCGpricingprobCreate(
53  SCIP* scip, /**< SCIP data structure (master problem) */
54  GCG_PRICINGPROB** pricingprob, /**< pricing problem to be created */
55  SCIP* pricingscip, /**< SCIP data structure of the corresponding pricing problem */
56  int probnr, /**< index of the corresponding pricing problem */
57  int nroundscol /**< number of previous pricing rounds for which the number of improving columns should be counted */
58 );
59 
60 /** free a pricing problem */
61 SCIP_EXPORT
63  SCIP* scip, /**< SCIP data structure (master problem) */
64  GCG_PRICINGPROB** pricingprob /**< pricing problem to be freed */
65 );
66 
67 /** initialize pricing problem at the beginning of the pricing round */
68 SCIP_EXPORT
70  GCG_PRICINGPROB* pricingprob /**< pricing problem structure */
71  );
72 
73 /** uninitialize pricing problem at the beginning of the pricing round */
74 SCIP_EXPORT
76  GCG_PRICINGPROB* pricingprob, /**< pricing problem structure */
77  int nroundscol /**< number of previous pricing rounds for which the number of improving columns should be counted */
78  );
79 
80 /** add generic branching data (constraint and dual value) to the current pricing problem */
81 SCIP_EXPORT
83  SCIP* scip, /**< SCIP data structure (master problem) */
84  GCG_PRICINGPROB* pricingprob, /**< pricing problem structure */
85  SCIP_CONS* branchcons, /**< generic branching constraint */
86  SCIP_Real branchdual /**< corresponding dual solution value */
87  );
88 
89 /** reset the pricing problem statistics for the current pricing round */
90 SCIP_EXPORT
92  SCIP* scip, /**< SCIP data structure (master problem) */
93  GCG_PRICINGPROB* pricingprob /**< pricing problem structure */
94  );
95 
96 /** update solution information of a pricing problem */
97 SCIP_EXPORT
99  SCIP* scip, /**< SCIP data structure (master problem) */
100  GCG_PRICINGPROB* pricingprob, /**< pricing problem structure */
101  GCG_PRICINGSTATUS status, /**< status of last pricing job */
102  SCIP_Real lowerbound, /**< new lower bound */
103  int nimpcols /**< number of new improving columns */
104  );
105 
106 /** add the information that the next branching constraint must be added */
107 SCIP_EXPORT
109  GCG_PRICINGPROB* pricingprob /**< pricing problem structure */
110  );
111 
112 /** set the lower bound of a pricing job */
113 SCIP_EXPORT
115  GCG_PRICINGJOB* pricingjob, /**< pricing job */
116  SCIP_Real lowerbound /**< new lower bound */
117  );
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif
SCIP_EXPORT void GCGpricingprobFree(SCIP *scip, GCG_PRICINGPROB **pricingprob)
Definition: pricingprob.c:82
type definitions for storing priced cols
data structure to store pricing problem information
GCG variable pricer.
enum GCG_PricingStatus GCG_PRICINGSTATUS
SCIP_EXPORT void GCGpricingprobUpdate(SCIP *scip, GCG_PRICINGPROB *pricingprob, GCG_PRICINGSTATUS status, SCIP_Real lowerbound, int nimpcols)
Definition: pricingprob.c:174
type definitions for pricing problem data structure
type definitions for pricing problem solvers in GCG project
SCIP_EXPORT SCIP_RETCODE GCGpricingprobAddGenericBranchData(SCIP *scip, GCG_PRICINGPROB *pricingprob, SCIP_CONS *branchcons, SCIP_Real branchdual)
Definition: pricingprob.c:122
SCIP_EXPORT void GCGpricingprobReset(SCIP *scip, GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:160
SCIP_EXPORT void GCGpricingprobInitPricing(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:95
SCIP_EXPORT void GCGpricingprobNextBranchcons(GCG_PRICINGPROB *pricingprob)
Definition: pricingprob.c:260
SCIP_EXPORT SCIP_RETCODE GCGpricingprobCreate(SCIP *scip, GCG_PRICINGPROB **pricingprob, SCIP *pricingscip, int probnr, int nroundscol)
Definition: pricingprob.c:51
type definitions for storing cols in a col pool
SCIP_EXPORT void GCGpricingjobSetLowerbound(GCG_PRICINGJOB *pricingjob, SCIP_Real lowerbound)
SCIP_EXPORT void GCGpricingprobExitPricing(GCG_PRICINGPROB *pricingprob, int nroundscol)
Definition: pricingprob.c:107
type definitions for pricing job data structure