Scippy

    SCIP

    Solving Constraint Integer Programs

    cons_fixedvar.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 cons_fixedvar.c
    26 * @ingroup DEFPLUGINS_CONS
    27 * @brief constraint handler that checks bounds on fixed variables
    28 * @author Stefan Vigerske
    29 *
    30 * For each original variable that has a counterpart in the transformed problem
    31 * which is not active (i.e., fixed, negated, aggregated, or multiaggregated),
    32 * check the original bounds. In enforcement, add a cut that enforces the bounds
    33 * or tighten LP feasibility tolerance.
    34 */
    35
    36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    37
    38#include <assert.h>
    39
    40#include "scip/cons_fixedvar.h"
    41
    42
    43/* fundamental constraint handler properties */
    44#define CONSHDLR_NAME "fixedvar"
    45#define CONSHDLR_DESC "check bounds of original variables that are not active in transformed problem"
    46#define CONSHDLR_ENFOPRIORITY -7000000 /**< priority of the constraint handler for constraint enforcing */
    47#define CONSHDLR_CHECKPRIORITY -7000000 /**< priority of the constraint handler for checking feasibility */
    48#define CONSHDLR_EAGERFREQ -1 /**< frequency for using all instead of only the useful constraints in separation,
    49 * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
    50#define CONSHDLR_NEEDSCONS FALSE /**< should the constraint handler be skipped, if no constraints are available? */
    51
    52/* parameter default values */
    53#define DEFAULT_ENABLED TRUE /**< enable constraint handler */
    54#define DEFAULT_SUBSCIPS TRUE /**< also run in subSCIPs */
    55#define DEFAULT_PREFERCUT TRUE /**< whether to prefer separation over tightening LP feastol in enforcement */
    56
    57/*
    58 * Data structures
    59 */
    60
    61/** constraint handler data */
    62struct SCIP_ConshdlrData
    63{
    64 SCIP_VAR** vars; /**< variables to check */
    65 int nvars; /**< number of variables to check */
    66 int varssize; /**< size of vars array */
    67
    68 SCIP_Bool enabled; /**< whether to do anything */
    69 SCIP_Bool subscips; /**< whether to be active in subSCIPs */
    70 SCIP_Bool prefercut; /**< whether to prefer separation over tightening LP feastol in enforcement */
    71};
    72
    73
    74/*
    75 * Local methods
    76 */
    77
    78/** an assert for checking that the violation is not so large
    79 *
    80 * The idea of this constraint handler is the handling of tiny bound violations that are scaled up
    81 * above the feasibility tolerance by aggregation factors. Usually, the violation should still be
    82 * rather "small". For this test, we quantify "small" as 0.5.
    83 */
    84#define assertSmallViolation(lb, val, ub) (assert((val) >= (lb) - 0.5 && (val) <= (ub) + 0.5))
    85
    86/** add cut to enforce global bounds on variable aggregation
    87 *
    88 * Given an original fixed variable x, add cut lb <= x <= ub.
    89 * SCIP will replace x by the corresponding aggregation of x in the transformed problem.
    90 * Though we only need to enforce original bounds on x, we use here the global bounds on x for lb/ub,
    91 * as these should be as tight as or tighter than the original bounds.
    92 */
    93static
    95 SCIP* scip, /**< SCIP data structure */
    96 SCIP_CONSHDLR* conshdlr, /**< fixedvar conshdlr */
    97 SCIP_SOL* sol, /**< solution that is enforced */
    98 SCIP_VAR* var, /**< fixed original variable which bound is violated */
    99 SCIP_Bool* success, /**< buffer to store whether cut was added */
    100 SCIP_Bool* cutoff /**< buffer to store whether a cutoff was detected */
    101 )
    102{
    103 SCIP_ROW* row;
    104 char name[SCIP_MAXSTRLEN];
    105
    106 assert(scip != NULL);
    107 assert(var != NULL);
    108 assert(success != NULL);
    109 assert(cutoff != NULL);
    110
    111 *cutoff = FALSE;
    112
    113 SCIPdebugMsg(scip, "addCut for variable <%s> [%.15g,%.15g] with value <%.15g>\n", SCIPvarGetName(var), SCIPvarGetLbGlobal(var), SCIPvarGetUbGlobal(var), SCIPgetSolVal(scip, sol, var));
    114
    115 (void) SCIPsnprintf(name, SCIP_MAXSTRLEN, "%s_bounds", SCIPvarGetName(var));
    116
    117 assert(SCIPvarGetLbGlobal(var) >= SCIPvarGetLbOriginal(var)); /*lint !e777*/
    118 assert(SCIPvarGetUbGlobal(var) <= SCIPvarGetUbOriginal(var)); /*lint !e777*/
    119
    121 SCIP_CALL( SCIPaddVarToRow(scip, row, var, 1.0) );
    122
    123#ifdef SCIP_DEBUG
    125#endif
    126
    127 /* solution should be violated in the row */
    129
    130 SCIP_CALL( SCIPaddRow(scip, row, FALSE, cutoff) );
    131 SCIP_CALL( SCIPreleaseRow(scip, &row) );
    132
    133 *success = TRUE;
    134
    135 return SCIP_OKAY;
    136}
    137
    138
    139/*
    140 * Callback methods of constraint handler
    141 */
    142
    143/** copy method for constraint handler plugins (called when SCIP copies plugins) */
    144static
    145SCIP_DECL_CONSHDLRCOPY(conshdlrCopyFixedvar)
    146{ /*lint --e{715}*/
    147 assert(scip != NULL);
    148 assert(conshdlr != NULL);
    149 assert(strcmp(SCIPconshdlrGetName(conshdlr), CONSHDLR_NAME) == 0);
    150
    151 if( SCIPconshdlrGetData(conshdlr)->subscips )
    152 {
    154 }
    155
    156 *valid = TRUE;
    157
    158 return SCIP_OKAY;
    159}
    160
    161/** destructor of constraint handler to free constraint handler data (called when SCIP is exiting) */
    162static
    163SCIP_DECL_CONSFREE(consFreeFixedvar)
    164{ /*lint --e{715}*/
    165 SCIP_CONSHDLRDATA* conshdlrdata;
    166
    167 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    168 assert(conshdlrdata != NULL);
    169 assert(conshdlrdata->vars == NULL); /* should have been freed in Exitsol */
    170
    171 SCIPfreeBlockMemory(scip, &conshdlrdata);
    172 SCIPconshdlrSetData(conshdlr, NULL);
    173
    174 return SCIP_OKAY;
    175}
    176
    177/** solving process initialization method of constraint handler (called when branch and bound process is about to begin) */
    178static
    179SCIP_DECL_CONSINITSOL(consInitsolFixedvar)
    180{ /*lint --e{715}*/
    181 SCIP_CONSHDLRDATA* conshdlrdata;
    182 SCIP_VAR** vars;
    183 int nvars;
    184 int i;
    185
    186 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    187 assert(conshdlrdata != NULL);
    188 assert(conshdlrdata->vars == NULL);
    189 assert(conshdlrdata->varssize == 0);
    190 assert(conshdlrdata->nvars == 0);
    191
    192 if( !conshdlrdata->enabled )
    193 return SCIP_OKAY;
    194
    195 if( SCIPgetNFixedVars(scip) == 0 )
    196 return SCIP_OKAY;
    197
    198 vars = SCIPgetOrigVars(scip);
    199 nvars = SCIPgetNOrigVars(scip);
    200
    201 /* for faster checks, collect original variables that are fixed in transformed problem
    202 * during solve, this list does not change
    203 */
    204 conshdlrdata->varssize = SCIPgetNFixedVars(scip);
    205 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &conshdlrdata->vars, conshdlrdata->varssize) );
    206
    207 for( i = 0; i < nvars; ++i )
    208 {
    209 SCIP_VAR* var;
    210
    211 SCIP_CALL( SCIPgetTransformedVar(scip, vars[i], &var) );
    212
    213 /* skip original variable without counterpart in transformed problem */
    214 if( var == NULL )
    215 continue;
    216
    217 /* skip original variable that is still active in transformed problem
    218 * the normal feasibility checks in SCIP should ensure that bounds are satisfied
    219 */
    220 if( SCIPvarIsActive(var) )
    221 continue;
    222
    223 /* skip free original variable */
    225 continue;
    226
    227 assert(conshdlrdata->nvars < conshdlrdata->varssize);
    228 conshdlrdata->vars[conshdlrdata->nvars++] = vars[i];
    229 }
    230
    231 return SCIP_OKAY;
    232}
    233
    234
    235/** solving process deinitialization method of constraint handler (called before branch and bound process data is freed) */
    236static
    237SCIP_DECL_CONSEXITSOL(consExitsolFixedvar)
    238{ /*lint --e{715}*/
    239 SCIP_CONSHDLRDATA* conshdlrdata;
    240
    241 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    242 assert(conshdlrdata != NULL);
    243
    244 SCIPfreeBlockMemoryArrayNull(scip, &conshdlrdata->vars, conshdlrdata->varssize);
    245 conshdlrdata->varssize = 0;
    246 conshdlrdata->nvars = 0;
    247
    248 return SCIP_OKAY;
    249}
    250
    251/** constraint enforcing method of constraint handler for LP solutions */
    252static
    253SCIP_DECL_CONSENFOLP(consEnfolpFixedvar)
    254{ /*lint --e{715}*/
    255 SCIP_CONSHDLRDATA* conshdlrdata;
    256 SCIP_Bool addcut;
    257 int i;
    258
    259 assert(scip != NULL);
    260 assert(result != NULL);
    261
    262 *result = SCIP_FEASIBLE;
    263
    264 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    265 assert(conshdlrdata != NULL);
    266
    267 /* we will try separation if this is preferred or the LP feastol is too small already */
    268 addcut = conshdlrdata->prefercut || !SCIPisPositive(scip, SCIPgetLPFeastol(scip));
    269
    270 for( i = 0; i < conshdlrdata->nvars; ++i )
    271 {
    272 SCIP_VAR* var;
    273 SCIP_Real lb;
    274 SCIP_Real ub;
    275 SCIP_Real val;
    276
    277 var = conshdlrdata->vars[i];
    278 assert(var != NULL);
    279
    280 lb = SCIPvarGetLbOriginal(var);
    281 ub = SCIPvarGetUbOriginal(var);
    282 val = SCIPgetSolVal(scip, NULL, var);
    283
    284 if( (!SCIPisInfinity(scip, -lb) && SCIPisFeasLT(scip, val, lb)) || (!SCIPisInfinity(scip, ub) && SCIPisFeasGT(scip, val, ub)) )
    285 {
    286 if( !solinfeasible )
    287 assertSmallViolation(lb, val, ub);
    288
    289 if( addcut )
    290 {
    291 SCIP_Bool success;
    292 SCIP_Bool cutoff;
    293
    294 SCIP_CALL( addCut(scip, conshdlr, NULL, var, &success, &cutoff) );
    295
    296 if( cutoff )
    297 {
    298 *result = SCIP_CUTOFF;
    299 break;
    300 }
    301
    302 if( success )
    303 {
    304 *result = SCIP_SEPARATED;
    305 break;
    306 }
    307
    308 /* tighten LP feasibility tolerance, but check other variables first */
    309 *result = SCIP_INFEASIBLE;
    310 }
    311 else
    312 {
    313 /* tighten LP feasibility tolerance */
    314 *result = SCIP_INFEASIBLE;
    315 break;
    316 }
    317 }
    318 }
    319
    320 if( *result == SCIP_INFEASIBLE )
    321 {
    322 /* if we could not add a cut or find a cutoff, then try to tighten LP feasibility tolerance
    323 * otherwise, we have no mean to enforce the bound, and declare the solution as feasible instead
    324 */
    326 {
    327 SCIP_Real redfeastol = SCIPgetLPFeastol(scip) / 10.0;
    328
    329 SCIPsetLPFeastol(scip, MAX(redfeastol, SCIPepsilon(scip))); /*lint !e666*/
    330 *result = SCIP_SOLVELP;
    331 }
    332 else
    333 {
    334 *result = SCIP_FEASIBLE;
    335 SCIPwarningMessage(scip, "Declaring solution with violated bound in original problem as feasible because attempts to enforce the bound have failed. We are very sorry.\n");
    336 }
    337 }
    338
    339 return SCIP_OKAY;
    340}
    341
    342
    343/** constraint enforcing method of constraint handler for relaxation solutions */
    344static
    345SCIP_DECL_CONSENFORELAX(consEnforelaxFixedvar)
    346{ /*lint --e{715}*/
    347 SCIP_CONSHDLRDATA* conshdlrdata;
    348 int i;
    349
    350 assert(scip != NULL);
    351 assert(result != NULL);
    352
    353 *result = SCIP_FEASIBLE;
    354
    355 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    356 assert(conshdlrdata != NULL);
    357
    358 for( i = 0; i < conshdlrdata->nvars; ++i )
    359 {
    360 SCIP_VAR* var;
    361 SCIP_Real lb;
    362 SCIP_Real ub;
    363 SCIP_Real val;
    364
    365 var = conshdlrdata->vars[i];
    366 assert(var != NULL);
    367
    368 lb = SCIPvarGetLbOriginal(var);
    369 ub = SCIPvarGetUbOriginal(var);
    370 val = SCIPgetSolVal(scip, sol, var);
    371
    372 if( (!SCIPisInfinity(scip, -lb) && SCIPisFeasLT(scip, val, lb)) || (!SCIPisInfinity(scip, ub) && SCIPisFeasGT(scip, val, ub)) )
    373 {
    374 SCIP_Bool success;
    375 SCIP_Bool cutoff;
    376
    377 if( !solinfeasible )
    378 assertSmallViolation(lb, val, ub);
    379
    380 SCIP_CALL( addCut(scip, conshdlr, sol, var, &success, &cutoff) );
    381
    382 if( cutoff )
    383 {
    384 *result = SCIP_CUTOFF;
    385 break;
    386 }
    387
    388 if( success )
    389 {
    390 *result = SCIP_SEPARATED;
    391 break;
    392 }
    393
    394 /* switch to solving the LP relaxation, but check other variables first */
    395 *result = SCIP_SOLVELP;
    396 }
    397 }
    398
    399 return SCIP_OKAY;
    400}
    401
    402
    403/** constraint enforcing method of constraint handler for pseudo solutions */
    404static
    405SCIP_DECL_CONSENFOPS(consEnfopsFixedvar)
    406{ /*lint --e{715}*/
    407 SCIP_CONSHDLRDATA* conshdlrdata;
    408 int i;
    409
    410 assert(scip != NULL);
    411 assert(result != NULL);
    412
    413 *result = SCIP_FEASIBLE;
    414
    415 /* skip check for solutions that are already declared infeasible
    416 * we could not do anything else than also signaling infeasibility
    417 */
    418 if( solinfeasible )
    419 return SCIP_OKAY;
    420
    421 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    422 assert(conshdlrdata != NULL);
    423
    424 for( i = 0; i < conshdlrdata->nvars; ++i )
    425 {
    426 SCIP_VAR* var;
    427 SCIP_Real lb;
    428 SCIP_Real ub;
    429 SCIP_Real val;
    430
    431 var = conshdlrdata->vars[i];
    432 assert(var != NULL);
    433
    434 lb = SCIPvarGetLbOriginal(var);
    435 ub = SCIPvarGetUbOriginal(var);
    436 val = SCIPgetSolVal(scip, NULL, var);
    437
    438 if( (!SCIPisInfinity(scip, -lb) && SCIPisFeasLT(scip, val, lb)) || (!SCIPisInfinity(scip, ub) && SCIPisFeasGT(scip, val, ub)) )
    439 {
    440 *result = SCIP_SOLVELP;
    441
    442 assertSmallViolation(lb, val, ub);
    443
    444 break;
    445 }
    446 }
    447
    448 return SCIP_OKAY;
    449}
    450
    451
    452/** feasibility check method of constraint handler for integral solutions */
    453static
    454SCIP_DECL_CONSCHECK(consCheckFixedvar)
    455{ /*lint --e{715}*/
    456 SCIP_CONSHDLRDATA* conshdlrdata;
    457 SCIP_VAR** vars;
    458 int nvars;
    459 int i;
    460
    461 assert(scip != NULL);
    462 assert(result != NULL);
    463
    464 *result = SCIP_FEASIBLE;
    465
    466 conshdlrdata = SCIPconshdlrGetData(conshdlr);
    467 assert(conshdlrdata != NULL);
    468
    469 if( !conshdlrdata->enabled )
    470 return SCIP_OKAY;
    471
    472 /* skip if no transformed problem yet */
    474 return SCIP_OKAY;
    475
    476 /* during solving use cached list of relevant original variables, otherwise loop through all variables */
    478 {
    479 nvars = conshdlrdata->nvars;
    480 vars = conshdlrdata->vars;
    481 }
    482 else
    483 {
    484 nvars = SCIPgetNOrigVars(scip);
    485 vars = SCIPgetOrigVars(scip);
    486 }
    487 assert(vars != NULL || nvars == 0);
    488
    489 for( i = 0; i < nvars; ++i )
    490 {
    491 SCIP_VAR* var;
    492 SCIP_Real lb;
    493 SCIP_Real ub;
    494 SCIP_Real val;
    495
    496 SCIP_CALL( SCIPgetTransformedVar(scip, vars[i], &var) );
    497
    498 if( var == NULL )
    499 continue;
    500
    501 if( SCIPvarIsActive(var) )
    502 continue;
    503
    504 lb = SCIPvarGetLbOriginal(vars[i]);
    505 ub = SCIPvarGetUbOriginal(vars[i]);
    506 val = SCIPgetSolVal(scip, sol, var);
    507
    508 if( !SCIPisInfinity(scip, -lb) && SCIPisFeasLT(scip, val, lb) )
    509 {
    510 SCIPdebugMsg(scip, "lower bound of <%s> [%g,%g] violated, solution value <%g>\n",
    511 SCIPvarGetName(var), lb, ub, val);
    512
    513 if( printreason )
    514 {
    515 SCIPinfoMessage(scip, NULL, "solution violates lower bound of fixed variable <%s> [%g,%g], solution value <%g>\n",
    516 SCIPvarGetName(vars[i]), lb, ub, val);
    517 }
    518
    519 *result = SCIP_INFEASIBLE;
    520
    521 if( !completely )
    522 {
    523 assertSmallViolation(lb, val, ub);
    524 return SCIP_OKAY;
    525 }
    526 }
    527
    528 if( !SCIPisInfinity(scip, ub) && SCIPisFeasGT(scip, val, ub) )
    529 {
    530 SCIPdebugMsg(scip, "upper bound of <%s> [%g,%g] violated, solution value <%g>\n",
    531 SCIPvarGetName(var), lb, ub, val);
    532
    533 if( printreason )
    534 {
    535 SCIPinfoMessage(scip, NULL, "solution violates upper bound of fixed variable <%s> [%g,%g], solution value <%g>\n",
    536 SCIPvarGetName(vars[i]), lb, ub, val);
    537 }
    538
    539 *result = SCIP_INFEASIBLE;
    540
    541 if( !completely )
    542 {
    543 assertSmallViolation(lb, val, ub);
    544 return SCIP_OKAY;
    545 }
    546 }
    547 }
    548
    549 return SCIP_OKAY;
    550}
    551
    552
    553/** variable rounding lock method of constraint handler */
    554static
    555SCIP_DECL_CONSLOCK(consLockFixedvar)
    556{ /*lint --e{715}*/
    557 return SCIP_OKAY;
    558}
    559
    560
    561/*
    562 * constraint specific interface methods
    563 */
    564
    565/** creates the fixedvar constraint handler and includes it in SCIP */
    567 SCIP* scip /**< SCIP data structure */
    568 )
    569{
    570 SCIP_CONSHDLRDATA* conshdlrdata;
    571 SCIP_CONSHDLR* conshdlr = NULL;
    572
    573 /* create fixedvar constraint handler data */
    574 SCIP_CALL( SCIPallocClearBlockMemory(scip, &conshdlrdata) );
    575
    576 /* include constraint handler */
    579 consEnfolpFixedvar, consEnfopsFixedvar, consCheckFixedvar, consLockFixedvar,
    580 conshdlrdata) );
    581 assert(conshdlr != NULL);
    582
    583 /* set non-fundamental callbacks via specific setter functions */
    584 SCIP_CALL( SCIPsetConshdlrCopy(scip, conshdlr, conshdlrCopyFixedvar, NULL) );
    585 SCIP_CALL( SCIPsetConshdlrFree(scip, conshdlr, consFreeFixedvar) );
    586 SCIP_CALL( SCIPsetConshdlrInitsol(scip, conshdlr, consInitsolFixedvar) );
    587 SCIP_CALL( SCIPsetConshdlrExitsol(scip, conshdlr, consExitsolFixedvar) );
    588 SCIP_CALL( SCIPsetConshdlrEnforelax(scip, conshdlr, consEnforelaxFixedvar) );
    589
    590 /* add fixedvar constraint handler parameters */
    591 SCIP_CALL( SCIPaddBoolParam(scip, "constraints/" CONSHDLR_NAME "/enabled",
    592 "whether to check and enforce bounds on fixed variables",
    593 &conshdlrdata->enabled, FALSE, DEFAULT_ENABLED, NULL, NULL) );
    594
    595 SCIP_CALL( SCIPaddBoolParam(scip, "constraints/" CONSHDLR_NAME "/subscips",
    596 "whether to act on subSCIPs",
    597 &conshdlrdata->subscips, FALSE, DEFAULT_SUBSCIPS, NULL, NULL) );
    598
    599 SCIP_CALL( SCIPaddBoolParam(scip, "constraints/" CONSHDLR_NAME "/prefercut",
    600 "whether to prefer separation over tightening LP feastol in enforcement",
    601 &conshdlrdata->prefercut, FALSE, DEFAULT_PREFERCUT, NULL, NULL) );
    602
    603 return SCIP_OKAY;
    604}
    #define DEFAULT_SUBSCIPS
    Definition: cons_fixedvar.c:54
    #define CONSHDLR_NEEDSCONS
    Definition: cons_fixedvar.c:50
    static SCIP_DECL_CONSCHECK(consCheckFixedvar)
    #define CONSHDLR_CHECKPRIORITY
    Definition: cons_fixedvar.c:47
    #define CONSHDLR_DESC
    Definition: cons_fixedvar.c:45
    static SCIP_DECL_CONSENFORELAX(consEnforelaxFixedvar)
    static SCIP_DECL_CONSINITSOL(consInitsolFixedvar)
    #define assertSmallViolation(lb, val, ub)
    Definition: cons_fixedvar.c:84
    static SCIP_RETCODE addCut(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Bool *success, SCIP_Bool *cutoff)
    Definition: cons_fixedvar.c:94
    static SCIP_DECL_CONSENFOPS(consEnfopsFixedvar)
    static SCIP_DECL_CONSEXITSOL(consExitsolFixedvar)
    static SCIP_DECL_CONSLOCK(consLockFixedvar)
    #define DEFAULT_PREFERCUT
    Definition: cons_fixedvar.c:55
    static SCIP_DECL_CONSFREE(consFreeFixedvar)
    static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyFixedvar)
    static SCIP_DECL_CONSENFOLP(consEnfolpFixedvar)
    #define CONSHDLR_EAGERFREQ
    Definition: cons_fixedvar.c:48
    #define CONSHDLR_ENFOPRIORITY
    Definition: cons_fixedvar.c:46
    #define DEFAULT_ENABLED
    Definition: cons_fixedvar.c:53
    #define CONSHDLR_NAME
    Definition: cons_fixedvar.c:44
    constraint handler that checks bounds on fixed variables
    #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 MAX(x, y)
    Definition: def.h:220
    #define SCIP_CALL(x)
    Definition: def.h:355
    SCIP_RETCODE SCIPincludeConshdlrFixedvar(SCIP *scip)
    SCIP_STAGE SCIPgetStage(SCIP *scip)
    Definition: scip_general.c:444
    SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
    Definition: scip_prob.c:2811
    int SCIPgetNOrigVars(SCIP *scip)
    Definition: scip_prob.c:2838
    int SCIPgetNFixedVars(SCIP *scip)
    Definition: scip_prob.c:2705
    void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
    Definition: scip_message.c:208
    #define SCIPdebugMsg
    Definition: scip_message.h:78
    void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
    Definition: scip_message.c:120
    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
    void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
    Definition: cons.c:4346
    SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
    Definition: scip_cons.c:181
    SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
    Definition: scip_cons.c:372
    SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
    Definition: scip_cons.c:323
    const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
    Definition: cons.c:4316
    SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
    Definition: scip_cons.c:347
    SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
    Definition: scip_cons.c:468
    SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
    Definition: scip_cons.c:444
    SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
    Definition: cons.c:4336
    SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
    Definition: scip_cut.c:225
    void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
    Definition: scip_lp.c:444
    SCIP_Real SCIPgetLPFeastol(SCIP *scip)
    Definition: scip_lp.c:434
    #define SCIPallocClearBlockMemory(scip, ptr)
    Definition: scip_mem.h:91
    #define SCIPallocBlockMemoryArray(scip, ptr, num)
    Definition: scip_mem.h:93
    #define SCIPfreeBlockMemory(scip, ptr)
    Definition: scip_mem.h:108
    #define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
    Definition: scip_mem.h:111
    SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1367
    SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
    Definition: scip_lp.c:1646
    SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
    Definition: scip_lp.c:2176
    SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
    Definition: scip_lp.c:2131
    SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
    Definition: scip_lp.c:1508
    SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
    Definition: scip_sol.c:1765
    SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
    SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
    SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
    SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
    SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
    SCIP_Real SCIPepsilon(SCIP *scip)
    SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
    Definition: var.c:23642
    SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
    Definition: var.c:24020
    SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
    Definition: var.c:24142
    const char * SCIPvarGetName(SCIP_VAR *var)
    Definition: var.c:23267
    SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
    Definition: var.c:24063
    SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
    Definition: var.c:24120
    SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
    Definition: scip_var.c:2078
    int SCIPsnprintf(char *t, int len, const char *s,...)
    Definition: misc.c:10827
    struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
    Definition: type_cons.h:64
    @ SCIP_CUTOFF
    Definition: type_result.h:48
    @ SCIP_FEASIBLE
    Definition: type_result.h:45
    @ SCIP_SEPARATED
    Definition: type_result.h:49
    @ SCIP_SOLVELP
    Definition: type_result.h:55
    @ SCIP_INFEASIBLE
    Definition: type_result.h:46
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    @ SCIP_STAGE_TRANSFORMED
    Definition: type_set.h:47
    @ SCIP_STAGE_FREETRANS
    Definition: type_set.h:56
    @ SCIP_STAGE_SOLVING
    Definition: type_set.h:53