GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
pub_branchgcg.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 pub_branchgcg.h
30 * @ingroup PUBLICCOREAPI
31 * @brief public methods for branching rules in GCG projects
32 * @author Erik Muehmer
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef GCG_PUB_BRANCHGCG_H_
38#define GCG_PUB_BRANCHGCG_H_
39
40#include "gcg/type_branchgcg.h"
41#include "scip/scip.h"
42#include "gcg/def.h"
43#include "gcg/type_gcg.h"
44
45#ifdef NDEBUG
47#endif
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53/** creates an extended master cons for a cons created by a branch rule */
56 GCG* gcg, /**< GCG data structure */
57 GCG_BRANCHRULE* branchrule, /**< GCG branch rule */
58 GCG_EXTENDEDMASTERCONSDATA** extendedmasterconsdata, /**< pointer to store the extended master cons data */
59 SCIP_CONS* cons, /**< constraint in the master problem that represents the extended master cons */
60 GCG_PRICINGMODIFICATION** pricingmodifications, /**< pricing modifications for the extended master cons */
61 int npricingmodifications, /**< number of pricing modifications for the extended master cons */
62 GCG_BRANCHDATA* branchdata /**< any data that might be required to calculate the coefficient of a column solution */
63 );
64
65/** calculate the coefficient of a column solution in the extended master cons */
68 GCG* gcg, /**< GCG data structure */
69 GCG_EXTENDEDMASTERCONSDATA* extendedmasterconsdata, /**< extended master cons data */
70 SCIP_VAR** solvars, /**< array of column solution variables */
71 SCIP_Real* solvals, /**< array of column solution values */
72 int nsolvars, /**< number of column solution variables and values */
73 int probnr, /**< the pricing problem that the column belongs to */
74 GCG_COL* gcgcol, /**< gcg column if available (or NULL) */
75 SCIP_Real* coeff /**< pointer to store the coefficient */
76 );
77
78/** frees the branch data stored in the extened master cons data */
81 GCG* gcg, /**< GCG data structure */
82 GCG_EXTENDEDMASTERCONSDATA** extendedmasterconsdata /**< extended master cons data */
83 );
84
85#ifdef NDEBUG
86#define GCGbranchGetScipBranchrule(gcgbranchrule) ((gcgbranchrule)->branchrule)
87#else
88/** returns the pointer to the SCIP_BRNACHRULE object */
91 GCG_BRANCHRULE* branchrule
92 );
93#endif
94
95#ifdef NDEBUG
96#define GCGbranchGetScipBranchruledata(gcgbranchrule) (SCIPbranchruleGetData((gcgbranchrule)->branchrule))
97#else
98/** returns the pointer to the SCIP_BRNACHRULEDATA object */
101 GCG_BRANCHRULE* branchrule
102 );
103#endif
104
105#ifdef __cplusplus
106}
107#endif
108
109#endif
SCIP_BRANCHRULEDATA * GCGbranchGetScipBranchruledata(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:113
SCIP_RETCODE GCGbranchFreeExtendedmasterconsBranchData(GCG *gcg, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata)
Definition branchgcg.c:83
SCIP_RETCODE GCGbranchCreateExtendedmastercons(GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_EXTENDEDMASTERCONSDATA **extendedmasterconsdata, SCIP_CONS *cons, GCG_PRICINGMODIFICATION **pricingmodifications, int npricingmodifications, GCG_BRANCHDATA *branchdata)
Definition branchgcg.c:41
SCIP_BRANCHRULE * GCGbranchGetScipBranchrule(GCG_BRANCHRULE *branchrule)
Definition branchgcg.c:102
SCIP_RETCODE GCGbranchGetExtendedmasterconsCoeff(GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *extendedmasterconsdata, SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, int probnr, GCG_COL *gcgcol, SCIP_Real *coeff)
Definition branchgcg.c:61
common defines and data types used in all packages of GCG
#define GCG_EXPORT
Definition def.h:59
#define SCIP_Real
data structures for branching rules
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
type definitions for branching rules in GCG projects
struct GCG_BranchData GCG_BRANCHDATA
struct GCG_Branchrule GCG_BRANCHRULE
struct SCIP_Cons SCIP_CONS
struct GCG_ExtendedMasterConsData GCG_EXTENDEDMASTERCONSDATA
struct GCG_PricingModification GCG_PRICINGMODIFICATION
struct Gcg GCG
Definition type_gcg.h:44
struct GCG_Col GCG_COL
Definition type_gcgcol.h:44
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Var SCIP_VAR