Scippy

SCIP

Solving Constraint Integer Programs

main.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file Coloring/src/main.c
17  * @brief Main file for C compilation
18  * @author Gerald Gamrath
19  */
20 
21 /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 
24 #include "reader_col.h"
25 #include "scip/scip.h"
26 #include "scip/scipdefplugins.h"
27 #include "scip/scipshell.h"
28 #include "branch_coloring.h"
29 #include "coloringplugins.h"
30 
31 static
33  int argc, /**< number of shell parameters */
34  char** argv, /**< array with shell parameters */
35  const char* defaultsetname /**< name of default settings file */
36  )
37 {
38  SCIP* scip = NULL;
39 
40  /*********
41  * Setup *
42  *********/
43 
44  /* initialize SCIP */
45  SCIP_CALL( SCIPcreate(&scip) );
46 
47  /* include coloring plugins */
49 
50  /* we explicitly enable the use of a debug solution for this main SCIP instance */
51  SCIPenableDebugSol(scip);
52 
53  /**********************************
54  * Process command line arguments *
55  **********************************/
56 
57  SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) );
58 
59 
60  /********************
61  * Deinitialization *
62  ********************/
63 
64  SCIP_CALL( SCIPfree(&scip) );
65 
67 
68  return SCIP_OKAY;
69 }
70 
71 
72 int
74  int argc,
75  char** argv
76  )
77 {
78  SCIP_RETCODE retcode;
79 
80  retcode = SCIPrunColoringShell(argc, argv, "scip.set");
81 
82  if( retcode != SCIP_OKAY )
83  {
84  SCIPprintError(retcode);
85  return -1;
86  }
87 
88  return 0;
89 }
void SCIPprintError(SCIP_RETCODE retcode)
Definition: scip_general.c:211
#define BMScheckEmptyMemory()
Definition: memory.h:147
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPincludeColoringPlugins(SCIP *scip)
file reader for vertex coloring instances
SCIP_RETCODE SCIPcreate(SCIP **scip)
Definition: scip_general.c:283
SCIP command line interface.
default branching rule for the vertex coloring problem
void SCIPenableDebugSol(SCIP *scip)
Definition: scip_debug.c:48
#define NULL
Definition: lpi_spx1.cpp:155
#define SCIP_CALL(x)
Definition: def.h:370
static SCIP_RETCODE SCIPrunColoringShell(int argc, char **argv, const char *defaultsetname)
Definition: main.c:32
SCIP_RETCODE SCIPprocessShellArguments(SCIP *scip, int argc, char **argv, const char *defaultsetname)
Definition: scipshell.c:148
SCIP_RETCODE SCIPfree(SCIP **scip)
Definition: scip_general.c:315
int main(int argc, char **argv)
Definition: main.c:53
default SCIP plugins
SCIP callable library.
SCIP plugins for coloring.