Scippy

    SCIP

    Solving Constraint Integer Programs

    nlhdlr.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 nlhdlr.h
    26 * @ingroup INTERNALAPI
    27 * @brief private functions of nonlinear handlers of nonlinear constraints
    28 * @author Ksenia Bestuzheva
    29 * @author Benjamin Mueller
    30 * @author Felipe Serrano
    31 * @author Stefan Vigerske
    32 */
    33
    34#ifndef SCIP_NLHDLR_H_
    35#define SCIP_NLHDLR_H_
    36
    37#include "scip/pub_nlhdlr.h"
    38#include "scip/type_datatree.h"
    39
    40#ifndef NDEBUG
    41#include "scip/struct_nlhdlr.h"
    42#endif
    43
    44#ifdef __cplusplus
    45extern "C" {
    46#endif
    47
    48/** creates a nonlinear handler */
    50 SCIP* scip, /**< SCIP data structure */
    51 SCIP_NLHDLR** nlhdlr, /**< buffer to store pointer to created nonlinear handler */
    52 const char* name, /**< name of nonlinear handler (must not be NULL) */
    53 const char* desc, /**< description of nonlinear handler (can be NULL) */
    54 int detectpriority, /**< detection priority of nonlinear handler */
    55 int enfopriority, /**< enforcement priority of nonlinear handler */
    56 SCIP_DECL_NLHDLRDETECT((*detect)), /**< structure detection callback of nonlinear handler */
    57 SCIP_DECL_NLHDLREVALAUX((*evalaux)), /**< auxiliary evaluation callback of nonlinear handler */
    58 SCIP_NLHDLRDATA* nlhdlrdata /**< data of nonlinear handler (can be NULL) */
    59 );
    60
    61/** frees a nonlinear handler */
    63 SCIP* scip, /**< SCIP data structure */
    64 SCIP_NLHDLR** nlhdlr /**< pointer to nonlinear handler to be freed */
    65 );
    66
    67/** call the handler copy callback of a nonlinear handler */
    68SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr);
    69
    70/** call the free expression specific data callback of a nonlinear handler */
    71SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata);
    72
    73/** call the initialization callback of a nonlinear handler */
    74SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit);
    75
    76/** call the deinitialization callback of a nonlinear handler */
    77SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit);
    78
    79/** call the detect callback of a nonlinear handler */
    80SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect);
    81
    82/** call the auxiliary evaluation callback of a nonlinear handler */
    83SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux);
    84
    85/** call the interval evaluation callback of a nonlinear handler */
    86SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval);
    87
    88/** call the reverse propagation callback of a nonlinear handler */
    89SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop);
    90
    91/** call the separation initialization callback of a nonlinear handler */
    92SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa);
    93
    94/** call the separation deinitialization callback of a nonlinear handler */
    95SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa);
    96
    97/** call the enforcement callback of a nonlinear handler */
    98SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo);
    99
    100/** call the estimator callback of a nonlinear handler */
    101SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate);
    102
    103/** call the solution linearization callback of a nonlinear handler */
    104SCIP_DECL_NLHDLRSOLLINEARIZE(SCIPnlhdlrSollinearize);
    105
    106/** reset number of detections counter for last round */
    108 SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
    109 );
    110
    111/** increments number of cutoffs in statistics */
    113 SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
    114 );
    115
    116/** increments number of separations in statistics */
    118 SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
    119 );
    120
    121/** print statistics for nonlinear handlers */
    123 SCIP* scip, /**< SCIP data structure */
    124 SCIP_NLHDLR** nlhdlrs, /**< nonlinear handlers */
    125 int nnlhdlrs, /**< number of nonlinear handlers */
    126 FILE* file /**< file handle, or NULL for standard out */
    127 );
    128
    129/** collect statistics for nonlinear handlers */
    131 SCIP* scip, /**< SCIP data structure */
    132 SCIP_NLHDLR** nlhdlrs, /**< nonlinear handlers */
    133 int nnlhdlrs, /**< number of nonlinear handlers */
    134 SCIP_DATATREE* datatree /**< datatree where to add statistics */
    135 );
    136
    137#ifndef NDEBUG
    138#define SCIPnlhdlrResetNDetectionslast(nlhdlr) (nlhdlr)->ndetectionslast = 0
    139#define SCIPnlhdlrIncrementNCutoffs(nlhdlr) ++(nlhdlr)->ncutoffs
    140#define SCIPnlhdlrIncrementNSeparated(nlhdlr) ++(nlhdlr)->nseparated
    141#endif
    142
    143#ifdef __cplusplus
    144}
    145#endif
    146
    147#endif /* SCIP_NLHDLR_H_ */
    SCIP_RETCODE SCIPnlhdlrFree(SCIP *scip, SCIP_NLHDLR **nlhdlr)
    Definition: nlhdlr.c:402
    SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect)
    Definition: nlhdlr.c:499
    SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa)
    Definition: nlhdlr.c:581
    SCIP_RETCODE SCIPnlhdlrCreate(SCIP *scip, SCIP_NLHDLR **nlhdlr, const char *name, const char *desc, int detectpriority, int enfopriority, SCIP_DECL_NLHDLRDETECT((*detect)), SCIP_DECL_NLHDLREVALAUX((*evalaux)), SCIP_NLHDLRDATA *nlhdlrdata)
    Definition: nlhdlr.c:354
    SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit)
    Definition: nlhdlr.c:458
    #define SCIPnlhdlrIncrementNSeparated(nlhdlr)
    Definition: nlhdlr.h:140
    SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr)
    Definition: nlhdlr.c:430
    SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval)
    Definition: nlhdlr.c:532
    SCIP_DECL_NLHDLRSOLLINEARIZE(SCIPnlhdlrSollinearize)
    Definition: nlhdlr.c:712
    SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux)
    Definition: nlhdlr.c:521
    void SCIPnlhdlrPrintStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, FILE *file)
    Definition: nlhdlr.c:753
    SCIP_RETCODE SCIPnlhdlrCollectStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, SCIP_DATATREE *datatree)
    Definition: nlhdlr.c:797
    SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate)
    Definition: nlhdlr.c:676
    SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop)
    Definition: nlhdlr.c:551
    #define SCIPnlhdlrResetNDetectionslast(nlhdlr)
    Definition: nlhdlr.h:138
    SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata)
    Definition: nlhdlr.c:442
    #define SCIPnlhdlrIncrementNCutoffs(nlhdlr)
    Definition: nlhdlr.h:139
    SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit)
    Definition: nlhdlr.c:486
    SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo)
    Definition: nlhdlr.c:623
    SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa)
    Definition: nlhdlr.c:606
    public functions of nonlinear handlers of nonlinear constraints
    structure definitions related to nonlinear handlers of nonlinear constraints
    type definitions for data tree
    struct SCIP_NlhdlrData SCIP_NLHDLRDATA
    Definition: type_nlhdlr.h:452
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63