Scippy

GCG

Branch-and-Price & Column Generation for Everyone

disp_master.c
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 disp_master.c
29  * @ingroup DISPLAYS
30  * @brief master display columns
31  * @author Gerald Gamrath
32  * @author Christian Puchert
33  * @author Martin Bergner
34  */
35 
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 
38 #include <assert.h>
39 #include <string.h>
40 
41 #include "disp_master.h"
42 #include "scip/disp_default.h"
43 #include "gcg.h"
44 
45 #define DISP_NAME_ORIGINAL "original"
46 #define DISP_DESC_ORIGINAL "display column printing a display line of the original SCIP instance"
47 #define DISP_HEAD_ORIGINAL ""
48 #define DISP_WIDT_ORIGINAL 5
49 #define DISP_PRIO_ORIGINAL 80000
50 #define DISP_POSI_ORIGINAL 3550
51 #define DISP_STRI_ORIGINAL TRUE
52 
53 /*
54  * Callback methods
55  */
56 
57 /** copy method for display plugins (called when SCIP copies plugins) */
58 static
59 SCIP_DECL_DISPCOPY(dispCopyMaster)
60 { /*lint --e{715}*/
61  assert(scip != NULL);
62  assert(disp != NULL);
63 
64  /* call inclusion method of default SCIP display plugin */
65  SCIP_CALL( SCIPincludeDispDefault(scip) );
66 
67  return SCIP_OKAY;
68 }
69 
70 /** output method of display column to output file stream 'file' printing a display column of the original SCIP instance */
71 static
72 SCIP_DECL_DISPOUTPUT(SCIPdispOutputOriginal)
73 { /*lint --e{715}*/
74  assert(disp != NULL);
75  assert(strcmp(SCIPdispGetName(disp), DISP_NAME_ORIGINAL) == 0);
76  assert(scip != NULL);
77 
78  SCIP_CALL( SCIPprintDisplayLine(GCGgetOriginalprob(scip), file, SCIP_VERBLEVEL_HIGH, FALSE) );
79 
80  return SCIP_OKAY;
81 }
82 
83 
84 /*
85  * default display columns specific interface methods
86  */
87 
88 /** includes the default display columns in SCIP */
89 SCIP_RETCODE SCIPincludeDispMaster(
90  SCIP* scip /**< SCIP data structure */
91  )
92 {
93  SCIP_CALL( SCIPincludeDisp(scip, DISP_NAME_ORIGINAL, DISP_DESC_ORIGINAL, DISP_HEAD_ORIGINAL,
94  SCIP_DISPSTATUS_AUTO, dispCopyMaster, NULL, NULL, NULL, NULL, NULL, SCIPdispOutputOriginal, NULL,
96 
97  return SCIP_OKAY;
98 }
#define DISP_NAME_ORIGINAL
Definition: disp_master.c:45
SCIP * GCGgetOriginalprob(SCIP *masterprob)
Definition: relax_gcg.c:3883
#define DISP_STRI_ORIGINAL
Definition: disp_master.c:51
GCG interface methods.
#define DISP_POSI_ORIGINAL
Definition: disp_master.c:50
static SCIP_DECL_DISPOUTPUT(SCIPdispOutputOriginal)
Definition: disp_master.c:72
#define DISP_PRIO_ORIGINAL
Definition: disp_master.c:49
#define DISP_HEAD_ORIGINAL
Definition: disp_master.c:47
static SCIP_DECL_DISPCOPY(dispCopyMaster)
Definition: disp_master.c:59
master display columns
SCIP_RETCODE SCIPincludeDispMaster(SCIP *scip)
Definition: disp_master.c:89
#define DISP_DESC_ORIGINAL
Definition: disp_master.c:46
#define DISP_WIDT_ORIGINAL
Definition: disp_master.c:48