Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_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 scip_relax.h
    26 * @ingroup PUBLICCOREAPI
    27 * @brief public methods for relaxator plugins
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Thorsten Koch
    31 * @author Alexander Martin
    32 * @author Marc Pfetsch
    33 * @author Kati Wolter
    34 * @author Gregor Hendel
    35 * @author Leona Gottwald
    36 */
    37
    38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    39
    40#ifndef __SCIP_SCIP_RELAX_H__
    41#define __SCIP_SCIP_RELAX_H__
    42
    43
    44#include "scip/def.h"
    45#include "scip/type_relax.h"
    46#include "scip/type_result.h"
    47#include "scip/type_retcode.h"
    48#include "scip/type_scip.h"
    49
    50#ifdef __cplusplus
    51extern "C" {
    52#endif
    53
    54/**@addtogroup PublicRelaxatorMethods
    55 *
    56 * @{
    57 */
    58
    59/** creates a relaxation handler and includes it in SCIP
    60 *
    61 * @note method has all relaxation handler callbacks as arguments and is thus changed every time a new
    62 * callback is added
    63 * in future releases; consider using SCIPincludeRelaxBasic() and setter functions
    64 * if you seek for a method which is less likely to change in future releases
    65 */
    66SCIP_EXPORT
    68 SCIP* scip, /**< SCIP data structure */
    69 const char* name, /**< name of relaxation handler */
    70 const char* desc, /**< description of relaxation handler */
    71 int priority, /**< priority of the relaxation handler (negative: after LP, non-negative: before LP) */
    72 int freq, /**< frequency for calling relaxation handler */
    73 SCIP_DECL_RELAXCOPY ((*relaxcopy)), /**< copy method of relaxation handler or NULL if you don't want to copy your plugin into sub-SCIPs */
    74 SCIP_DECL_RELAXFREE ((*relaxfree)), /**< destructor of relaxation handler */
    75 SCIP_DECL_RELAXINIT ((*relaxinit)), /**< initialize relaxation handler */
    76 SCIP_DECL_RELAXEXIT ((*relaxexit)), /**< deinitialize relaxation handler */
    77 SCIP_DECL_RELAXINITSOL((*relaxinitsol)), /**< solving process initialization method of relaxation handler */
    78 SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), /**< solving process deinitialization method of relaxation handler */
    79 SCIP_DECL_RELAXEXEC ((*relaxexec)), /**< execution method of relaxation handler */
    80 SCIP_RELAXDATA* relaxdata /**< relaxation handler data */
    81 );
    82
    83/** creates a relaxation handler and includes it in SCIP. All non fundamental
    84 * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
    85 * Optional callbacks can be set via specific setter functions, see SCIPsetRelaxInit(), SCIPsetRelaxExit(),
    86 * SCIPsetRelaxCopy(), SCIPsetRelaxFree(), SCIPsetRelaxInitsol(), and SCIPsetRelaxExitsol()
    87 *
    88 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeRelax() instead
    89 */
    90SCIP_EXPORT
    92 SCIP* scip, /**< SCIP data structure */
    93 SCIP_RELAX** relaxptr, /**< reference to relaxation pointer, or NULL */
    94 const char* name, /**< name of relaxation handler */
    95 const char* desc, /**< description of relaxation handler */
    96 int priority, /**< priority of the relaxation handler (negative: after LP, non-negative: before LP) */
    97 int freq, /**< frequency for calling relaxation handler */
    98 SCIP_DECL_RELAXEXEC ((*relaxexec)), /**< execution method of relaxation handler */
    99 SCIP_RELAXDATA* relaxdata /**< relaxation handler data */
    100 );
    101
    102/** sets copy method of relaxation handler */
    103SCIP_EXPORT
    105 SCIP* scip, /**< SCIP data structure */
    106 SCIP_RELAX* relax, /**< relaxation handler */
    107 SCIP_DECL_RELAXCOPY ((*relaxcopy)) /**< copy method of relaxation handler or NULL if you don't want to copy your plugin into sub-SCIPs */
    108 );
    109
    110/** sets destructor method of relaxation handler */
    111SCIP_EXPORT
    113 SCIP* scip, /**< SCIP data structure */
    114 SCIP_RELAX* relax, /**< relaxation handler */
    115 SCIP_DECL_RELAXFREE ((*relaxfree)) /**< destructor of relaxation handler */
    116 );
    117
    118/** sets initialization method of relaxation handler */
    119SCIP_EXPORT
    121 SCIP* scip, /**< SCIP data structure */
    122 SCIP_RELAX* relax, /**< relaxation handler */
    123 SCIP_DECL_RELAXINIT ((*relaxinit)) /**< initialize relaxation handler */
    124 );
    125
    126/** sets deinitialization method of relaxation handler */
    127SCIP_EXPORT
    129 SCIP* scip, /**< SCIP data structure */
    130 SCIP_RELAX* relax, /**< relaxation handler */
    131 SCIP_DECL_RELAXEXIT ((*relaxexit)) /**< deinitialize relaxation handler */
    132 );
    133
    134/** sets solving process initialization method of relaxation handler */
    135SCIP_EXPORT
    137 SCIP* scip, /**< SCIP data structure */
    138 SCIP_RELAX* relax, /**< relaxation handler */
    139 SCIP_DECL_RELAXINITSOL((*relaxinitsol)) /**< solving process initialization method of relaxation handler */
    140 );
    141
    142/** sets solving process deinitialization method of relaxation handler */
    143SCIP_EXPORT
    145 SCIP* scip, /**< SCIP data structure */
    146 SCIP_RELAX* relax, /**< relaxation handler */
    147 SCIP_DECL_RELAXEXITSOL((*relaxexitsol)) /**< solving process deinitialization method of relaxation handler */
    148 );
    149
    150/** returns the relaxation handler of the given name, or NULL if not existing */
    151SCIP_EXPORT
    153 SCIP* scip, /**< SCIP data structure */
    154 const char* name /**< name of relaxation handler */
    155 );
    156
    157/** returns the array of currently available relaxation handlers */
    158SCIP_EXPORT
    160 SCIP* scip /**< SCIP data structure */
    161 );
    162
    163/** returns the number of currently available relaxation handlers */
    164SCIP_EXPORT
    166 SCIP* scip /**< SCIP data structure */
    167 );
    168
    169/** sets the priority of a relaxation handler*/
    170SCIP_EXPORT
    172 SCIP* scip, /**< SCIP data structure */
    173 SCIP_RELAX* relax, /**< relaxation handler */
    174 int priority /**< new priority of the relaxation handler */
    175 );
    176
    177/** @} */
    178
    179#ifdef __cplusplus
    180}
    181#endif
    182
    183#endif
    common defines and data types used in all packages of SCIP
    SCIP_RETCODE SCIPsetRelaxCopy(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXCOPY((*relaxcopy)))
    Definition: scip_relax.c:140
    SCIP_RETCODE SCIPincludeRelax(SCIP *scip, const char *name, const char *desc, int priority, int freq, SCIP_DECL_RELAXCOPY((*relaxcopy)), SCIP_DECL_RELAXFREE((*relaxfree)), SCIP_DECL_RELAXINIT((*relaxinit)), SCIP_DECL_RELAXEXIT((*relaxexit)), SCIP_DECL_RELAXINITSOL((*relaxinitsol)), SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
    Definition: scip_relax.c:61
    SCIP_RELAX ** SCIPgetRelaxs(SCIP *scip)
    Definition: scip_relax.c:250
    int SCIPgetNRelaxs(SCIP *scip)
    Definition: scip_relax.c:263
    SCIP_RETCODE SCIPsetRelaxExitsol(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXEXITSOL((*relaxexitsol)))
    Definition: scip_relax.c:220
    SCIP_RETCODE SCIPsetRelaxExit(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXEXIT((*relaxexit)))
    Definition: scip_relax.c:188
    SCIP_RETCODE SCIPsetRelaxPriority(SCIP *scip, SCIP_RELAX *relax, int priority)
    Definition: scip_relax.c:274
    SCIP_RETCODE SCIPsetRelaxFree(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXFREE((*relaxfree)))
    Definition: scip_relax.c:156
    SCIP_RETCODE SCIPsetRelaxInit(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXINIT((*relaxinit)))
    Definition: scip_relax.c:172
    SCIP_RETCODE SCIPsetRelaxInitsol(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXINITSOL((*relaxinitsol)))
    Definition: scip_relax.c:204
    SCIP_RETCODE SCIPincludeRelaxBasic(SCIP *scip, SCIP_RELAX **relaxptr, const char *name, const char *desc, int priority, int freq, SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
    Definition: scip_relax.c:106
    SCIP_RELAX * SCIPfindRelax(SCIP *scip, const char *name)
    Definition: scip_relax.c:237
    type definitions for relaxators
    #define SCIP_DECL_RELAXINIT(x)
    Definition: type_relax.h:77
    #define SCIP_DECL_RELAXEXITSOL(x)
    Definition: type_relax.h:107
    #define SCIP_DECL_RELAXFREE(x)
    Definition: type_relax.h:69
    #define SCIP_DECL_RELAXINITSOL(x)
    Definition: type_relax.h:96
    #define SCIP_DECL_RELAXCOPY(x)
    Definition: type_relax.h:61
    #define SCIP_DECL_RELAXEXEC(x)
    Definition: type_relax.h:132
    #define SCIP_DECL_RELAXEXIT(x)
    Definition: type_relax.h:85
    struct SCIP_RelaxData SCIP_RELAXDATA
    Definition: type_relax.h:52
    result codes for SCIP callback methods
    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