Scippy

SCIP

Solving Constraint Integer Programs

cmain.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-2022 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 STP/src/cmain.c
17  * @brief Main file for SCIP-Jack
18  * @author Gerald Gamrath
19  * @author Daniel Rehfeldt
20  *
21  * This the file contains the \ref main() main function of the projects. This includes all the default plugins of
22  * \SCIP and the once which belong to that projects. After that is starts the interactive shell of \SCIP or processes
23  * the shell arguments if given.
24  */
25 #include <stdio.h>
26 
27 #include "scip/scip.h"
28 #include "scip/scipshell.h"
29 #include "scip/scipdefplugins.h"
30 
31 #include "relax_stp.h"
32 #include "relax_stpenum.h"
33 #include "relax_stpdp.h"
34 #include "reader_stp.h"
35 #include "reader_gr.h"
36 #include "cons_stp.h"
37 #include "cons_stpcomponents.h"
38 #include "heur_tm.h"
39 #include "heur_local.h"
40 #include "heur_prune.h"
41 #include "heur_ascendprune.h"
42 #include "heur_slackprune.h"
43 #include "heur_lurkprune.h"
44 #include "heur_rec.h"
45 #include "pricer_stp.h"
46 #include "event_bestsol.h"
47 #include "probdata_stp.h"
48 #include "dialog_stp.h"
49 #include "prop_stp.h"
50 #include "branch_stp.h"
51 
52 /** creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately,
53  * and frees the SCIP instance
54  */
55 static
57  int argc, /**< number of shell parameters */
58  char** argv, /**< array containing shell parameters */
59  const char* defaultsetname /**< name of default settings file */
60  )
61 {
62  SCIP* scip = NULL;
63 
64  /*********
65  * Setup *
66  *********/
67 
68  /* initialize SCIP */
69  SCIP_CALL( SCIPcreate(&scip) );
70 
71  /* we explicitly enable the use of a debug solution for this main SCIP instance */
72  SCIPenableDebugSol(scip);
73 
75 
78 
80 
82 
84 
86 
88 
90 
92 
94 
96 
98 
100 
102 
104 
106 
107  /* include event handler for printing primal solution development */
109 
111 
112  SCIP_CALL( SCIPincludePropStp(scip) );
113 
114  /* set hard-coded default parameters */
116 
117  /**********************************
118  * Process command line arguments *
119  **********************************/
120  SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) );
121 
122  /********************
123  * Deinitialization *
124  ********************/
125 
126  SCIP_CALL( SCIPfree(&scip) );
127 
129 
130  return SCIP_OKAY;
131 }
132 
133 int
135  int argc, /**< number of shell parameters */
136  char** argv /**< array containing shell parameters */
137  )
138 {
139  SCIP_RETCODE retcode;
140 
141  retcode = runShell(argc, argv, "scip.set");
142  if( retcode != SCIP_OKAY )
143  {
144  SCIPprintError(retcode);
145  return -1;
146  }
147 
148  return 0;
149 }
Steiner tree relaxator.
stp variable pricer
#define BMScheckEmptyMemory()
Definition: memory.h:148
eventhdlr for best solution found
SCIP_RETCODE SCIPincludePricerStp(SCIP *scip)
Definition: pricer_stp.c:370
Constraint handler for Steiner problems.
SCIP_RETCODE SCIPStpIncludeHeurTM(SCIP *scip)
Definition: heur_tm.c:3711
SCIP_RETCODE SCIPStpIncludeHeurLocal(SCIP *scip)
Definition: heur_local.c:4353
dual-ascent and reduction based primal heuristic for Steiner problems
SCIP_RETCODE SCIPincludeBranchruleStp(SCIP *scip)
Definition: branch_stp.c:1129
reduction and dual-cost based primal heuristic for Steiner problems
Problem data for stp problem.
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPStpIncludeHeurRec(SCIP *scip)
Definition: heur_rec.c:2161
Steiner tree problem file reader.
SCIP_RETCODE SCIPcreate(SCIP **scip)
Definition: scip_general.c:283
int main(int argc, char **argv)
Definition: cmain.c:102
Components constraint handler for Steiner problems.
SCIP_RETCODE SCIPStpIncludeHeurPrune(SCIP *scip)
Definition: heur_prune.c:951
SCIP_RETCODE SCIPincludeRelaxStpenum(SCIP *scip)
SCIP command line interface.
SCIP_RETCODE SCIPincludeReaderStp(SCIP *scip)
Definition: reader_stp.c:257
SCIP_RETCODE SCIPincludeConshdlrStp(SCIP *scip)
Definition: cons_stp.c:1051
stp user interface dialog
#define NULL
Definition: lpi_spx1.cpp:155
Steiner tree enumeration relaxator.
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_RETCODE SCIPStpIncludeHeurLurkPrune(SCIP *scip)
Improvement heuristic for Steiner problems.
reduction-based primal heuristic for Steiner problems
SCIP_RETCODE SCIPincludePropStp(SCIP *scip)
Definition: prop_stp.c:2610
propagator for Steiner tree problems, using the LP reduced costs
SCIP_RETCODE SCIPprobdataSetDefaultParams(SCIP *scip)
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
SCIP_RETCODE SCIPincludeRelaxStp(SCIP *scip)
Definition: relax_stp.c:332
SCIP_RETCODE SCIPincludeDialogStp(SCIP *scip)
Definition: dialog_stp.c:48
SCIP_RETCODE SCIPStpIncludeHeurAscendPrune(SCIP *scip)
Steiner tree problem file reader.
SCIP_RETCODE SCIPprocessShellArguments(SCIP *scip, int argc, char **argv, const char *defaultsetname)
Definition: scipshell.c:217
Steiner vertex branching rule.
SCIP_RETCODE SCIPincludeRelaxStpdp(SCIP *scip)
Definition: relax_stpdp.c:307
Primal recombination heuristic for Steiner problems.
static SCIP_RETCODE runShell(int argc, char **argv, const char *defaultsetname)
Definition: cmain.c:56
shortest paths based primal heuristics for Steiner problems
reduction based primal heuristic for Steiner problems
SCIP_RETCODE SCIPStpIncludeHeurSlackPrune(SCIP *scip)
SCIP_RETCODE SCIPincludeEventHdlrBestsol(SCIP *scip)
void SCIPprintError(SCIP_RETCODE retcode)
Definition: scip_general.c:211
SCIP_RETCODE SCIPincludeReaderGr(SCIP *scip)
Definition: reader_gr.c:100
default SCIP plugins
Steiner tree dynamic programming relaxator.
SCIP_RETCODE SCIPincludeConshdlrStpcomponents(SCIP *scip)
SCIP callable library.
SCIP_RETCODE SCIPfree(SCIP **scip)
Definition: scip_general.c:315
void SCIPenableDebugSol(SCIP *scip)
Definition: scip_debug.c:48