Scippy

    SCIP

    Solving Constraint Integer Programs

    struct_nodesel.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 struct_nodesel.h
    26 * @ingroup INTERNALAPI
    27 * @brief data structures for node selectors and node priority queues
    28 * @author Tobias Achterberg
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_STRUCT_NODESEL_H__
    34#define __SCIP_STRUCT_NODESEL_H__
    35
    36
    37#include "scip/def.h"
    38#include "scip/type_tree.h"
    39#include "scip/type_nodesel.h"
    40
    41#ifdef __cplusplus
    42extern "C" {
    43#endif
    44
    45/** node priority queue data structure;
    46 * the fields lowerboundnode, lowerbound, nlowerbounds and validlowerbound are only used for node selection rules,
    47 * that don't store the lowest bound node in the first slot of the queue
    48 */
    50{
    51 SCIP_Real lowerboundsum; /**< sum of lower bounds of all nodes in the queue */
    52 SCIP_NODESEL* nodesel; /**< node selector used for sorting the nodes in the queue */
    53 SCIP_NODE** slots; /**< array of element slots */
    54 int* bfsposs; /**< position of the slot in the bfs ordered queue */
    55 int* bfsqueue; /**< queue of slots[] indices sorted by best lower bound */
    56 int len; /**< number of used element slots */
    57 int size; /**< total number of available element slots */
    58};
    59
    60/** node selector */
    62{
    63 char* name; /**< name of node selector */
    64 char* desc; /**< description of node selector */
    65 SCIP_DECL_NODESELCOPY ((*nodeselcopy)); /**< copy method of node selector or NULL if you don't want to copy your plugin into sub-SCIPs */
    66 SCIP_DECL_NODESELFREE ((*nodeselfree)); /**< destructor of node selector */
    67 SCIP_DECL_NODESELINIT ((*nodeselinit)); /**< initialize node selector */
    68 SCIP_DECL_NODESELEXIT ((*nodeselexit)); /**< deinitialize node selector */
    69 SCIP_DECL_NODESELINITSOL((*nodeselinitsol));/**< solving process initialization method of node selector */
    70 SCIP_DECL_NODESELEXITSOL((*nodeselexitsol));/**< solving process deinitialization method of node selector */
    71 SCIP_DECL_NODESELSELECT((*nodeselselect));/**< node selection method */
    72 SCIP_DECL_NODESELCOMP ((*nodeselcomp)); /**< node comparison method */
    73 SCIP_CLOCK* setuptime; /**< time spend for setting up this node selector for the next stages */
    74 SCIP_CLOCK* nodeseltime; /**< node selector execution time */
    75 SCIP_NODESELDATA* nodeseldata; /**< node selector data */
    76 int stdpriority; /**< priority of the node selector in standard mode */
    77 int memsavepriority; /**< priority of the node selector in memory saving mode */
    78 SCIP_Bool initialized; /**< is node selector initialized? */
    79};
    80
    81#ifdef __cplusplus
    82}
    83#endif
    84
    85#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    SCIP_NODE ** slots
    SCIP_Real lowerboundsum
    SCIP_NODESEL * nodesel
    SCIP_DECL_NODESELEXIT((*nodeselexit))
    SCIP_Bool initialized
    SCIP_DECL_NODESELFREE((*nodeselfree))
    SCIP_DECL_NODESELCOPY((*nodeselcopy))
    SCIP_CLOCK * setuptime
    SCIP_NODESELDATA * nodeseldata
    SCIP_DECL_NODESELCOMP((*nodeselcomp))
    SCIP_DECL_NODESELINITSOL((*nodeselinitsol))
    SCIP_CLOCK * nodeseltime
    SCIP_DECL_NODESELINIT((*nodeselinit))
    SCIP_DECL_NODESELSELECT((*nodeselselect))
    SCIP_DECL_NODESELEXITSOL((*nodeselexitsol))
    type definitions for node selectors
    struct SCIP_NodeselData SCIP_NODESELDATA
    Definition: type_nodesel.h:52
    type definitions for branch and bound tree