SCIP

    Solving Constraint Integer Programs

    scipshell.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-2026 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 scipshell.c
    26 * @ingroup OTHER_CFILES
    27 * @brief SCIP command line interface
    28 * @author Tobias Achterberg
    29 */
    30
    31/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#include <stdio.h>
    34#include <string.h>
    35#include <ctype.h>
    36
    37#include "scip/scip.h"
    38#include "scip/scipdefplugins.h"
    39#include "scip/scipshell.h"
    41#include "scip/reader_nl.h"
    42#include "scip/rational.h"
    43
    44/*
    45 * Message Handler
    46 */
    47
    48static
    50 SCIP* scip, /**< SCIP data structure */
    51 const char* filename /**< parameter file name */
    52 )
    53{
    54 if( SCIPfileExists(filename) )
    55 {
    56 SCIPinfoMessage(scip, NULL, "reading user parameter file <%s>\n", filename);
    57 SCIP_CALL( SCIPreadParams(scip, filename) );
    58 }
    59 else
    60 SCIPinfoMessage(scip, NULL, "user parameter file <%s> not found - using default parameters\n", filename);
    61
    62 return SCIP_OKAY;
    63}
    64
    65static
    67 SCIP* scip, /**< SCIP data structure */
    68 const char* filename, /**< input file name */
    69 SCIP_Bool useconcurrent /**< should we use concurrent solving? */
    70 )
    71{
    72 SCIP_RETCODE retcode;
    73 SCIP_Bool outputorigsol = FALSE;
    74
    75 /********************
    76 * Problem Creation *
    77 ********************/
    78
    79 /** @note The message handler should be only fed line by line such the message has the chance to add string in front
    80 * of each message
    81 */
    83 SCIPinfoMessage(scip, NULL, "read problem <%s>\n", filename);
    84 SCIPinfoMessage(scip, NULL, "============\n");
    86
    87 retcode = SCIPreadProb(scip, filename, NULL);
    88
    89 switch( retcode )
    90 {
    91 case SCIP_NOFILE:
    92 SCIPinfoMessage(scip, NULL, "file <%s> not found\n", filename);
    93 return SCIP_OKAY;
    95 SCIPinfoMessage(scip, NULL, "no reader for input file <%s> available\n", filename);
    96 return SCIP_OKAY;
    97 case SCIP_READERROR:
    98 SCIPinfoMessage(scip, NULL, "error reading file <%s>\n", filename);
    99 return SCIP_OKAY;
    100 default:
    101 SCIP_CALL( retcode );
    102 } /*lint !e788*/
    103
    104 /*******************
    105 * Problem Solving *
    106 *******************/
    107
    108 /* solve problem */
    109 if( useconcurrent )
    110 {
    111 SCIPinfoMessage(scip, NULL, "\nsolve problem concurrently\n");
    112 SCIPinfoMessage(scip, NULL, "==========================\n\n");
    113
    115 }
    116 else
    117 {
    118 SCIPinfoMessage(scip, NULL, "\nsolve problem\n");
    119 SCIPinfoMessage(scip, NULL, "=============\n\n");
    120
    122 }
    123
    124 /*******************
    125 * Solution Output *
    126 *******************/
    127
    128 SCIP_CALL( SCIPgetBoolParam(scip, "misc/outputorigsol", &outputorigsol) );
    129 if ( outputorigsol )
    130 {
    131 SCIP_SOL* bestsol;
    132
    133 SCIPinfoMessage(scip, NULL, "\nprimal solution (original space):\n");
    134 SCIPinfoMessage(scip, NULL, "=================================\n\n");
    135
    136 bestsol = SCIPgetBestSol(scip);
    137 if ( bestsol == NULL )
    138 SCIPinfoMessage(scip, NULL, "no solution available\n");
    139 else
    140 {
    141 SCIP_SOL* origsol;
    142
    143 SCIP_CALL( SCIPcreateSolCopy(scip, &origsol, bestsol) );
    144 SCIP_CALL( SCIPretransformSol(scip, origsol) );
    145 if( SCIPisExact(scip) && SCIPsolIsExact(bestsol) )
    146 {
    148 }
    149 else
    150 {
    151 SCIP_CALL( SCIPprintSol(scip, origsol, NULL, FALSE) );
    152 }
    153 SCIP_CALL( SCIPfreeSol(scip, &origsol) );
    154 }
    155 }
    156 else
    157 {
    158 SCIPinfoMessage(scip, NULL, "\nprimal solution (transformed space):\n");
    159 SCIPinfoMessage(scip, NULL, "====================================\n\n");
    160
    162 }
    163
    164 /**************
    165 * Statistics *
    166 **************/
    167
    168 SCIPinfoMessage(scip, NULL, "\nStatistics\n");
    169 SCIPinfoMessage(scip, NULL, "==========\n\n");
    170
    172
    173 return SCIP_OKAY;
    174}
    175
    176/** runs SCIP as if it was called by AMPL */
    177static
    179 SCIP* scip, /**< SCIP data structure */
    180 char* nlfilename, /**< name of .nl file, without the .nl */
    181 SCIP_Bool interactive, /**< whether to start SCIP shell instead of solve only */
    182 const char* defaultsetname /**< name of default settings file */
    183 )
    184{
    185#ifdef SCIP_WITH_AMPL
    186 char fullnlfilename[SCIP_MAXSTRLEN];
    187 char* logfile;
    188 SCIP_Bool printstat;
    189 const char* constoptions;
    190 size_t nlfilenamelen;
    191
    192 SCIP_CALL( SCIPaddBoolParam(scip, "display/statistics",
    193 "whether to print statistics on a solve",
    194 &printstat, FALSE, FALSE, NULL, NULL) );
    195
    196 SCIP_CALL( SCIPaddStringParam(scip, "display/logfile",
    197 "name of file to write SCIP log to (additionally to writing to stdout)",
    198 NULL, FALSE, "", NULL, NULL) );
    199
    201 SCIPinfoMessage(scip, NULL, "\n");
    202
    204 SCIPinfoMessage(scip, NULL, "\n");
    205
    206 constoptions = getenv("scip_options");
    207 if( constoptions != NULL )
    208 {
    209 /* parse and apply options from scip_options env variable */
    210 size_t optionslen;
    211 char* options;
    212 char* optname;
    213 char* optval;
    214
    215 optionslen = strlen(constoptions);
    216 SCIP_CALL( SCIPduplicateBufferArray(scip, &options, constoptions, optionslen+1) );
    217
    218 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "applying scip_options:\n");
    219
    220 optname = strtok(options, " ");
    221 optval = strtok(NULL, " ");
    222 while( optname != NULL && optval != NULL )
    223 {
    224 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " %s = %s\n", optname, optval);
    225 SCIP_CALL( SCIPsetParam(scip, optname, optval) );
    226
    227 optname = strtok(NULL, " ");
    228 optval = strtok(NULL, " ");
    229 }
    230
    231 SCIPfreeBufferArray(scip, &options);
    232 }
    233
    234 if( defaultsetname != NULL )
    235 {
    236 if( SCIPfileExists(defaultsetname) )
    237 {
    238 SCIPinfoMessage(scip, NULL, "reading user parameter file <%s>\n", defaultsetname);
    239 SCIPinfoMessage(scip, NULL, "===========================\n\n");
    240 SCIP_CALL( SCIPreadParams(scip, defaultsetname) );
    242 SCIPinfoMessage(scip, NULL, "\n");
    243 }
    244 else
    245 {
    246 SCIPinfoMessage(scip, NULL, "user parameter file <%s> not found - using default parameters\n", defaultsetname);
    247 }
    248 }
    249
    250 SCIP_CALL( SCIPgetStringParam(scip, "display/logfile", &logfile) );
    251 if( *logfile )
    253
    254 /* AMPL calls solver with file without .nl extension, but others (Pyomo) may not
    255 * so add .nl only if not already present
    256 */
    257 nlfilenamelen = strlen(nlfilename);
    258 if( nlfilenamelen > 3 && strcmp(nlfilename + (nlfilenamelen-3), ".nl") == 0 )
    259 (void) SCIPsnprintf(fullnlfilename, SCIP_MAXSTRLEN, "%s", nlfilename);
    260 else
    261 (void) SCIPsnprintf(fullnlfilename, SCIP_MAXSTRLEN, "%s.nl", nlfilename);
    262
    263 if( interactive )
    264 {
    265 char readcommand[SCIP_MAXSTRLEN+6];
    266
    267 (void) SCIPsnprintf(readcommand, (int)sizeof(readcommand), "read %s", fullnlfilename);
    268 SCIP_CALL( SCIPaddDialogInputLine(scip, readcommand) );
    269
    271 }
    272 else
    273 {
    274 SCIPinfoMessage(scip, NULL, "read problem <%s>\n", fullnlfilename);
    275 SCIPinfoMessage(scip, NULL, "============\n\n");
    276
    277 SCIP_CALL( SCIPreadProb(scip, fullnlfilename, "nl") );
    278
    279 SCIPinfoMessage(scip, NULL, "\nsolve problem\n");
    280 SCIPinfoMessage(scip, NULL, "=============\n\n");
    281
    283 }
    284
    285 SCIP_CALL( SCIPgetBoolParam(scip, "display/statistics", &printstat) );
    286 if( printstat )
    287 {
    288 SCIPinfoMessage(scip, NULL, "\nStatistics\n");
    289 SCIPinfoMessage(scip, NULL, "==========\n\n");
    290
    292 }
    293
    295 {
    297 }
    298
    299 return SCIP_OKAY;
    300
    301#else /* SCIP_WITH_AMPL */
    302 SCIPerrorMessage("SCIP has been compiled without AMPL support.\n");
    303 return SCIP_PLUGINNOTFOUND;
    304#endif
    305}
    306
    307/** evaluates command line parameters and runs SCIP appropriately in the given SCIP instance */
    309 SCIP* scip, /**< SCIP data structure */
    310 int argc, /**< number of shell parameters */
    311 char** argv, /**< array with shell parameters */
    312 const char* defaultsetname /**< name of default settings file */
    313 )
    314{ /*lint --e{850}*/
    315 char* probname = NULL;
    316 char* settingsname = NULL;
    317 char* logname = NULL;
    318 int randomseed;
    319 int nthreads;
    320 SCIP_Bool randomseedread;
    321 SCIP_Bool nthreadsread;
    322 SCIP_Bool quiet;
    323 SCIP_Bool paramerror;
    325 SCIP_Bool onlyversion;
    326 SCIP_Real primalreference = SCIP_UNKNOWN;
    327 SCIP_Real dualreference = SCIP_UNKNOWN;
    328 SCIP_RATIONAL* primalreferencerational = NULL;
    329 SCIP_RATIONAL* dualreferencerational = NULL;
    330 const char* dualrefstring;
    331 const char* primalrefstring;
    332 int i;
    333
    334 /********************
    335 * Parse parameters *
    336 ********************/
    337
    338 /* recognize and handle case where we were called from AMPL first */
    339 if( argc >= 3 && strcmp(argv[2], "-AMPL") == 0 )
    340 {
    341 /* check for optional argument -i after -AMPL */
    342 interactive = argc >= 4 && strcmp(argv[3], "-i") == 0;
    343
    344 SCIP_CALL( fromAmpl(scip, argv[1], interactive, defaultsetname) );
    345
    346 return SCIP_OKAY;
    347 }
    348
    349 quiet = FALSE;
    350 paramerror = FALSE;
    352 onlyversion = FALSE;
    353 randomseedread = FALSE;
    354 nthreadsread = FALSE;
    355 randomseed = 0;
    356 nthreads = 1;
    357 primalrefstring = NULL;
    358 dualrefstring = NULL;
    359
    360 for( i = 1; i < argc; ++i )
    361 {
    362 if( strcmp(argv[i], "-l") == 0 )
    363 {
    364 i++;
    365 if( i < argc )
    366 logname = argv[i];
    367 else
    368 {
    369 printf("missing log filename after parameter '-l'\n");
    370 paramerror = TRUE;
    371 }
    372 }
    373 else if( strcmp(argv[i], "-q") == 0 )
    374 quiet = TRUE;
    375 else if( strcmp(argv[i], "-v") == 0 )
    376 onlyversion = TRUE;
    377 else if( strcmp(argv[i], "--version") == 0 )
    378 onlyversion = TRUE;
    379 else if( strcmp(argv[i], "-s") == 0 )
    380 {
    381 i++;
    382 if( i < argc )
    383 settingsname = argv[i];
    384 else
    385 {
    386 printf("missing settings filename after parameter '-s'\n");
    387 paramerror = TRUE;
    388 }
    389 }
    390 else if( strcmp(argv[i], "-f") == 0 )
    391 {
    392 i++;
    393 if( i < argc )
    394 probname = argv[i];
    395 else
    396 {
    397 printf("missing problem filename after parameter '-f'\n");
    398 paramerror = TRUE;
    399 }
    400 }
    401 else if( strcmp(argv[i], "-c") == 0 )
    402 {
    403 i++;
    404 if( i < argc )
    405 {
    408 }
    409 else
    410 {
    411 printf("missing command line after parameter '-c'\n");
    412 paramerror = TRUE;
    413 }
    414 }
    415 else if( strcmp(argv[i], "-b") == 0 )
    416 {
    417 i++;
    418 if( i < argc )
    419 {
    420 SCIP_FILE* file;
    421
    422 file = SCIPfopen(argv[i], "r");
    423 if( file == NULL )
    424 {
    425 printf("cannot read command batch file <%s>\n", argv[i]);
    426 SCIPprintSysError(argv[i]);
    427 paramerror = TRUE;
    428 }
    429 else
    430 {
    431 while( !SCIPfeof(file) )
    432 {
    433 char buffer[SCIP_MAXSTRLEN];
    434
    435 (void)SCIPfgets(buffer, (int) sizeof(buffer), file);
    436 if( buffer[0] != '\0' )
    437 {
    439 }
    440 }
    441 SCIPfclose(file);
    443 }
    444 }
    445 else
    446 {
    447 printf("missing command batch filename after parameter '-b'\n");
    448 paramerror = TRUE;
    449 }
    450 }
    451 else if( strcmp(argv[i], "-r") == 0 )
    452 {
    453 /*read a random seed from the command line */
    454 i++;
    455 if( i < argc && isdigit((unsigned char)argv[i][0]) )
    456 {
    457 randomseed = atoi(argv[i]);
    458 randomseedread = TRUE;
    459 }
    460 else
    461 {
    462 printf("Random seed parameter '-r' followed by something that is not an integer\n");
    463 paramerror = TRUE;
    464 }
    465 }
    466 else if( strcmp(argv[i], "-t") == 0 )
    467 {
    468 /* read number of threads from the command line */
    469 i++;
    470 if( i < argc && isdigit((unsigned char)argv[i][0]) )
    471 {
    472 nthreads = atoi(argv[i]);
    473 nthreadsread = TRUE;
    474 }
    475 else
    476 {
    477 printf("Thread limit parameter '-t' followed by something that is not an integer\n");
    478 paramerror = TRUE;
    479 }
    480 }
    481 else if( strcmp(argv[i], "-o") == 0 )
    482 {
    483 if( i >= argc - 2 )
    484 {
    485 printf("wrong usage of reference objective parameter '-o': -o <primref> <dualref>\n");
    486 paramerror = TRUE;
    487 }
    488 else
    489 {
    490 /* do not parse the strings directly, the settings could still influence the value of +-infinity */
    491 primalrefstring = argv[i + 1];
    492 dualrefstring = argv[i+2];
    493 }
    494 i += 2;
    495 }
    496 else
    497 {
    498 printf("invalid parameter <%s>\n", argv[i]);
    499 paramerror = TRUE;
    500 }
    501 }
    502
    503 if( interactive && probname != NULL )
    504 {
    505 printf("cannot mix batch mode '-c' and '-b' with file mode '-f'\n");
    506 paramerror = TRUE;
    507 }
    508
    509 if( !paramerror )
    510 {
    511 /***********************************
    512 * create log file message handler *
    513 ***********************************/
    514
    515 if( quiet )
    516 {
    518 }
    519
    520 if( logname != NULL )
    521 {
    523 }
    524
    525 /***********************************
    526 * Version and library information *
    527 ***********************************/
    528
    530 SCIPinfoMessage(scip, NULL, "\n");
    531
    533 SCIPinfoMessage(scip, NULL, "\n");
    534
    535 if( onlyversion )
    536 {
    538 SCIPinfoMessage(scip, NULL, "\n");
    539 return SCIP_OKAY;
    540 }
    541
    542 /*****************
    543 * Load settings *
    544 *****************/
    545
    546 if( settingsname != NULL )
    547 {
    548 SCIP_CALL( readParams(scip, settingsname) );
    549 }
    550 else if( defaultsetname != NULL )
    551 {
    552 SCIP_CALL( readParams(scip, defaultsetname) );
    553 }
    554
    555 /************************************
    556 * Change random seed, if specified *
    557 ***********************************/
    558 if( randomseedread )
    559 {
    560 SCIP_CALL( SCIPsetIntParam(scip, "randomization/randomseedshift", randomseed) );
    561 }
    562
    563 /*************************************
    564 * Change thread limit, if specified *
    565 *************************************/
    566 if( nthreadsread )
    567 {
    568 SCIP_CALL( SCIPsetIntParam(scip, "parallel/maxnthreads", nthreads) );
    569 SCIP_CALL( SCIPsetIntParam(scip, "parallel/minnthreads", nthreads) );
    570 }
    571
    572 /**************
    573 * Start SCIP *
    574 **************/
    575
    576 if( probname != NULL )
    577 {
    578 SCIP_Bool validatesolve = FALSE;
    579
    580 if( primalrefstring != NULL && dualrefstring != NULL )
    581 {
    582 char *endptr;
    583 if( !SCIPisExact(scip) )
    584 {
    585 if( ! SCIPparseReal(scip, primalrefstring, &primalreference, &endptr) ||
    586 ! SCIPparseReal(scip, dualrefstring, &dualreference, &endptr) )
    587 {
    588 printf("error parsing primal and dual reference values for validation: %s %s\n", primalrefstring, dualrefstring);
    589 return SCIP_ERROR;
    590 }
    591 else
    592 validatesolve = TRUE;
    593 }
    594 else
    595 {
    596 SCIP_Bool error;
    597
    598 SCIP_CALL( SCIPrationalCreateBlock(SCIPblkmem(scip), &primalreferencerational) );
    599 SCIP_CALL( SCIPrationalCreateBlock(SCIPblkmem(scip), &dualreferencerational) );
    600
    601 error = !SCIPparseRational(scip, primalrefstring, primalreferencerational, &endptr) ||
    602 !SCIPparseRational(scip, primalrefstring, dualreferencerational, &endptr);
    603 if( error )
    604 {
    605 printf("error parsing exact primal and dual reference values for validation: %s %s\n", primalrefstring, dualrefstring);
    606 return SCIP_ERROR;
    607 }
    608 else
    609 validatesolve = TRUE;
    610 }
    611 }
    612 SCIP_CALL( fromCommandLine(scip, probname, nthreadsread) );
    613
    614 /* validate the solve */
    615 if( validatesolve )
    616 {
    617 if( !SCIPisExact(scip) )
    618 {
    619 SCIP_CALL( SCIPvalidateSolve(scip, primalreference, dualreference, SCIPfeastol(scip), FALSE, NULL, NULL, NULL) );
    620 }
    621 else
    622 {
    623 SCIP_CALL( SCIPvalidateSolveExact(scip, primalreferencerational, dualreferencerational, FALSE, NULL, NULL, NULL) );
    624 SCIPrationalFreeBlock(SCIPblkmem(scip), &dualreferencerational);
    625 SCIPrationalFreeBlock(SCIPblkmem(scip), &primalreferencerational);
    626 }
    627 }
    628 }
    629 else
    630 {
    631 SCIPinfoMessage(scip, NULL, "\n");
    633 }
    634 }
    635 else
    636 {
    637 printf("\nsyntax: %s [-l <logfile>] [-q] [-s <settings>] [-r <randseed>] [-t <threads>] [-f <problem>] [-b <batchfile>] [-c \"command\"]\n"
    638 " -v, --version : print version and build options\n"
    639 " -l <logfile> : copy output into log file\n"
    640 " -q : suppress screen messages\n"
    641 " -s <settings> : load parameter settings (.set) file\n"
    642 " -f <problem> : load and solve problem file\n"
    643 " -o <primref> <dualref> : pass primal and dual objective reference values for validation at the end of the solve\n"
    644 " -b <batchfile>: load and execute dialog command batch file (can be used multiple times)\n"
    645 " -r <randseed> : nonnegative integer to be used as random seed. "
    646 "Has priority over random seed specified through parameter settings (.set) file\n"
    647 " -t <threads> : number of threads (triggers concurrent solving)\n"
    648 " -c \"command\" : execute single line of dialog commands (can be used multiple times)\n",
    649 argv[0]);
    650#ifdef SCIP_WITH_AMPL
    651 printf("\nas AMPL solver: %s <.nl-file without the .nl> -AMPL [-i]\n"
    652 " -i : start interactive SCIP shell after .nl file has been read\n",
    653 argv[0]);
    654#endif
    655 printf("\n");
    656 }
    657
    658 return SCIP_OKAY;
    659}
    660
    661/** creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately,
    662 * and frees the SCIP instance
    663 */
    665 int argc, /**< number of shell parameters */
    666 char** argv, /**< array with shell parameters */
    667 const char* defaultsetname /**< name of default settings file */
    668 )
    669{
    670 SCIP* scip = NULL;
    671
    672 /*********
    673 * Setup *
    674 *********/
    675
    676 /* initialize SCIP */
    678
    679 /* we explicitly enable the use of a debug solution for this main SCIP instance */
    681
    682 /* include default SCIP plugins */
    684
    685 /**********************************
    686 * Process command line arguments *
    687 **********************************/
    688
    689 SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) );
    690
    691 /********************
    692 * Deinitialization *
    693 ********************/
    695
    697
    698 return SCIP_OKAY;
    699}
    #define NULL
    Definition: def.h:257
    #define SCIP_MAXSTRLEN
    Definition: def.h:278
    #define SCIP_Bool
    Definition: def.h:100
    #define SCIP_Real
    Definition: def.h:165
    #define SCIP_UNKNOWN
    Definition: def.h:188
    #define TRUE
    Definition: def.h:102
    #define FALSE
    Definition: def.h:103
    #define SCIP_CALL(x)
    Definition: def.h:364
    #define SCIP_CALL_FINALLY(x, y)
    Definition: def.h:406
    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
    void SCIPenableDebugSol(SCIP *scip)
    Definition: scip_debug.c:58
    SCIP_Bool SCIPfileExists(const char *filename)
    Definition: misc.c:11057
    SCIP_RETCODE SCIPfree(SCIP **scip)
    Definition: scip_general.c:402
    SCIP_RETCODE SCIPcreate(SCIP **scip)
    Definition: scip_general.c:370
    SCIP_STAGE SCIPgetStage(SCIP *scip)
    Definition: scip_general.c:444
    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
    void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
    Definition: scip_message.c:225
    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 SCIPprintBuildOptions(SCIP *scip, FILE *file)
    Definition: scip_general.c:201
    void SCIPprintVersion(SCIP *scip, FILE *file)
    Definition: scip_general.c:169
    SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
    Definition: scip_param.c:250
    SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: scip_param.c:194
    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 SCIPsetParam(SCIP *scip, const char *name, const char *value)
    Definition: scip_param.c:753
    SCIP_RETCODE SCIPgetStringParam(SCIP *scip, const char *name, char **value)
    Definition: scip_param.c:345
    SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: scip_param.c:57
    SCIP_RETCODE SCIPstartInteraction(SCIP *scip)
    Definition: scip_dialog.c:242
    SCIP_RETCODE SCIPaddDialogInputLine(SCIP *scip, const char *inputline)
    Definition: scip_dialog.c:192
    SCIP_Bool SCIPisExact(SCIP *scip)
    Definition: scip_exact.c:193
    void SCIPprintExternalCodes(SCIP *scip, FILE *file)
    Definition: scip_general.c:833
    BMS_BLKMEM * SCIPblkmem(SCIP *scip)
    Definition: scip_mem.c:57
    #define SCIPfreeBufferArray(scip, ptr)
    Definition: scip_mem.h:136
    #define SCIPduplicateBufferArray(scip, ptr, source, num)
    Definition: scip_mem.h:132
    SCIP_RETCODE SCIPrationalCreateBlock(BMS_BLKMEM *blkmem, SCIP_RATIONAL **rational)
    Definition: rational.cpp:109
    void SCIPrationalFreeBlock(BMS_BLKMEM *mem, SCIP_RATIONAL **rational)
    Definition: rational.cpp:462
    SCIP_SOL * SCIPgetBestSol(SCIP *scip)
    Definition: scip_sol.c:2986
    SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
    Definition: scip_sol.c:882
    SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
    Definition: scip_sol.c:3052
    SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
    Definition: scip_sol.c:1250
    SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
    Definition: scip_sol.c:2351
    SCIP_RETCODE SCIPretransformSol(SCIP *scip, SCIP_SOL *sol)
    Definition: scip_sol.c:3187
    SCIP_RETCODE SCIPprintSolExact(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
    Definition: scip_sol.c:2426
    SCIP_Bool SCIPsolIsExact(SCIP_SOL *sol)
    Definition: sol.c:4165
    SCIP_RETCODE SCIPsolveConcurrent(SCIP *scip)
    Definition: scip_solve.c:2937
    SCIP_RETCODE SCIPsolve(SCIP *scip)
    Definition: scip_solve.c:2611
    SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
    SCIP_Bool SCIPparseRational(SCIP *scip, const char *str, SCIP_RATIONAL *value, char **endptr)
    SCIP_Real SCIPfeastol(SCIP *scip)
    SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
    SCIP_RETCODE SCIPvalidateSolveExact(SCIP *scip, SCIP_RATIONAL *primalreference, SCIP_RATIONAL *dualreference, SCIP_Bool quiet, SCIP_Bool *feasible, SCIP_Bool *primalboundcheck, SCIP_Bool *dualboundcheck)
    SCIP_RETCODE SCIPvalidateSolve(SCIP *scip, SCIP_Real primalreference, SCIP_Real dualreference, SCIP_Real reftol, SCIP_Bool quiet, SCIP_Bool *feasible, SCIP_Bool *primalboundcheck, SCIP_Bool *dualboundcheck)
    int SCIPsnprintf(char *t, int len, const char *s,...)
    Definition: misc.c:10827
    void SCIPprintSysError(const char *message)
    Definition: misc.c:10719
    #define BMScheckEmptyMemory()
    Definition: memory.h:155
    default message handler
    struct SCIP_File SCIP_FILE
    Definition: pub_fileio.h:43
    #define SCIPerrorMessage
    Definition: pub_message.h:64
    wrapper for rational number arithmetic
    SCIP_RETCODE SCIPwriteSolutionNl(SCIP *scip)
    Definition: reader_nl.cpp:3258
    AMPL .nl file reader and writer.
    SCIP callable library.
    SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
    default SCIP plugins
    SCIP_RETCODE SCIPrunShell(int argc, char **argv, const char *defaultsetname)
    Definition: scipshell.c:664
    static SCIP_RETCODE fromCommandLine(SCIP *scip, const char *filename, SCIP_Bool useconcurrent)
    Definition: scipshell.c:66
    static SCIP_RETCODE fromAmpl(SCIP *scip, char *nlfilename, SCIP_Bool interactive, const char *defaultsetname)
    Definition: scipshell.c:178
    static SCIP_RETCODE readParams(SCIP *scip, const char *filename)
    Definition: scipshell.c:49
    SCIP_RETCODE SCIPprocessShellArguments(SCIP *scip, int argc, char **argv, const char *defaultsetname)
    Definition: scipshell.c:308
    SCIP command line interface.
    @ SCIP_VERBLEVEL_HIGH
    Definition: type_message.h:61
    @ SCIP_NOFILE
    Definition: type_retcode.h:47
    @ SCIP_READERROR
    Definition: type_retcode.h:45
    @ SCIP_PLUGINNOTFOUND
    Definition: type_retcode.h:54
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    @ SCIP_ERROR
    Definition: type_retcode.h:43
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    @ SCIP_STAGE_PROBLEM
    Definition: type_set.h:45