Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_event.c
    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_event.c
    26 * @ingroup OTHER_CFILES
    27 * @brief public methods for event handler plugins and event handlers
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Gerald Gamrath
    31 * @author Leona Gottwald
    32 * @author Stefan Heinz
    33 * @author Gregor Hendel
    34 * @author Thorsten Koch
    35 * @author Alexander Martin
    36 * @author Marc Pfetsch
    37 * @author Michael Winkler
    38 * @author Kati Wolter
    39 *
    40 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
    41 */
    42
    43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    44
    45#include "scip/debug.h"
    46#include "scip/event.h"
    47#include "scip/lp.h"
    48#include "scip/pub_message.h"
    49#include "scip/pub_var.h"
    50#include "scip/scip_event.h"
    51#include "scip/set.h"
    52#include "scip/struct_mem.h"
    53#include "scip/struct_scip.h"
    54#include "scip/struct_set.h"
    55#include "scip/var.h"
    56
    57/** creates an event handler and includes it in SCIP
    58 * @pre This method can be called if SCIP is in one of the following stages:
    59 * - \ref SCIP_STAGE_INIT
    60 * - \ref SCIP_STAGE_PROBLEM
    61 *
    62 * @note method has all event handler callbacks as arguments and is thus changed every time a new
    63 * callback is added in future releases; consider using SCIPincludeEventhdlrBasic() and setter functions
    64 * if you seek for a method which is less likely to change in future releases
    65 */
    67 SCIP* scip, /**< SCIP data structure */
    68 const char* name, /**< name of event handler */
    69 const char* desc, /**< description of event handler */
    70 SCIP_DECL_EVENTCOPY ((*eventcopy)), /**< copy method of event handler or NULL if you don't want to copy your plugin into sub-SCIPs */
    71 SCIP_DECL_EVENTFREE ((*eventfree)), /**< destructor of event handler */
    72 SCIP_DECL_EVENTINIT ((*eventinit)), /**< initialize event handler */
    73 SCIP_DECL_EVENTEXIT ((*eventexit)), /**< deinitialize event handler */
    74 SCIP_DECL_EVENTINITSOL((*eventinitsol)), /**< solving process initialization method of event handler */
    75 SCIP_DECL_EVENTEXITSOL((*eventexitsol)), /**< solving process deinitialization method of event handler */
    76 SCIP_DECL_EVENTDELETE ((*eventdelete)), /**< free specific event data */
    77 SCIP_DECL_EVENTEXEC ((*eventexec)), /**< execute event handler */
    78 SCIP_EVENTHDLRDATA* eventhdlrdata /**< event handler data */
    79 )
    80{
    81 SCIP_EVENTHDLR* eventhdlr;
    82
    84
    85 /* check whether event handler is already present */
    86 if( SCIPfindEventhdlr(scip, name) != NULL )
    87 {
    88 SCIPerrorMessage("event handler <%s> already included.\n", name);
    89 return SCIP_INVALIDDATA;
    90 }
    91
    92 SCIP_CALL( SCIPeventhdlrCreate(&eventhdlr, scip->set, name, desc,
    93 eventcopy, eventfree, eventinit, eventexit, eventinitsol, eventexitsol, eventdelete, eventexec,
    94 eventhdlrdata) );
    95 SCIP_CALL( SCIPsetIncludeEventhdlr(scip->set, eventhdlr) );
    96
    97 return SCIP_OKAY;
    98}
    99
    100/** creates an event handler and includes it in SCIP with all its non-fundamental callbacks set
    101 * to NULL; if needed, non-fundamental callbacks can be set afterwards via setter functions
    102 * SCIPsetEventhdlrCopy(), SCIPsetEventhdlrFree(), SCIPsetEventhdlrInit(), SCIPsetEventhdlrExit(),
    103 * SCIPsetEventhdlrInitsol(), SCIPsetEventhdlrExitsol(), and SCIPsetEventhdlrDelete()
    104 *
    105 * @pre This method can be called if SCIP is in one of the following stages:
    106 * - \ref SCIP_STAGE_INIT
    107 * - \ref SCIP_STAGE_PROBLEM
    108 *
    109 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeEventhdlr() instead
    110 */
    112 SCIP* scip, /**< SCIP data structure */
    113 SCIP_EVENTHDLR** eventhdlrptr, /**< reference to an event handler, or NULL */
    114 const char* name, /**< name of event handler */
    115 const char* desc, /**< description of event handler */
    116 SCIP_DECL_EVENTEXEC ((*eventexec)), /**< execute event handler */
    117 SCIP_EVENTHDLRDATA* eventhdlrdata /**< event handler data */
    118 )
    119{
    120 SCIP_EVENTHDLR* eventhdlr;
    121
    122 SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeEventhdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    123
    124 /* check whether event handler is already present */
    125 if( SCIPfindEventhdlr(scip, name) != NULL )
    126 {
    127 SCIPerrorMessage("event handler <%s> already included.\n", name);
    128 return SCIP_INVALIDDATA;
    129 }
    130
    131 SCIP_CALL( SCIPeventhdlrCreate(&eventhdlr, scip->set, name, desc,
    132 NULL, NULL, NULL, NULL, NULL, NULL, NULL, eventexec,
    133 eventhdlrdata) );
    134 SCIP_CALL( SCIPsetIncludeEventhdlr(scip->set, eventhdlr) );
    135
    136 if( eventhdlrptr != NULL )
    137 *eventhdlrptr = eventhdlr;
    138
    139 return SCIP_OKAY;
    140}
    141
    142/** sets copy callback of the event handler */
    144 SCIP* scip, /**< scip instance */
    145 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    146 SCIP_DECL_EVENTCOPY ((*eventcopy)) /**< copy callback of the event handler */
    147 )
    148{
    149 assert(scip != NULL);
    150 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    151
    152 SCIPeventhdlrSetCopy(eventhdlr, eventcopy);
    153 return SCIP_OKAY;
    154}
    155
    156/** sets deinitialization callback of the event handler */
    158 SCIP* scip, /**< scip instance */
    159 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    160 SCIP_DECL_EVENTFREE ((*eventfree)) /**< deinitialization callback of the event handler */
    161 )
    162{
    163 assert(scip != NULL);
    164 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    165
    166 SCIPeventhdlrSetFree(eventhdlr, eventfree);
    167 return SCIP_OKAY;
    168}
    169
    170/** sets initialization callback of the event handler */
    172 SCIP* scip, /**< scip instance */
    173 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    174 SCIP_DECL_EVENTINIT ((*eventinit)) /**< initialize event handler */
    175 )
    176{
    177 assert(scip != NULL);
    178 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    179
    180 SCIPeventhdlrSetInit(eventhdlr, eventinit);
    181 return SCIP_OKAY;
    182}
    183
    184/** sets deinitialization callback of the event handler */
    186 SCIP* scip, /**< scip instance */
    187 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    188 SCIP_DECL_EVENTEXIT ((*eventexit)) /**< deinitialize event handler */
    189 )
    190{
    191 assert(scip != NULL);
    192 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    193
    194 SCIPeventhdlrSetExit(eventhdlr, eventexit);
    195 return SCIP_OKAY;
    196}
    197
    198/** sets solving process initialization callback of the event handler */
    200 SCIP* scip, /**< scip instance */
    201 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    202 SCIP_DECL_EVENTINITSOL((*eventinitsol)) /**< solving process initialization callback of event handler */
    203 )
    204{
    205 assert(scip != NULL);
    206 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    207
    208 SCIPeventhdlrSetInitsol(eventhdlr, eventinitsol);
    209 return SCIP_OKAY;
    210}
    211
    212/** sets solving process deinitialization callback of the event handler */
    214 SCIP* scip, /**< scip instance */
    215 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    216 SCIP_DECL_EVENTEXITSOL((*eventexitsol)) /**< solving process deinitialization callback of event handler */
    217 )
    218{
    219 assert(scip != NULL);
    220 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    221
    222 SCIPeventhdlrSetExitsol(eventhdlr, eventexitsol);
    223 return SCIP_OKAY;
    224}
    225
    226/** sets callback of the event handler to free specific event data */
    228 SCIP* scip, /**< scip instance */
    229 SCIP_EVENTHDLR* eventhdlr, /**< event handler */
    230 SCIP_DECL_EVENTDELETE ((*eventdelete)) /**< free specific event data */
    231 )
    232{
    233 assert(scip != NULL);
    234 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetEventhdlrDelete", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    235
    236 SCIPeventhdlrSetDelete(eventhdlr, eventdelete);
    237 return SCIP_OKAY;
    238}
    239
    240/** returns the event handler of the given name, or NULL if not existing */
    242 SCIP* scip, /**< SCIP data structure */
    243 const char* name /**< name of event handler */
    244 )
    245{
    246 assert(scip != NULL);
    247 assert(scip->set != NULL);
    248 assert(name != NULL);
    249
    250 return SCIPsetFindEventhdlr(scip->set, name);
    251}
    252
    253/** returns the array of currently available event handlers */
    255 SCIP* scip /**< SCIP data structure */
    256 )
    257{
    258 assert(scip != NULL);
    259 assert(scip->set != NULL);
    260
    261 return scip->set->eventhdlrs;
    262}
    263
    264/** returns the number of currently available event handlers */
    266 SCIP* scip /**< SCIP data structure */
    267 )
    268{
    269 assert(scip != NULL);
    270 assert(scip->set != NULL);
    271
    272 return scip->set->neventhdlrs;
    273}
    274
    275/** catches a global (not variable or row dependent) event
    276 *
    277 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    278 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    279 *
    280 * @pre This method can be called if @p scip is in one of the following stages:
    281 * - \ref SCIP_STAGE_TRANSFORMING
    282 * - \ref SCIP_STAGE_TRANSFORMED
    283 * - \ref SCIP_STAGE_INITPRESOLVE
    284 * - \ref SCIP_STAGE_PRESOLVING
    285 * - \ref SCIP_STAGE_EXITPRESOLVE
    286 * - \ref SCIP_STAGE_PRESOLVED
    287 * - \ref SCIP_STAGE_INITSOLVE
    288 * - \ref SCIP_STAGE_SOLVING
    289 * - \ref SCIP_STAGE_SOLVED
    290 * - \ref SCIP_STAGE_EXITSOLVE
    291 * - \ref SCIP_STAGE_FREETRANS
    292 */
    294 SCIP* scip, /**< SCIP data structure */
    295 SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
    296 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    297 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    298 int* filterpos /**< pointer to store position of event filter entry, or NULL */
    299 )
    300{
    301 SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    302
    304 {
    305 SCIPerrorMessage("SCIPcatchEvent does not support variable or row change events. Use SCIPcatchVarEvent or SCIPcatchRowEvent!\n");
    306 return SCIP_INVALIDDATA;
    307 }
    308
    309 SCIP_CALL( SCIPeventfilterAdd(scip->eventfilter, scip->mem->probmem, scip->set,
    310 eventtype, eventhdlr, eventdata, filterpos) );
    311
    312 return SCIP_OKAY;
    313}
    314
    315/** drops a global event (stops to track event)
    316 *
    317 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    318 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    319 *
    320 * @pre This method can be called if @p scip is in one of the following stages:
    321 * - \ref SCIP_STAGE_TRANSFORMING
    322 * - \ref SCIP_STAGE_TRANSFORMED
    323 * - \ref SCIP_STAGE_INITPRESOLVE
    324 * - \ref SCIP_STAGE_PRESOLVING
    325 * - \ref SCIP_STAGE_EXITPRESOLVE
    326 * - \ref SCIP_STAGE_PRESOLVED
    327 * - \ref SCIP_STAGE_INITSOLVE
    328 * - \ref SCIP_STAGE_SOLVING
    329 * - \ref SCIP_STAGE_SOLVED
    330 * - \ref SCIP_STAGE_EXITSOLVE
    331 * - \ref SCIP_STAGE_FREETRANS
    332 */
    334 SCIP* scip, /**< SCIP data structure */
    335 SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
    336 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    337 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    338 int filterpos /**< position of event filter entry returned by SCIPcatchEvent(), or -1 */
    339 )
    340{
    342
    343 SCIP_CALL( SCIPeventfilterDel(scip->eventfilter, scip->mem->probmem, scip->set,
    344 eventtype, eventhdlr, eventdata, filterpos) );
    345
    346 return SCIP_OKAY;
    347}
    348
    349/** catches an objective value or domain change event on the given transformed variable
    350 *
    351 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    352 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    353 *
    354 * @pre This method can be called if @p scip is in one of the following stages:
    355 * - \ref SCIP_STAGE_TRANSFORMING
    356 * - \ref SCIP_STAGE_TRANSFORMED
    357 * - \ref SCIP_STAGE_INITPRESOLVE
    358 * - \ref SCIP_STAGE_PRESOLVING
    359 * - \ref SCIP_STAGE_EXITPRESOLVE
    360 * - \ref SCIP_STAGE_PRESOLVED
    361 * - \ref SCIP_STAGE_INITSOLVE
    362 * - \ref SCIP_STAGE_SOLVING
    363 * - \ref SCIP_STAGE_SOLVED
    364 * - \ref SCIP_STAGE_EXITSOLVE
    365 * - \ref SCIP_STAGE_FREETRANS
    366 */
    368 SCIP* scip, /**< SCIP data structure */
    369 SCIP_VAR* var, /**< transformed variable to catch event for */
    370 SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
    371 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    372 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    373 int* filterpos /**< pointer to store position of event filter entry, or NULL */
    374 )
    375{
    376 SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchVarEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    377
    378 if( (eventtype & SCIP_EVENTTYPE_VARCHANGED) == 0 )
    379 {
    380 SCIPerrorMessage("event does not operate on a single variable\n");
    381 return SCIP_INVALIDDATA;
    382 }
    383
    384 if( SCIPvarIsOriginal(var) )
    385 {
    386 SCIPerrorMessage("cannot catch events on original variable <%s>\n", SCIPvarGetName(var));
    387 return SCIP_INVALIDDATA;
    388 }
    389
    390 SCIP_CALL( SCIPvarCatchEvent(var, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
    391
    392 return SCIP_OKAY;
    393}
    394
    395/** drops an objective value or domain change event (stops to track event) on the given transformed variable
    396 *
    397 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    398 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    399 *
    400 * @pre This method can be called if @p scip is in one of the following stages:
    401 * - \ref SCIP_STAGE_TRANSFORMING
    402 * - \ref SCIP_STAGE_TRANSFORMED
    403 * - \ref SCIP_STAGE_INITPRESOLVE
    404 * - \ref SCIP_STAGE_PRESOLVING
    405 * - \ref SCIP_STAGE_EXITPRESOLVE
    406 * - \ref SCIP_STAGE_PRESOLVED
    407 * - \ref SCIP_STAGE_INITSOLVE
    408 * - \ref SCIP_STAGE_SOLVING
    409 * - \ref SCIP_STAGE_SOLVED
    410 * - \ref SCIP_STAGE_EXITSOLVE
    411 * - \ref SCIP_STAGE_FREETRANS
    412 */
    414 SCIP* scip, /**< SCIP data structure */
    415 SCIP_VAR* var, /**< transformed variable to drop event for */
    416 SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
    417 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    418 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    419 int filterpos /**< position of event filter entry returned by SCIPcatchVarEvent(), or -1 */
    420 )
    421{
    422 SCIP_CALL( SCIPcheckStage(scip, "SCIPdropVarEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    423
    424 if( SCIPvarIsOriginal(var) )
    425 {
    426 SCIPerrorMessage("cannot drop events on original variable <%s>\n", SCIPvarGetName(var));
    427 return SCIP_INVALIDDATA;
    428 }
    429
    430 SCIP_CALL( SCIPvarDropEvent(var, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
    431
    432 return SCIP_OKAY;
    433}
    434
    435/** catches a row coefficient, constant, or side change event on the given row
    436 *
    437 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    438 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    439 *
    440 * @pre This method can be called if @p scip is in one of the following stages:
    441 * - \ref SCIP_STAGE_TRANSFORMING
    442 * - \ref SCIP_STAGE_TRANSFORMED
    443 * - \ref SCIP_STAGE_INITPRESOLVE
    444 * - \ref SCIP_STAGE_PRESOLVING
    445 * - \ref SCIP_STAGE_EXITPRESOLVE
    446 * - \ref SCIP_STAGE_PRESOLVED
    447 * - \ref SCIP_STAGE_INITSOLVE
    448 * - \ref SCIP_STAGE_SOLVING
    449 * - \ref SCIP_STAGE_SOLVED
    450 * - \ref SCIP_STAGE_EXITSOLVE
    451 * - \ref SCIP_STAGE_FREETRANS
    452 */
    454 SCIP* scip, /**< SCIP data structure */
    455 SCIP_ROW* row, /**< linear row to catch event for */
    456 SCIP_EVENTTYPE eventtype, /**< event type mask to select events to catch */
    457 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    458 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    459 int* filterpos /**< pointer to store position of event filter entry, or NULL */
    460 )
    461{
    462 SCIP_CALL( SCIPcheckStage(scip, "SCIPcatchRowEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    463
    464 if( (eventtype & SCIP_EVENTTYPE_ROWCHANGED) == 0 )
    465 {
    466 SCIPerrorMessage("event does not operate on a single row\n");
    467 return SCIP_INVALIDDATA;
    468 }
    469
    470 SCIP_CALL( SCIProwCatchEvent(row, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
    471
    472 return SCIP_OKAY;
    473}
    474
    475/** drops a row coefficient, constant, or side change event (stops to track event) on the given row
    476 *
    477 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    478 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    479 *
    480 * @pre This method can be called if @p scip is in one of the following stages:
    481 * - \ref SCIP_STAGE_TRANSFORMING
    482 * - \ref SCIP_STAGE_TRANSFORMED
    483 * - \ref SCIP_STAGE_INITPRESOLVE
    484 * - \ref SCIP_STAGE_PRESOLVING
    485 * - \ref SCIP_STAGE_EXITPRESOLVE
    486 * - \ref SCIP_STAGE_PRESOLVED
    487 * - \ref SCIP_STAGE_INITSOLVE
    488 * - \ref SCIP_STAGE_SOLVING
    489 * - \ref SCIP_STAGE_SOLVED
    490 * - \ref SCIP_STAGE_EXITSOLVE
    491 * - \ref SCIP_STAGE_FREETRANS
    492 */
    494 SCIP* scip, /**< SCIP data structure */
    495 SCIP_ROW* row, /**< linear row to drop event for */
    496 SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
    497 SCIP_EVENTHDLR* eventhdlr, /**< event handler to process events with */
    498 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler when processing this event */
    499 int filterpos /**< position of event filter entry returned by SCIPcatchVarEvent(), or -1 */
    500 )
    501{
    502 SCIP_CALL( SCIPcheckStage(scip, "SCIPdropRowEvent", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
    503
    504 SCIP_CALL( SCIProwDropEvent(row, scip->mem->probmem, scip->set, eventtype, eventhdlr, eventdata, filterpos) );
    505
    506 return SCIP_OKAY;
    507}
    SCIP_DECL_EVENTDELETE(EventhdlrNewSol::scip_delete)
    SCIP_DECL_EVENTEXEC(EventhdlrNewSol::scip_exec)
    SCIP_DECL_EVENTINIT(EventhdlrNewSol::scip_init)
    SCIP_DECL_EVENTINITSOL(EventhdlrNewSol::scip_initsol)
    SCIP_DECL_EVENTEXIT(EventhdlrNewSol::scip_exit)
    SCIP_DECL_EVENTEXITSOL(EventhdlrNewSol::scip_exitsol)
    SCIP_DECL_EVENTFREE(EventhdlrNewSol::scip_free)
    methods for debugging
    #define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
    Definition: debug.h:364
    #define NULL
    Definition: def.h:248
    #define TRUE
    Definition: def.h:93
    #define FALSE
    Definition: def.h:94
    #define SCIP_CALL(x)
    Definition: def.h:355
    SCIP_RETCODE SCIPeventhdlrCreate(SCIP_EVENTHDLR **eventhdlr, SCIP_SET *set, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
    Definition: event.c:195
    void SCIPeventhdlrSetFree(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
    Definition: event.c:438
    void SCIPeventhdlrSetExitsol(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXITSOL((*eventexitsol)))
    Definition: event.c:482
    void SCIPeventhdlrSetInitsol(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINITSOL((*eventinitsol)))
    Definition: event.c:471
    void SCIPeventhdlrSetCopy(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTCOPY((*eventcopy)))
    Definition: event.c:427
    void SCIPeventhdlrSetInit(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
    Definition: event.c:449
    SCIP_RETCODE SCIPeventfilterDel(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: event.c:2300
    void SCIPeventhdlrSetDelete(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTDELETE((*eventdelete)))
    Definition: event.c:493
    void SCIPeventhdlrSetExit(SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
    Definition: event.c:460
    SCIP_RETCODE SCIPeventfilterAdd(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: event.c:2207
    internal methods for managing events
    SCIP_EVENTHDLR ** SCIPgetEventhdlrs(SCIP *scip)
    Definition: scip_event.c:254
    SCIP_RETCODE SCIPsetEventhdlrInitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINITSOL((*eventinitsol)))
    Definition: scip_event.c:199
    SCIP_RETCODE SCIPincludeEventhdlr(SCIP *scip, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
    Definition: scip_event.c:66
    SCIP_RETCODE SCIPsetEventhdlrDelete(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTDELETE((*eventdelete)))
    Definition: scip_event.c:227
    SCIP_RETCODE SCIPsetEventhdlrCopy(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTCOPY((*eventcopy)))
    Definition: scip_event.c:143
    SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
    Definition: scip_event.c:111
    SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
    Definition: scip_event.c:241
    SCIP_RETCODE SCIPsetEventhdlrExitsol(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXITSOL((*eventexitsol)))
    Definition: scip_event.c:213
    int SCIPgetNEventhdlrs(SCIP *scip)
    Definition: scip_event.c:265
    SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
    Definition: scip_event.c:157
    SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
    Definition: scip_event.c:185
    SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
    Definition: scip_event.c:171
    SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: scip_event.c:367
    SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: scip_event.c:413
    SCIP_RETCODE SCIPdropRowEvent(SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: scip_event.c:493
    SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: scip_event.c:293
    SCIP_RETCODE SCIPcatchRowEvent(SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: scip_event.c:453
    SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: scip_event.c:333
    const char * SCIPvarGetName(SCIP_VAR *var)
    Definition: var.c:23267
    SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
    Definition: var.c:23417
    SCIP_RETCODE SCIProwCatchEvent(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: lp.c:8079
    SCIP_RETCODE SCIProwDropEvent(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: lp.c:8103
    internal methods for LP management
    public methods for message output
    #define SCIPerrorMessage
    Definition: pub_message.h:64
    public methods for problem variables
    public methods for event handler plugins and event handlers
    SCIP_RETCODE SCIPsetIncludeEventhdlr(SCIP_SET *set, SCIP_EVENTHDLR *eventhdlr)
    Definition: set.c:4988
    SCIP_EVENTHDLR * SCIPsetFindEventhdlr(SCIP_SET *set, const char *name)
    Definition: set.c:5011
    internal methods for global SCIP settings
    datastructures for block memory pools and memory buffers
    SCIP main data structure.
    datastructures for global SCIP settings
    struct SCIP_EventData SCIP_EVENTDATA
    Definition: type_event.h:179
    #define SCIP_EVENTTYPE_ROWCHANGED
    Definition: type_event.h:153
    struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
    Definition: type_event.h:160
    #define SCIP_DECL_EVENTCOPY(x)
    Definition: type_event.h:189
    #define SCIP_EVENTTYPE_VARCHANGED
    Definition: type_event.h:132
    uint64_t SCIP_EVENTTYPE
    Definition: type_event.h:156
    @ SCIP_INVALIDDATA
    Definition: type_retcode.h:52
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    SCIP_RETCODE SCIPvarDropEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
    Definition: var.c:24824
    SCIP_RETCODE SCIPvarCatchEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
    Definition: var.c:24797
    internal methods for problem variables