Scippy

    SCIP

    Solving Constraint Integer Programs

    type_relax.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 type_relax.h
    26 * @ingroup TYPEDEFINITIONS
    27 * @brief type definitions for relaxators
    28 * @author Tobias Achterberg
    29 */
    30
    31/** @defgroup DEFPLUGINS_RELAX Default relaxators
    32 * @ingroup DEFPLUGINS
    33 * @brief implementation files of the default relaxators of SCIP
    34 */
    35
    36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    37
    38#ifndef __SCIP_TYPE_RELAX_H__
    39#define __SCIP_TYPE_RELAX_H__
    40
    41#include "scip/def.h"
    42#include "scip/type_retcode.h"
    43#include "scip/type_result.h"
    44#include "scip/type_scip.h"
    45
    46#ifdef __cplusplus
    47extern "C" {
    48#endif
    49
    50typedef struct SCIP_Relax SCIP_RELAX; /**< relaxator */
    51typedef struct SCIP_Relaxation SCIP_RELAXATION; /**< relaxator */
    52typedef struct SCIP_RelaxData SCIP_RELAXDATA; /**< locally defined relaxator data */
    53
    54
    55/** copy method for relaxator plugins (called when SCIP copies plugins)
    56 *
    57 * input:
    58 * - scip : SCIP main data structure
    59 * - relax : the relaxator itself
    60 */
    61#define SCIP_DECL_RELAXCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    62
    63/** destructor of relaxator to free user data (called when SCIP is exiting)
    64 *
    65 * input:
    66 * - scip : SCIP main data structure
    67 * - relax : the relaxator itself
    68 */
    69#define SCIP_DECL_RELAXFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    70
    71/** initialization method of relaxator (called after problem was transformed)
    72 *
    73 * input:
    74 * - scip : SCIP main data structure
    75 * - relax : the relaxator itself
    76 */
    77#define SCIP_DECL_RELAXINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    78
    79/** deinitialization method of relaxator (called before transformed problem is freed)
    80 *
    81 * input:
    82 * - scip : SCIP main data structure
    83 * - relax : the relaxator itself
    84 */
    85#define SCIP_DECL_RELAXEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    86
    87/** solving process initialization method of relaxator (called when branch and bound process is about to begin)
    88 *
    89 * This method is called when the presolving was finished and the branch and bound process is about to begin.
    90 * The relaxator may use this call to initialize its branch and bound specific data.
    91 *
    92 * input:
    93 * - scip : SCIP main data structure
    94 * - relax : the relaxator itself
    95 */
    96#define SCIP_DECL_RELAXINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    97
    98/** solving process deinitialization method of relaxator (called before branch and bound process data is freed)
    99 *
    100 * This method is called before the branch and bound process is freed.
    101 * The relaxator should use this call to clean up its branch and bound data.
    102 *
    103 * input:
    104 * - scip : SCIP main data structure
    105 * - relax : the relaxator itself
    106 */
    107#define SCIP_DECL_RELAXEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
    108
    109/** execution method of relaxator
    110 *
    111 * The method is called in the node processing loop. It solves the current subproblem's relaxation.
    112 * Like the LP relaxation, the relaxator should only operate on COLUMN variables.
    113 *
    114 * input:
    115 * - scip : SCIP main data structure
    116 * - relax : the relaxator itself
    117 * - lowerbound : pointer to store a lowerbound for the current node
    118 * - result : pointer to store the result of the relaxation call
    119 *
    120 * possible return values for *result (if more than one applies, the first in the list should be used):
    121 * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
    122 * - SCIP_CONSADDED : an additional constraint was generated, and the relaxator should not be called again on the
    123 * same relaxation
    124 * - SCIP_REDUCEDDOM : a variable's domain was reduced, and the relaxator should not be called again on the same
    125 * relaxation
    126 * - SCIP_SEPARATED : a cutting plane was generated, and the relaxator should not be called again on the same relaxation
    127 * - SCIP_SUCCESS : the relaxator solved the relaxation and should not be called again on the same relaxation
    128 * - SCIP_SUSPENDED : the relaxator interrupted its solving process to wait for additional input (e.g. cutting
    129 * planes); however, it is able to continue the solving in order to improve the dual bound
    130 * - SCIP_DIDNOTRUN : the relaxator was skipped
    131 */
    132#define SCIP_DECL_RELAXEXEC(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result)
    133
    134#ifdef __cplusplus
    135}
    136#endif
    137
    138#endif
    common defines and data types used in all packages of SCIP
    struct SCIP_RelaxData SCIP_RELAXDATA
    Definition: type_relax.h:52
    result codes for SCIP callback methods
    type definitions for return codes for SCIP methods
    type definitions for SCIP's main datastructure