Scippy

GCG

Branch-and-Price & Column Generation for Everyone

rowgraph.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 rowgraph.h
30 * @brief A row graph where each row is a node and rows are adjacent if they share a variable
31 * @author Martin Bergner
32 * @author Annika Thome
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef GCG_ROWGRAPH_H_
38#define GCG_ROWGRAPH_H_
39
40#include "graph/graph.h"
42#include "graph/matrixgraph.h"
43
44namespace gcg {
45template <class T>
46class RowGraph : public gcg::MatrixGraph<T>
47{
48protected:
50
51public:
53 GCG* gcg, /**< GCG data structure */
54 Weights w /**< weights for the given graph */
55 );
56 virtual ~RowGraph();
57
59 GCG_DECOMP** decomp /**< decomposition structure to generate */
60 );
61
62 /** amplifies a partialdec by dint of a graph created with open constraints and open variables of the partialdec */
64 PARTIALDECOMP* oldpartialdec, /**< partialdec which should be amplifies */
65 PARTIALDECOMP** firstpartialdec, /**< pointer to buffer the new partialdec amplified by dint of the graph (can be NULL) */
66 PARTIALDECOMP** secondpartialdec, /**< pointer to buffer the new partialdec whose border is amplified by dint of the graph (can be NULL) */
67 DETPROBDATA* detprobdata /**< datprobdata the partialdecs correspond to */
68 );
69
71 SCIP_CONS** conss, /**< constraints for which graph should be created */
72 SCIP_VAR** vars, /**< variables for which graph should be created */
73 int nconss_, /**< number of constraints */
74 int nvars_ /**< number of variables */
75 );
76};
77
78} /* namespace gcg */
79#endif /* GCG_ROWGRAPH_H_ */
class to manage partial decompositions
RowGraph(GCG *gcg, Weights w)
Definition: rowgraph_def.h:47
virtual SCIP_RETCODE createPartialdecFromPartition(PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata)
Definition: rowgraph_def.h:134
gcg::Graph< T > graph
Definition: rowgraph.h:49
virtual ~RowGraph()
Definition: rowgraph_def.h:57
virtual SCIP_RETCODE createFromMatrix(SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_)
Definition: rowgraph_def.h:252
virtual SCIP_RETCODE createDecompFromPartition(GCG_DECOMP **decomp)
Definition: rowgraph_def.h:63
miscellaneous graph methods for structure detection
miscellaneous matrixgraph methods for structure detection
Definition: struct_gcg.h:55
enum SCIP_Retcode SCIP_RETCODE