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 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 gcg_general.c
30 * @brief gcg general public methods
31 * @author Steffan Schlein
32 */
33
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35
36#include "gcg/gcg_general.h"
37#include "pub_gcg.h"
38#include "gcg/gcggithash.h"
39
40#include "scip/pub_message.h"
41#include "scip/scip_message.h"
42
43
44/** returns complete GCG version number in the format "major . minor tech"
45 *
46 * @return complete GCG version
47 */
49 void
50 )
51{
52 return (SCIP_Real)(GCG_VERSION)/100.0;
53}
54
55/** returns GCG major version
56 *
57 * @return major GCG version
58 */
60 void
61 )
62{
63 return GCG_VERSION/100;
64}
65
66/** returns GCG minor version
67 *
68 * @return minor GCG version
69 */
71 void
72 )
73{
74 return (GCG_VERSION/10) % 10;
75}
76
77/** returns GCG technical version
78 *
79 * @return technical GCG version
80 */
82 void
83 )
84{
85 return GCG_VERSION % 10;
86}
87
88/** returns GCG sub version number
89 *
90 * @return subversion GCG version
91 */
93 void
94 )
95{
96 return GCG_SUBVERSION;
97}
98
99/** prints out GCG version
100 */
102 GCG* gcg, /**< GCG data structure */
103 FILE* file /**< output file (or NULL for standard output) */
104 )
105{
106 SCIP* scip;
107 assert(gcg != NULL);
109
110 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "GCG version %d.%d.%d",
112#if GCG_SUBVERSION > 0
114#endif
115 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, " [GitHash: %s]", GCGgetGitHash());
117 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "Copyright (C) 2010-2026 Operations Research, RWTH Aachen University\n");
118 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, " Zuse Institute Berlin (ZIB)\n\n");
119}
#define GCG_SUBVERSION
Definition: def.h:64
#define GCG_VERSION
Definition: def.h:63
#define SCIP_Real
int GCGminorVersion(void)
Definition: gcg_general.c:70
SCIP_Real GCGversion(void)
Definition: gcg_general.c:48
int GCGmajorVersion(void)
Definition: gcg_general.c:59
int GCGtechVersion(void)
Definition: gcg_general.c:81
void GCGprintVersion(GCG *gcg, FILE *file)
Definition: gcg_general.c:101
int GCGsubversion(void)
Definition: gcg_general.c:92
gcg general public methods
const char * GCGgetGitHash(void)
Definition: gcggithash.c:42
git hash methods
SCIP * GCGgetOrigprob(GCG *gcg)
Definition: gcg.cpp:87
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
#define NULL
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
public methods for working with gcg structure
Definition: struct_gcg.h:55