GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
pricestore_gcg.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
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-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file pricestore_gcg.h
30 * @brief methods for storing priced cols (based on SCIP's separation storage)
31 * @author Jonas Witt
32 */
33
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35
36#ifndef __GCG_PRICESTORE_H__
37#define __GCG_PRICESTORE_H__
38
39
40#include "scip/def.h"
42#include "scip/type_implics.h"
43#include "scip/type_retcode.h"
44#include "scip/type_set.h"
45#include "scip/type_stat.h"
46#include "scip/type_event.h"
47#include "scip/type_lp.h"
48#include "scip/type_prob.h"
49#include "scip/type_tree.h"
50#include "scip/type_reopt.h"
51#include "scip/type_branch.h"
52
53#include "gcg/pub_colpool.h"
54#include "gcg/pub_gcgcol.h"
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/** creates price storage */
64 GCG* gcg, /**< GCG data structure */
65 GCG_PRICESTORE** pricestore, /**< pointer to store price storage */
66 SCIP_Real redcostfac, /**< factor of -redcost/norm in score function */
67 SCIP_Real objparalfac, /**< factor of objective parallelism in score function */
68 SCIP_Real orthofac, /**< factor of orthogonalities in score function */
69 SCIP_Real mincolorth, /**< minimal orthogonality of columns to add
70 (with respect to columns added in the current round) */
71 GCG_EFFICIACYCHOICE efficiacychoice, /**< choice to base efficiacy on */
72 int hashtablesize /**< size of hashtable */
73 );
74
75/** frees price storage */
78 GCG_PRICESTORE** pricestore /**< pointer to store price storage */
79 );
80
81/** informs price storage, that Farkas pricing starts now */
84 GCG_PRICESTORE* pricestore /**< price storage */
85 );
86
87/** informs price storage, that Farkas pricing is now finished */
90 GCG_PRICESTORE* pricestore /**< price storage */
91 );
92
93/** informs price storage, that the following cols should be used in any case */
96 GCG_PRICESTORE* pricestore /**< price storage */
97 );
98
99/** informs price storage, that the following cols should no longer be used in any case */
102 GCG_PRICESTORE* pricestore /**< price storage */
103 );
104
105/** adds col to price storage;
106 * if the col should be forced to enter the LP, an infinite score has to be used
107 */
110 GCG_PRICESTORE* pricestore, /**< price storage */
111 GCG_COL* col, /**< priced col */
112 SCIP_Bool forcecol, /**< should the col be forced to enter the LP? */
113 SCIP_Bool fromcolpool, /**< is column from colpool */
114 SCIP_Bool* added /**< pointer to var that indicates whether the col was added */
115 );
116
117/** adds cols to priced vars and clears price storage */
120 GCG_PRICESTORE* pricestore, /**< price storage */
121 GCG_COLPOOL* colpool, /**< GCG column pool */
122 SCIP_Bool usecolpool, /**< use column pool? */
123 int* nfoundvars /**< pointer to store number of variables that were added to the problem */
124 );
125
126/** clears the price storage without adding the cols to priced vars */
129 GCG_PRICESTORE* pricestore /**< price storage */
130 );
131
132/** get cols in the price storage */
135 GCG_PRICESTORE* pricestore, /**< price storage */
136 int arrayindex /**< index of the arrays */
137 );
138
139/** get number of cols in the price storage */
142 GCG_PRICESTORE* pricestore, /**< price storage */
143 int arrayindex /**< index of the arrays */
144 );
145
146/** get number of cols in the price storage */
149 GCG_PRICESTORE* pricestore /**< price storage */
150 );
151
152/** get total number of cols found so far */
155 GCG_PRICESTORE* pricestore /**< price storage */
156 );
157
158/** get number of cols found so far in current price round */
161 GCG_PRICESTORE* pricestore /**< price storage */
162 );
163
164/** get total number of cols applied to the LPs */
167 GCG_PRICESTORE* pricestore /**< price storage */
168 );
169
170#ifdef __cplusplus
171}
172#endif
173
174#endif
#define GCG_EXPORT
Definition def.h:59
#define SCIP_Bool
#define SCIP_Real
void GCGpricestoreEndFarkas(GCG_PRICESTORE *pricestore)
SCIP_RETCODE GCGpricestoreApplyCols(GCG_PRICESTORE *pricestore, GCG_COLPOOL *colpool, SCIP_Bool usecolpool, int *nfoundvars)
SCIP_RETCODE GCGpricestoreFree(GCG_PRICESTORE **pricestore)
int GCGpricestoreGetNColsApplied(GCG_PRICESTORE *pricestore)
int GCGpricestoreGetNColsTotal(GCG_PRICESTORE *pricestore)
int GCGpricestoreGetNCols(GCG_PRICESTORE *pricestore, int arrayindex)
void GCGpricestoreEndForceCols(GCG_PRICESTORE *pricestore)
int GCGpricestoreGetNColsFound(GCG_PRICESTORE *pricestore)
void GCGpricestoreStartFarkas(GCG_PRICESTORE *pricestore)
int GCGpricestoreGetNColsFoundRound(GCG_PRICESTORE *pricestore)
SCIP_RETCODE GCGpricestoreAddCol(GCG_PRICESTORE *pricestore, GCG_COL *col, SCIP_Bool forcecol, SCIP_Bool fromcolpool, SCIP_Bool *added)
GCG_COL ** GCGpricestoreGetCols(GCG_PRICESTORE *pricestore, int arrayindex)
void GCGpricestoreStartForceCols(GCG_PRICESTORE *pricestore)
SCIP_RETCODE GCGpricestoreClearCols(GCG_PRICESTORE *pricestore)
SCIP_RETCODE GCGpricestoreCreate(GCG *gcg, GCG_PRICESTORE **pricestore, SCIP_Real efficiacyfac, SCIP_Real objparalfac, SCIP_Real orthofac, SCIP_Real mincolorth, GCG_EFFICIACYCHOICE efficiacychoice, int hashtablesize)
public methods for storing cols in a col pool
public methods for working with gcg columns
struct GCG_Colpool GCG_COLPOOL
struct Gcg GCG
Definition type_gcg.h:44
struct GCG_Col GCG_COL
Definition type_gcgcol.h:44
type definitions for storing priced cols
enum GCG_Efficiacychoice GCG_EFFICIACYCHOICE
struct GCG_PriceStore GCG_PRICESTORE
enum SCIP_Retcode SCIP_RETCODE