Scippy

    SCIP

    Solving Constraint Integer Programs

    branch_pscost.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file branch_pscost.h
    26 * @ingroup BRANCHINGRULES
    27 * @brief pseudo costs branching rule
    28 * @author Tobias Achterberg
    29 * @author Krunal Patel
    30 *
    31 * The pseudo costs branching rule selects the branching variable with respect to the so-called pseudo costs
    32 * of the variables. Pseudo costs measure the average gain per unit in the objective function when the variable
    33 * was branched on upwards or downwards, resp. The required information is updated at every node of
    34 * the solving process.
    35 *
    36 * The selected variable maximizes the expected gain of the dual bound in the created subtree.
    37 *
    38 * Discounted pseudo costs are an extension of classic pseudo costs. If we interpret pseudo costs as the
    39 * immediate reward for branching on a variable, then discounted pseudo costs can be considered to give the
    40 * discounted total reward for branching on a variable, including gains of nodes a few level below branched node.
    41 * In the current implementation, we consider discounted pseudo costs from one additional level according to
    42 * the parameter discountfactor .
    43 *
    44 * For a more mathematical description and a comparison between the pseudo costs branching rule
    45 * and other branching rules in SCIP, we refer to
    46 *
    47 * @par
    48 * Tobias Achterberg@n
    49 * Constraint Integer Programming@n
    50 * PhD Thesis, Technische Universität Berlin, 2007@n
    51 */
    52
    53/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    54
    55#ifndef __SCIP_BRANCH_PSCOST_H__
    56#define __SCIP_BRANCH_PSCOST_H__
    57
    58
    59#include "scip/def.h"
    60#include "scip/type_retcode.h"
    61#include "scip/type_scip.h"
    62#include "scip/type_var.h"
    63
    64#ifdef __cplusplus
    65extern "C" {
    66#endif
    67
    68/** creates the pseudo cost branching rule and includes it in SCIP
    69 *
    70 * @ingroup BranchingRuleIncludes
    71 */
    72SCIP_EXPORT
    74 SCIP* scip /**< SCIP data structure */
    75 );
    76
    77/**@addtogroup BRANCHINGRULES
    78 *
    79 * @{
    80 */
    81
    82/** selects a branching variable, due to pseudo cost, from the given candidate array and returns this variable together
    83 * with a branching point */
    84SCIP_EXPORT
    86 SCIP* scip, /**< SCIP data structure */
    87 SCIP_VAR** branchcands, /**< branching candidates */
    88 SCIP_Real* branchcandssol, /**< solution value for the branching candidates */
    89 SCIP_Real* branchcandsscore, /**< array of candidate scores */
    90 int nbranchcands, /**< number of branching candidates */
    91 SCIP_VAR** var, /**< pointer to store the variable to branch on, or NULL if none */
    92 SCIP_Real* brpoint /**< pointer to store the branching point for the branching variable, will be fractional for a discrete variable */
    93 );
    94
    95/** @} */
    96
    97#ifdef __cplusplus
    98}
    99#endif
    100
    101#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Real
    Definition: def.h:156
    SCIP_RETCODE SCIPselectBranchVarPscost(SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsscore, int nbranchcands, SCIP_VAR **var, SCIP_Real *brpoint)
    SCIP_RETCODE SCIPincludeBranchrulePscost(SCIP *scip)
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for SCIP's main datastructure
    type definitions for problem variables