1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */ 7 /* fuer Informationstechnik Berlin */ 8 /* */ 9 /* SCIP is distributed under the terms of the ZIB Academic License. */ 10 /* */ 11 /* You should have received a copy of the ZIB Academic License */ 12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */ 13 /* */ 14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 15 16 /**@file reopt.h 17 * @ingroup INTERNALAPI 18 * @brief data structures and methods for collecting reoptimization information 19 * @author Jakob Witzig 20 */ 21 22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 23 24 #ifndef __SCIP_REOPT_H__ 25 #define __SCIP_REOPT_H__ 26 27 #include "blockmemshell/memory.h" 28 #include "scip/def.h" 29 #include "scip/pub_reopt.h" 30 #include "scip/type_branch.h" 31 #include "scip/type_cutpool.h" 32 #include "scip/type_misc.h" 33 #include "scip/type_primal.h" 34 #include "scip/type_prob.h" 35 #include "scip/type_retcode.h" 36 #include "scip/type_reopt.h" 37 #include "scip/type_sepastore.h" 38 #include "scip/type_set.h" 39 #include "scip/type_stat.h" 40 #include "scip/struct_reopt.h" 41 #include "scip/struct_var.h" 42 #include "scip/struct_history.h" 43 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 47 48 /** creates reopt data */ 49 SCIP_RETCODE SCIPreoptCreate( 50 SCIP_REOPT** reopt, /**< pointer to reoptimization data structure */ 51 SCIP_SET* set, /**< global SCIP settings */ 52 BMS_BLKMEM* blkmem /**< block memory */ 53 ); 54 55 /** frees reopt data */ 56 SCIP_RETCODE SCIPreoptFree( 57 SCIP_REOPT** reopt, /**< reoptimization data structure */ 58 SCIP_SET* set, /**< global SCIP settings */ 59 SCIP_PRIMAL* origprimal, /**< original primal */ 60 BMS_BLKMEM* blkmem /**< block memory */ 61 ); 62 63 /* release all variables and constraints captured during reoptimization */ 64 SCIP_RETCODE SCIPreoptReleaseData( 65 SCIP_REOPT* reopt, /**< pointer to reoptimization data structure */ 66 SCIP_SET* set, /**< global SCIP settings */ 67 BMS_BLKMEM* blkmem /**< block memory */ 68 ); 69 70 /** returns the number of constraints added by the reoptimization plug-in */ 71 int SCIPreoptGetNAddedConss( 72 SCIP_REOPT* reopt, /**< reoptimization data */ 73 SCIP_NODE* node /**< node of the search tree */ 74 ); 75 76 /** add a solution to the solution tree */ 77 SCIP_RETCODE SCIPreoptAddSol( 78 SCIP_REOPT* reopt, /**< reoptimization data */ 79 SCIP_SET* set, /**< global SCIP settings */ 80 SCIP_STAT* stat, /**< dynamic problem statistics */ 81 SCIP_PRIMAL* origprimal, /**< original primal */ 82 BMS_BLKMEM* blkmem, /**< block memory */ 83 SCIP_SOL* sol, /**< solution to add */ 84 SCIP_Bool bestsol, /**< is the current solution an optimal solution? */ 85 SCIP_Bool* added, /**< pointer to store the information if the soltion was added */ 86 SCIP_VAR** vars, /**< variable array */ 87 int nvars, /**< number of variables */ 88 int run /**< number of the current run (1,2,...) */ 89 ); 90 91 /** add optimal solution */ 92 SCIP_RETCODE SCIPreoptAddOptSol( 93 SCIP_REOPT* reopt, /**< reoptimization data structure */ 94 SCIP_SOL* sol, /**< solution to add */ 95 BMS_BLKMEM* blkmem, /**< block memory */ 96 SCIP_SET* set, /**< global SCIP settings */ 97 SCIP_STAT* stat, /**< dynamic problem statistics */ 98 SCIP_PRIMAL* origprimal, /**< original primal */ 99 SCIP_VAR** vars, /**< original problem variables */ 100 int nvars /**< number of original problem variables */ 101 ); 102 103 /** add a run */ 104 SCIP_RETCODE SCIPreoptAddRun( 105 SCIP_REOPT* reopt, /**< reoptimization data sturcture */ 106 SCIP_SET* set, /**< global SCIP settings */ 107 BMS_BLKMEM* blkmem, /**< block memory */ 108 SCIP_VAR** origvars, /**< original problem variables */ 109 int norigvars, /**< number of original variables */ 110 int size /**< number of expected solutions */ 111 ); 112 113 /** get the number of checked solutions during the reoptimization process */ 114 int SCIPreoptGetNCheckedSols( 115 SCIP_REOPT* reopt /**< reoptimization data */ 116 ); 117 118 /** update the number of checked solutions during the reoptimization process */ 119 void SCIPreoptAddNCheckedSols( 120 SCIP_REOPT* reopt, /**< reoptimization data */ 121 int ncheckedsols /**< number of updated solutions */ 122 ); 123 124 /** get the number of checked solutions during the reoptimization process */ 125 int SCIPreoptGetNImprovingSols( 126 SCIP_REOPT* reopt /**< reoptimization data */ 127 ); 128 129 /** update the number of checked solutions during the reoptimization process */ 130 void SCIPreoptAddNImprovingSols( 131 SCIP_REOPT* reopt, /**< reoptimization data */ 132 int nimprovingsols /**< number of improving solutions */ 133 ); 134 135 /** returns number of solutions stored in the solution tree of a given run */ 136 int SCIPreoptGetNSolsRun( 137 SCIP_REOPT* reopt, /**< reoptimization data */ 138 int run /**< number of the run (1,2,..) */ 139 ); 140 141 /** returns number of all solutions of all runs */ 142 int SCIPreoptGetNSols( 143 SCIP_REOPT* reopt /**< reoptimization data */ 144 ); 145 146 /** return the stored solutions of a given run */ 147 SCIP_RETCODE SCIPreoptGetSolsRun( 148 SCIP_REOPT* reopt, /**< reopt data */ 149 int run, /**< number of the run (1,2,...) */ 150 SCIP_SOL** sols, /**< array of solutions to fill */ 151 int solssize, /**< length of the array */ 152 int* nsols /**< pointer to store the number of added solutions */ 153 ); 154 155 /** returns the number of saved solutions overall runs */ 156 int SCIPreoptGetNSavedSols( 157 SCIP_REOPT* reopt /**< reoptimization data */ 158 ); 159 160 /** Check if the reoptimization process should be (locally) restarted. 161 * 162 * First, we check whether the current node is the root node, e.g., node == NULL. In this case, we do not need to calculate 163 * the similarity again. We trigger a restart if 164 * 1. the objective function has changed too much, or 165 * 2. the number of stored nodes is exceeded, or 166 * 3. the last n optimal solutions were found by heur_reoptsols (in this case, the stored tree was only needed to 167 * prove the optimality and this can probably be done faster by solving from scratch). 168 * 169 * If the current node is different to the root node we calculate the local similarity, i.e., exclude all variables 170 * that are already fixed at the given node. 171 */ 172 SCIP_RETCODE SCIPreoptCheckRestart( 173 SCIP_REOPT* reopt, /**< reopt data */ 174 SCIP_SET* set, /**< global SCIP settings */ 175 BMS_BLKMEM* blkmem, /**< block memory */ 176 SCIP_NODE* node, /**< current node of the branch and bound tree (or NULL) */ 177 SCIP_VAR** transvars, /**< transformed problem variables */ 178 int ntransvars, /**< number of transformed problem variables */ 179 SCIP_Bool* restart /**< pointer to store if the reoptimization process should be restarted */ 180 ); 181 182 /** returns the similarity to the previous objective function */ 183 SCIP_Real SCIPreoptGetSimToPrevious( 184 SCIP_REOPT* reopt /**< reoptimization data */ 185 ); 186 187 /** returns the similarity to the first objective functions */ 188 SCIP_Real SCIPreoptGetSimToFirst( 189 SCIP_REOPT* reopt /**< reoptimization data */ 190 ); 191 192 /** return the similarity between two of objective functions of two given runs */ 193 SCIP_Real SCIPreoptGetSimilarity( 194 SCIP_REOPT* reopt, /**< reoptimization data structure */ 195 SCIP_SET* set, /**< global SCIP settings */ 196 int run1, /**< number of the first run */ 197 int run2, /**< number of the second run */ 198 SCIP_VAR** origvars, /**< original problem variables */ 199 int norigvars /**< number of original problem variables */ 200 ); 201 202 /** returns the best solution of the last run */ 203 SCIP_SOL* SCIPreoptGetLastBestSol( 204 SCIP_REOPT* reopt /**< reoptimization data */ 205 ); 206 207 /** returns the node of the reoptimization tree corresponding to the unique @p id */ 208 SCIP_REOPTNODE* SCIPreoptGetReoptnode( 209 SCIP_REOPT* reopt, /**< reoptimization data structure */ 210 unsigned int id /**< unique id */ 211 ); 212 213 /** returns the coefficent of variable with index @p idx in run @p run */ 214 SCIP_Real SCIPreoptGetOldObjCoef( 215 SCIP_REOPT* reopt, /**< reopt data */ 216 int run, /**< number of the run */ 217 int idx /**< problem index of variable */ 218 ); 219 220 /** return the best solution of a given run 221 * 222 * @note the returned solution is part of the original space. 223 */ 224 SCIP_SOL* SCIPreoptGetBestSolRun( 225 SCIP_REOPT* reopt, /**< reoptimization data structure */ 226 int run /**< number of the run (1,2,...) */ 227 ); 228 229 /** reset solving specific paramters */ 230 SCIP_RETCODE SCIPreoptReset( 231 SCIP_REOPT* reopt, /**< reoptimization data structure */ 232 SCIP_SET* set, /**< global SCIP settings */ 233 BMS_BLKMEM* blkmem /**< block memory */ 234 ); 235 236 /** reset marks of stored solutions to not updated */ 237 void SCIPreoptResetSolMarks( 238 SCIP_REOPT* reopt /**< reoptimization data */ 239 ); 240 241 /** returns the number of stored nodes */ 242 int SCIPreoptGetNNodes( 243 SCIP_REOPT* reopt, /**< reoptimization data */ 244 SCIP_NODE* node /**< node of the search tree */ 245 ); 246 247 /** save information that given node is infeasible */ 248 SCIP_RETCODE SCIPreoptAddInfNode( 249 SCIP_REOPT* reopt, /**< reoptimization data */ 250 SCIP_SET* set, /**< global SCIP settings */ 251 BMS_BLKMEM* blkmem, /**< block memory */ 252 SCIP_NODE* node /**< node of the search tree */ 253 ); 254 255 /** check the reason for cut off a node and if necessary store the node */ 256 SCIP_RETCODE SCIPreoptCheckCutoff( 257 SCIP_REOPT* reopt, /**< reoptimization data structure */ 258 SCIP_SET* set, /**< global SCIP settings */ 259 BMS_BLKMEM* blkmem, /**< block memery */ 260 SCIP_NODE* node, /**< node of the search tree */ 261 SCIP_EVENTTYPE eventtype, /**< eventtype */ 262 SCIP_LP* lp, /**< LP data */ 263 SCIP_LPSOLSTAT lpsolstat, /**< solution status of the LP */ 264 SCIP_Bool isrootnode, /**< the node is the root */ 265 SCIP_Bool isfocusnode, /**< the node is the current focus node */ 266 SCIP_Real lowerbound, /**< lower bound of the node */ 267 int effectiverootdepth /**< effective root depth */ 268 ); 269 270 /** store bound change based on dual information */ 271 SCIP_RETCODE SCIPreoptAddDualBndchg( 272 SCIP_REOPT* reopt, /**< reoptimization data structure */ 273 SCIP_SET* set, /**< global SCIP settings */ 274 BMS_BLKMEM* blkmem, /**< block memory */ 275 SCIP_NODE* node, /**< node of the search tree */ 276 SCIP_VAR* var, /**< variables */ 277 SCIP_Real newval, /**< new bound */ 278 SCIP_Real oldval /**< old bound */ 279 ); 280 281 /** returns the number of bound changes based on dual information */ 282 int SCIPreoptGetNDualBndchgs( 283 SCIP_REOPT* reopt, /**< reoptimization data */ 284 SCIP_NODE* node /**< node of the search tree */ 285 ); 286 287 /** returns the number of leaf nodes of the subtree induced by @p node (of the whole tree if node == NULL) */ 288 int SCIPreoptGetNLeaves( 289 SCIP_REOPT* reopt, /**< reoptimization data */ 290 SCIP_NODE* node /**< node of the search tree */ 291 ); 292 293 /** returns the child nodes of @p node that need to be reoptimized next or NULL if @p node is a leaf */ 294 SCIP_RETCODE SCIPreoptGetChildIDs( 295 SCIP_REOPT* reopt, /**< reoptimization data structure */ 296 SCIP_SET* set, /**< global SCIP settings */ 297 BMS_BLKMEM* blkmem, /**< block memory */ 298 SCIP_NODE* node, /**< node of the search tree */ 299 unsigned int* childs, /**< array to store the child ids */ 300 int childssize, /**< size of the childs array */ 301 int* nchilds /**< pointer to store the number of child nodes */ 302 ); 303 304 /** returns all leaves of the subtree induced by @p node */ 305 SCIP_RETCODE SCIPreoptGetLeaves( 306 SCIP_REOPT* reopt, /**< reoptimization data */ 307 SCIP_NODE* node, /**< node of the search tree */ 308 unsigned int* leaves, /**< array to the the ids */ 309 int leavessize, /**< size of leaves array */ 310 int* nleaves /**< pointer to store the number of leaf node */ 311 ); 312 313 /** returns the time needed to store the nodes for reoptimization */ 314 SCIP_Real SCIPreoptGetSavingtime( 315 SCIP_REOPT* reopt /**< reoptimization data */ 316 ); 317 318 /** store a global constraint that should be added at the beginning of the next iteration */ 319 SCIP_RETCODE SCIPreoptAddGlbCons( 320 SCIP_REOPT* reopt, /**< reoptimization data */ 321 SCIP_VAR** vars, /**< array to store the variables of the constraint */ 322 SCIP_Real* vals, /**< array to store the coefficients of the variables */ 323 int nvars, /**< pointer to store the size of the constraints */ 324 BMS_BLKMEM* blkmem /**< block memory */ 325 ); 326 327 /** add the stored constraints globally to the problem */ 328 SCIP_RETCODE SCIPreoptApplyGlbConss( 329 SCIP* scip, /**< SCIP data structure */ 330 SCIP_REOPT* reopt, /**< reoptimization data structure */ 331 SCIP_SET* set, /**< global SCIP settings */ 332 SCIP_STAT* stat, /**< dynamic problem statistics */ 333 BMS_BLKMEM* blkmem /**< block memory */ 334 ); 335 336 /** add the stored cuts to the separation storage */ 337 SCIP_RETCODE SCIPreoptApplyCuts( 338 SCIP_REOPT* reopt, /**< reoptimization data structure */ 339 SCIP_NODE* node, /**< current focus node */ 340 SCIP_SEPASTORE* sepastore, /**< separation storage */ 341 SCIP_CUTPOOL* cutpool, /**< global cutpool */ 342 BMS_BLKMEM* blkmem, /**< block memory */ 343 SCIP_SET* set, /**< global SCIP settings */ 344 SCIP_STAT* stat, /**< dynamic problem statistics */ 345 SCIP_EVENTQUEUE* eventqueue, /**< event queue */ 346 SCIP_EVENTFILTER* eventfilter, /**< event filter */ 347 SCIP_LP* lp, /**< current LP */ 348 SCIP_Bool root /**< bool whether the current node is the root */ 349 ); 350 351 /** check if the LP of the given node should be solved or not */ 352 SCIP_Bool SCIPreoptGetSolveLP( 353 SCIP_REOPT* reopt, /**< reoptimization data structure */ 354 SCIP_SET* set, /**< global SCIP settings */ 355 SCIP_NODE* node /**< node of the current search tree */ 356 ); 357 358 /** reactivate the given @p reoptnode and split them into several nodes if necessary */ 359 SCIP_RETCODE SCIPreoptApply( 360 SCIP_REOPT* reopt, /**< reoptimization data structure */ 361 SCIP* scip, /**< SCIP data structure */ 362 SCIP_SET* set, /**< global SCIP settings */ 363 SCIP_STAT* stat, /**< dynamic problem statistics */ 364 SCIP_PROB* transprob, /**< transformed problem */ 365 SCIP_PROB* origprob, /**< original problem */ 366 SCIP_TREE* tree, /**< branching tree */ 367 SCIP_LP* lp, /**< current LP */ 368 SCIP_BRANCHCAND* branchcand, /**< branching candidate */ 369 SCIP_EVENTQUEUE* eventqueue, /**< event queue */ 370 SCIP_CLIQUETABLE* cliquetable, /**< clique table */ 371 BMS_BLKMEM* blkmem, /**< block memory */ 372 SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree to reactivate */ 373 unsigned int id, /**< id of the node to reactivate */ 374 SCIP_Real estimate, /**< estimate of the child nodes that should be created */ 375 SCIP_NODE** childnodes, /**< array to store the created child nodes */ 376 int* ncreatedchilds, /**< pointer to store number of created child nodes */ 377 int* naddedconss, /**< pointer to store number of generated constraints */ 378 int childnodessize, /**< available size of childnodes array */ 379 SCIP_Bool* success /**< pointer store the result */ 380 ); 381 382 /** delete a node stored in the reoptimization tree */ 383 SCIP_RETCODE SCIPreoptDeleteNode( 384 SCIP_REOPT* reopt, /**< reoptimization data */ 385 SCIP_SET* set, /**< global SCIP settings */ 386 unsigned int id, /**< id of the node */ 387 BMS_BLKMEM* blkmem /**< block memory */ 388 ); 389 390 /** reset the stored information abound bound changes based on dual information */ 391 SCIP_RETCODE SCIPreoptResetDualBndchgs( 392 SCIP_REOPT* reopt, /**< reoptimization data */ 393 SCIP_NODE* node, /**< node of the search tree */ 394 BMS_BLKMEM* blkmem /**< block memory */ 395 ); 396 397 /** splits the root into several nodes and moves the child nodes of the root to one of the created nodes */ 398 SCIP_RETCODE SCIPreoptSplitRoot( 399 SCIP_REOPT* reopt, /**< reoptimization data structure */ 400 SCIP_TREE* tree, /**< branch and bound tree */ 401 SCIP_SET* set, /**< global SCIP settings */ 402 SCIP_STAT* stat, /**< dynamic SCIP statistics */ 403 BMS_BLKMEM* blkmem, /**< block memory */ 404 int* ncreatedchilds, /**< pointer to store the number of created nodes */ 405 int* naddedconss /**< pointer to store the number added constraints */ 406 ); 407 408 /** reset the complete tree and set the given search frontier */ 409 SCIP_RETCODE SCIPreoptApplyCompression( 410 SCIP_REOPT* reopt, /**< reoptimization data structure */ 411 SCIP_SET* set, /**< global SCIP settings */ 412 BMS_BLKMEM* blkmem, /**< block memory */ 413 SCIP_REOPTNODE** representatives, /**< array of representatives */ 414 int nrepresentatives, /**< number of representatives */ 415 SCIP_Bool* success /**< pointer to store if the method was successful */ 416 ); 417 418 /** add all unprocessed nodes to the reoptimization tree */ 419 SCIP_RETCODE SCIPreoptSaveOpenNodes( 420 SCIP_REOPT* reopt, /**< reoptimization data structure */ 421 SCIP_SET* set, /**< global SCIP settings */ 422 SCIP_LP* lp, /**< LP data */ 423 BMS_BLKMEM* blkmem, /**< block memory */ 424 SCIP_NODE** leaves, /**< array of open leave nodes */ 425 int nleaves, /**< number of open leave nodes */ 426 SCIP_NODE** childs, /**< array of open children nodes */ 427 int nchilds, /**< number of open leave nodes */ 428 SCIP_NODE** siblings, /**< array of open sibling nodes */ 429 int nsiblings /**< number of open leave nodes */ 430 ); 431 432 /** merges the variable history of the current run with the stored history */ 433 SCIP_RETCODE SCIPreoptMergeVarHistory( 434 SCIP_REOPT* reopt, /**< reoptimization data structure */ 435 SCIP_SET* set, /**< global SCIP settings */ 436 SCIP_STAT* stat, /**< dynamic problem statistics */ 437 SCIP_VAR** vars, /**< original problem variables */ 438 int nvars /**< number of original problem variables */ 439 ); 440 441 /** updates the variable history */ 442 SCIP_RETCODE SCIPreoptUpdateVarHistory( 443 SCIP_REOPT* reopt, /**< reoptimization data structure */ 444 SCIP_SET* set, /**< global SCIP settings */ 445 SCIP_STAT* stat, /**< dynamic problem statistics */ 446 BMS_BLKMEM* blkmem, /**< block memory */ 447 SCIP_VAR** vars, /**< variable array */ 448 int nvars /**< number of variables */ 449 ); 450 451 /* 452 * methods for reoptnode 453 */ 454 455 /** initialize an empty node */ 456 void SCIPreoptnodeInit( 457 SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */ 458 SCIP_SET* set /**< global SCIP settings */ 459 ); 460 461 /** reset the given reoptimization node */ 462 SCIP_RETCODE SCIPreoptnodeReset( 463 SCIP_REOPT* reopt, /**< reoptimization data structure */ 464 SCIP_SET* set, /**< global SCIP settings */ 465 BMS_BLKMEM* blkmem, /**< block memory */ 466 SCIP_REOPTNODE* reoptnode /**< reoptimization node */ 467 ); 468 469 /** delete the given reoptimization node */ 470 SCIP_RETCODE SCIPreoptnodeDelete( 471 SCIP_REOPTNODE** reoptnode, /**< pointer of reoptnode */ 472 BMS_BLKMEM* blkmem /**< block memory */ 473 ); 474 475 /** add a variable to a given reoptnode */ 476 SCIP_RETCODE SCIPreoptnodeAddBndchg( 477 SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */ 478 SCIP_SET* set, /**< global SCIP settings */ 479 BMS_BLKMEM* blkmem, /**< block memory */ 480 SCIP_VAR* var, /**< variable to add */ 481 SCIP_Real val, /**< value of the variable */ 482 SCIP_BOUNDTYPE boundtype /**< boundtype of the variable */ 483 ); 484 485 /** add a constraint to a given reoptnode */ 486 SCIP_RETCODE SCIPreoptnodeAddCons( 487 SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */ 488 SCIP_SET* set, /**< global SCIP settings */ 489 BMS_BLKMEM* blkmem, /**< block memory */ 490 SCIP_VAR** vars, /**< variables which are part of the constraint */ 491 SCIP_Real* bounds, /**< bounds of the variables */ 492 SCIP_BOUNDTYPE* boundtypes, /**< boundtypes of the varibales (or NULL is the constraint is a cut) */ 493 SCIP_Real lhs, /**< lhs of the constraint */ 494 SCIP_Real rhs, /**< rhs of the constraint */ 495 int nvars, /**< number of variables */ 496 REOPT_CONSTYPE constype, /**< type of the constraint */ 497 SCIP_Bool linear /**< the given constraint has a linear representation */ 498 ); 499 500 /** return the branching path of the given node in the reoptimization tree */ 501 void SCIPreoptnodeGetPath( 502 SCIP_REOPT* reopt, /**< reoptimization data structure */ 503 SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree */ 504 SCIP_VAR** vars, /**< array for variables */ 505 SCIP_Real* vals, /**< array for values */ 506 SCIP_BOUNDTYPE* boundtypes, /**< array for bound types */ 507 int varssize, /**< size of arrays vars, vals, and boundtypes */ 508 int* nbndchgs, /**< pointer to store the number of bound changes */ 509 int* nbndchgsafterdual /**< pointer to store the number of bound changes applied after 510 * the first dual reduction at the given node */ 511 ); 512 513 /** add a constraint to the reoptimization data structure */ 514 SCIP_RETCODE SCIPreoptAddCons( 515 SCIP_REOPT* reopt, /**< reoptimization data structure */ 516 SCIP_SET* set, /**< global SCIP settings */ 517 BMS_BLKMEM* blkmem, /**< block memory */ 518 SCIP_CONS* cons /**< constraint to add */ 519 ); 520 521 /** save global lower and upper bounds 522 * 523 * @note this method can only called once, i.e., after fishing presolving of the first problem 524 */ 525 SCIP_RETCODE SCIPreoptSaveGlobalBounds( 526 SCIP_REOPT* reopt, /**< reoptimization data structure */ 527 SCIP_PROB* transprob, /**< transformed problem data */ 528 BMS_BLKMEM* blkmem /**< block memory */ 529 ); 530 531 /** save active constraints 532 * 533 * @note this method can only called once, i.e., after fishing presolving of the first problem 534 */ 535 SCIP_RETCODE SCIPreoptSaveActiveConss( 536 SCIP_REOPT* reopt, /**< reoptimization data structure */ 537 SCIP_SET* set, /**< global SCIP settings */ 538 SCIP_PROB* transprob, /**< transformed problem data */ 539 BMS_BLKMEM* blkmem /**< block memory */ 540 ); 541 542 /** installs global lower and upper bounds */ 543 SCIP_RETCODE SCIPreoptInstallBounds( 544 SCIP_REOPT* reopt, /**< reoptimization data structure */ 545 SCIP_SET* set, /**< global SCIP settings */ 546 SCIP_STAT* stat, /**< dynamic SCIP statistics */ 547 SCIP_PROB* transprob, /**< transformed problem data */ 548 SCIP_LP* lp, /**< current LP data */ 549 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */ 550 SCIP_EVENTQUEUE* eventqueue, /**< event queue */ 551 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */ 552 BMS_BLKMEM* blkmem /**< block memory */ 553 ); 554 555 /** reactivate globally valid constraints that were deactivated and necessary to ensure correctness */ 556 SCIP_RETCODE SCIPreoptResetActiveConss( 557 SCIP_REOPT* reopt, /**< reoptimization data structure */ 558 SCIP_SET* set, /**< global SCIP settings */ 559 SCIP_STAT* stat /**< dynamic SCIP statistics */ 560 ); 561 562 563 /** returns whether a constraint is necessary to ensure correctness and cannot be deleted */ 564 SCIP_Bool SCIPreoptConsCanBeDeleted( 565 SCIP_REOPT* reopt, /**< reoptimization data structure */ 566 SCIP_CONS* cons /**< problem constraint */ 567 ); 568 569 #ifdef __cplusplus 570 } 571 #endif 572 573 #endif 574