Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg_general.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Colum 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 gcg_general.c
29  * @brief gcg general public methods
30  * @author Steffan Schlein
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "gcg_general.h"
36 
37 #include "gcggithash.h"
38 
39 #include "scip/pub_message.h"
40 #include "scip/scip_message.h"
41 
42 
43 /** Gets GCG major version
44  * @returns GCG major version */
45 static
46 int GCGmajorVersion(void)
47 {
48  return GCG_VERSION/100;
49 }
50 
51 /** Gets GCG minor version
52  * @returns GCG minor version */
53 static
54 int GCGminorVersion(void)
55 {
56  return (GCG_VERSION/10) % 10; /*lint !e778*/
57 }
58 
59 /** Gets GCG technical version
60  * @returns GCG technical version */
61 static
62 int GCGtechVersion(void)
63 {
64  return GCG_VERSION % 10; /*lint !e778*/
65 }
66 #if GCG_SUBVERSION > 0
67 /** Gets GCG sub version number
68  * @returns GCG sub version number */
69 static
70 int GCGsubversion(void)
71 {
72  return GCG_SUBVERSION;
73 }
74 #endif
75 
76 /** prints out GCG version
77  * @returns nothing */
79  SCIP* scip, /**< SCIP data structure */
80  FILE* file /**< output file (or NULL for standard output) */
81  )
82 {
83  assert(scip != NULL);
84 
85  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "GCG version %d.%d.%d",
87 #if GCG_SUBVERSION > 0
88  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, ".%d", GCGsubversion());
89 #endif
90  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, " [GitHash: %s]", GCGgetGitHash());
91  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "\n");
92  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "Copyright (C) 2010-2021 Operations Research, RWTH Aachen University\n");
93  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, " Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)\n\n");
94 }
#define GCG_SUBVERSION
Definition: def.h:39
void GCGprintVersion(SCIP *scip, FILE *file)
Definition: gcg_general.c:78
#define GCG_VERSION
Definition: def.h:38
static int GCGtechVersion(void)
Definition: gcg_general.c:62
git hash methods
gcg general public methods
const char * GCGgetGitHash(void)
Definition: gcggithash.c:41
static int GCGminorVersion(void)
Definition: gcg_general.c:54
static int GCGmajorVersion(void)
Definition: gcg_general.c:46