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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file main.c
26 * @brief main file for the Pseudo-Boolean solver application
27 * @author Alexander Hoen
28 * @author Gioni Mexi
29 * @author Dominik Kamp
30 *
31 * @todo Add absolute feasibility tolerance parameter to enforce exact feasibility.
32 * @todo Add separate integrality tolerance parameter to enforce exact integrality.
33 */
34
35/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#include <stdio.h>
38#include <string.h>
39#include <time.h>
40#include "scip/scipdefplugins.h"
41#include "scip/scipshell.h"
42#include "message_pb.h"
43#include "event_bestsol.h"
44
45#define SETOBJ FALSE /**< insert objective function if no exists */
46#define HEURISTICS_OFF FALSE /**< turn off heuristics */
47#define MAXINTSIZE 47 /**< maximal intsize accepted in problem instance */
48#define MAXMEMUSAGE 0.9 /**< maximal memory usage relative to given memory limit */
49#define POSTTIME 3.0 /**< time in seconds saved in the end to display solution and free everything */
50
51
52/** sets parameters for pure satisfiability problems */
53static
55 SCIP* scip /**< SCIP data structure */
56 )
57{
58 /* TODO: set parameters */
59 return SCIP_OKAY;
60}
61
62/** sets parameters for maximum satisfiability instances */
63static
65 SCIP* scip /**< SCIP data structure */
66 )
67{
68 /* TODO: set parameters */
69 return SCIP_OKAY;
70}
71
72/** run SCIP from command line */
73static
75 SCIP* scip, /**< SCIP data structure */
76 const char* settingsfilename, /**< settings file name */
77 const char* problemfilename, /**< problem file name */
78 SCIP_Real timelimit, /**< required time limit */
79 clock_t startclock /**< clock at which the process started */
80 )
81{
82 SCIP_RETCODE retcode;
83 SCIP_VAR** vars;
84 SCIP_CONS** conshdlrconss;
85 SCIP_CONSHDLR* conshdlr;
86 SCIP_Bool hasobj;
87 SCIP_Bool hasindicator;
88 SCIP_Bool puresat;
89 char* filenamecopy;
90 char* extension;
91 int nvars;
92 int nconshdlrconss;
93 int npuresatconss;
94 int v;
95 int c;
96
97 /***********************
98 * Settings Definition *
99 ***********************/
100
101 /* read parameter settings */
102 if( settingsfilename != NULL )
103 {
104 SCIP_CALL( SCIPreadParams(scip, settingsfilename) );
105 }
106
107 /* define time limit */
108 if( timelimit >= 0.0 )
109 {
110 /* get starting time and reserve finishing time */
111 timelimit -= (SCIP_Real)(clock() - startclock) / (SCIP_Real)CLOCKS_PER_SEC + POSTTIME;
112
113 /* stop immediately if time exceeded */
114 if( timelimit < 0.0 )
115 return SCIP_INVALIDCALL;
116
117 /* set time limit */
118 SCIP_CALL( SCIPsetRealParam(scip, "limits/time", timelimit) );
119 }
120
121 /* add reading time */
122 SCIP_CALL( SCIPsetBoolParam(scip, "timing/reading", TRUE) );
123
124 /* set intsize limit */
125 SCIP_CALL( SCIPsetIntParam(scip, "reading/opbreader/maxintsize", MAXINTSIZE) );
126
127 /********************
128 * Problem Creation *
129 ********************/
130
131 /* read pseudoboolean problem */
132 SCIPinfoMessage(scip, NULL, "reading problem <%s>\n", problemfilename);
133 SCIP_CALL( SCIPduplicateBufferArray(scip, &filenamecopy, problemfilename, (int)strlen(problemfilename) + 1) );
134 SCIPsplitFilename(filenamecopy, NULL, NULL, &extension, NULL);
135 if( strcmp(extension, "opb") == 0 || strcmp(extension, "wbo") == 0 )
136 retcode = SCIPreadProb(scip, problemfilename, extension);
137 else
138 retcode = SCIP_INVALIDDATA;
139 SCIPfreeBufferArray(scip, &filenamecopy);
140
141 /* declare unsupported problem */
142 if( retcode == SCIP_INVALIDDATA )
143 {
145 return SCIP_OKAY;
146 }
147
148 /* detect unexpected error */
149 SCIP_CALL( retcode );
150 SCIPinfoMessage(scip, NULL, "problem read in %.3lf seconds\n", SCIPgetReadingTime(scip));
151
152 /*******************
153 * Problem Solving *
154 *******************/
155
156 vars = SCIPgetOrigVars(scip);
157 nvars = SCIPgetNOrigVars(scip);
158 assert(vars != NULL || nvars == 0);
159 hasobj = FALSE;
160 for( v = 0; v < nvars; ++v )
161 {
162 if( !SCIPisZero(scip, SCIPvarGetObj(vars[v])) )
163 {
164 hasobj = TRUE;
165 break;
166 }
167 }
168
169 /* detect soft constraints */
170 conshdlr = SCIPfindConshdlr(scip, "pseudoboolean");
171 conshdlrconss = SCIPconshdlrGetConss(conshdlr);
172 nconshdlrconss = SCIPconshdlrGetNConss(conshdlr);
173 assert(conshdlrconss != NULL || nconshdlrconss == 0);
174 hasindicator = FALSE;
175 for( c = 0; c < nconshdlrconss; ++c )
176 {
177 if( SCIPgetIndVarPseudoboolean(scip, conshdlrconss[c]) != NULL )
178 {
179 hasindicator = TRUE;
180 break;
181 }
182 }
183
184 /* create event handler for best solution found if an objective exists */
185 if( hasobj )
186 {
188 {
190 }
191 }
192 else
193 {
194 SCIPinfoMessage(scip, NULL, "problem without objective\n");
195#if SETOBJ
196 /* insert objective function if no exists */
197 for( v = 0; v < nvars; ++v )
198 {
199 /* add objective coefficient if variable will not be fixed up by dual presolver */
200 if( SCIPvarGetNLocksUp(vars[v]) >= 1 )
201 {
202 SCIP_CALL( SCIPchgVarObj(scip, vars[v], 1.0) );
203 }
204 }
205#endif
206 }
207
208 if( hasindicator && settingsfilename == NULL )
209 {
210 /* load settings for maximum SAT */
212 }
213
214 /* start presolving */
216
217#ifdef SCIP_DEBUG
218 SCIP_CALL( SCIPwriteTransProblem(scip, "debug.cip", NULL, FALSE) );
219#endif
220
221 /* count number of constraints represented by or conditions */
222 npuresatconss = 0;
223
224 /* add logicor constraints */
225 conshdlr = SCIPfindConshdlr(scip, "logicor");
226 if( conshdlr != NULL )
227 npuresatconss += SCIPconshdlrGetNCheckConss(conshdlr);
228
229 /* add and constraints as representable by linear amount of logicor constraints */
230 conshdlr = SCIPfindConshdlr(scip, "and");
231 if( conshdlr != NULL )
232 npuresatconss += SCIPconshdlrGetNCheckConss(conshdlr);
233
234 /* add setppc constraints if all are covering */
235 conshdlr = SCIPfindConshdlr(scip, "setppc");
236 if( conshdlr != NULL )
237 {
238 nconshdlrconss = SCIPconshdlrGetNCheckConss(conshdlr);
239 if( npuresatconss + nconshdlrconss == SCIPgetNCheckConss(scip) )
240 {
241 conshdlrconss = SCIPconshdlrGetCheckConss(conshdlr);
242 assert(conshdlrconss != NULL || nconshdlrconss == 0);
243 for( c = 0; c < nconshdlrconss; ++c )
244 {
245 if( SCIPgetTypeSetppc(scip, conshdlrconss[c]) != SCIP_SETPPCTYPE_COVERING )
246 break;
247 }
248 if( c == nconshdlrconss )
249 npuresatconss += nconshdlrconss;
250 }
251 }
252
253 /* determine problem type */
254 puresat = (npuresatconss == SCIPgetNCheckConss(scip));
255 if( puresat )
256 SCIPinfoMessage(scip, NULL, "problem pure SAT\n");
257
258 /* set setting for the branch-and-bound process */
259 if( settingsfilename == NULL )
260 {
261 if( puresat )
262 {
263 /* load settings for pure SAT */
265 }
266
267#if HEURISTICS_OFF
268 /* turn off heuristics */
269 char parametername[SCIP_MAXSTRLEN];
270 SCIP_HEUR** heuristics = SCIPgetHeurs(scip);
271 int nheuristics = SCIPgetNHeurs(scip);
272 int h;
273 assert(heuristics != NULL);
274
275 for( h = 0; h < nheuristics; ++h )
276 {
277 (void)SCIPsnprintf(parametername, SCIP_MAXSTRLEN, "heuristics/%s/freq", SCIPheurGetName(heuristics[h]));
278 SCIP_CALL( SCIPsetIntParam(scip, parametername, -1) );
279 assert(SCIPheurGetFreq(heuristics[h]) == -1);
280 }
281#endif
282 }
283
284 /* write non-default parameters to console */
285 SCIPinfoMessage(scip, NULL, "\n- non default parameters ----------------------------------------------------------------------\n\n");
287 SCIPinfoMessage(scip, NULL, "-----------------------------------------------------------------------------------------------\n");
288
289 /* start solving */
291
292 /* print resulting solution */
294
295 /* print solving statistics */
297
298 return SCIP_OKAY;
299}
300
301/** evaluates command line parameters and runs SCIP appropriately in the given SCIP instance */
302static
304 SCIP* scip, /**< SCIP data structure */
305 int argc, /**< number of shell parameters */
306 char** argv, /**< array with shell parameters */
307 clock_t startclock, /**< clock at which the process started */
308 const char* defaultsetname /**< name of default settings file */
309 )
310{
311 SCIP_MESSAGEHDLR* messagehdlr;
312 SCIP_MESSAGEHDLRDATA* messagehdlrdata;
313 SCIP_Real timelimit = -1.0;
314 SCIP_Bool quiet = FALSE;
315 SCIP_Bool print = FALSE;
317 SCIP_Bool paramerror = FALSE;
318 char* logname = NULL;
319 char* settingsname = NULL;
320 char* problemname = NULL;
321 int i;
322
323 /********************
324 * Parse parameters *
325 ********************/
326
327 for( i = 1; i < argc; ++i )
328 {
329 /* check for a valid flag */
330 if( argv[i][0] == '-' && strlen(argv[i]) == 2 )
331 {
332 switch( argv[i][1] )
333 {
334 /* set quiet flag */
335 case 'q':
336 quiet = TRUE;
337 break;
338 /* set print flag */
339 case 'p':
340 print = TRUE;
341 break;
342 /* get log filename */
343 case 'l':
344 if( ++i < argc )
345 logname = argv[i];
346 else
347 {
348 SCIPerrorMessage("missing log filename after parameter '-l'\n");
349 paramerror = TRUE;
350 }
351 break;
352 /* get settings filename */
353 case 's':
354 if( ++i < argc )
355 settingsname = argv[i];
356 else
357 {
358 SCIPerrorMessage("missing settings filename after parameter '-s'\n");
359 paramerror = TRUE;
360 }
361 break;
362 /* get problem filename */
363 case 'f':
364 if( ++i < argc )
365 problemname = argv[i];
366 else
367 {
368 SCIPerrorMessage("missing problem filename after parameter '-f'\n");
369 paramerror = TRUE;
370 }
371 break;
372 /* set display frequency */
373 case 'd':
374 if( ++i < argc )
375 {
376 SCIP_CALL( SCIPsetIntParam(scip, "display/freq", atoi(argv[i])) );
377 }
378 else
379 {
380 SCIPerrorMessage("missing display frequency after parameter '-d'\n");
381 paramerror = TRUE;
382 }
383 break;
384 /* get time limit */
385 case 't':
386 if( ++i < argc )
387 timelimit = atof(argv[i]);
388 else
389 {
390 SCIPerrorMessage("missing time limit after parameter '-t'\n");
391 paramerror = TRUE;
392 }
393 break;
394 /* set memory limit */
395 case 'm':
396 if( ++i < argc )
397 {
398 SCIP_CALL( SCIPsetRealParam(scip, "limits/memory", atof(argv[i]) * MAXMEMUSAGE) );
399 }
400 else
401 {
402 SCIPerrorMessage("missing memory limit after parameter '-m'\n");
403 paramerror = TRUE;
404 }
405 break;
406 /* batch file input */
407 case 'b':
408 if( ++i < argc )
409 {
410 SCIP_FILE* file;
411
412 file = SCIPfopen(argv[i], "r");
413 if( file == NULL )
414 {
415 SCIPerrorMessage("cannot read command batch file <%s>\n", argv[i]);
416 paramerror = TRUE;
417 }
418 else
419 {
420 while( !SCIPfeof(file) )
421 {
422 char buffer[SCIP_MAXSTRLEN];
423
424 (void)SCIPfgets(buffer, (int) sizeof(buffer), file);
425 if( buffer[0] != '\0' )
426 {
428 }
429 }
430 SCIPfclose(file);
432 }
433 }
434 else
435 {
436 SCIPerrorMessage("missing command batch filename after parameter '-b'\n");
437 paramerror = TRUE;
438 }
439 break;
440 /* command line input */
441 case 'c':
442 if( ++i < argc )
443 {
446 }
447 else
448 {
449 SCIPerrorMessage("missing command line after parameter '-c'\n");
450 paramerror = TRUE;
451 }
452 break;
453 default:
454 SCIPerrorMessage("invalid parameter '%s'\n", argv[i]);
455 paramerror = TRUE;
456 break;
457 }
458 }
459 else
460 {
461 SCIPerrorMessage("invalid parameter '%s'\n", argv[i]);
462 paramerror = TRUE;
463 }
464 }
465 if( !paramerror )
466 {
467 /***********************
468 * Version information *
469 ***********************/
470
471 /* interactive mode if no problem */
472 if( problemname == NULL )
474
475 /* set attributes of message handler */
476 messagehdlr = SCIPgetMessagehdlr(scip);
477 assert(messagehdlr != NULL);
478 messagehdlrdata = SCIPmessagehdlrGetData(messagehdlr);
479 assert(messagehdlrdata != NULL);
482 messagehdlrdata->comment = print == interactive;
483
484 /* print version information */
486 SCIPinfoMessage(scip, NULL, "\n");
488 SCIPinfoMessage(scip, NULL, "\n");
489
490 /*****************
491 * Load defaults *
492 *****************/
493
494 if( defaultsetname != NULL && SCIPfileExists(defaultsetname) )
495 {
496 SCIP_CALL( SCIPreadParams(scip, defaultsetname) );
497 }
498
499 if( !interactive )
500 {
501 /**************
502 * Start SCIP *
503 **************/
504
505 SCIP_CALL( fromCommandLine(scip, settingsname, problemname, timelimit, startclock) );
506 }
507 else
508 {
510 }
511 }
512 else
513 {
514 SCIPinfoMessage(scip, NULL, "syntax: %s [-q] [-p] [-l <logfile>] [-s <settings>] [-f <problem>] [-d <dispfreq>] [-t <timelimit>] [-m <memlimit>] [-b <batchfile> ...] [-c <command> ...]\n", argv[0]);
515
516 SCIPinfoMessage(scip, NULL, " -q : suppress screen messages\n");
517 SCIPinfoMessage(scip, NULL, " -p : toggle print mode\n");
518 SCIPinfoMessage(scip, NULL, " -l <logfile> : copy output into log file\n");
519 SCIPinfoMessage(scip, NULL, " -s <settings> : load settings (.set) file\n");
520 SCIPinfoMessage(scip, NULL, " -f <problem> : solve problem (.opb or .wbo) file\n");
521 SCIPinfoMessage(scip, NULL, " -d <dispfreq> : log display frequency\n");
522 SCIPinfoMessage(scip, NULL, " -t <timelimit> : enforce time limit\n");
523 SCIPinfoMessage(scip, NULL, " -m <memlimit> : enforce memory limit\n");
524 SCIPinfoMessage(scip, NULL, " -b <batchfile> : execute batch file with default messages\n");
525 SCIPinfoMessage(scip, NULL, " -c <command> : execute command line with default messages\n");
526 }
527
528 return SCIP_OKAY;
529}
530
531/** creates a SCIP instance with default plugins, evaluates command line parameters,
532 * runs SCIP appropriately, and frees the SCIP instance
533 */
534static
536 int argc, /**< number of shell parameters */
537 char** argv, /**< array with shell parameters */
538 clock_t startclock, /**< clock at which the process started */
539 const char* defaultsetname /**< name of default settings file */
540 )
541{
542 SCIP_MESSAGEHDLR* messagehdlr = NULL;
543 SCIP* scip = NULL;
544
545 /*********
546 * Setup *
547 *********/
548
549 /* initialize SCIP */
551
552 /* include default plugins */
554
555 /* create own buffered message handler for PB console log */
557
558 /* set PB competition message handler */
559 SCIP_CALL( SCIPsetMessagehdlr(scip, messagehdlr) );
560
561 /**********************************
562 * Process command line arguments *
563 **********************************/
564
565 SCIP_CALL( processShellArguments(scip, argc, argv, startclock, defaultsetname) );
566
567 /* release captured and own message handler */
568 SCIP_CALL( SCIPmessagehdlrRelease(&messagehdlr) );
569
570 /********************
571 * Deinitialization *
572 ********************/
573
576
577 return SCIP_OKAY;
578}
579
580/** main method starting the PBSolver */
582 int argc, /**< number of arguments */
583 char** argv /**< string array with arguments */
584 )
585{
586 SCIP_RETCODE retcode;
587 clock_t startclock, endclock;
588
589 startclock = clock();
590
591 retcode = runShell(argc, argv, startclock, "scip.set");
592
593 endclock = clock();
594
595 if( retcode != SCIP_OKAY )
596 printf("s UNKNOWN\n");
597
598 printf("c Time complete (sec): %10.3lf\n", (double)(endclock - startclock) / (double)CLOCKS_PER_SEC);
599
600 return 0;
601}
SCIP_RETCODE SCIPcreateEventHdlrBestsol(SCIP *scip)
static SCIP_RETCODE runShell(int argc, char **argv, clock_t startclock, const char *defaultsetname)
Definition: main.c:535
#define MAXINTSIZE
Definition: main.c:47
static SCIP_RETCODE fromCommandLine(SCIP *scip, const char *settingsfilename, const char *problemfilename, SCIP_Real timelimit, clock_t startclock)
Definition: main.c:74
static SCIP_RETCODE processShellArguments(SCIP *scip, int argc, char **argv, clock_t startclock, const char *defaultsetname)
Definition: main.c:303
#define POSTTIME
Definition: main.c:49
static SCIP_RETCODE loadSettingsMaxSAT(SCIP *scip)
Definition: main.c:64
static SCIP_RETCODE loadSettingsPureSat(SCIP *scip)
Definition: main.c:54
#define MAXMEMUSAGE
Definition: main.c:48
SCIP_VAR * h
Definition: circlepacking.c:68
#define NULL
Definition: def.h:248
#define SCIP_MAXSTRLEN
Definition: def.h:269
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:156
#define TRUE
Definition: def.h:93
#define FALSE
Definition: def.h:94
#define SCIP_CALL(x)
Definition: def.h:355
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:397
eventhdlr for best solution found
static SCIP_RETCODE interactive(SCIP *scip)
Definition: cmain.c:99
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
Definition: fileio.c:153
int SCIPfeof(SCIP_FILE *stream)
Definition: fileio.c:227
int SCIPfclose(SCIP_FILE *fp)
Definition: fileio.c:232
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
Definition: fileio.c:200
SCIP_VAR * SCIPgetIndVarPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
Definition: cons_setppc.c:9642
@ SCIP_SETPPCTYPE_COVERING
Definition: cons_setppc.h:89
SCIP_Bool SCIPfileExists(const char *filename)
Definition: misc.c:11057
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
Definition: misc.c:11073
SCIP_RETCODE SCIPfree(SCIP **scip)
Definition: scip_general.c:402
SCIP_RETCODE SCIPcreate(SCIP **scip)
Definition: scip_general.c:370
int SCIPgetNCheckConss(SCIP *scip)
Definition: scip_prob.c:3762
SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
Definition: scip_prob.c:2811
int SCIPgetNOrigVars(SCIP *scip)
Definition: scip_prob.c:2838
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip_prob.c:789
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip_prob.c:341
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:208
SCIP_RETCODE SCIPsetMessagehdlr(SCIP *scip, SCIP_MESSAGEHDLR *messagehdlr)
Definition: scip_message.c:64
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
Definition: scip_message.c:88
void SCIPsetMessagehdlrLogfile(SCIP *scip, const char *filename)
Definition: scip_message.c:96
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
Definition: scip_message.c:108
void SCIPprintVersion(SCIP *scip, FILE *file)
Definition: scip_general.c:169
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
Definition: scip_param.c:487
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
Definition: scip_param.c:772
SCIP_RETCODE SCIPwriteParams(SCIP *scip, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
Definition: scip_param.c:813
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
Definition: scip_param.c:429
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
Definition: scip_param.c:603
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4798
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4755
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4778
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
Definition: scip_cons.c:940
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4735
SCIP_RETCODE SCIPstartInteraction(SCIP *scip)
Definition: scip_dialog.c:242
SCIP_RETCODE SCIPaddDialogInputLine(SCIP *scip, const char *inputline)
Definition: scip_dialog.c:192
void SCIPprintExternalCodes(SCIP *scip, FILE *file)
Definition: scip_general.c:825
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
Definition: scip_heur.c:276
int SCIPgetNHeurs(SCIP *scip)
Definition: scip_heur.c:287
int SCIPheurGetFreq(SCIP_HEUR *heur)
Definition: heur.c:1552
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition: heur.c:1467
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:136
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip_mem.h:132
SCIP_RETCODE SCIPpresolve(SCIP *scip)
Definition: scip_solve.c:2449
SCIP_RETCODE SCIPsolve(SCIP *scip)
Definition: scip_solve.c:2635
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetReadingTime(SCIP *scip)
Definition: scip_timing.c:405
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:23900
int SCIPvarGetNLocksUp(SCIP_VAR *var)
Definition: var.c:4462
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_var.c:5372
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10827
#define BMScheckEmptyMemory()
Definition: memory.h:155
SCIP_MESSAGEHDLRDATA * SCIPmessagehdlrGetData(SCIP_MESSAGEHDLR *messagehdlr)
Definition: message.c:887
SCIP_RETCODE SCIPmessagehdlrRelease(SCIP_MESSAGEHDLR **messagehdlr)
Definition: message.c:348
SCIP_RETCODE SCIPprintSolutionPbSolver(SCIP *scip)
Definition: message_pb.c:156
SCIP_RETCODE SCIPcreateMessagehdlrPbSolver(SCIP_MESSAGEHDLR **messagehdlr, SCIP_Bool buffered, const char *filename, SCIP_Bool quiet)
Definition: message_pb.c:106
SCIP_RETCODE SCIPprintUnsupportedPbSolver(SCIP *scip)
Definition: message_pb.c:128
messagehdlr for the Pseudo-Boolean output format
struct SCIP_File SCIP_FILE
Definition: pub_fileio.h:43
#define SCIPerrorMessage
Definition: pub_message.h:64
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
default SCIP plugins
SCIP command line interface.
int main(int argc, char **argv)
Definition: main.c:62
struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
Definition: type_message.h:67
@ SCIP_INVALIDDATA
Definition: type_retcode.h:52
@ SCIP_OKAY
Definition: type_retcode.h:42
@ SCIP_INVALIDCALL
Definition: type_retcode.h:51
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63