Scippy

    SCIP

    Solving Constraint Integer Programs

    prob.h
    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 prob.h
    26 * @ingroup INTERNALAPI
    27 * @brief internal methods for storing and manipulating the main problem
    28 * @author Tobias Achterberg
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_PROB_H__
    34#define __SCIP_PROB_H__
    35
    36
    37#include "scip/def.h"
    39#include "scip/type_retcode.h"
    40#include "scip/type_set.h"
    41#include "scip/type_stat.h"
    42#include "scip/type_event.h"
    43#include "scip/type_lp.h"
    44#include "scip/type_var.h"
    45#include "scip/type_implics.h"
    46#include "scip/type_prob.h"
    47#include "scip/type_primal.h"
    48#include "scip/type_tree.h"
    49#include "scip/type_rational.h"
    50#include "scip/type_reopt.h"
    51#include "scip/type_branch.h"
    52#include "scip/type_cons.h"
    54#include "scip/type_message.h"
    55#include "scip/type_misc.h"
    56#include "scip/type_datatree.h"
    57
    58#ifdef NDEBUG
    59#include "scip/struct_prob.h"
    60#endif
    61
    62#ifdef __cplusplus
    63extern "C" {
    64#endif
    65
    66/*
    67 * problem creation
    68 */
    69
    70/** creates problem data structure by copying the source problem;
    71 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
    72 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
    73 */
    75 SCIP_PROB** prob, /**< pointer to problem data structure */
    76 BMS_BLKMEM* blkmem, /**< block memory */
    77 SCIP_SET* set, /**< global SCIP settings */
    78 const char* name, /**< problem name */
    79 SCIP* sourcescip, /**< source SCIP data structure */
    80 SCIP_PROB* sourceprob, /**< source problem structure */
    81 SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
    82 * target variables, or NULL */
    83 SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
    84 * target constraints, or NULL */
    85 SCIP_Bool original, /**< copy original or transformed problem? */
    86 SCIP_Bool global /**< create a global or a local copy? */
    87 );
    88
    89/** creates problem data structure
    90 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
    91 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
    92 */
    94 SCIP_PROB** prob, /**< pointer to problem data structure */
    95 BMS_BLKMEM* blkmem, /**< block memory */
    96 SCIP_SET* set, /**< global SCIP settings */
    97 const char* name, /**< problem name */
    98 SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
    99 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
    100 SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
    101 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
    102 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
    103 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
    104 SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
    105 SCIP_Bool transformed /**< is this the transformed problem? */
    106 );
    107
    108/** sets callback to free user data of original problem */
    110 SCIP_PROB* prob, /**< problem */
    111 SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
    112 );
    113
    114/** sets callback to create user data of transformed problem by transforming original user data */
    116 SCIP_PROB* prob, /**< problem */
    117 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
    118 );
    119
    120/** sets callback to free user data of transformed problem */
    122 SCIP_PROB* prob, /**< problem */
    123 SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
    124 );
    125
    126/** sets solving process initialization callback of transformed data */
    128 SCIP_PROB* prob, /**< problem */
    129 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
    130 );
    131
    132/** sets solving process deinitialization callback of transformed data */
    134 SCIP_PROB* prob, /**< problem */
    135 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
    136 );
    137
    138/** sets callback to copy user data to copy it to a subscip, or NULL */
    139void SCIPprobSetCopy(
    140 SCIP_PROB* prob, /**< problem */
    141 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
    142 );
    143
    144/** frees problem data structure */
    146 SCIP_PROB** prob, /**< pointer to problem data structure */
    147 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    148 BMS_BLKMEM* blkmem, /**< block memory buffer */
    149 SCIP_SET* set, /**< global SCIP settings */
    150 SCIP_STAT* stat, /**< dynamic problem statistics */
    151 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    152 SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
    153 );
    154
    155/** transform problem data into normalized form */
    157 SCIP_PROB* source, /**< problem to transform */
    158 BMS_BLKMEM* blkmem, /**< block memory buffer */
    159 SCIP_SET* set, /**< global SCIP settings */
    160 SCIP_STAT* stat, /**< problem statistics */
    161 SCIP_PRIMAL* primal, /**< primal data */
    162 SCIP_TREE* tree, /**< branch and bound tree */
    163 SCIP_REOPT* reopt, /**< reoptimization data structure */
    164 SCIP_LP* lp, /**< current LP data */
    165 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
    166 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    167 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
    168 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
    169 SCIP_PROB** target /**< pointer to target problem data structure */
    170 );
    171
    172/** resets the global and local bounds of original variables in original problem to their original values */
    174 SCIP_PROB* prob, /**< original problem data */
    175 BMS_BLKMEM* blkmem, /**< block memory */
    176 SCIP_SET* set, /**< global SCIP settings */
    177 SCIP_STAT* stat /**< problem statistics */
    178 );
    179
    180/** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
    181 * with respect to their original index (within their categories). Adjust the problem index afterwards which is
    182 * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
    183 * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
    184 * model)
    185 */
    187 SCIP_PROB* prob /**< problem data */
    188 );
    189
    190/** possibly create and sort the constraints according to check priorties */
    192 SCIP_PROB* prob /**< problem data */
    193 );
    194
    195/*
    196 * problem modification
    197 */
    198
    199/** sets user problem data */
    200void SCIPprobSetData(
    201 SCIP_PROB* prob, /**< problem */
    202 SCIP_PROBDATA* probdata /**< user problem data to use */
    203 );
    204
    205/** adds variable's name to the namespace */
    207 SCIP_PROB* prob, /**< problem data */
    208 SCIP_VAR* var /**< variable */
    209 );
    210
    211/** removes variable's name from the namespace */
    213 SCIP_PROB* prob, /**< problem data */
    214 SCIP_VAR* var /**< variable */
    215 );
    216
    217/** adds variable to the problem and captures it */
    219 SCIP_PROB* prob, /**< problem data */
    220 BMS_BLKMEM* blkmem, /**< block memory buffers */
    221 SCIP_SET* set, /**< global SCIP settings */
    222 SCIP_LP* lp, /**< current LP data */
    223 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
    224 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    225 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
    226 SCIP_VAR* var /**< variable to add */
    227 );
    228
    229/** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
    231 SCIP_PROB* prob, /**< problem data */
    232 BMS_BLKMEM* blkmem, /**< block memory */
    233 SCIP_SET* set, /**< global SCIP settings */
    234 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    235 SCIP_VAR* var, /**< problem variable */
    236 SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
    237 );
    238
    239/** actually removes the deleted variables from the problem and releases them */
    241 SCIP_PROB* prob, /**< problem data */
    242 BMS_BLKMEM* blkmem, /**< block memory */
    243 SCIP_SET* set, /**< global SCIP settings */
    244 SCIP_STAT* stat, /**< dynamic problem statistics */
    245 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    246 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
    247 SCIP_LP* lp, /**< current LP data (may be NULL) */
    248 SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
    249 );
    250
    251/** changes the type of a variable in the problem */
    253 SCIP_PROB* prob, /**< problem data */
    254 BMS_BLKMEM* blkmem, /**< block memory */
    255 SCIP_SET* set, /**< global SCIP settings */
    256 SCIP_PRIMAL* primal, /**< primal data */
    257 SCIP_LP* lp, /**< current LP data */
    258 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
    259 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    260 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
    261 SCIP_VAR* var, /**< variable to change type of */
    262 SCIP_VARTYPE vartype /**< new type of variable */
    263 );
    264
    265/** changes the implied integral type of a variable in the problem */
    267 SCIP_PROB* prob, /**< problem data */
    268 BMS_BLKMEM* blkmem, /**< block memory */
    269 SCIP_SET* set, /**< global SCIP settings */
    270 SCIP_PRIMAL* primal, /**< primal data */
    271 SCIP_LP* lp, /**< current LP data */
    272 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
    273 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    274 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
    275 SCIP_VAR* var, /**< variable to change implied integral type of */
    276 SCIP_IMPLINTTYPE impltype /**< new implied integral type of variable */
    277 );
    278
    279/** informs problem, that the given loose problem variable changed its status */
    281 SCIP_PROB* prob, /**< problem data */
    282 BMS_BLKMEM* blkmem, /**< block memory */
    283 SCIP_SET* set, /**< global SCIP settings */
    284 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
    285 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
    286 SCIP_VAR* var /**< problem variable */
    287 );
    288
    289/** adds constraint's name to the namespace */
    291 SCIP_PROB* prob, /**< problem data */
    292 SCIP_CONS* cons /**< constraint */
    293 );
    294
    295/** remove constraint's name from the namespace */
    297 SCIP_PROB* prob, /**< problem data */
    298 SCIP_CONS* cons /**< constraint */
    299 );
    300
    301/** adds constraint to the problem and captures it;
    302 * a local constraint is automatically upgraded into a global constraint
    303 */
    305 SCIP_PROB* prob, /**< problem data */
    306 SCIP_SET* set, /**< global SCIP settings */
    307 SCIP_STAT* stat, /**< dynamic problem statistics */
    308 SCIP_CONS* cons /**< constraint to add */
    309 );
    310
    311/** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
    312 * constraint may be invalid after the call
    313 */
    315 SCIP_PROB* prob, /**< problem data */
    316 BMS_BLKMEM* blkmem, /**< block memory */
    317 SCIP_SET* set, /**< global SCIP settings */
    318 SCIP_STAT* stat, /**< dynamic problem statistics */
    319 SCIP_CONS* cons /**< constraint to remove */
    320 );
    321
    322/** remembers the current number of constraints in the problem's internal data structure
    323 * - resets maximum number of constraints to current number of constraints
    324 * - remembers current number of constraints as starting number of constraints
    325 */
    327 SCIP_PROB* prob /**< problem data */
    328 );
    329
    330/** sets objective sense: minimization or maximization */
    332 SCIP_PROB* prob, /**< problem data */
    333 SCIP_OBJSENSE objsense /**< new objective sense */
    334 );
    335
    336/** adds value to objective offset */
    338 SCIP_PROB* prob, /**< problem data */
    339 SCIP_Real addval /**< value to add to objective offset */
    340 );
    341
    342/** adds value to objective offset */
    344 SCIP_PROB* prob, /**< problem data */
    345 SCIP_RATIONAL* addval /**< value to add to objective offset */
    346 );
    347
    348/** sets the dual bound on objective function */
    350 SCIP_PROB* prob, /**< problem data */
    351 SCIP_Real dualbound /**< external dual bound */
    352 );
    353
    354/** sets limit on objective function, such that only solutions better than this limit are accepted */
    356 SCIP_PROB* prob, /**< problem data */
    357 SCIP_Real objlim /**< external objective limit */
    358 );
    359
    360/** informs the problem, that its objective value is always integral in every feasible solution */
    362 SCIP_PROB* prob /**< problem data */
    363 );
    364
    365/** sets integral objective value flag, if all variables with non-zero objective values are integral and have
    366 * integral objective value and also updates the cutoff bound if primal solution is already known
    367 */
    369 SCIP_PROB* transprob, /**< tranformed problem data */
    370 SCIP_PROB* origprob, /**< original problem data */
    371 BMS_BLKMEM* blkmem, /**< block memory */
    372 SCIP_SET* set, /**< global SCIP settings */
    373 SCIP_STAT* stat, /**< problem statistics data */
    374 SCIP_PRIMAL* primal, /**< primal data */
    375 SCIP_TREE* tree, /**< branch and bound tree */
    376 SCIP_REOPT* reopt, /**< reoptimization data structure */
    377 SCIP_LP* lp, /**< current LP data */
    378 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    379 SCIP_EVENTFILTER* eventfilter /**< global event filter */
    380 );
    381
    382/** if possible, scales objective function such that it is integral with gcd = 1 */
    384 SCIP_PROB* transprob, /**< tranformed problem data */
    385 SCIP_PROB* origprob, /**< original problem data */
    386 BMS_BLKMEM* blkmem, /**< block memory */
    387 SCIP_SET* set, /**< global SCIP settings */
    388 SCIP_STAT* stat, /**< problem statistics data */
    389 SCIP_PRIMAL* primal, /**< primal data */
    390 SCIP_TREE* tree, /**< branch and bound tree */
    391 SCIP_REOPT* reopt, /**< reoptimization data structure */
    392 SCIP_LP* lp, /**< current LP data */
    393 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    394 SCIP_EVENTFILTER* eventfilter /**< global event filter */
    395 );
    396
    397/** remembers the current solution as root solution in the problem variables */
    399 SCIP_PROB* prob, /**< problem data */
    400 SCIP_SET* set, /**< global SCIP settings */
    401 SCIP_STAT* stat, /**< SCIP statistics */
    402 SCIP_LP* lp, /**< current LP data */
    403 SCIP_Bool roothaslp /**< is the root solution from LP? */
    404 );
    405
    406/** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
    408 SCIP_PROB* prob, /**< problem data */
    409 SCIP_SET* set, /**< global SCIP settings */
    410 SCIP_STAT* stat, /**< problem statistics */
    411 SCIP_LP* lp /**< current LP data */
    412 );
    413
    414/** informs problem, that the presolving process was finished, and updates all internal data structures */
    416 SCIP_PROB* prob, /**< problem data */
    417 SCIP_SET* set /**< global SCIP settings */
    418 );
    419
    420/** initializes problem for branch and bound process */
    422 SCIP_PROB* prob, /**< problem data */
    423 SCIP_SET* set /**< global SCIP settings */
    424 );
    425
    426/** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
    428 SCIP_PROB* prob, /**< problem data */
    429 BMS_BLKMEM* blkmem, /**< block memory */
    430 SCIP_SET* set, /**< global SCIP settings */
    431 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
    432 SCIP_LP* lp, /**< current LP data */
    433 SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
    434 );
    435
    436
    437
    438
    439/*
    440 * problem information
    441 */
    442
    443/** sets problem name */
    445 SCIP_PROB* prob, /**< problem data */
    446 const char* name /**< name to be set */
    447 );
    448
    449/** returns the number of variables with non-zero objective coefficient */
    451 SCIP_PROB* prob, /**< problem data */
    452 SCIP_SET* set /**< global SCIP settings */
    453 );
    454
    455/** returns the minimal absolute non-zero objective coefficient
    456 *
    457 * @note currently, this is only used for statistics and printed after the solving process. if this information is
    458 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
    459 * absolute non-zero coefficient every time an objective coefficient has changed.
    460 */
    462 SCIP_PROB* prob, /**< problem data */
    463 SCIP_SET* set /**< global SCIP settings */
    464 );
    465
    466/** returns the maximal absolute non-zero objective coefficient
    467 *
    468 * @note currently, this is only used for statistics and printed after the solving process. if this information is
    469 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
    470 * absolute non-zero coefficient every time an objective coefficient has changed.
    471 */
    473 SCIP_PROB* prob, /**< problem data */
    474 SCIP_SET* set /**< global SCIP settings */
    475 );
    476
    477/** update the number of variables with non-zero objective coefficient */
    479 SCIP_PROB* prob, /**< problem data */
    480 SCIP_SET* set, /**< global SCIP settings */
    481 SCIP_Real oldobj, /**< old objective value for variable */
    482 SCIP_Real newobj /**< new objective value for variable */
    483 );
    484
    485/** update the dual bound if its better as the current one */
    487 SCIP_PROB* prob, /**< problem data */
    488 SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
    489 );
    490
    491/** invalidates the dual bound */
    493 SCIP_PROB* prob /**< problem data */
    494 );
    495
    496/** returns the external value of the given internal objective value */
    498 SCIP_PROB* transprob, /**< tranformed problem data */
    499 SCIP_PROB* origprob, /**< original problem data */
    500 SCIP_SET* set, /**< global SCIP settings */
    501 SCIP_Real objval /**< internal objective value */
    502 );
    503
    504/** computes the exact external value of the given internal objective value */
    506 SCIP_PROB* transprob, /**< tranformed problem data */
    507 SCIP_PROB* origprob, /**< original problem data */
    508 SCIP_SET* set, /**< global SCIP settings */
    509 SCIP_RATIONAL* objval, /**< internal objective value */
    510 SCIP_RATIONAL* objvalext /**< store external objective value */
    511 );
    512
    513/** returns the internal value of the given external objective value */
    515 SCIP_PROB* transprob, /**< tranformed problem data */
    516 SCIP_PROB* origprob, /**< original problem data */
    517 SCIP_SET* set, /**< global SCIP settings */
    518 SCIP_Real objval /**< external objective value */
    519 );
    520
    521/** returns the internal value of the given external objective value */
    523 SCIP_PROB* transprob, /**< tranformed problem data */
    524 SCIP_PROB* origprob, /**< original problem data */
    525 SCIP_SET* set, /**< global SCIP settings */
    526 SCIP_RATIONAL* objval, /**< internal objective value */
    527 SCIP_RATIONAL* objvalint /**< store internal objective value */
    528 );
    529
    530/** returns variable of the problem with given name */
    532 SCIP_PROB* prob, /**< problem data */
    533 const char* name /**< name of variable to find */
    534 );
    535
    536/** returns constraint of the problem with given name */
    538 SCIP_PROB* prob, /**< problem data */
    539 const char* name /**< name of variable to find */
    540 );
    541
    542/** displays current pseudo solution */
    544 SCIP_PROB* prob, /**< problem data */
    545 SCIP_SET* set, /**< global SCIP settings */
    546 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
    547 );
    548
    549/** outputs problem statistics */
    551 SCIP_PROB* prob, /**< problem data */
    552 SCIP_SET* set, /**< global SCIP settings */
    553 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    554 FILE* file /**< output file (or NULL for standard output) */
    555 );
    556
    557
    558/** collects problem statistics in a SCIP_DATATREE object */
    560 SCIP_PROB* prob, /**< problem data */
    561 BMS_BLKMEM* blkmem, /**< block memory */
    562 SCIP_SET* set, /**< global SCIP settings */
    563 SCIP_DATATREE* datatree /**< data tree */
    564 );
    565
    566#ifndef NDEBUG
    567
    568/* In debug mode, the following methods are implemented as function calls to ensure
    569 * type validity.
    570 */
    571
    572/** is the problem permuted */
    574 SCIP_PROB* prob
    575 );
    576
    577/** mark the problem as permuted */
    579 SCIP_PROB* prob
    580 );
    581
    582/** is the problem data transformed */
    584 SCIP_PROB* prob /**< problem data */
    585 );
    586
    587/** returns whether the objective value is known to be integral in every feasible solution */
    589 SCIP_PROB* prob /**< problem data */
    590 );
    591
    592/** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
    593 * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
    594 */
    596 SCIP_PROB* prob, /**< problem data */
    597 SCIP_SET* set, /**< global SCIP settings */
    598 SCIP_LP* lp /**< current LP data */
    599 );
    600
    601/** gets limit on objective function in external space */
    603 SCIP_PROB* prob, /**< problem data */
    604 SCIP_SET* set /**< global SCIP settings */
    605 );
    606
    607/** gets user problem data */
    609 SCIP_PROB* prob /**< problem */
    610 );
    611
    612/** gets problem name */
    613const char* SCIPprobGetName(
    614 SCIP_PROB* prob /**< problem data */
    615 );
    616
    617/** gets number of problem variables */
    619 SCIP_PROB* prob /**< problem data */
    620 );
    621
    622/** gets number of binary problem variables */
    624 SCIP_PROB* prob /**< problem data */
    625 );
    626
    627/** gets number of integer problem variables */
    629 SCIP_PROB* prob /**< problem data */
    630 );
    631
    632/** gets number of implied integral problem variables of any type */
    634 SCIP_PROB* prob /**< problem data */
    635 );
    636
    637/** gets number of continuous problem variables */
    639 SCIP_PROB* prob /**< problem data */
    640 );
    641
    642/** gets problem variables */
    644 SCIP_PROB* prob /**< problem data */
    645 );
    646
    647/** gets number of fixed variables */
    649 SCIP_PROB* prob /**< problem data */
    650 );
    651
    652/** gets fixed variables */
    654 SCIP_PROB* prob /**< problem data */
    655 );
    656
    657/** gets number of variables existing when problem solving started */
    659 SCIP_PROB* prob /**< problem data */
    660 );
    661
    662/** gets number of problem constraints */
    664 SCIP_PROB* prob /**< problem data */
    665 );
    666
    667/** gets problem constraints */
    669 SCIP_PROB* prob /**< problem data */
    670 );
    671
    672/** gets maximum number of constraints existing at the same time */
    674 SCIP_PROB* prob /**< problem data */
    675 );
    676
    677/** gets number of constraints existing when problem solving started */
    679 SCIP_PROB* prob /**< problem data */
    680 );
    681
    682/** gets the objective sense */
    684 SCIP_PROB* prob /**< problem data */
    685 );
    686
    687/** gets the objective offset */
    689 SCIP_PROB* prob /**< problem data */
    690 );
    691
    692/** gets the objective scalar */
    694 SCIP_PROB* prob /**< problem data */
    695 );
    696
    697/** gets the exact objective offset */
    699 SCIP_PROB* prob /**< problem data */
    700 );
    701
    702/** gets the exact objective scalar */
    704 SCIP_PROB* prob /**< problem data */
    705 );
    706
    707/** is constraint compression enabled for this problem? */
    709 SCIP_PROB* prob /**< problem data */
    710 );
    711
    712/** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
    714 SCIP_PROB* prob /**< problem data */
    715 );
    716
    717#else
    718
    719/* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
    720 * speed up the algorithms.
    721 */
    722
    723#define SCIPprobIsPermuted(prob) ((prob)->permuted)
    724#define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
    725#define SCIPprobIsTransformed(prob) ((prob)->transformed)
    726#define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
    727#define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
    728#define SCIPprobGetObjlim(prob,set) \
    729 ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
    730#define SCIPprobGetData(prob) ((prob)->probdata)
    731#define SCIPprobGetName(prob) ((prob)->name)
    732#define SCIPprobGetName(prob) ((prob)->name)
    733#define SCIPprobGetNVars(prob) ((prob)->nvars)
    734#define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
    735#define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
    736#define SCIPprobGetNImplVars(prob) ((prob)->nbinimplvars + (prob)->nintimplvars + (prob)->ncontimplvars)
    737#define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
    738#define SCIPprobGetVars(prob) ((prob)->vars)
    739#define SCIPprobGetNFixedVars(prob) ((prob)->nfixedvars)
    740#define SCIPprobGetFixedVars(prob) ((prob)->fixedvars)
    741#define SCIPprobGetStartNVars(prob) ((prob)->startnvars)
    742#define SCIPprobGetNConss(prob) ((prob)->nconss)
    743#define SCIPprobGetConss(prob) ((prob)->conss)
    744#define SCIPprobGetMaxNConss(prob) ((prob)->maxnconss)
    745#define SCIPprobGetStartNConss(prob) ((prob)->startnconss)
    746#define SCIPprobGetObjsense(prob) ((prob)->objsense)
    747#define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
    748#define SCIPprobGetObjscale(prob) ((prob)->objscale)
    749#define SCIPprobGetObjoffsetExact(prob) ((prob)->objoffsetexact)
    750#define SCIPprobGetObjscaleExact(prob) ((prob)->objscaleexact)
    751#define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
    752#define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
    753#endif
    754
    755#ifdef __cplusplus
    756}
    757#endif
    758
    759#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    memory allocation routines
    struct BMS_BlkMem BMS_BLKMEM
    Definition: memory.h:437
    void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
    Definition: prob.c:2686
    SCIP_RETCODE SCIPprobCollectStatistics(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_DATATREE *datatree)
    Definition: prob.c:2708
    SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
    Definition: prob.c:2783
    SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2290
    void SCIPprobSetTrans(SCIP_PROB *prob, SCIP_DECL_PROBTRANS((*probtrans)))
    Definition: prob.c:379
    void SCIPprobUpdateNObjVars(SCIP_PROB *prob, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
    Definition: prob.c:1874
    int SCIPprobGetNContVars(SCIP_PROB *prob)
    Definition: prob.c:2904
    SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
    Definition: prob.c:1470
    SCIP_RETCODE SCIPprobTransform(SCIP_PROB *source, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CONFLICTSTORE *conflictstore, SCIP_PROB **target)
    Definition: prob.c:553
    void SCIPprobSetInitsol(SCIP_PROB *prob, SCIP_DECL_PROBINITSOL((*probinitsol)))
    Definition: prob.c:401
    SCIP_CONS ** SCIPprobGetConss(SCIP_PROB *prob)
    Definition: prob.c:2958
    int SCIPprobGetNFixedVars(SCIP_PROB *prob)
    Definition: prob.c:2922
    void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
    Definition: prob.c:1918
    SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
    Definition: prob.c:1065
    void SCIPprobInternObjvalExact(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_RATIONAL *objval, SCIP_RATIONAL *objvalint)
    Definition: prob.c:2599
    void SCIPprobSetObjIntegral(SCIP_PROB *prob)
    Definition: prob.c:1724
    SCIP_RETCODE SCIPprobVarChangedStatus(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
    Definition: prob.c:1412
    const char * SCIPprobGetName(SCIP_PROB *prob)
    Definition: prob.c:2859
    SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
    Definition: prob.c:2994
    int SCIPprobGetNConss(SCIP_PROB *prob)
    Definition: prob.c:2949
    int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2423
    SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2470
    SCIP_RETCODE SCIPprobPerformVarDeletions(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand)
    Definition: prob.c:1233
    void SCIPprobSetExitsol(SCIP_PROB *prob, SCIP_DECL_PROBEXITSOL((*probexitsol)))
    Definition: prob.c:412
    SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2497
    SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
    Definition: prob.c:1081
    int SCIPprobGetStartNConss(SCIP_PROB *prob)
    Definition: prob.c:2976
    SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2837
    void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
    Definition: prob.c:1891
    SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
    Definition: prob.c:2299
    void SCIPprobMarkNConss(SCIP_PROB *prob)
    Definition: prob.c:1643
    SCIP_RATIONAL * SCIPprobGetObjoffsetExact(SCIP_PROB *prob)
    Definition: prob.c:3014
    SCIP_OBJSENSE SCIPprobGetObjsense(SCIP_PROB *prob)
    Definition: prob.c:2985
    void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: prob.c:2664
    int SCIPprobGetStartNVars(SCIP_PROB *prob)
    Definition: prob.c:2940
    SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
    Definition: prob.c:2409
    void SCIPprobSetDeltrans(SCIP_PROB *prob, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
    Definition: prob.c:390
    void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
    Definition: prob.c:778
    SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
    Definition: prob.c:3004
    void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
    Definition: prob.c:1669
    SCIP_RETCODE SCIPprobChgVarImplType(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_IMPLINTTYPE impltype)
    Definition: prob.c:1358
    void SCIPprobSetCopy(SCIP_PROB *prob, SCIP_DECL_PROBCOPY((*probcopy)))
    Definition: prob.c:423
    SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
    Definition: prob.c:2626
    int SCIPprobGetNImplVars(SCIP_PROB *prob)
    Definition: prob.c:2895
    SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
    Definition: prob.c:2334
    SCIP_RETCODE SCIPprobCreate(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata, SCIP_Bool transformed)
    Definition: prob.c:272
    void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
    Definition: prob.c:1713
    SCIP_VAR ** SCIPprobGetFixedVars(SCIP_PROB *prob)
    Definition: prob.c:2931
    SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
    Definition: prob.c:1171
    SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
    Definition: prob.c:2813
    SCIP_RETCODE SCIPprobAddVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_VAR *var)
    Definition: prob.c:1096
    void SCIPprobEnableConsCompression(SCIP_PROB *prob)
    Definition: prob.c:3046
    SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
    Definition: prob.c:2645
    void SCIPprobMarkPermuted(SCIP_PROB *prob)
    Definition: prob.c:2793
    SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
    Definition: prob.c:1485
    int SCIPprobGetNIntVars(SCIP_PROB *prob)
    Definition: prob.c:2886
    SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
    Definition: prob.c:1578
    int SCIPprobGetNVars(SCIP_PROB *prob)
    Definition: prob.c:2868
    SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
    Definition: prob.c:2849
    SCIP_RETCODE SCIPprobChgVarType(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_VARTYPE vartype)
    Definition: prob.c:1304
    SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
    Definition: prob.c:2520
    void SCIPprobResortVars(SCIP_PROB *prob)
    Definition: prob.c:684
    SCIP_RETCODE SCIPprobFree(SCIP_PROB **prob, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
    Definition: prob.c:434
    SCIP_RETCODE SCIPprobCopy(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP *sourcescip, SCIP_PROB *sourceprob, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool original, SCIP_Bool global)
    Definition: prob.c:208
    SCIP_RETCODE SCIPprobScaleObj(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
    Definition: prob.c:2026
    SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
    Definition: prob.c:1507
    SCIP_RETCODE SCIPprobCheckObjIntegral(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
    Definition: prob.c:1804
    int SCIPprobGetMaxNConss(SCIP_PROB *prob)
    Definition: prob.c:2967
    SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
    Definition: prob.c:658
    void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
    Definition: prob.c:1702
    void SCIPprobStoreRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool roothaslp)
    Definition: prob.c:2165
    int SCIPprobGetNBinVars(SCIP_PROB *prob)
    Definition: prob.c:2877
    SCIP_RATIONAL * SCIPprobGetObjscaleExact(SCIP_PROB *prob)
    Definition: prob.c:3025
    SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
    Definition: prob.c:2913
    void SCIPprobSetDelorig(SCIP_PROB *prob, SCIP_DECL_PROBDELORIG((*probdelorig)))
    Definition: prob.c:368
    SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
    Definition: prob.c:2825
    void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
    Definition: prob.c:2192
    SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
    Definition: prob.c:2803
    void SCIPprobExternObjvalExact(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_RATIONAL *objval, SCIP_RATIONAL *objvalext)
    Definition: prob.c:2546
    SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
    Definition: prob.c:3036
    void SCIPprobAddObjoffsetExact(SCIP_PROB *prob, SCIP_RATIONAL *addval)
    Definition: prob.c:1685
    void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
    Definition: prob.c:1656
    SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
    Definition: prob.c:2573
    SCIP_RETCODE SCIPprobSortConssCheck(SCIP_PROB *prob)
    Definition: prob.c:748
    datastructures for storing and manipulating the main problem
    Definition: heur_padm.c:135
    type definitions for branching rules
    type definitions for conflict store
    type definitions for constraints and constraint handlers
    type definitions for data tree
    type definitions for managing events
    type definitions for implications, variable bounds, and cliques
    type definitions for LP management
    type definitions for message output methods
    type definitions for miscellaneous datastructures
    type definitions for collecting primal CIP solutions and primal informations
    type definitions for storing and manipulating the main problem
    #define SCIP_DECL_PROBCOPY(x)
    Definition: type_prob.h:150
    #define SCIP_DECL_PROBDELTRANS(x)
    Definition: type_prob.h:95
    #define SCIP_DECL_PROBEXITSOL(x)
    Definition: type_prob.h:119
    struct SCIP_ProbData SCIP_PROBDATA
    Definition: type_prob.h:53
    #define SCIP_DECL_PROBDELORIG(x)
    Definition: type_prob.h:64
    #define SCIP_DECL_PROBTRANS(x)
    Definition: type_prob.h:83
    #define SCIP_DECL_PROBINITSOL(x)
    Definition: type_prob.h:106
    enum SCIP_Objsense SCIP_OBJSENSE
    Definition: type_prob.h:50
    type definitions for rational numbers
    type definitions for collecting reoptimization information
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for global SCIP settings
    type definitions for problem statistics
    type definitions for branch and bound tree
    type definitions for problem variables
    enum SCIP_ImplintType SCIP_IMPLINTTYPE
    Definition: type_var.h:117
    enum SCIP_Vartype SCIP_VARTYPE
    Definition: type_var.h:73