Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_lp.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 scip_lp.c
    26 * @ingroup OTHER_CFILES
    27 * @brief public methods for the LP relaxation, rows and columns
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Gerald Gamrath
    31 * @author Leona Gottwald
    32 * @author Stefan Heinz
    33 * @author Gregor Hendel
    34 * @author Thorsten Koch
    35 * @author Alexander Martin
    36 * @author Marc Pfetsch
    37 * @author Michael Winkler
    38 * @author Kati Wolter
    39 *
    40 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
    41 */
    42
    43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    44
    46#include "lpi/lpi.h"
    47#include "scip/conflict.h"
    48#include "scip/debug.h"
    49#include "scip/lp.h"
    50#include "scip/lpexact.h"
    51#include "scip/prob.h"
    52#include "scip/pub_lp.h"
    53#include "scip/pub_message.h"
    54#include "scip/pub_tree.h"
    55#include "scip/scip_exact.h"
    56#include "scip/scip_lpexact.h"
    57#include "scip/scip_lp.h"
    58#include "scip/scip_mem.h"
    59#include "scip/scip_message.h"
    60#include "scip/scip_numerics.h"
    61#include "scip/scip_sol.h"
    63#include "scip/scip_tree.h"
    64#include "scip/scip_var.h"
    65#include "scip/set.h"
    66#include "scip/solve.h"
    67#include "scip/struct_lp.h"
    68#include "scip/struct_mem.h"
    69#include "scip/struct_primal.h"
    70#include "scip/struct_prob.h"
    71#include "scip/struct_scip.h"
    72#include "scip/struct_set.h"
    73#include "scip/struct_stat.h"
    74#include "scip/struct_tree.h"
    75#include "scip/tree.h"
    76#include "scip/var.h"
    77
    78/** returns whether the LP was or is to be solved in the current node
    79 *
    80 * @return whether the LP was or is to be solved in the current node.
    81 *
    82 * @pre This method can be called if @p scip is in one of the following stages:
    83 * - \ref SCIP_STAGE_SOLVING
    84 *
    85 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    86 */
    88 SCIP* scip /**< SCIP data structure */
    89 )
    90{
    92
    93 return SCIPtreeHasCurrentNodeLP(scip->tree);
    94}
    95
    96/** returns whether the LP of the current node is already constructed
    97 *
    98 * @return whether the LP of the current node is already constructed.
    99 *
    100 * @pre This method can be called if @p scip is in one of the following stages:
    101 * - \ref SCIP_STAGE_SOLVING
    102 *
    103 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    104 */
    106 SCIP* scip /**< SCIP data structure */
    107 )
    108{
    110
    112}
    113
    114/** makes sure that the LP of the current node is loaded and may be accessed through the LP information methods
    115 *
    116 * @warning Contructing the LP might change the amount of variables known in the transformed problem and therefore also
    117 * the variables array of SCIP (returned by SCIPgetVars() and SCIPgetVarsData()), so it might be necessary to
    118 * call one of the later method after this one
    119 *
    120 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    121 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    122 *
    123 * @pre This method can be called if @p scip is in one of the following stages:
    124 * - \ref SCIP_STAGE_SOLVING
    125 *
    126 * @note The result stored in @p cutoff is safe to use in exact solving mode.
    127 *
    128 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    129 */
    131 SCIP* scip, /**< SCIP data structure */
    132 SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
    133 )
    134{
    136
    137 SCIP_CALL( SCIPconstructCurrentLP(scip->mem->probmem, scip->set, scip->stat, scip->transprob, scip->origprob,
    138 scip->tree, scip->reopt, scip->lp, scip->pricestore, scip->sepastore, scip->cutpool, scip->branchcand,
    139 scip->eventqueue, scip->eventfilter, scip->cliquetable, FALSE, cutoff) );
    140
    141 return SCIP_OKAY;
    142}
    143
    144/** makes sure that the LP of the current node is flushed
    145 *
    146 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    147 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    148 *
    149 * @pre This method can be called if @p scip is in one of the following stages:
    150 * - \ref SCIP_STAGE_SOLVING
    151 *
    152 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    153 */
    155 SCIP* scip /**< SCIP data structure */
    156 )
    157{
    159
    160 SCIP_CALL( SCIPlpFlush(scip->lp, scip->mem->probmem, scip->set, scip->transprob, scip->eventqueue) );
    161
    162 return SCIP_OKAY;
    163}
    164
    165/** gets solution status of current LP
    166 *
    167 * @return the solution status of current LP.
    168 *
    169 * @pre This method can be called if @p scip is in one of the following stages:
    170 * - \ref SCIP_STAGE_SOLVING
    171 *
    172 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    173 */
    175 SCIP* scip /**< SCIP data structure */
    176 )
    177{
    179
    181 return SCIPlpGetSolstat(scip->lp);
    182 else
    184}
    185
    186/** returns whether the current LP solution passed the primal feasibility check
    187 *
    188 * @return whether the current LP solution passed the primal feasibility check.
    189 *
    190 * @pre This method can be called if @p scip is in one of the following stages:
    191 * - \ref SCIP_STAGE_SOLVING
    192 *
    193 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    194 */
    196 SCIP* scip /**< SCIP data structure */
    197 )
    198{
    200
    201 return SCIPlpIsPrimalReliable(scip->lp);
    202}
    203
    204/** returns whether the current LP solution passed the dual feasibility check
    205 *
    206 * @returns whether the current LP solution passed the dual feasibility check.
    207 *
    208 * @pre This method can be called if @p scip is in one of the following stages:
    209 * - \ref SCIP_STAGE_SOLVING
    210 *
    211 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    212 */
    214 SCIP* scip /**< SCIP data structure */
    215 )
    216{
    218
    219 return SCIPlpIsDualReliable(scip->lp);
    220}
    221
    222/** returns whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound
    223 *
    224 * @return whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound.
    225 *
    226 * @pre This method can be called if @p scip is in one of the following stages:
    227 * - \ref SCIP_STAGE_SOLVING
    228 *
    229 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    230 */
    232 SCIP* scip /**< SCIP data structure */
    233 )
    234{
    236
    237 return SCIPlpIsRelax(scip->lp);
    238}
    239
    240/** gets objective value of current LP (which is the sum of column and loose objective value)
    241 *
    242 * @return the objective value of current LP (which is the sum of column and loose objective value).
    243 *
    244 * @pre This method can be called if @p scip is in one of the following stages:
    245 * - \ref SCIP_STAGE_SOLVING
    246 *
    247 * @note This method returns the objective value of the current LP solution, which might be primal or dual infeasible
    248 * if a limit was hit during solving. It must not be used as a dual bound if the LP solution status returned by
    249 * SCIPgetLPSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
    250 *
    251 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    252 */
    254 SCIP* scip /**< SCIP data structure */
    255 )
    256{
    258
    259 return SCIPlpGetObjval(scip->lp, scip->set, scip->transprob);
    260}
    261
    262/** gets part of objective value of current LP that results from COLUMN variables only
    263 *
    264 * @return the part of objective value of current LP that results from COLUMN variables only.
    265 *
    266 * @pre This method can be called if @p scip is in one of the following stages:
    267 * - \ref SCIP_STAGE_SOLVING
    268 *
    269 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    270 */
    272 SCIP* scip /**< SCIP data structure */
    273 )
    274{
    276
    277 return SCIPlpGetColumnObjval(scip->lp);
    278}
    279
    280/** gets part of objective value of current LP that results from LOOSE variables only
    281 *
    282 * @return part of objective value of current LP that results from LOOSE variables only.
    283 *
    284 * @pre This method can be called if @p scip is in one of the following stages:
    285 * - \ref SCIP_STAGE_SOLVING
    286 *
    287 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    288 */
    290 SCIP* scip /**< SCIP data structure */
    291 )
    292{
    294
    295 return SCIPlpGetLooseObjval(scip->lp, scip->set, scip->transprob);
    296}
    297
    298/** gets the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
    299 * function) global bound
    300 *
    301 * @return the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
    302 * function) global bound.
    303 *
    304 * @pre This method can be called if @p scip is in one of the following stages:
    305 * - \ref SCIP_STAGE_INITPRESOLVE
    306 * - \ref SCIP_STAGE_PRESOLVING
    307 * - \ref SCIP_STAGE_EXITPRESOLVE
    308 * - \ref SCIP_STAGE_PRESOLVED
    309 * - \ref SCIP_STAGE_INITSOLVE
    310 * - \ref SCIP_STAGE_SOLVING
    311 *
    312 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    313 */
    315 SCIP* scip /**< SCIP data structure */
    316 )
    317{
    318 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetGlobalPseudoObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    319
    320 return SCIPlpGetGlobalPseudoObjval(scip->lp, scip->set, scip->transprob);
    321}
    322
    323/** gets the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
    324 * objective function) local bound
    325 *
    326 * @return the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
    327 * objective function) local bound.
    328 *
    329 * @pre This method can be called if @p scip is in one of the following stages:
    330 * - \ref SCIP_STAGE_INITPRESOLVE
    331 * - \ref SCIP_STAGE_PRESOLVING
    332 * - \ref SCIP_STAGE_EXITPRESOLVE
    333 * - \ref SCIP_STAGE_PRESOLVED
    334 * - \ref SCIP_STAGE_INITSOLVE
    335 * - \ref SCIP_STAGE_SOLVING
    336 *
    337 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    338 */
    340 SCIP* scip /**< SCIP data structure */
    341 )
    342{
    344
    345 return SCIPlpGetPseudoObjval(scip->lp, scip->set, scip->transprob);
    346}
    347
    348/** returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound
    349 *
    350 * @return whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound.
    351 *
    352 * @pre This method can be called if @p scip is in one of the following stages:
    353 * - \ref SCIP_STAGE_SOLVING
    354 *
    355 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    356 */
    358 SCIP* scip /**< SCIP data structure */
    359 )
    360{
    362
    363 return SCIPlpIsRootLPRelax(scip->lp);
    364}
    365
    366/** gets the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved
    367 *
    368 * @return the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved.
    369 *
    370 * @pre This method can be called if @p scip is in one of the following stages:
    371 * - \ref SCIP_STAGE_INITPRESOLVE
    372 * - \ref SCIP_STAGE_PRESOLVING
    373 * - \ref SCIP_STAGE_EXITPRESOLVE
    374 * - \ref SCIP_STAGE_SOLVING
    375 *
    376 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    377 */
    379 SCIP* scip /**< SCIP data structure */
    380 )
    381{
    383
    384 return SCIPlpGetRootObjval(scip->lp);
    385}
    386
    387/** gets part of the objective value of the root node LP that results from COLUMN variables only;
    388 * returns SCIP_INVALID if the root node LP was not (yet) solved
    389 *
    390 * @return the part of the objective value of the root node LP that results from COLUMN variables only;
    391 * or SCIP_INVALID if the root node LP was not (yet) solved.
    392 *
    393 * @pre This method can be called if @p scip is in one of the following stages:
    394 * - \ref SCIP_STAGE_INITPRESOLVE
    395 * - \ref SCIP_STAGE_PRESOLVING
    396 * - \ref SCIP_STAGE_EXITPRESOLVE
    397 * - \ref SCIP_STAGE_SOLVING
    398 *
    399 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    400 */
    402 SCIP* scip /**< SCIP data structure */
    403 )
    404{
    405 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPRootColumnObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    406
    408}
    409
    410/** gets part of the objective value of the root node LP that results from LOOSE variables only;
    411 * returns SCIP_INVALID if the root node LP was not (yet) solved
    412 *
    413 * @return the part of the objective value of the root node LP that results from LOOSE variables only;
    414 * or SCIP_INVALID if the root node LP was not (yet) solved.
    415 *
    416 * @pre This method can be called if @p scip is in one of the following stages:
    417 * - \ref SCIP_STAGE_INITPRESOLVE
    418 * - \ref SCIP_STAGE_PRESOLVING
    419 * - \ref SCIP_STAGE_EXITPRESOLVE
    420 * - \ref SCIP_STAGE_SOLVING
    421 *
    422 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    423 */
    425 SCIP* scip /**< SCIP data structure */
    426 )
    427{
    428 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPRootLooseObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    429
    430 return SCIPlpGetRootLooseObjval(scip->lp);
    431}
    432
    433/** gets current primal feasibility tolerance of LP */
    435 SCIP* scip /**< SCIP data structure */
    436 )
    437{
    439
    440 return SCIPlpGetFeastol(scip->lp);
    441}
    442
    443/** sets primal feasibility tolerance of LP */
    445 SCIP* scip, /**< SCIP data structure */
    446 SCIP_Real newfeastol /**< new primal feasibility tolerance for LP */
    447 )
    448{
    450
    451 SCIPlpSetFeastol(scip->lp, scip->set, newfeastol);
    452}
    453
    454/** resets primal feasibility tolerance of LP
    455 *
    456 * Sets primal feasibility tolerance to min of numerics/lpfeastolfactor * numerics/feastol and relaxfeastol.
    457 */
    459 SCIP* scip /**< SCIP data structure */
    460 )
    461{
    463
    464 SCIPlpResetFeastol(scip->lp, scip->set);
    465}
    466
    467/** gets current LP columns along with the current number of LP columns
    468 *
    469 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    470 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    471 *
    472 * @pre This method can be called if @p scip is in one of the following stages:
    473 * - \ref SCIP_STAGE_SOLVING
    474 *
    475 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    476 */
    478 SCIP* scip, /**< SCIP data structure */
    479 SCIP_COL*** cols, /**< pointer to store the array of LP columns, or NULL */
    480 int* ncols /**< pointer to store the number of LP columns, or NULL */
    481 )
    482{
    484
    486 {
    487 if( cols != NULL )
    488 *cols = SCIPlpGetCols(scip->lp);
    489 if( ncols != NULL )
    490 *ncols = SCIPlpGetNCols(scip->lp);
    491 }
    492 else
    493 {
    494 if( cols != NULL )
    495 *cols = NULL;
    496 if( ncols != NULL )
    497 *ncols = 0;
    498 }
    499
    500 return SCIP_OKAY;
    501}
    502
    503/** gets current LP columns
    504 *
    505 * @return the current LP columns.
    506 *
    507 * @pre This method can be called if @p scip is in one of the following stages:
    508 * - \ref SCIP_STAGE_SOLVING
    509 *
    510 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    511 */
    513 SCIP* scip /**< SCIP data structure */
    514 )
    515{
    517
    519 return SCIPlpGetCols(scip->lp);
    520 else
    521 return NULL;
    522}
    523
    524/** gets current number of LP columns
    525 *
    526 * @return the current number of LP columns.
    527 *
    528 * @pre This method can be called if @p scip is in one of the following stages:
    529 * - \ref SCIP_STAGE_SOLVING
    530 *
    531 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    532 */
    534 SCIP* scip /**< SCIP data structure */
    535 )
    536{
    538
    540 return SCIPlpGetNCols(scip->lp);
    541 else
    542 return 0;
    543}
    544
    545/** gets current number of unfixed LP columns
    546 *
    547 * @return the current number of unfixed LP columns.
    548 *
    549 * @pre This method can be called if @p scip is in one of the following stages:
    550 * - \ref SCIP_STAGE_SOLVING
    551 *
    552 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    553 */
    555 SCIP* scip /**< SCIP data structure */
    556 )
    557{
    559
    561 return SCIPlpGetNUnfixedCols(scip->lp, scip->set->num_epsilon);
    562 else
    563 return 0;
    564}
    565
    566/** gets current LP rows along with the current number of LP rows
    567 *
    568 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    569 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    570 *
    571 * @pre This method can be called if @p scip is in one of the following stages:
    572 * - \ref SCIP_STAGE_SOLVING
    573 *
    574 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    575 */
    577 SCIP* scip, /**< SCIP data structure */
    578 SCIP_ROW*** rows, /**< pointer to store the array of LP rows, or NULL */
    579 int* nrows /**< pointer to store the number of LP rows, or NULL */
    580 )
    581{
    583
    585 {
    586 if( rows != NULL )
    587 *rows = SCIPlpGetRows(scip->lp);
    588 if( nrows != NULL )
    589 *nrows = SCIPlpGetNRows(scip->lp);
    590 }
    591 else
    592 {
    593 if( rows != NULL )
    594 *rows = NULL;
    595 if( nrows != NULL )
    596 *nrows = 0;
    597 }
    598
    599 return SCIP_OKAY;
    600}
    601
    602/** gets current LP rows
    603 *
    604 * @return the current LP rows.
    605 *
    606 * @pre This method can be called if @p scip is in one of the following stages:
    607 * - \ref SCIP_STAGE_SOLVING
    608 *
    609 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    610 */
    612 SCIP* scip /**< SCIP data structure */
    613 )
    614{
    616
    618 return SCIPlpGetRows(scip->lp);
    619 else
    620 return NULL;
    621}
    622
    623/** gets current number of LP rows
    624 *
    625 * @return the current number of LP rows.
    626 *
    627 * @pre This method can be called if @p scip is in one of the following stages:
    628 * - \ref SCIP_STAGE_SOLVING
    629 *
    630 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    631 */
    633 SCIP* scip /**< SCIP data structure */
    634 )
    635{
    637
    639 return SCIPlpGetNRows(scip->lp);
    640 else
    641 return 0;
    642}
    643
    644/** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
    645 * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
    646 *
    647 * @return TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
    648 * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing.
    649 *
    650 * @pre This method can be called if @p scip is in one of the following stages:
    651 * - \ref SCIP_STAGE_SOLVING
    652 *
    653 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    654 */
    656 SCIP* scip /**< SCIP data structure */
    657 )
    658{
    660
    661 return SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp);
    662}
    663
    664/** returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis
    665 *
    666 * @return whether the current LP solution is basic, i.e. is defined by a valid simplex basis.
    667 *
    668 * @pre This method can be called if @p scip is in one of the following stages:
    669 * - \ref SCIP_STAGE_SOLVING
    670 *
    671 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    672 */
    674 SCIP* scip /**< SCIP data structure */
    675 )
    676{
    678
    679 return SCIPlpIsSolBasic(scip->lp);
    680}
    681
    682/** gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1
    683 *
    684 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    685 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    686 *
    687 * @pre This method can be called if @p scip is in one of the following stages:
    688 * - \ref SCIP_STAGE_SOLVING
    689 *
    690 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    691 */
    693 SCIP* scip, /**< SCIP data structure */
    694 int* basisind /**< pointer to store basis indices ready to keep number of rows entries */
    695 )
    696{
    698
    699 if( !SCIPlpIsSolBasic(scip->lp) )
    700 {
    701 SCIPerrorMessage("current LP solution is not basic\n");
    702 return SCIP_INVALIDCALL;
    703 }
    704
    705 SCIP_CALL( SCIPlpGetBasisInd(scip->lp, basisind) );
    706
    707 return SCIP_OKAY;
    708}
    709
    710/** gets a row from the inverse basis matrix B^-1
    711 *
    712 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    713 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    714 *
    715 * @pre This method can be called if @p scip is in one of the following stages:
    716 * - \ref SCIP_STAGE_SOLVING
    717 *
    718 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    719 */
    721 SCIP* scip, /**< SCIP data structure */
    722 int r, /**< row number */
    723 SCIP_Real* coefs, /**< array to store the coefficients of the row */
    724 int* inds, /**< array to store the non-zero indices, or NULL */
    725 int* ninds /**< pointer to store the number of non-zero indices, or NULL
    726 * (-1: if we do not store sparsity informations) */
    727 )
    728{
    730
    731 if( !SCIPlpIsSolBasic(scip->lp) )
    732 {
    733 SCIPerrorMessage("current LP solution is not basic\n");
    734 return SCIP_INVALIDCALL;
    735 }
    736
    737 SCIP_CALL( SCIPlpGetBInvRow(scip->lp, r, coefs, inds, ninds) );
    738
    739 /* debug check if the coef is the r-th line of the inverse matrix B^-1 */
    740 SCIP_CALL( SCIPdebugCheckBInvRow(scip, r, coefs) ); /*lint !e506 !e774*/
    741
    742 return SCIP_OKAY;
    743}
    744
    745/** gets a column from the inverse basis matrix B^-1
    746 *
    747 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    748 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    749 *
    750 * @pre This method can be called if @p scip is in one of the following stages:
    751 * - \ref SCIP_STAGE_SOLVING
    752 *
    753 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    754 */
    756 SCIP* scip, /**< SCIP data structure */
    757 int c, /**< column number of B^-1; this is NOT the number of the column in the LP
    758 * returned by SCIPcolGetLPPos(); you have to call SCIPgetBasisInd()
    759 * to get the array which links the B^-1 column numbers to the row and
    760 * column numbers of the LP! c must be between 0 and nrows-1, since the
    761 * basis has the size nrows * nrows */
    762 SCIP_Real* coefs, /**< array to store the coefficients of the column */
    763 int* inds, /**< array to store the non-zero indices, or NULL */
    764 int* ninds /**< pointer to store the number of non-zero indices, or NULL
    765 * (-1: if we do not store sparsity informations) */
    766 )
    767{
    769
    770 if( !SCIPlpIsSolBasic(scip->lp) )
    771 {
    772 SCIPerrorMessage("current LP solution is not basic\n");
    773 return SCIP_INVALIDCALL;
    774 }
    775
    776 SCIP_CALL( SCIPlpGetBInvCol(scip->lp, c, coefs, inds, ninds) );
    777
    778 return SCIP_OKAY;
    779}
    780
    781/** gets a row from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A)
    782 *
    783 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    784 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    785 *
    786 * @pre This method can be called if @p scip is in one of the following stages:
    787 * - \ref SCIP_STAGE_SOLVING
    788 *
    789 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    790 */
    792 SCIP* scip, /**< SCIP data structure */
    793 int r, /**< row number */
    794 SCIP_Real* binvrow, /**< row in B^-1 from prior call to SCIPgetLPBInvRow(), or NULL */
    795 SCIP_Real* coefs, /**< array to store the coefficients of the row */
    796 int* inds, /**< array to store the non-zero indices, or NULL */
    797 int* ninds /**< pointer to store the number of non-zero indices, or NULL
    798 * (-1: if we do not store sparsity informations) */
    799 )
    800{
    802
    803 if( !SCIPlpIsSolBasic(scip->lp) )
    804 {
    805 SCIPerrorMessage("current LP solution is not basic\n");
    806 return SCIP_INVALIDCALL;
    807 }
    808
    809 SCIP_CALL( SCIPlpGetBInvARow(scip->lp, r, binvrow, coefs, inds, ninds) );
    810
    811 return SCIP_OKAY;
    812}
    813
    814/** gets a column from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A),
    815 * i.e., it computes B^-1 * A_c with A_c being the c'th column of A
    816 *
    817 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    818 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    819 *
    820 * @pre This method can be called if @p scip is in one of the following stages:
    821 * - \ref SCIP_STAGE_SOLVING
    822 *
    823 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    824 */
    826 SCIP* scip, /**< SCIP data structure */
    827 int c, /**< column number which can be accessed by SCIPcolGetLPPos() */
    828 SCIP_Real* coefs, /**< array to store the coefficients of the column */
    829 int* inds, /**< array to store the non-zero indices, or NULL */
    830 int* ninds /**< pointer to store the number of non-zero indices, or NULL
    831 * (-1: if we do not store sparsity informations) */
    832 )
    833{
    835
    836 if( !SCIPlpIsSolBasic(scip->lp) )
    837 {
    838 SCIPerrorMessage("current LP solution is not basic\n");
    839 return SCIP_INVALIDCALL;
    840 }
    841
    842 SCIP_CALL( SCIPlpGetBInvACol(scip->lp, c, coefs, inds, ninds) );
    843
    844 return SCIP_OKAY;
    845}
    846
    847/** calculates a weighted sum of all LP rows; for negative weights, the left and right hand side of the corresponding
    848 * LP row are swapped in the summation
    849 *
    850 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    851 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    852 *
    853 * @pre This method can be called if @p scip is in one of the following stages:
    854 * - \ref SCIP_STAGE_SOLVING
    855 *
    856 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    857 */
    859 SCIP* scip, /**< SCIP data structure */
    860 SCIP_Real* weights, /**< row weights in row summation */
    861 SCIP_REALARRAY* sumcoef, /**< array to store sum coefficients indexed by variables' probindex */
    862 SCIP_Real* sumlhs, /**< pointer to store the left hand side of the row summation */
    863 SCIP_Real* sumrhs /**< pointer to store the right hand side of the row summation */
    864 )
    865{
    867
    868 SCIP_CALL( SCIPlpSumRows(scip->lp, scip->set, scip->transprob, weights, sumcoef, sumlhs, sumrhs) );
    869
    870 return SCIP_OKAY;
    871}
    872
    873/** interrupts or disables the interrupt of the currently ongoing lp solve; if the lp is not currently constructed just returns with no effect
    874 *
    875 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    876 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    877 *
    878 * @pre This method can be called in any SCIP stage
    879 */
    881 SCIP* scip, /**< SCIP data structure */
    882 SCIP_Bool interrupt /**< TRUE if interrupt should be set, FALSE if it should be disabled */
    883 )
    884{
    885 SCIP_CALL( SCIPcheckStage(scip, "SCIPinterruptLP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) );
    886
    887 if( scip->lp == NULL )
    888 return SCIP_OKAY;
    889
    890 SCIP_CALL( SCIPlpInterrupt(scip->lp, interrupt) );
    891 if( interrupt )
    892 scip->stat->userinterrupt = TRUE;
    893
    894 return SCIP_OKAY;
    895}
    896
    897/** writes current LP to a file
    898 *
    899 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    900 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    901 *
    902 * @pre This method can be called if @p scip is in one of the following stages:
    903 * - \ref SCIP_STAGE_SOLVING
    904 *
    905 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    906 */
    908 SCIP* scip, /**< SCIP data structure */
    909 const char* filename /**< file name */
    910 )
    911{
    913
    915 {
    916 SCIPerrorMessage("LP not constructed\n");
    917 return SCIP_INVALIDDATA;
    918 }
    919
    920 if( !scip->lp->flushed )
    921 SCIPwarningMessage(scip, "LP not flushed\n");
    922
    923 SCIP_CALL( SCIPlpWrite(scip->lp, filename) );
    924
    925 return SCIP_OKAY;
    926}
    927
    928/** writes MIP relaxation of the current branch-and-bound node to a file
    929 *
    930 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    931 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    932 *
    933 * @pre This method can be called if @p scip is in one of the following stages:
    934 * - \ref SCIP_STAGE_SOLVING
    935 *
    936 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    937 */
    939 SCIP* scip, /**< SCIP data structure */
    940 const char* filename, /**< file name */
    941 SCIP_Bool genericnames, /**< should generic names like x_i and row_j be used in order to avoid
    942 * troubles with reserved symbols? */
    943 SCIP_Bool origobj, /**< should the original objective function be used? */
    944 SCIP_Bool lazyconss /**< output removable rows as lazy constraints? */
    945 )
    946{
    948
    950 {
    951 SCIPerrorMessage("LP not constructed\n");
    952 return SCIP_INVALIDDATA;
    953 }
    954
    955 if( !scip->lp->flushed )
    956 SCIPwarningMessage(scip, "LP not flushed\n");
    957
    958 SCIP_CALL( SCIPlpWriteMip(scip->lp, scip->set, scip->messagehdlr, filename, genericnames,
    959 origobj, scip->origprob->objsense, scip->transprob->objscale, scip->transprob->objoffset, lazyconss) );
    960
    961 return SCIP_OKAY;
    962}
    963
    964/** gets the LP interface of SCIP;
    965 * with the LPI you can use all of the methods defined in lpi/lpi.h;
    966 *
    967 * @warning You have to make sure, that the full internal state of the LPI does not change or is recovered completely
    968 * after the end of the method that uses the LPI. In particular, if you manipulate the LP or its solution
    969 * (e.g. by calling one of the SCIPlpiAdd...() or one of the SCIPlpiSolve...() methods), you have to check in
    970 * advance with SCIPlpiWasSolved() whether the LP is currently solved. If this is the case, you have to make
    971 * sure, the internal solution status is recovered completely at the end of your method. This can be achieved
    972 * by getting the LPI state before applying any LPI manipulations with SCIPlpiGetState() and restoring it
    973 * afterwards with SCIPlpiSetState() and SCIPlpiFreeState(). Additionally you have to resolve the LP with the
    974 * appropriate SCIPlpiSolve...() call in order to reinstall the internal solution status.
    975 *
    976 * @warning Make also sure, that all parameter values that you have changed are set back to their original values.
    977 *
    978 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    979 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    980 *
    981 * @pre This method can be called if @p scip is in one of the following stages:
    982 * - \ref SCIP_STAGE_TRANSFORMED
    983 * - \ref SCIP_STAGE_INITPRESOLVE
    984 * - \ref SCIP_STAGE_PRESOLVING
    985 * - \ref SCIP_STAGE_EXITPRESOLVE
    986 * - \ref SCIP_STAGE_PRESOLVED
    987 * - \ref SCIP_STAGE_INITSOLVE
    988 * - \ref SCIP_STAGE_SOLVING
    989 * - \ref SCIP_STAGE_SOLVED
    990 * - \ref SCIP_STAGE_EXITSOLVE
    991 *
    992 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    993 */
    995 SCIP* scip, /**< SCIP data structure */
    996 SCIP_LPI** lpi /**< pointer to store the LP interface */
    997 )
    998{
    999 assert(lpi != NULL);
    1000
    1002
    1003 *lpi = SCIPlpGetLPI(scip->lp);
    1004
    1005 return SCIP_OKAY;
    1006}
    1007
    1008/** displays quality information about the current LP solution. An LP solution need to be available; information printed
    1009 * is subject to what the LP solver supports
    1010 *
    1011 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1012 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1013 *
    1014 * @pre This method can be called if @p scip is in one of the following stages:
    1015 * - \ref SCIP_STAGE_INIT
    1016 * - \ref SCIP_STAGE_PROBLEM
    1017 * - \ref SCIP_STAGE_TRANSFORMED
    1018 * - \ref SCIP_STAGE_INITPRESOLVE
    1019 * - \ref SCIP_STAGE_PRESOLVING
    1020 * - \ref SCIP_STAGE_EXITPRESOLVE
    1021 * - \ref SCIP_STAGE_PRESOLVED
    1022 * - \ref SCIP_STAGE_SOLVING
    1023 * - \ref SCIP_STAGE_SOLVED
    1024 * - \ref SCIP_STAGE_FREE
    1025 *
    1026 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    1027 *
    1028 * @note The printing process is done via the message handler system.
    1029 */
    1031 SCIP* scip, /**< SCIP data structure */
    1032 FILE* file /**< output file (or NULL for standard output) */
    1033 )
    1034{
    1035 SCIP_LPI* lpi;
    1036 SCIP_Real quality;
    1037
    1038 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintLPSolutionQuality", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE) );
    1039
    1040 switch( scip->set->stage )
    1041 {
    1042 case SCIP_STAGE_INIT:
    1043 case SCIP_STAGE_PROBLEM:
    1049 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Problem not solving yet, no LP available.\n");
    1050 return SCIP_OKAY;
    1051
    1052 case SCIP_STAGE_SOLVING:
    1053 case SCIP_STAGE_SOLVED:
    1054 break;
    1055
    1056 default:
    1057 SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
    1058 return SCIP_INVALIDCALL;
    1059 } /*lint !e788*/
    1060
    1061 /* note that after diving mode, the LPI may only have the basis information, but SCIPlpiWasSolved() can be false; in
    1062 * this case, we will (depending on the LP solver) probably not obtain the quality measure; one solution would be to
    1063 * store the results of SCIPlpiGetRealSolQuality() within the SCIP_LP after each LP solve; this would have the added
    1064 * advantage, that we reduce direct access to the LPI, but it sounds potentially expensive
    1065 */
    1066 lpi = SCIPlpGetLPI(scip->lp);
    1067 assert(lpi != NULL);
    1068
    1070 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Basis matrix condition (estimated): ");
    1071 if( quality != SCIP_INVALID ) /*lint !e777*/
    1072 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%.6e\n", quality);
    1073 else
    1074 SCIPmessageFPrintInfo(scip->messagehdlr, file, "not available\n");
    1075
    1077 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Basis matrix condition (exact): ");
    1078 if( quality != SCIP_INVALID ) /*lint !e777*/
    1079 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%.6e\n", quality);
    1080 else
    1081 SCIPmessageFPrintInfo(scip->messagehdlr, file, "not available\n");
    1082
    1083 return SCIP_OKAY;
    1084}
    1085
    1086/** compute relative interior point to current LP
    1087 * @see SCIPlpComputeRelIntPoint
    1088 *
    1089 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1090 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1091 *
    1092 * @pre This method can be called if @p scip is in one of the following stages:
    1093 * - \ref SCIP_STAGE_TRANSFORMED
    1094 * - \ref SCIP_STAGE_INITPRESOLVE
    1095 * - \ref SCIP_STAGE_PRESOLVING
    1096 * - \ref SCIP_STAGE_EXITPRESOLVE
    1097 * - \ref SCIP_STAGE_PRESOLVED
    1098 * - \ref SCIP_STAGE_SOLVING
    1099 * - \ref SCIP_STAGE_SOLVED
    1100 *
    1101 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    1102 */
    1104 SCIP* scip, /**< SCIP data structure */
    1105 SCIP_Bool relaxrows, /**< should the rows be relaxed */
    1106 SCIP_Bool inclobjcutoff, /**< should a row for the objective cutoff be included */
    1107 SCIP_Real timelimit, /**< time limit for LP solver */
    1108 int iterlimit, /**< iteration limit for LP solver */
    1109 SCIP_SOL** point /**< relative interior point on exit */
    1110 )
    1111{
    1112 SCIP_Real* pointvals;
    1113 SCIP_Bool success;
    1114
    1115 SCIP_CALL( SCIPcheckStage(scip, "SCIPcomputeLPRelIntPoint", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
    1116
    1117 assert(scip != NULL);
    1118 assert(scip->lp != NULL);
    1119 assert(point != NULL);
    1120
    1121 *point = NULL;
    1122
    1124
    1125 SCIP_CALL( SCIPlpComputeRelIntPoint(scip->set, scip->messagehdlr, scip->lp, scip->transprob,
    1126 relaxrows, inclobjcutoff, timelimit, iterlimit, pointvals, &success) );
    1127
    1128 /* if successful, create new solution with point values */
    1129 if( success )
    1130 {
    1131 int i;
    1132
    1133 SCIP_CALL( SCIPcreateSol(scip, point, NULL) );
    1134
    1135 for( i = 0; i < SCIPlpGetNCols(scip->lp); ++i )
    1136 {
    1137 SCIP_CALL( SCIPsetSolVal(scip, *point, SCIPcolGetVar(SCIPlpGetCols(scip->lp)[i]), pointvals[i]) );
    1138 }
    1139 }
    1140
    1141 SCIPfreeBufferArray(scip, &pointvals);
    1142
    1143 return SCIP_OKAY;
    1144}
    1145
    1146/*
    1147 * LP column methods
    1148 */
    1149
    1150/** returns the reduced costs of a column in the last (feasible) LP
    1151 *
    1152 * @return the reduced costs of a column in the last (feasible) LP
    1153 *
    1154 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1155 * - \ref SCIP_STAGE_SOLVING
    1156 * - \ref SCIP_STAGE_SOLVED
    1157 *
    1158 * @note calling this method in SCIP_STAGE_SOLVED is only recommended to experienced users and should only be called
    1159 * for pure LP instances (without presolving)
    1160 *
    1161 * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
    1162 */
    1164 SCIP* scip, /**< SCIP data structure */
    1165 SCIP_COL* col /**< LP column */
    1166 )
    1167{
    1169
    1170 if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
    1171 {
    1172 SCIPerrorMessage("cannot get reduced costs, because node LP is not processed\n");
    1173 SCIPABORT();
    1174 return 0.0; /*lint !e527*/
    1175 }
    1176
    1177 return SCIPcolGetRedcost(col, scip->stat, scip->lp);
    1178}
    1179
    1180
    1181/** returns the Farkas coefficient of a column in the last (infeasible) LP
    1182 *
    1183 * @return the Farkas coefficient of a column in the last (infeasible) LP
    1184 *
    1185 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1186 * - \ref SCIP_STAGE_SOLVING
    1187 * - \ref SCIP_STAGE_SOLVED
    1188 */
    1190 SCIP* scip, /**< SCIP data structure */
    1191 SCIP_COL* col /**< LP column */
    1192 )
    1193{
    1195
    1196 if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
    1197 {
    1198 SCIPerrorMessage("cannot get Farkas coeff, because node LP is not processed\n");
    1199 SCIPABORT();
    1200 return 0.0; /*lint !e527*/
    1201 }
    1202
    1203 return SCIPcolGetFarkasCoef(col, scip->stat, scip->lp);
    1204}
    1205
    1206/** marks a column to be not removable from the LP in the current node
    1207 *
    1208 * @pre this method can be called in the following stage of the SCIP solving process:
    1209 * - \ref SCIP_STAGE_SOLVING
    1210 */
    1212 SCIP* scip, /**< SCIP data structure */
    1213 SCIP_COL* col /**< LP column */
    1214 )
    1215{
    1216 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPmarkColNotRemovableLocal", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1217
    1219}
    1220
    1221/*
    1222 * LP row methods
    1223 */
    1224
    1225/** creates and captures an LP row from a constraint handler
    1226 *
    1227 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1228 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1229 *
    1230 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1231 * - \ref SCIP_STAGE_SOLVING
    1232 */
    1234 SCIP* scip, /**< SCIP data structure */
    1235 SCIP_ROW** row, /**< pointer to row */
    1236 SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
    1237 const char* name, /**< name of row */
    1238 int len, /**< number of nonzeros in the row */
    1239 SCIP_COL** cols, /**< array with columns of row entries */
    1240 SCIP_Real* vals, /**< array with coefficients of row entries */
    1241 SCIP_Real lhs, /**< left hand side of row */
    1242 SCIP_Real rhs, /**< right hand side of row */
    1243 SCIP_Bool local, /**< is row only valid locally? */
    1244 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1245 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1246 )
    1247{
    1248 assert(conshdlr != NULL);
    1249
    1250 /* Note: Rows can only be created in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1251 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowConshdlr", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1252
    1253 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1254 name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_CONSHDLR, (void*) conshdlr, local, modifiable, removable) );
    1255
    1256 return SCIP_OKAY;
    1257}
    1258
    1259/** creates and captures an LP row from a constraint
    1260 *
    1261 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1262 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1263 *
    1264 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1265 * - \ref SCIP_STAGE_SOLVING
    1266 */
    1268 SCIP* scip, /**< SCIP data structure */
    1269 SCIP_ROW** row, /**< pointer to row */
    1270 SCIP_CONS* cons, /**< constraint that creates the row */
    1271 const char* name, /**< name of row */
    1272 int len, /**< number of nonzeros in the row */
    1273 SCIP_COL** cols, /**< array with columns of row entries */
    1274 SCIP_Real* vals, /**< array with coefficients of row entries */
    1275 SCIP_Real lhs, /**< left hand side of row */
    1276 SCIP_Real rhs, /**< right hand side of row */
    1277 SCIP_Bool local, /**< is row only valid locally? */
    1278 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1279 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1280 )
    1281{
    1282 assert(cons != NULL);
    1283
    1284 /* Note: Rows can only be created in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1286
    1287 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1288 name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_CONS, (void*) cons, local, modifiable, removable) );
    1289
    1290 return SCIP_OKAY;
    1291}
    1292
    1293/** creates and captures an LP row from a separator
    1294 *
    1295 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1296 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1297 *
    1298 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1299 * - \ref SCIP_STAGE_SOLVING
    1300 */
    1302 SCIP* scip, /**< SCIP data structure */
    1303 SCIP_ROW** row, /**< pointer to row */
    1304 SCIP_SEPA* sepa, /**< separator that creates the row */
    1305 const char* name, /**< name of row */
    1306 int len, /**< number of nonzeros in the row */
    1307 SCIP_COL** cols, /**< array with columns of row entries */
    1308 SCIP_Real* vals, /**< array with coefficients of row entries */
    1309 SCIP_Real lhs, /**< left hand side of row */
    1310 SCIP_Real rhs, /**< right hand side of row */
    1311 SCIP_Bool local, /**< is row only valid locally? */
    1312 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1313 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1314 )
    1315{
    1316 assert(sepa != NULL);
    1317
    1318 /* Note: Rows can only be created in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1320
    1321 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1322 name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_SEPA, (void*) sepa, local, modifiable, removable) );
    1323
    1324 return SCIP_OKAY;
    1325}
    1326
    1327/** creates and captures an LP row from an unspecified source
    1328 *
    1329 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1330 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1331 *
    1332 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1333 * - \ref SCIP_STAGE_SOLVING
    1334 */
    1336 SCIP* scip, /**< SCIP data structure */
    1337 SCIP_ROW** row, /**< pointer to row */
    1338 const char* name, /**< name of row */
    1339 int len, /**< number of nonzeros in the row */
    1340 SCIP_COL** cols, /**< array with columns of row entries */
    1341 SCIP_Real* vals, /**< array with coefficients of row entries */
    1342 SCIP_Real lhs, /**< left hand side of row */
    1343 SCIP_Real rhs, /**< right hand side of row */
    1344 SCIP_Bool local, /**< is row only valid locally? */
    1345 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1346 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1347 )
    1348{
    1349 /* Note: Rows can only be created in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1350 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowUnspec", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1351
    1352 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1353 name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_UNSPEC, NULL, local, modifiable, removable) );
    1354
    1355 return SCIP_OKAY;
    1356}
    1357
    1358/** creates and captures an LP row without any coefficients from a constraint handler
    1359 *
    1360 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1361 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1362 *
    1363 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1364 * - \ref SCIP_STAGE_INITSOLVE
    1365 * - \ref SCIP_STAGE_SOLVING
    1366 */
    1368 SCIP* scip, /**< SCIP data structure */
    1369 SCIP_ROW** row, /**< pointer to row */
    1370 SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
    1371 const char* name, /**< name of row */
    1372 SCIP_Real lhs, /**< left hand side of row */
    1373 SCIP_Real rhs, /**< right hand side of row */
    1374 SCIP_Bool local, /**< is row only valid locally? */
    1375 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1376 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1377 )
    1378{
    1379 assert(conshdlr != NULL);
    1380
    1381 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowConshdlr", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1382
    1383 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1384 name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_CONSHDLR, (void*) conshdlr, local, modifiable, removable) );
    1385
    1386 return SCIP_OKAY;
    1387}
    1388
    1389/** creates and captures an LP row without any coefficients from a constraint
    1390 *
    1391 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1392 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1393 *
    1394 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1395 * - \ref SCIP_STAGE_INITSOLVE
    1396 * - \ref SCIP_STAGE_SOLVING
    1397 */
    1399 SCIP* scip, /**< SCIP data structure */
    1400 SCIP_ROW** row, /**< pointer to row */
    1401 SCIP_CONS* cons, /**< constraint that creates the row */
    1402 const char* name, /**< name of row */
    1403 SCIP_Real lhs, /**< left hand side of row */
    1404 SCIP_Real rhs, /**< right hand side of row */
    1405 SCIP_Bool local, /**< is row only valid locally? */
    1406 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1407 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1408 )
    1409{
    1410 assert(cons != NULL);
    1411
    1412 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1413
    1414 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1415 name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_CONS, (void*) cons, local, modifiable, removable) );
    1416
    1417 return SCIP_OKAY;
    1418}
    1419
    1420/** creates and captures an LP row without any coefficients from a separator
    1421 *
    1422 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1423 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1424 *
    1425 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1426 * - \ref SCIP_STAGE_INITSOLVE
    1427 * - \ref SCIP_STAGE_SOLVING
    1428 */
    1430 SCIP* scip, /**< SCIP data structure */
    1431 SCIP_ROW** row, /**< pointer to row */
    1432 SCIP_SEPA* sepa, /**< separator that creates the row */
    1433 const char* name, /**< name of row */
    1434 SCIP_Real lhs, /**< left hand side of row */
    1435 SCIP_Real rhs, /**< right hand side of row */
    1436 SCIP_Bool local, /**< is row only valid locally? */
    1437 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1438 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1439 )
    1440{
    1441 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowSepa", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1442
    1443 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1444 name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_SEPA, (void*) sepa, local, modifiable, removable) );
    1445
    1446 return SCIP_OKAY;
    1447}
    1448
    1449/** creates and captures an LP row without any coefficients from an unspecified source
    1450 *
    1451 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1452 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1453 *
    1454 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1455 * - \ref SCIP_STAGE_INITSOLVE
    1456 * - \ref SCIP_STAGE_SOLVING
    1457 */
    1459 SCIP* scip, /**< SCIP data structure */
    1460 SCIP_ROW** row, /**< pointer to row */
    1461 const char* name, /**< name of row */
    1462 SCIP_Real lhs, /**< left hand side of row */
    1463 SCIP_Real rhs, /**< right hand side of row */
    1464 SCIP_Bool local, /**< is row only valid locally? */
    1465 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
    1466 SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
    1467 )
    1468{
    1469 SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowUnspec", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1470
    1471 SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
    1472 name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_UNSPEC, NULL, local, modifiable, removable) );
    1473
    1474 return SCIP_OKAY;
    1475}
    1476
    1477/** increases usage counter of LP row
    1478 *
    1479 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1480 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1481 *
    1482 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1483 * - \ref SCIP_STAGE_INITSOLVE
    1484 * - \ref SCIP_STAGE_SOLVING
    1485 */
    1487 SCIP* scip, /**< SCIP data structure */
    1488 SCIP_ROW* row /**< row to capture */
    1489 )
    1490{
    1492
    1493 SCIProwCapture(row);
    1494
    1495 return SCIP_OKAY;
    1496}
    1497
    1498/** decreases usage counter of LP row, and frees memory if necessary
    1499 *
    1500 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1501 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1502 *
    1503 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1504 * - \ref SCIP_STAGE_INITSOLVE
    1505 * - \ref SCIP_STAGE_SOLVING
    1506 * - \ref SCIP_STAGE_EXITSOLVE
    1507 */
    1509 SCIP* scip, /**< SCIP data structure */
    1510 SCIP_ROW** row /**< pointer to LP row */
    1511 )
    1512{
    1514
    1515 SCIP_CALL( SCIProwRelease(row, scip->mem->probmem, scip->set, scip->lp) );
    1516
    1517 return SCIP_OKAY;
    1518}
    1519
    1520/** changes left hand side of LP row
    1521 *
    1522 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1523 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1524 *
    1525 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1526 * - \ref SCIP_STAGE_INITSOLVE
    1527 * - \ref SCIP_STAGE_SOLVING
    1528 */
    1530 SCIP* scip, /**< SCIP data structure */
    1531 SCIP_ROW* row, /**< LP row */
    1532 SCIP_Real lhs /**< new left hand side */
    1533 )
    1534{
    1536
    1537 assert(!SCIPlpDiving(scip->lp) || (row->lppos == -1));
    1538
    1539 SCIP_CALL( SCIProwChgLhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, lhs) );
    1540
    1541 return SCIP_OKAY;
    1542}
    1543
    1544/** changes right hand side of LP row
    1545 *
    1546 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1547 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1548 *
    1549 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1550 * - \ref SCIP_STAGE_INITSOLVE
    1551 * - \ref SCIP_STAGE_SOLVING
    1552 */
    1554 SCIP* scip, /**< SCIP data structure */
    1555 SCIP_ROW* row, /**< LP row */
    1556 SCIP_Real rhs /**< new right hand side */
    1557 )
    1558{
    1560
    1561 assert(!SCIPlpDiving(scip->lp) || (row->lppos == -1));
    1562
    1563 SCIP_CALL( SCIProwChgRhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, rhs) );
    1564
    1565 return SCIP_OKAY;
    1566}
    1567
    1568/** informs row, that all subsequent additions of variables to the row should be cached and not directly applied;
    1569 * after all additions were applied, SCIPflushRowExtensions() must be called;
    1570 * while the caching of row extensions is activated, information methods of the row give invalid results;
    1571 * caching should be used, if a row is build with SCIPaddVarToRow() calls variable by variable to increase
    1572 * the performance
    1573 *
    1574 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1575 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1576 *
    1577 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1578 * - \ref SCIP_STAGE_INITSOLVE
    1579 * - \ref SCIP_STAGE_SOLVING
    1580 */
    1582 SCIP* scip, /**< SCIP data structure */
    1583 SCIP_ROW* row /**< LP row */
    1584 )
    1585{
    1586 SCIP_CALL( SCIPcheckStage(scip, "SCIPcacheRowExtensions", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1587
    1588 /* delay the row sorting */
    1589 SCIProwDelaySort(row);
    1590
    1591 return SCIP_OKAY;
    1592}
    1593
    1594/** flushes all cached row extensions after a call of SCIPcacheRowExtensions() and merges coefficients with
    1595 * equal columns into a single coefficient
    1596 *
    1597 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1598 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1599 *
    1600 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1601 * - \ref SCIP_STAGE_INITSOLVE
    1602 * - \ref SCIP_STAGE_SOLVING
    1603 */
    1605 SCIP* scip, /**< SCIP data structure */
    1606 SCIP_ROW* row /**< LP row */
    1607 )
    1608{
    1609 SCIP_CALL( SCIPcheckStage(scip, "SCIPflushRowExtensions", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1610
    1611 /* force the row sorting, and merge equal column entries */
    1612 SCIProwForceSort(row, scip->set);
    1613
    1614 /* link row to columns */
    1615 SCIP_CALL( rowLink(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp) );
    1616
    1617 return SCIP_OKAY;
    1618}
    1619
    1620/** resolves variable to columns and adds them with the coefficient to the row
    1621 *
    1622 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1623 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1624 *
    1625 * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variable will not added.
    1626 *
    1627 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1628 * - \ref SCIP_STAGE_SOLVING
    1629 *
    1630 * @note In case calling this method in the enforcement process of an lp solution, it might be that some variables,
    1631 * that were not yet in the LP (e.g. dynamic columns) will change their lp solution value returned by SCIP.
    1632 * For example, a variable, which has a negative objective value, that has no column in the lp yet, is in the lp solution
    1633 * on its upper bound (variables with status SCIP_VARSTATUS_LOOSE are in an lp solution on it's best bound), but
    1634 * creating the column, changes the solution value (variable than has status SCIP_VARSTATUS_COLUMN, and the
    1635 * initialization sets the lp solution value) to 0.0. (This leads to the conclusion that, if a constraint was
    1636 * violated, the linear relaxation might not be violated anymore.)
    1637 *
    1638 * @note If the variable being added is FIXED (as given by the status SCIP_VARSTATUS_FIXED), then the variable is not
    1639 * added to the row, but the corresponding constant is added. Similarly, if the input variable is aggregated (as
    1640 * given by the status SCIP_VARSTATUS_AGGREGATED), then the input variable is substituted with its aggregation.
    1641 * For other cases, and to better understand the function behavior, please check the code of SCIPvarAddToRow.
    1642 *
    1643 * @note When several variables are added to a row with the use of this function, performance can be improved by
    1644 * calling SCIPcacheRowExtensions() before these additions and SCIPflushRowExtensions() after.
    1645 */
    1647 SCIP* scip, /**< SCIP data structure */
    1648 SCIP_ROW* row, /**< LP row */
    1649 SCIP_VAR* var, /**< problem variable */
    1650 SCIP_Real val /**< value of coefficient */
    1651 )
    1652{
    1653 /* Note: Variables can only be added to rows in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1655
    1656 SCIP_CALL( SCIPvarAddToRow(var, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp, row, val) );
    1657
    1658 return SCIP_OKAY;
    1659}
    1660
    1661/** resolves variables to columns and adds them with the coefficients to the row;
    1662 * this method caches the row extensions and flushes them afterwards to gain better performance
    1663 *
    1664 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1665 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1666 *
    1667 * @attention If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
    1668 *
    1669 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1670 * - \ref SCIP_STAGE_SOLVING
    1671 */
    1673 SCIP* scip, /**< SCIP data structure */
    1674 SCIP_ROW* row, /**< LP row */
    1675 int nvars, /**< number of variables to add to the row */
    1676 SCIP_VAR** vars, /**< problem variables to add */
    1677 SCIP_Real* vals /**< values of coefficients */
    1678 )
    1679{
    1680 int v;
    1681
    1682 assert(nvars == 0 || vars != NULL);
    1683 assert(nvars == 0 || vals != NULL);
    1684
    1685 /* Note: Variables can only be added to rows in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1687
    1688 /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
    1689 SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
    1690
    1691 /* delay the row sorting */
    1692 SCIProwDelaySort(row);
    1693
    1694 /* add the variables to the row */
    1695 for( v = 0; v < nvars; ++v )
    1696 {
    1697 SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
    1698 row, vals[v]) );
    1699 }
    1700
    1701 /* force the row sorting */
    1702 SCIProwForceSort(row, scip->set);
    1703
    1704 return SCIP_OKAY;
    1705}
    1706
    1707/** resolves variables to columns and adds them with the same single coefficient to the row;
    1708 * this method caches the row extensions and flushes them afterwards to gain better performance
    1709 *
    1710 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1711 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1712 *
    1713 * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variables will not added.
    1714 *
    1715 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1716 * - \ref SCIP_STAGE_SOLVING
    1717 */
    1719 SCIP* scip, /**< SCIP data structure */
    1720 SCIP_ROW* row, /**< LP row */
    1721 int nvars, /**< number of variables to add to the row */
    1722 SCIP_VAR** vars, /**< problem variables to add */
    1723 SCIP_Real val /**< unique value of all coefficients */
    1724 )
    1725{
    1726 int v;
    1727
    1728 assert(nvars == 0 || vars != NULL);
    1729
    1730 /* Note: Variables can only be added to rows in the solving stage, since otherwise the LP does not exist and, e.g., the norms cannot be computed correctly. */
    1731 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarsToRowSameCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1732
    1733 /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
    1734 SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
    1735
    1736 /* delay the row sorting */
    1737 SCIProwDelaySort(row);
    1738
    1739 /* add the variables to the row */
    1740 for( v = 0; v < nvars; ++v )
    1741 {
    1742 SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
    1743 row, val) );
    1744 }
    1745
    1746 /* force the row sorting */
    1747 SCIProwForceSort(row, scip->set);
    1748
    1749 return SCIP_OKAY;
    1750}
    1751
    1752/** tries to find a value, such that all row coefficients, if scaled with this value become integral
    1753 *
    1754 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1755 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1756 *
    1757 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1758 * - \ref SCIP_STAGE_INITSOLVE
    1759 * - \ref SCIP_STAGE_SOLVING
    1760 */
    1762 SCIP* scip, /**< SCIP data structure */
    1763 SCIP_ROW* row, /**< LP row */
    1764 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
    1765 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
    1766 SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
    1767 SCIP_Real maxscale, /**< maximal allowed scalar */
    1768 SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
    1769 SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
    1770 SCIP_Bool* success /**< stores whether returned value is valid */
    1771 )
    1772{
    1773 SCIP_CALL( SCIPcheckStage(scip, "SCIPcalcRowIntegralScalar", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1774
    1775 SCIP_CALL( SCIProwCalcIntegralScalar(row, scip->set, mindelta, maxdelta, maxdnom, maxscale,
    1776 usecontvars, intscalar, success) );
    1777
    1778 return SCIP_OKAY;
    1779}
    1780
    1781/** tries to scale row, s.t. all coefficients (of integer variables) become integral
    1782 *
    1783 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1784 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1785 *
    1786 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1787 * - \ref SCIP_STAGE_INITSOLVE
    1788 * - \ref SCIP_STAGE_SOLVING
    1789 */
    1791 SCIP* scip, /**< SCIP data structure */
    1792 SCIP_ROW* row, /**< LP row */
    1793 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
    1794 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
    1795 SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
    1796 SCIP_Real maxscale, /**< maximal value to scale row with */
    1797 SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
    1798 SCIP_Bool* success /**< stores whether row could be made rational */
    1799 )
    1800{
    1801 SCIP_CALL( SCIPcheckStage(scip, "SCIPmakeRowIntegral", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1802
    1803 SCIP_CALL( SCIProwMakeIntegral(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->stat, scip->lp, mindelta, maxdelta, maxdnom, maxscale,
    1804 usecontvars, success) );
    1805
    1806 return SCIP_OKAY;
    1807}
    1808
    1809/** marks a row to be not removable from the LP in the current node
    1810 *
    1811 * @pre this method can be called in the following stage of the SCIP solving process:
    1812 * - \ref SCIP_STAGE_SOLVING
    1813 */
    1815 SCIP* scip, /**< SCIP data structure */
    1816 SCIP_ROW* row /**< LP row */
    1817 )
    1818{
    1819 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPmarkRowNotRemovableLocal", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1820
    1822}
    1823
    1824/** returns number of integral columns in the row
    1825 *
    1826 * @return number of integral columns in the row
    1827 *
    1828 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1829 * - \ref SCIP_STAGE_INITSOLVE
    1830 * - \ref SCIP_STAGE_SOLVING
    1831 */
    1833 SCIP* scip, /**< SCIP data structure */
    1834 SCIP_ROW* row /**< LP row */
    1835 )
    1836{
    1838
    1839 return SCIProwGetNumIntCols(row, scip->set);
    1840}
    1841
    1842/** returns number of implied integral columns in the row
    1843 *
    1844 * @return number of implied integral columns in the row
    1845 *
    1846 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1847 * - \ref SCIP_STAGE_INITSOLVE
    1848 * - \ref SCIP_STAGE_SOLVING
    1849 */
    1851 SCIP* scip, /**< SCIP data structure */
    1852 SCIP_ROW* row /**< LP row */
    1853 )
    1854{
    1855 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowNumImpliedIntCols", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1856
    1857 return SCIProwGetNumImpliedIntCols(row, scip->set);
    1858}
    1859
    1860/** returns minimal absolute value of row vector's non-zero coefficients
    1861 *
    1862 * @return minimal absolute value of row vector's non-zero coefficients
    1863 *
    1864 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1865 * - \ref SCIP_STAGE_INITSOLVE
    1866 * - \ref SCIP_STAGE_SOLVING
    1867 */
    1869 SCIP* scip, /**< SCIP data structure */
    1870 SCIP_ROW* row /**< LP row */
    1871 )
    1872{
    1874
    1875 return SCIProwGetMinval(row, scip->set);
    1876}
    1877
    1878/** returns maximal absolute value of row vector's non-zero coefficients
    1879 *
    1880 * @return maximal absolute value of row vector's non-zero coefficients
    1881 *
    1882 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1883 * - \ref SCIP_STAGE_INITSOLVE
    1884 * - \ref SCIP_STAGE_SOLVING
    1885 */
    1887 SCIP* scip, /**< SCIP data structure */
    1888 SCIP_ROW* row /**< LP row */
    1889 )
    1890{
    1892
    1893 return SCIProwGetMaxval(row, scip->set);
    1894}
    1895
    1896/** returns the minimal activity of a row w.r.t. the column's bounds
    1897 *
    1898 * @return the minimal activity of a row w.r.t. the column's bounds
    1899 *
    1900 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1901 * - \ref SCIP_STAGE_SOLVING
    1902 */
    1904 SCIP* scip, /**< SCIP data structure */
    1905 SCIP_ROW* row /**< LP row */
    1906 )
    1907{
    1909
    1910 return SCIProwGetMinActivity(row, scip->set, scip->stat);
    1911}
    1912
    1913/** returns the maximal activity of a row w.r.t. the column's bounds
    1914 *
    1915 * @return the maximal activity of a row w.r.t. the column's bounds
    1916 *
    1917 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1918 * - \ref SCIP_STAGE_SOLVING
    1919 */
    1921 SCIP* scip, /**< SCIP data structure */
    1922 SCIP_ROW* row /**< LP row */
    1923 )
    1924{
    1926
    1927 return SCIProwGetMaxActivity(row, scip->set, scip->stat);
    1928}
    1929
    1930/** recalculates the activity of a row in the last LP solution
    1931 *
    1932 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1933 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1934 *
    1935 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1936 * - \ref SCIP_STAGE_SOLVING
    1937 */
    1939 SCIP* scip, /**< SCIP data structure */
    1940 SCIP_ROW* row /**< LP row */
    1941 )
    1942{
    1943 SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowLPActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1944
    1945 SCIProwRecalcLPActivity(row, scip->stat);
    1946
    1947 return SCIP_OKAY;
    1948}
    1949
    1950/** returns the activity of a row in the last LP solution
    1951 *
    1952 * @return activity of a row in the last LP solution
    1953 *
    1954 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1955 * - \ref SCIP_STAGE_SOLVING
    1956 */
    1958 SCIP* scip, /**< SCIP data structure */
    1959 SCIP_ROW* row /**< LP row */
    1960 )
    1961{
    1963
    1964 return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
    1965}
    1966
    1967/** returns the feasibility of a row in the last LP solution
    1968 *
    1969 * @return the feasibility of a row in the last LP solution: negative value means infeasibility
    1970 *
    1971 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1972 * - \ref SCIP_STAGE_SOLVING
    1973 */
    1975 SCIP* scip, /**< SCIP data structure */
    1976 SCIP_ROW* row /**< LP row */
    1977 )
    1978{
    1979 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowLPFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1980
    1981 return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
    1982}
    1983
    1984/** recalculates the activity of a row for the current pseudo solution
    1985 *
    1986 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    1987 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    1988 *
    1989 * @pre this method can be called in one of the following stages of the SCIP solving process:
    1990 * - \ref SCIP_STAGE_SOLVING
    1991 */
    1993 SCIP* scip, /**< SCIP data structure */
    1994 SCIP_ROW* row /**< LP row */
    1995 )
    1996{
    1997 SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    1998
    2000
    2001 return SCIP_OKAY;
    2002}
    2003
    2004/** returns the activity of a row for the current pseudo solution
    2005 *
    2006 * @return the activity of a row for the current pseudo solution
    2007 *
    2008 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2009 * - \ref SCIP_STAGE_SOLVING
    2010 */
    2012 SCIP* scip, /**< SCIP data structure */
    2013 SCIP_ROW* row /**< LP row */
    2014 )
    2015{
    2016 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2017
    2018 return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
    2019}
    2020
    2021/** returns the feasibility of a row for the current pseudo solution: negative value means infeasibility
    2022 *
    2023 * @return the feasibility of a row for the current pseudo solution: negative value means infeasibility
    2024 *
    2025 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2026 * - \ref SCIP_STAGE_SOLVING
    2027 */
    2029 SCIP* scip, /**< SCIP data structure */
    2030 SCIP_ROW* row /**< LP row */
    2031 )
    2032{
    2033 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2034
    2035 return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
    2036}
    2037
    2038/** recalculates the activity of a row in the last LP or pseudo solution
    2039 *
    2040 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2041 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2042 *
    2043 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2044 * - \ref SCIP_STAGE_SOLVING
    2045 */
    2047 SCIP* scip, /**< SCIP data structure */
    2048 SCIP_ROW* row /**< LP row */
    2049 )
    2050{
    2051 SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2052
    2053 if( SCIPtreeHasCurrentNodeLP(scip->tree) )
    2054 SCIProwRecalcLPActivity(row, scip->stat);
    2055 else
    2057
    2058 return SCIP_OKAY;
    2059}
    2060
    2061/** returns the activity of a row in the last LP or pseudo solution
    2062 *
    2063 * @return the activity of a row in the last LP or pseudo solution
    2064 *
    2065 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2066 * - \ref SCIP_STAGE_SOLVING
    2067 */
    2069 SCIP* scip, /**< SCIP data structure */
    2070 SCIP_ROW* row /**< LP row */
    2071 )
    2072{
    2074
    2075 if( SCIPtreeHasCurrentNodeLP(scip->tree) )
    2076 return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
    2077 else
    2078 return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
    2079}
    2080
    2081/** returns the feasibility of a row in the last LP or pseudo solution
    2082 *
    2083 * @return the feasibility of a row in the last LP or pseudo solution
    2084 *
    2085 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2086 * - \ref SCIP_STAGE_SOLVING
    2087 */
    2089 SCIP* scip, /**< SCIP data structure */
    2090 SCIP_ROW* row /**< LP row */
    2091 )
    2092{
    2094
    2095 if( SCIPtreeHasCurrentNodeLP(scip->tree) )
    2096 return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
    2097 else
    2098 return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
    2099}
    2100
    2101/** returns the activity of a row for the given primal solution
    2102 *
    2103 * @return the activitiy of a row for the given primal solution
    2104 *
    2105 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2106 * - \ref SCIP_STAGE_SOLVING
    2107 */
    2109 SCIP* scip, /**< SCIP data structure */
    2110 SCIP_ROW* row, /**< LP row */
    2111 SCIP_SOL* sol /**< primal CIP solution */
    2112 )
    2113{
    2115
    2116 if( sol != NULL )
    2117 return SCIProwGetSolActivity(row, scip->set, scip->stat, sol);
    2118 else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
    2119 return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
    2120 else
    2121 return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
    2122}
    2123
    2124/** returns the feasibility of a row for the given primal solution
    2125 *
    2126 * @return the feasibility of a row for the given primal solution
    2127 *
    2128 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2129 * - \ref SCIP_STAGE_SOLVING
    2130 */
    2132 SCIP* scip, /**< SCIP data structure */
    2133 SCIP_ROW* row, /**< LP row */
    2134 SCIP_SOL* sol /**< primal CIP solution */
    2135 )
    2136{
    2137 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowSolFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2138
    2139 if( sol != NULL )
    2140 return SCIProwGetSolFeasibility(row, scip->set, scip->stat, sol);
    2141 else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
    2142 return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
    2143 else
    2144 return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
    2145}
    2146
    2147/** returns the parallelism of row with objective function
    2148 *
    2149 * @return 1 is returned if the row is parallel to the objective function and 0 if it is orthogonal
    2150 *
    2151 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2152 * - \ref SCIP_STAGE_SOLVING
    2153 */
    2155 SCIP* scip, /**< SCIP data structure */
    2156 SCIP_ROW* row /**< LP row */
    2157 )
    2158{
    2159 assert(row != NULL);
    2160
    2161 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowObjParallelism", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2162
    2163 return SCIProwGetObjParallelism(row, scip->set, scip->lp);
    2164}
    2165
    2166/** output row to file stream via the message handler system
    2167 *
    2168 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2169 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2170 *
    2171 * @pre this method can be called in one of the following stages of the SCIP solving process:
    2172 * - \ref SCIP_STAGE_SOLVING
    2173 * - \ref SCIP_STAGE_SOLVED
    2174 * - \ref SCIP_STAGE_EXITSOLVE
    2175 */
    2177 SCIP* scip, /**< SCIP data structure */
    2178 SCIP_ROW* row, /**< LP row */
    2179 FILE* file /**< output file (or NULL for standard output) */
    2180 )
    2181{
    2182 assert(row != NULL);
    2183
    2185
    2186 SCIProwPrint(row, scip->messagehdlr, file);
    2187
    2188 return SCIP_OKAY;
    2189}
    2190
    2191/** initiates LP diving, making methods SCIPchgVarObjDive(), SCIPchgVarLbDive(), and SCIPchgVarUbDive() available
    2192 *
    2193 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2194 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2195 *
    2196 * @pre This method can be called if @p scip is in one of the following stages:
    2197 * - \ref SCIP_STAGE_SOLVING
    2198 *
    2199 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2200 *
    2201 * @note diving is allowed even if the current LP is not flushed, not solved, or not solved to optimality; be aware
    2202 * that solving the (first) diving LP may take longer than expect and that the latter two cases could stem from
    2203 * numerical troubles during the last LP solve; because of this, most users will want to call this method only if
    2204 * SCIPgetLPSolstat(scip) == SCIP_LPSOLSTAT_OPTIMAL
    2205 */
    2207 SCIP* scip /**< SCIP data structure */
    2208 )
    2209{
    2210 assert(scip != NULL);
    2211
    2214
    2215 if( SCIPlpDiving(scip->lp) )
    2216 {
    2217 SCIPerrorMessage("already in diving mode\n");
    2218 return SCIP_INVALIDCALL;
    2219 }
    2220
    2221 if( SCIPtreeProbing(scip->tree) )
    2222 {
    2223 SCIPerrorMessage("cannot start diving while being in probing mode\n");
    2224 return SCIP_INVALIDCALL;
    2225 }
    2226
    2228 {
    2229 SCIPerrorMessage("cannot start diving if LP has not been constructed\n");
    2230 return SCIP_INVALIDCALL;
    2231 }
    2232 assert(SCIPtreeHasCurrentNodeLP(scip->tree));
    2233
    2234 SCIP_CALL( SCIPlpStartDive(scip->lp, scip->mem->probmem, scip->set, scip->stat) );
    2235
    2236 /* remember the relaxation solution to reset it later */
    2238 {
    2239 SCIP_CALL( SCIPtreeStoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
    2240 }
    2241
    2242 return SCIP_OKAY;
    2243}
    2244
    2245/** quits LP diving and resets bounds and objective values of columns to the current node's values
    2246 *
    2247 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2248 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2249 *
    2250 * @pre This method can be called if @p scip is in one of the following stages:
    2251 * - \ref SCIP_STAGE_SOLVING
    2252 *
    2253 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2254 */
    2256 SCIP* scip /**< SCIP data structure */
    2257 )
    2258{
    2259 assert(scip != NULL);
    2260
    2262
    2263 if( !SCIPlpDiving(scip->lp) )
    2264 {
    2265 SCIPerrorMessage("not in diving mode\n");
    2266 return SCIP_INVALIDCALL;
    2267 }
    2268
    2269 /* unmark the diving flag in the LP and reset all variables' objective and bound values */
    2270 SCIP_CALL( SCIPlpEndDive(scip->lp, scip->mem->probmem, scip->set, scip->messagehdlr, scip->stat, scip->eventqueue, scip->eventfilter,
    2271 scip->transprob, scip->transprob->vars, scip->transprob->nvars) );
    2272
    2273 /* the lower bound may have changed slightly due to LP resolve in SCIPlpEndDive() */
    2274 if( !scip->lp->resolvelperror && scip->tree->focusnode != NULL && SCIPlpIsRelax(scip->lp) && SCIPlpIsSolved(scip->lp)
    2275 && !SCIPlpExactDiving(scip->lpexact) && !SCIPisExact(scip) )
    2276 {
    2278 SCIP_CALL( SCIPnodeUpdateLowerboundLP(scip->tree->focusnode, scip->set, scip->stat, scip->messagehdlr, scip->eventfilter, scip->tree, scip->transprob,
    2279 scip->origprob, scip->lp) );
    2280 }
    2281 /* reset the probably changed LP's cutoff bound */
    2282 SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, scip->primal->cutoffbound) );
    2283 assert(scip->lp->cutoffbound == scip->primal->cutoffbound); /*lint !e777*/
    2284
    2285 /* if a new best solution was created, the cutoff of the tree was delayed due to diving;
    2286 * the cutoff has to be done now.
    2287 */
    2288 if( scip->tree->cutoffdelayed )
    2289 {
    2290 SCIP_CALL( SCIPtreeCutoff(scip->tree, scip->reopt, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue,
    2291 scip->eventfilter, scip->lp, scip->primal->cutoffbound) );
    2292 }
    2293
    2294 /* if a relaxation was stored before diving, restore it now */
    2295 if( scip->tree->probdiverelaxstored )
    2296 {
    2297 SCIP_CALL( SCIPtreeRestoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
    2298 }
    2299
    2300 return SCIP_OKAY;
    2301}
    2302
    2303/** changes cutoffbound in current dive
    2304 *
    2305 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2306 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2307 *
    2308 * @pre This method can be called if @p scip is in one of the following stages:
    2309 * - \ref SCIP_STAGE_SOLVING
    2310 *
    2311 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2312 */
    2314 SCIP* scip, /**< SCIP data structure */
    2315 SCIP_Real newcutoffbound /**< new cutoffbound */
    2316 )
    2317{
    2318 assert(scip != NULL);
    2319
    2320 SCIP_CALL( SCIPcheckStage(scip, "SCIPchgCutoffboundDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2321
    2322 if( !SCIPlpDiving(scip->lp) )
    2323 {
    2324 SCIPerrorMessage("not in diving mode\n");
    2325 return SCIP_INVALIDCALL;
    2326 }
    2327
    2328 SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, newcutoffbound) );
    2329
    2330 return SCIP_OKAY;
    2331}
    2332
    2333/** changes variable's objective value in current dive
    2334 *
    2335 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2336 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2337 *
    2338 * @pre This method can be called if @p scip is in one of the following stages:
    2339 * - \ref SCIP_STAGE_SOLVING
    2340 *
    2341 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2342 */
    2344 SCIP* scip, /**< SCIP data structure */
    2345 SCIP_VAR* var, /**< variable to change the objective value for */
    2346 SCIP_Real newobj /**< new objective value */
    2347 )
    2348{
    2349 assert(scip != NULL);
    2350 assert(var != NULL);
    2351
    2353
    2354 if( !SCIPlpDiving(scip->lp) )
    2355 {
    2356 SCIPerrorMessage("not in diving mode\n");
    2357 return SCIP_INVALIDCALL;
    2358 }
    2359
    2360 /* invalidate the LP's cutoff bound, since this has nothing to do with the current objective value anymore;
    2361 * the cutoff bound is reset in SCIPendDive()
    2362 */
    2363 SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, SCIPsetInfinity(scip->set)) );
    2364
    2365 /* mark the LP's objective function invalid */
    2367
    2368 /* change the objective value of the variable in the diving LP */
    2369 SCIP_CALL( SCIPvarChgObjDive(var, scip->set, scip->lp, newobj) );
    2370
    2371 return SCIP_OKAY;
    2372}
    2373
    2374/** changes variable's lower bound in current dive
    2375 *
    2376 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2377 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2378 *
    2379 * @pre This method can be called if @p scip is in one of the following stages:
    2380 * - \ref SCIP_STAGE_SOLVING
    2381 *
    2382 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2383 */
    2385 SCIP* scip, /**< SCIP data structure */
    2386 SCIP_VAR* var, /**< variable to change the bound for */
    2387 SCIP_Real newbound /**< new value for bound */
    2388 )
    2389{
    2390 assert(scip != NULL);
    2391 assert(var != NULL);
    2392
    2394
    2395 if( !SCIPlpDiving(scip->lp) )
    2396 {
    2397 SCIPerrorMessage("not in diving mode\n");
    2398 return SCIP_INVALIDCALL;
    2399 }
    2400
    2401 SCIP_CALL( SCIPvarChgLbDive(var, scip->set, scip->lp, newbound) );
    2402
    2403 return SCIP_OKAY;
    2404}
    2405
    2406/** changes variable's upper bound in current dive
    2407 *
    2408 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2409 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2410 *
    2411 * @pre This method can be called if @p scip is in one of the following stages:
    2412 * - \ref SCIP_STAGE_SOLVING
    2413 *
    2414 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2415 */
    2417 SCIP* scip, /**< SCIP data structure */
    2418 SCIP_VAR* var, /**< variable to change the bound for */
    2419 SCIP_Real newbound /**< new value for bound */
    2420 )
    2421{
    2422 assert(scip != NULL);
    2423 assert(var != NULL);
    2424
    2426
    2427 if( !SCIPlpDiving(scip->lp) )
    2428 {
    2429 SCIPerrorMessage("not in diving mode\n");
    2430 return SCIP_INVALIDCALL;
    2431 }
    2432
    2433 SCIP_CALL( SCIPvarChgUbDive(var, scip->set, scip->lp, newbound) );
    2434
    2435 return SCIP_OKAY;
    2436}
    2437
    2438/** adds a row to the LP in current dive
    2439 *
    2440 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2441 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2442 *
    2443 * @pre This method can be called if @p scip is in one of the following stages:
    2444 * - \ref SCIP_STAGE_SOLVING
    2445 *
    2446 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2447 */
    2449 SCIP* scip, /**< SCIP data structure */
    2450 SCIP_ROW* row /**< row to be added */
    2451 )
    2452{
    2453 SCIP_NODE* node;
    2454 int depth;
    2455
    2456 assert(scip != NULL);
    2457 assert(row != NULL);
    2458
    2460
    2461 if( !SCIPlpDiving(scip->lp) )
    2462 {
    2463 SCIPerrorMessage("not in diving mode\n");
    2464 return SCIP_INVALIDCALL;
    2465 }
    2466
    2467 /* get depth of current node */
    2468 node = SCIPtreeGetCurrentNode(scip->tree);
    2469 assert(node != NULL);
    2470 depth = SCIPnodeGetDepth(node);
    2471
    2472 SCIP_CALL( SCIPlpAddRow(scip->lp, scip->mem->probmem, scip->set, scip->eventqueue, scip->eventfilter, row, depth) );
    2473
    2474 return SCIP_OKAY;
    2475}
    2476
    2477/** changes row lhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowLhs()
    2478 *
    2479 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2480 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2481 *
    2482 * @pre This method can be called if @p scip is in one of the following stages:
    2483 * - \ref SCIP_STAGE_SOLVING
    2484 *
    2485 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2486 */
    2488 SCIP* scip, /**< SCIP data structure */
    2489 SCIP_ROW* row, /**< row to change the lhs for */
    2490 SCIP_Real newlhs /**< new value for lhs */
    2491 )
    2492{
    2493 assert(scip != NULL);
    2494 assert(row != NULL);
    2495
    2497
    2498 if( !SCIPlpDiving(scip->lp) )
    2499 {
    2500 SCIPerrorMessage("not in diving mode\n");
    2501 return SCIP_INVALIDCALL;
    2502 }
    2503
    2505 SCIP_CALL( SCIProwChgLhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newlhs) );
    2506
    2507 return SCIP_OKAY;
    2508}
    2509
    2510/** changes row rhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowRhs()
    2511 *
    2512 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2513 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2514 *
    2515 * @pre This method can be called if @p scip is in one of the following stages:
    2516 * - \ref SCIP_STAGE_SOLVING
    2517 *
    2518 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2519 */
    2521 SCIP* scip, /**< SCIP data structure */
    2522 SCIP_ROW* row, /**< row to change the lhs for */
    2523 SCIP_Real newrhs /**< new value for rhs */
    2524 )
    2525{
    2526 assert(scip != NULL);
    2527 assert(row != NULL);
    2528
    2530
    2531 if( !SCIPlpDiving(scip->lp) )
    2532 {
    2533 SCIPerrorMessage("not in diving mode\n");
    2534 return SCIP_INVALIDCALL;
    2535 }
    2536
    2538 SCIP_CALL( SCIProwChgRhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newrhs) );
    2539
    2540 return SCIP_OKAY;
    2541}
    2542
    2543/** gets variable's objective value in current dive
    2544 *
    2545 * @return the variable's objective value in current dive.
    2546 *
    2547 * @pre This method can be called if @p scip is in one of the following stages:
    2548 * - \ref SCIP_STAGE_SOLVING
    2549 *
    2550 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2551 */
    2553 SCIP* scip, /**< SCIP data structure */
    2554 SCIP_VAR* var /**< variable to get the bound for */
    2555 )
    2556{
    2557 assert(scip != NULL);
    2558 assert(var != NULL);
    2559
    2561
    2562 if( !SCIPlpDiving(scip->lp) )
    2563 {
    2564 SCIPerrorMessage("not in diving mode\n");
    2565 SCIPABORT();
    2566 return SCIP_INVALID; /*lint !e527*/
    2567 }
    2568
    2569 return SCIPvarGetObjLP(var);
    2570}
    2571
    2572/** gets variable's lower bound in current dive
    2573 *
    2574 * @return the variable's lower bound in current dive.
    2575 *
    2576 * @pre This method can be called if @p scip is in one of the following stages:
    2577 * - \ref SCIP_STAGE_SOLVING
    2578 *
    2579 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2580 */
    2582 SCIP* scip, /**< SCIP data structure */
    2583 SCIP_VAR* var /**< variable to get the bound for */
    2584 )
    2585{
    2586 assert(scip != NULL);
    2587 assert(var != NULL);
    2588
    2590
    2591 if( !SCIPlpDiving(scip->lp) )
    2592 {
    2593 SCIPerrorMessage("not in diving mode\n");
    2594 SCIPABORT();
    2595 return SCIP_INVALID; /*lint !e527*/
    2596 }
    2597
    2598 return SCIPvarGetLbLP(var, scip->set);
    2599}
    2600
    2601/** gets variable's upper bound in current dive
    2602 *
    2603 * @return the variable's upper bound in current dive.
    2604 *
    2605 * @pre This method can be called if @p scip is in one of the following stages:
    2606 * - \ref SCIP_STAGE_SOLVING
    2607 *
    2608 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2609 */
    2611 SCIP* scip, /**< SCIP data structure */
    2612 SCIP_VAR* var /**< variable to get the bound for */
    2613 )
    2614{
    2615 assert(scip != NULL);
    2616 assert(var != NULL);
    2617
    2619
    2620 if( !SCIPlpDiving(scip->lp) )
    2621 {
    2622 SCIPerrorMessage("not in diving mode\n");
    2623 SCIPABORT();
    2624 return SCIP_INVALID; /*lint !e527*/
    2625 }
    2626
    2627 return SCIPvarGetUbLP(var, scip->set);
    2628}
    2629
    2630/** solves the LP of the current dive; no separation or pricing is applied
    2631 *
    2632 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    2633 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    2634 *
    2635 * @pre This method can be called if @p scip is in one of the following stages:
    2636 * - \ref SCIP_STAGE_SOLVING
    2637 *
    2638 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2639 *
    2640 * @note be aware that the LP solve may take longer than expected if SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL,
    2641 * compare the explanation of SCIPstartDive()
    2642 */
    2644 SCIP* scip, /**< SCIP data structure */
    2645 int itlim, /**< maximal number of LP iterations to perform, or -1 for no limit */
    2646 SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred */
    2647 SCIP_Bool* cutoff /**< pointer to store whether the diving LP was infeasible or the objective
    2648 * limit was reached (or NULL, if not needed) */
    2649 )
    2650{
    2651 assert(scip != NULL);
    2652
    2654
    2655 if( !SCIPlpDiving(scip->lp) )
    2656 {
    2657 SCIPerrorMessage("not in diving mode\n");
    2658 return SCIP_INVALIDCALL;
    2659 }
    2660
    2661 if( cutoff != NULL )
    2662 *cutoff = FALSE;
    2663
    2664 /* solve diving LP */
    2665 SCIP_CALL( SCIPlpSolveAndEval(scip->lp, scip->set, scip->messagehdlr, scip->mem->probmem, scip->stat,
    2666 scip->eventqueue, scip->eventfilter, scip->transprob, (SCIP_Longint)itlim, FALSE, FALSE, FALSE, FALSE, lperror) );
    2667
    2668 /* the LP is infeasible or the objective limit was reached */
    2672 {
    2673 /* analyze the infeasible LP (only if the objective was not changed, all columns are in the LP, and no external
    2674 * pricers exist) */
    2676 && SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp) )
    2677 {
    2678 SCIP_CALL( SCIPconflictAnalyzeLP(scip->conflict, scip->conflictstore, scip->mem->probmem, scip->set, scip->stat, scip->transprob,
    2679 scip->origprob, scip->tree, scip->reopt, scip->lp, scip->branchcand, scip->eventqueue, scip->eventfilter, scip->cliquetable, NULL) );
    2680 }
    2681
    2682 if( cutoff != NULL )
    2683 *cutoff = TRUE;
    2684 }
    2685
    2686 return SCIP_OKAY;
    2687}
    2688
    2689/** returns the number of the node in the current branch and bound run, where the last LP was solved in diving
    2690 * or probing mode
    2691 *
    2692 * @return the number of the node in the current branch and bound run, where the last LP was solved in diving
    2693 * or probing mode.
    2694 *
    2695 * @pre This method can be called if @p scip is in one of the following stages:
    2696 * - \ref SCIP_STAGE_TRANSFORMING
    2697 * - \ref SCIP_STAGE_TRANSFORMED
    2698 * - \ref SCIP_STAGE_INITPRESOLVE
    2699 * - \ref SCIP_STAGE_PRESOLVING
    2700 * - \ref SCIP_STAGE_EXITPRESOLVE
    2701 * - \ref SCIP_STAGE_PRESOLVED
    2702 * - \ref SCIP_STAGE_INITSOLVE
    2703 * - \ref SCIP_STAGE_SOLVING
    2704 * - \ref SCIP_STAGE_SOLVED
    2705 * - \ref SCIP_STAGE_EXITSOLVE
    2706 * - \ref SCIP_STAGE_FREETRANS
    2707 *
    2708 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2709 */
    2711 SCIP* scip /**< SCIP data structure */
    2712 )
    2713{
    2714 assert(scip != NULL);
    2715
    2716 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLastDivenode", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    2717
    2718 return scip->stat->lastdivenode;
    2719}
    2720
    2721/** returns whether we are in diving mode
    2722 *
    2723 * @return whether we are in diving mode.
    2724 *
    2725 * @pre This method can be called if @p scip is in one of the following stages:
    2726 * - \ref SCIP_STAGE_TRANSFORMING
    2727 * - \ref SCIP_STAGE_TRANSFORMED
    2728 * - \ref SCIP_STAGE_INITPRESOLVE
    2729 * - \ref SCIP_STAGE_PRESOLVING
    2730 * - \ref SCIP_STAGE_EXITPRESOLVE
    2731 * - \ref SCIP_STAGE_PRESOLVED
    2732 * - \ref SCIP_STAGE_INITSOLVE
    2733 * - \ref SCIP_STAGE_SOLVING
    2734 * - \ref SCIP_STAGE_SOLVED
    2735 * - \ref SCIP_STAGE_EXITSOLVE
    2736 * - \ref SCIP_STAGE_FREETRANS
    2737 *
    2738 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
    2739 */
    2741 SCIP* scip /**< SCIP data structure */
    2742 )
    2743{
    2744 assert(scip != NULL);
    2745
    2747
    2748 return SCIPlpDiving(scip->lp);
    2749}
    2750
    2751/** computes two measures for dual degeneracy (dual degeneracy rate and variable-constraint ratio)
    2752 * based on the changes applied when reducing the problem to the optimal face
    2753 *
    2754 * returns the dual degeneracy rate, i.e., the share of nonbasic variables with reduced cost 0
    2755 * and the variable-constraint ratio, i.e., the number of unfixed variables in relation to the basis size
    2756 */
    2758 SCIP* scip, /**< SCIP data structure */
    2759 SCIP_Real* degeneracy, /**< pointer to store the dual degeneracy rate */
    2760 SCIP_Real* varconsratio /**< pointer to store the variable-constraint ratio */
    2761 )
    2762{
    2763 assert(scip != NULL);
    2764 assert(degeneracy != NULL);
    2765 assert(varconsratio != NULL);
    2766
    2767 SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPDualDegeneracy", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    2768
    2769 SCIP_CALL( SCIPlpGetDualDegeneracy(scip->lp, scip->set, scip->stat, degeneracy, varconsratio) );
    2770
    2771 return SCIP_OKAY;
    2772}
    SCIP_Real * r
    Definition: circlepacking.c:59
    internal methods for conflict analysis
    SCIP_RETCODE SCIPconflictAnalyzeLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
    methods for debugging
    #define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
    Definition: debug.h:364
    #define SCIPdebugCheckBInvRow(scip, r, coef)
    Definition: debug.h:337
    #define NULL
    Definition: def.h:248
    #define SCIP_Longint
    Definition: def.h:141
    #define SCIP_INVALID
    Definition: def.h:178
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    #define TRUE
    Definition: def.h:93
    #define FALSE
    Definition: def.h:94
    #define SCIP_CALL_ABORT(x)
    Definition: def.h:334
    #define SCIPABORT()
    Definition: def.h:327
    #define SCIP_CALL(x)
    Definition: def.h:355
    SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
    Definition: lpi_clp.cpp:2968
    void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
    Definition: scip_message.c:120
    SCIP_Real SCIPgetColRedcost(SCIP *scip, SCIP_COL *col)
    Definition: scip_lp.c:1163
    SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
    Definition: lp.c:17425
    SCIP_Real SCIPgetColFarkasCoef(SCIP *scip, SCIP_COL *col)
    Definition: scip_lp.c:1189
    void SCIPmarkColNotRemovableLocal(SCIP *scip, SCIP_COL *col)
    Definition: scip_lp.c:1211
    SCIP_Bool SCIPisExact(SCIP *scip)
    Definition: scip_exact.c:193
    SCIP_RETCODE SCIPchgVarLbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
    Definition: scip_lp.c:2384
    SCIP_RETCODE SCIPchgVarUbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
    Definition: scip_lp.c:2416
    SCIP_RETCODE SCIPchgCutoffboundDive(SCIP *scip, SCIP_Real newcutoffbound)
    Definition: scip_lp.c:2313
    SCIP_RETCODE SCIPchgRowLhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newlhs)
    Definition: scip_lp.c:2487
    SCIP_RETCODE SCIPaddRowDive(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2448
    SCIP_Real SCIPgetVarLbDive(SCIP *scip, SCIP_VAR *var)
    Definition: scip_lp.c:2581
    SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)
    Definition: scip_lp.c:2610
    SCIP_RETCODE SCIPchgRowRhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newrhs)
    Definition: scip_lp.c:2520
    SCIP_Real SCIPgetVarObjDive(SCIP *scip, SCIP_VAR *var)
    Definition: scip_lp.c:2552
    SCIP_RETCODE SCIPstartDive(SCIP *scip)
    Definition: scip_lp.c:2206
    SCIP_RETCODE SCIPgetLPDualDegeneracy(SCIP *scip, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
    Definition: scip_lp.c:2757
    SCIP_RETCODE SCIPchgVarObjDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
    Definition: scip_lp.c:2343
    SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
    Definition: scip_lp.c:2643
    SCIP_RETCODE SCIPendDive(SCIP *scip)
    Definition: scip_lp.c:2255
    SCIP_Bool SCIPinDive(SCIP *scip)
    Definition: scip_lp.c:2740
    SCIP_Longint SCIPgetLastDivenode(SCIP *scip)
    Definition: scip_lp.c:2710
    SCIP_RETCODE SCIPflushLP(SCIP *scip)
    Definition: scip_lp.c:154
    SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
    Definition: scip_lp.c:87
    SCIP_Real SCIPgetLPLooseObjval(SCIP *scip)
    Definition: scip_lp.c:289
    SCIP_RETCODE SCIPconstructLP(SCIP *scip, SCIP_Bool *cutoff)
    Definition: scip_lp.c:130
    SCIP_Bool SCIPisLPRelax(SCIP *scip)
    Definition: scip_lp.c:231
    SCIP_RETCODE SCIPprintLPSolutionQuality(SCIP *scip, FILE *file)
    Definition: scip_lp.c:1030
    SCIP_Bool SCIPisLPPrimalReliable(SCIP *scip)
    Definition: scip_lp.c:195
    SCIP_Bool SCIPisLPConstructed(SCIP *scip)
    Definition: scip_lp.c:105
    SCIP_RETCODE SCIPgetLPBasisInd(SCIP *scip, int *basisind)
    Definition: scip_lp.c:692
    SCIP_RETCODE SCIPgetLPBInvACol(SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
    Definition: scip_lp.c:825
    SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
    Definition: scip_lp.c:477
    SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
    Definition: scip_lp.c:576
    SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
    Definition: scip_lp.c:611
    SCIP_Real SCIPgetPseudoObjval(SCIP *scip)
    Definition: scip_lp.c:339
    SCIP_RETCODE SCIPcomputeLPRelIntPoint(SCIP *scip, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_SOL **point)
    Definition: scip_lp.c:1103
    void SCIPresetLPFeastol(SCIP *scip)
    Definition: scip_lp.c:458
    SCIP_Real SCIPgetLPColumnObjval(SCIP *scip)
    Definition: scip_lp.c:271
    int SCIPgetNLPRows(SCIP *scip)
    Definition: scip_lp.c:632
    SCIP_RETCODE SCIPsumLPRows(SCIP *scip, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
    Definition: scip_lp.c:858
    SCIP_RETCODE SCIPgetLPI(SCIP *scip, SCIP_LPI **lpi)
    Definition: scip_lp.c:994
    SCIP_RETCODE SCIPgetLPBInvARow(SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
    Definition: scip_lp.c:791
    SCIP_Real SCIPgetGlobalPseudoObjval(SCIP *scip)
    Definition: scip_lp.c:314
    SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
    Definition: scip_lp.c:174
    SCIP_COL ** SCIPgetLPCols(SCIP *scip)
    Definition: scip_lp.c:512
    SCIP_Real SCIPgetLPRootObjval(SCIP *scip)
    Definition: scip_lp.c:378
    SCIP_RETCODE SCIPwriteMIP(SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
    Definition: scip_lp.c:938
    SCIP_Bool SCIPallColsInLP(SCIP *scip)
    Definition: scip_lp.c:655
    SCIP_Real SCIPgetLPRootColumnObjval(SCIP *scip)
    Definition: scip_lp.c:401
    SCIP_Real SCIPgetLPObjval(SCIP *scip)
    Definition: scip_lp.c:253
    void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
    Definition: scip_lp.c:444
    SCIP_Real SCIPgetLPFeastol(SCIP *scip)
    Definition: scip_lp.c:434
    int SCIPgetNUnfixedLPCols(SCIP *scip)
    Definition: scip_lp.c:554
    int SCIPgetNLPCols(SCIP *scip)
    Definition: scip_lp.c:533
    SCIP_RETCODE SCIPgetLPBInvCol(SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
    Definition: scip_lp.c:755
    SCIP_RETCODE SCIPwriteLP(SCIP *scip, const char *filename)
    Definition: scip_lp.c:907
    SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
    Definition: scip_lp.c:673
    SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
    Definition: scip_lp.c:720
    SCIP_Real SCIPgetLPRootLooseObjval(SCIP *scip)
    Definition: scip_lp.c:424
    SCIP_Bool SCIPisLPDualReliable(SCIP *scip)
    Definition: scip_lp.c:213
    SCIP_RETCODE SCIPinterruptLP(SCIP *scip, SCIP_Bool interrupt)
    Definition: scip_lp.c:880
    SCIP_Bool SCIPisRootLPRelax(SCIP *scip)
    Definition: scip_lp.c:357
    #define SCIPallocBufferArray(scip, ptr, num)
    Definition: scip_mem.h:124
    #define SCIPfreeBufferArray(scip, ptr)
    Definition: scip_mem.h:136
    SCIP_NODETYPE SCIPnodeGetType(SCIP_NODE *node)
    Definition: tree.c:8473
    int SCIPnodeGetDepth(SCIP_NODE *node)
    Definition: tree.c:8493
    SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1886
    SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1868
    SCIP_RETCODE SCIPcreateRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1233
    SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1581
    SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
    Definition: scip_lp.c:1529
    SCIP_Real SCIPgetRowMinActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1903
    SCIP_Real SCIPgetRowFeasibility(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2088
    SCIP_RETCODE SCIPcreateRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1267
    int SCIProwGetNNonz(SCIP_ROW *row)
    Definition: lp.c:17607
    SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1957
    SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
    Definition: scip_lp.c:1718
    SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1398
    SCIP_Real SCIPgetRowMaxActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1920
    SCIP_RETCODE SCIPrecalcRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1992
    SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1604
    SCIP_RETCODE SCIPrecalcRowActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2046
    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_Real SCIPgetRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2011
    int SCIPgetRowNumImpliedIntCols(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1850
    SCIP_RETCODE SCIPmakeRowIntegral(SCIP *scip, SCIP_ROW *row, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
    Definition: scip_lp.c:1790
    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 SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2068
    SCIP_RETCODE SCIPcaptureRow(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1486
    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 SCIPgetRowPseudoFeasibility(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2028
    SCIP_RETCODE SCIPcreateRowUnspec(SCIP *scip, SCIP_ROW **row, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1335
    SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1429
    SCIP_RETCODE SCIPrecalcRowLPActivity(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1938
    SCIP_RETCODE SCIPcreateEmptyRowUnspec(SCIP *scip, SCIP_ROW **row, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1458
    void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1814
    SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1974
    SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
    Definition: scip_lp.c:1553
    SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:2154
    SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
    Definition: scip_lp.c:1672
    SCIP_RETCODE SCIPcreateRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: scip_lp.c:1301
    int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
    Definition: scip_lp.c:1832
    SCIP_RETCODE SCIPcalcRowIntegralScalar(SCIP *scip, SCIP_ROW *row, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Real *intscalar, SCIP_Bool *success)
    Definition: scip_lp.c:1761
    SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
    Definition: scip_lp.c:2108
    SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
    Definition: scip_sol.c:516
    SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
    Definition: scip_sol.c:1571
    SCIP_Real SCIPgetCutoffbound(SCIP *scip)
    SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
    SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
    Definition: scip_tree.c:91
    SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
    Definition: scip_var.c:3281
    SCIP_Bool SCIPlpIsSolBasic(SCIP_LP *lp)
    Definition: lp.c:18241
    SCIP_Real SCIProwGetMaxval(SCIP_ROW *row, SCIP_SET *set)
    Definition: lp.c:6901
    SCIP_Real SCIProwGetLPFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
    Definition: lp.c:6484
    SCIP_RETCODE SCIPlpGetBInvRow(SCIP_LP *lp, int r, SCIP_Real *coef, int *inds, int *ninds)
    Definition: lp.c:10100
    void SCIProwCapture(SCIP_ROW *row)
    Definition: lp.c:5554
    SCIP_Real SCIProwGetPseudoFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
    Definition: lp.c:6680
    SCIP_RETCODE SCIPlpGetBInvCol(SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
    Definition: lp.c:10122
    SCIP_RETCODE SCIPlpInterrupt(SCIP_LP *lp, SCIP_Bool interrupt)
    Definition: lp.c:10367
    int SCIProwGetNumIntCols(SCIP_ROW *row, SCIP_SET *set)
    Definition: lp.c:6965
    SCIP_Real SCIProwGetSolFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
    Definition: lp.c:6738
    void SCIProwRecalcPseudoActivity(SCIP_ROW *row, SCIP_STAT *stat)
    Definition: lp.c:6625
    SCIP_RETCODE SCIProwEnsureSize(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
    Definition: lp.c:636
    SCIP_Real SCIPlpGetLooseObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
    Definition: lp.c:13475
    SCIP_Real SCIProwGetMaxActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
    Definition: lp.c:6849
    SCIP_RETCODE SCIProwMakeIntegral(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
    Definition: lp.c:6197
    SCIP_Bool SCIPlpDivingObjChanged(SCIP_LP *lp)
    Definition: lp.c:18261
    SCIP_RETCODE SCIPlpFlush(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_EVENTQUEUE *eventqueue)
    Definition: lp.c:8917
    void SCIPlpSetFeastol(SCIP_LP *lp, SCIP_SET *set, SCIP_Real newfeastol)
    Definition: lp.c:10509
    SCIP_RETCODE SCIPlpWrite(SCIP_LP *lp, const char *fname)
    Definition: lp.c:16911
    SCIP_Real SCIProwGetLPActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
    Definition: lp.c:6454
    void SCIProwMarkNotRemovableLocal(SCIP_ROW *row, SCIP_STAT *stat)
    Definition: lp.c:8124
    SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
    Definition: lp.c:13420
    SCIP_RETCODE SCIProwCreate(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_ROWORIGINTYPE origintype, void *origin, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
    Definition: lp.c:5313
    SCIP_Real SCIPlpGetColumnObjval(SCIP_LP *lp)
    Definition: lp.c:13464
    SCIP_Bool SCIPlpIsPrimalReliable(SCIP_LP *lp)
    Definition: lp.c:18221
    SCIP_Bool SCIPlpIsRelax(SCIP_LP *lp)
    Definition: lp.c:18201
    SCIP_RETCODE SCIPlpSolveAndEval(SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_Longint itlim, SCIP_Bool limitresolveiters, SCIP_Bool aging, SCIP_Bool keepsol, SCIP_Bool forcedlpsolve, SCIP_Bool *lperror)
    Definition: lp.c:12680
    SCIP_Real SCIPlpGetObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
    Definition: lp.c:13436
    void SCIProwRecalcLPActivity(SCIP_ROW *row, SCIP_STAT *stat)
    Definition: lp.c:6402
    SCIP_Real SCIProwGetMinval(SCIP_ROW *row, SCIP_SET *set)
    Definition: lp.c:6917
    SCIP_Real SCIPlpGetRootObjval(SCIP_LP *lp)
    Definition: lp.c:18144
    SCIP_Real SCIProwGetSolActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
    Definition: lp.c:6696
    void SCIPlpMarkDivingObjChanged(SCIP_LP *lp)
    Definition: lp.c:18271
    SCIP_RETCODE SCIPlpGetBInvARow(SCIP_LP *lp, int r, SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
    Definition: lp.c:10148
    SCIP_LPI * SCIPlpGetLPI(SCIP_LP *lp)
    Definition: lp.c:18178
    SCIP_Bool SCIPlpDiving(SCIP_LP *lp)
    Definition: lp.c:18251
    SCIP_RETCODE SCIPlpGetBasisInd(SCIP_LP *lp, int *basisind)
    Definition: lp.c:10066
    SCIP_RETCODE SCIPlpComputeRelIntPoint(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_LP *lp, SCIP_PROB *prob, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_Real *point, SCIP_Bool *success)
    Definition: lp.c:19007
    SCIP_RETCODE SCIPlpGetDualDegeneracy(SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
    Definition: lp.c:19079
    SCIP_Real SCIPlpGetRootLooseObjval(SCIP_LP *lp)
    Definition: lp.c:18168
    void SCIProwPrint(SCIP_ROW *row, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
    Definition: lp.c:5514
    SCIP_RETCODE SCIPlpSetCutoffbound(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real cutoffbound)
    Definition: lp.c:10451
    SCIP_RETCODE SCIPlpRecordOldRowSideDive(SCIP_LP *lp, SCIP_ROW *row, SCIP_SIDETYPE sidetype)
    Definition: lp.c:16675
    SCIP_Real SCIPlpGetFeastol(SCIP_LP *lp)
    Definition: lp.c:10499
    SCIP_RETCODE SCIPlpGetBInvACol(SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
    Definition: lp.c:10173
    SCIP_Bool SCIPlpDivingRowsChanged(SCIP_LP *lp)
    Definition: lp.c:18293
    SCIP_Real SCIPcolGetRedcost(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
    Definition: lp.c:4147
    SCIP_Bool SCIPlpIsRootLPRelax(SCIP_LP *lp)
    Definition: lp.c:18134
    SCIP_Bool SCIPlpIsSolved(SCIP_LP *lp)
    Definition: lp.c:18211
    SCIP_Real SCIPcolGetFarkasCoef(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
    Definition: lp.c:4330
    SCIP_Real SCIPlpGetGlobalPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
    Definition: lp.c:13587
    SCIP_Bool SCIPlpIsDualReliable(SCIP_LP *lp)
    Definition: lp.c:18231
    SCIP_RETCODE SCIPlpAddRow(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_ROW *row, int depth)
    Definition: lp.c:9759
    SCIP_RETCODE SCIPlpWriteMip(SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_Bool lazyconss)
    Definition: lp.c:16925
    SCIP_RETCODE SCIPlpStartDive(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
    Definition: lp.c:16383
    SCIP_RETCODE SCIPlpEndDive(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_VAR **vars, int nvars)
    Definition: lp.c:16489
    SCIP_COL ** SCIPlpGetCols(SCIP_LP *lp)
    Definition: lp.c:17969
    int SCIPlpGetNCols(SCIP_LP *lp)
    Definition: lp.c:17979
    SCIP_RETCODE SCIProwChgRhs(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real rhs)
    Definition: lp.c:5914
    SCIP_Real SCIPlpGetRootColumnObjval(SCIP_LP *lp)
    Definition: lp.c:18156
    SCIP_RETCODE SCIProwCalcIntegralScalar(SCIP_ROW *row, SCIP_SET *set, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Real *intscalar, SCIP_Bool *success)
    Definition: lp.c:5963
    SCIP_Real SCIProwGetPseudoActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
    Definition: lp.c:6652
    SCIP_ROW ** SCIPlpGetRows(SCIP_LP *lp)
    Definition: lp.c:18016
    SCIP_RETCODE SCIProwChgLhs(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real lhs)
    Definition: lp.c:5882
    void SCIProwForceSort(SCIP_ROW *row, SCIP_SET *set)
    Definition: lp.c:6380
    void SCIPcolMarkNotRemovableLocal(SCIP_COL *col, SCIP_STAT *stat)
    Definition: lp.c:4944
    SCIP_RETCODE rowLink(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
    Definition: lp.c:2569
    int SCIPlpGetNUnfixedCols(SCIP_LP *lp, SCIP_Real eps)
    Definition: lp.c:17989
    SCIP_Real SCIProwGetMinActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
    Definition: lp.c:6828
    void SCIPlpResetFeastol(SCIP_LP *lp, SCIP_SET *set)
    Definition: lp.c:10534
    int SCIProwGetNumImpliedIntCols(SCIP_ROW *row, SCIP_SET *set)
    Definition: lp.c:6981
    void SCIProwDelaySort(SCIP_ROW *row)
    Definition: lp.c:6369
    int SCIPlpGetNRows(SCIP_LP *lp)
    Definition: lp.c:18026
    SCIP_Real SCIProwGetObjParallelism(SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp)
    Definition: lp.c:8046
    SCIP_RETCODE SCIPlpSumRows(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
    Definition: lp.c:10197
    SCIP_Real SCIPlpGetPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
    Definition: lp.c:13619
    SCIP_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
    Definition: lp.c:5567
    internal methods for LP management
    SCIP_Bool SCIPlpExactDiving(SCIP_LPEXACT *lpexact)
    Definition: lpexact.c:8423
    internal methods for exact LP management
    interface methods for specific LP solvers
    memory allocation routines
    void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
    Definition: message.c:618
    SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
    Definition: prob.c:2825
    internal methods for storing and manipulating the main problem
    public methods for LP management
    public methods for message output
    #define SCIPerrorMessage
    Definition: pub_message.h:64
    public methods for branch and bound tree
    public methods for exact solving
    public methods for the LP relaxation, rows and columns
    public methods for the LP relaxation, rows and columns
    public methods for memory management
    public methods for message handling
    public methods for numerical tolerances
    public methods for solutions
    public methods for querying solving statistics
    public methods for the branch-and-bound tree
    public methods for SCIP variables
    SCIP_Real SCIPsetInfinity(SCIP_SET *set)
    Definition: set.c:6380
    internal methods for global SCIP settings
    SCIP_RETCODE SCIPconstructCurrentLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool newinitconss, SCIP_Bool *cutoff)
    Definition: solve.c:1407
    internal methods for main solving loop and node processing
    int lppos
    Definition: struct_lp.h:243
    data structures for LP management
    datastructures for block memory pools and memory buffers
    datastructures for collecting primal CIP solutions and primal informations
    datastructures for storing and manipulating the main problem
    SCIP main data structure.
    datastructures for global SCIP settings
    datastructures for problem statistics
    data structures for branch and bound tree
    SCIP_Bool SCIPtreeIsFocusNodeLPConstructed(SCIP_TREE *tree)
    Definition: tree.c:9442
    SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
    Definition: tree.c:9361
    SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
    Definition: tree.c:9462
    SCIP_RETCODE SCIPtreeStoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
    Definition: tree.c:7997
    SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
    Definition: tree.c:9496
    SCIP_RETCODE SCIPtreeRestoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
    Definition: tree.c:8041
    SCIP_RETCODE SCIPtreeCutoff(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Real cutoffbound)
    Definition: tree.c:5858
    SCIP_RETCODE SCIPnodeUpdateLowerboundLP(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_MESSAGEHDLR *messagehdlr, SCIP_EVENTFILTER *eventfilter, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp)
    Definition: tree.c:2973
    internal methods for branch and bound tree
    enum SCIP_LPSolStat SCIP_LPSOLSTAT
    Definition: type_lp.h:52
    @ SCIP_ROWORIGINTYPE_CONSHDLR
    Definition: type_lp.h:74
    @ SCIP_ROWORIGINTYPE_UNSPEC
    Definition: type_lp.h:73
    @ SCIP_ROWORIGINTYPE_SEPA
    Definition: type_lp.h:76
    @ SCIP_ROWORIGINTYPE_CONS
    Definition: type_lp.h:75
    @ SCIP_SIDETYPE_RIGHT
    Definition: type_lp.h:66
    @ SCIP_SIDETYPE_LEFT
    Definition: type_lp.h:65
    @ SCIP_LPSOLSTAT_NOTSOLVED
    Definition: type_lp.h:43
    @ SCIP_LPSOLSTAT_OPTIMAL
    Definition: type_lp.h:44
    @ SCIP_LPSOLSTAT_INFEASIBLE
    Definition: type_lp.h:45
    @ SCIP_LPSOLSTAT_OBJLIMIT
    Definition: type_lp.h:47
    @ SCIP_LPSOLQUALITY_EXACTCONDITION
    Definition: type_lpi.h:102
    @ SCIP_LPSOLQUALITY_ESTIMCONDITION
    Definition: type_lpi.h:101
    @ SCIP_INVALIDDATA
    Definition: type_retcode.h:52
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    @ SCIP_INVALIDCALL
    Definition: type_retcode.h:51
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    @ SCIP_STAGE_PROBLEM
    Definition: type_set.h:45
    @ SCIP_STAGE_INITPRESOLVE
    Definition: type_set.h:48
    @ SCIP_STAGE_SOLVED
    Definition: type_set.h:54
    @ SCIP_STAGE_PRESOLVING
    Definition: type_set.h:49
    @ SCIP_STAGE_TRANSFORMED
    Definition: type_set.h:47
    @ SCIP_STAGE_EXITPRESOLVE
    Definition: type_set.h:50
    @ SCIP_STAGE_INIT
    Definition: type_set.h:44
    @ SCIP_STAGE_SOLVING
    Definition: type_set.h:53
    @ SCIP_STAGE_PRESOLVED
    Definition: type_set.h:51
    @ SCIP_NODETYPE_FOCUSNODE
    Definition: type_tree.h:41
    SCIP_Real SCIPvarGetObjLP(SCIP_VAR *var)
    Definition: var.c:18522
    SCIP_RETCODE SCIPvarAddToRow(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val)
    Definition: var.c:20035
    SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
    Definition: var.c:18568
    SCIP_RETCODE SCIPvarChgObjDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
    Definition: var.c:9847
    SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
    Definition: var.c:18638
    SCIP_RETCODE SCIPvarChgUbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
    Definition: var.c:13422
    SCIP_RETCODE SCIPvarChgLbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
    Definition: var.c:13275
    internal methods for problem variables