Scippy

SCIP

Solving Constraint Integer Programs

src/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-2020 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 scip/src/main.c
17  * @ingroup OTHER_CFILES
18  * @brief main file for C compilation
19  * @author Tobias Achterberg
20  */
21 
22 /* global todos: */
23 
24 /**@todo pricing for pseudo solutions */
25 /**@todo unboundness detection in presolving -> convert problem into feasibility problem to decide
26  * unboundness/infeasibility */
27 /**@todo variable event PSSOLCHANGED, update pseudo activities in constraints to speed up checking of pseudo solutions */
28 /**@todo branching rule acting as a filter by temporary changing the branching priority of variables and returning
29  * SCIP_DIDNOTFIND to let the next branching rule select the branching variable */
30 /**@todo try to not use the first but the shortest constraint as reason for a deduction */
31 
32 /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #include <stdio.h>
35 #include <signal.h>
36 
37 #include "scip/scip.h"
38 #include "scip/scipshell.h"
39 #include "scip/interrupt.h"
40 
41 /** callback function for handling signals */ /*lint -e715*/
42 static
44  int signum /**< signal code */
45  )
46 { /*lint --e{715}*/
48 }
49 
50 /** main method starting SCIP */
51 int main(
52  int argc, /**< number of arguments from the shell */
53  char** argv /**< array of shell arguments */
54  )
55 {
56  SCIP_RETCODE retcode;
57 
58  (void)signal(SIGTERM, handleSigterm);
59  /* run interactive shell */
60  retcode = SCIPrunShell(argc, argv, "scip.set");
61 
62  /* evaluate retrun code of the SCIP process */
63  if( retcode != SCIP_OKAY )
64  {
65  /* write error back trace */
66  SCIPprintError(retcode);
67  return -1;
68  }
69 
70  return 0;
71 }
void SCIPprintError(SCIP_RETCODE retcode)
Definition: scip_general.c:211
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP command line interface.
SCIP_RETCODE SCIPrunShell(int argc, char **argv, const char *defaultsetname)
Definition: scipshell.c:427
methods for catching the user CTRL-C interrupt
static void handleSigterm(int signum)
Definition: main.c:43
void SCIPtryTerminate(void)
Definition: interrupt.c:170
int main(int argc, char **argv)
Definition: main.c:51
SCIP callable library.