Scippy

    SCIP

    Solving Constraint Integer Programs

    pricer_coloring.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 pricer_coloring.h
    26 * @brief variable pricer for the vertex coloring problem
    27 * @author Gerald Gamrath
    28 *
    29 * This file implements the pricer for the coloring algorithm.
    30 *
    31 * It computes maximal stable sets in the current graph whose corresponding variables can improve
    32 * the current LP solution. This is done by computing a maximum weighted stable set in the current
    33 * graph with dual-variables of the node constraints as weights. A variable can improve the
    34 * solution, if the weight of the corresponding stable set is larger than 1, since it then has
    35 * negative reduced costs, which are given by (1 - weight of the set).
    36 *
    37 * The pricer first tries to compute such a stable set using a a greedy-method. If it fails, the tclique-algorithm is
    38 * used on the complementary graph. This is a branch-and-bound based algorithm for maximal cliques,
    39 * included in SCIP. In this case, not only the best solution is added to the LP, but also all other
    40 * stable sets found during the branch-and-bound process that could improve the current LP solution
    41 * are added, limited to a maximal number that can be changed by a parameter.
    42 */
    43
    44/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    45
    46#ifndef __SCIP_PRICER_COLORING__
    47#define __SCIP_PRICER_COLORING__
    48
    49#include "probdata_coloring.h"
    50
    51#ifdef __cplusplus
    52extern "C" {
    53#endif
    54
    55/** creates the healthcare variable pricer and includes it in SCIP */
    57 SCIP* scip /**< SCIP data structure */
    58 );
    59
    60/** sets the way, the pricer handles variables with negative reduced costs found during the tclique-algorithm
    61 if onlybest is true, only the best n variables are added to the lp, while onlybest = false means, that
    62 the first n variables with negative reduced costs are added
    63 Here, n is the value set by setNVarsCreatedPerRound */
    65 SCIP* scip, /**< SCIP data structure */
    66 SCIP_Bool onlybest /**< true, if only the best vars should be used */
    67 );
    68
    69
    70/* sets, whether the pricing should use the greedy-method */
    72 SCIP* scip, /**< SCIP data structure */
    73 SCIP_Bool usegreedy /**< true, if the greedy should be used */
    74 );
    75
    76
    77/* sets whether the pricing should use the tclique-method for finding new variables */
    79 SCIP* scip, /**< SCIP data structure */
    80 SCIP_Bool usetclique /**< true, if the tclique-algorithm should be used */
    81 );
    82
    83
    84/* sets the number of variables that the pricer is allowed to create in one round of pricing */
    86 SCIP* scip, /**< SCIP data structure */
    87 int nvars /**< maximal number of variables that should be created in one round */
    88 );
    89
    90#ifdef __cplusplus
    91}
    92#endif
    93
    94#endif
    #define SCIP_Bool
    Definition: def.h:91
    void COLORpricerUseTclique(SCIP *scip, SCIP_Bool usetclique)
    SCIP_RETCODE SCIPincludePricerColoring(SCIP *scip)
    void COLORpricerUseGreedy(SCIP *scip, SCIP_Bool usegreedy)
    void COLORpricerSetNVarsCreatedPerRound(SCIP *scip, int nvars)
    void COLORpricerUseOnlyBestStableSets(SCIP *scip, SCIP_Bool onlybest)
    problem data for vertex coloring algorithm
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63