Scippy

    SCIP

    Solving Constraint Integer Programs

    concurrent.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 concurrent.c
    26 * @ingroup PARALLEL
    27 * @brief helper functions for concurrent SCIP solvers
    28 * @author Leona Gottwald
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#include "scip/concurrent.h"
    34#include "scip/concsolver.h"
    35#include "scip/event.h"
    36#include "scip/stat.h"
    38#include "scip/struct_scip.h"
    39#include "scip/struct_set.h"
    40#include "scip/struct_tree.h"
    41#include "scip/struct_primal.h"
    42#include "scip/struct_sol.h"
    43#include "scip/struct_prop.h"
    44#include "scip/struct_heur.h"
    45#include "scip/struct_sepa.h"
    46#include "scip/struct_presol.h"
    47#include "scip/prob.h"
    48#include "scip/prop_sync.h"
    49#include "scip/heur_sync.h"
    51#include "scip/scip.h"
    52#include "scip/syncstore.h"
    53#include "scip/type_syncstore.h"
    54#include "scip/set.h"
    55#include "tpi/tpi.h"
    56#include "tpi/def_openmp.h"
    57
    58/** TPI job data */
    59struct SCIP_ConcurrentData
    60{
    61 SCIP* scip; /**< SCIP datastructure */
    62 int solverindex; /**< index of solver running concurrently */
    63};
    64typedef struct SCIP_ConcurrentData SCIP_CONCURRENTDATA;
    65
    66/** create concurrent data */
    68 SCIP* scip, /**< SCIP datastructure */
    69 SCIP_CONCSOLVER* concsolver, /**< concurrent solver of given SCIP instance */
    70 int* varperm, /**< permutation of variables for communication */
    71 int nvars /**< number of variables in problem */
    72 )
    73{
    74 assert(scip != NULL);
    75 assert(concsolver != NULL);
    76 assert(varperm != NULL);
    77 assert(scip->concurrent == NULL);
    78 assert(nvars >= 0);
    79
    80 SCIP_CALL( SCIPallocBlockMemory(scip, &scip->concurrent) );
    81
    82 scip->concurrent->varperm = NULL;
    83 scip->concurrent->nvars = nvars;
    84
    85 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &scip->concurrent->varperm, varperm, nvars) );
    86
    87 scip->concurrent->concsolver = concsolver;
    88 scip->concurrent->mainscip = scip;
    89 scip->concurrent->solidx = scip->stat->solindex;
    90 scip->stat->subscipdepth = 0;
    91
    92 if( scip->set->parallel_mode == (int) SCIP_PARA_DETERMINISTIC )
    93 {
    94 scip->concurrent->dettime = 0.0;
    95 scip->concurrent->wallclock = NULL;
    96 }
    97 else
    98 {
    99 SCIP_CALL( SCIPcreateWallClock(scip, &scip->concurrent->wallclock) );
    100 SCIP_CALL( SCIPstartClock(scip, scip->concurrent->wallclock) );
    101 }
    102
    103 assert(SCIPfindHeur(scip, "sync") == NULL);
    104
    106 scip->concurrent->heursync = SCIPfindHeur(scip, "sync");
    107
    108 assert(SCIPfindProp(scip, "sync") == NULL);
    109
    111 scip->concurrent->propsync = SCIPfindProp(scip, "sync");
    112
    113 scip->concurrent->eventglobalbnd = NULL;
    114 assert(SCIPfindEventhdlr(scip, "globalbnd") == NULL);
    115
    116 if( scip->set->concurrent_commvarbnds )
    117 {
    119 scip->concurrent->eventglobalbnd = SCIPfindEventhdlr(scip, "globalbnd");
    120 }
    121
    122 return SCIP_OKAY;
    123}
    124
    125/** get number of initialized concurrent solvers */
    127 SCIP* scip /**< SCIP datastructure */
    128 )
    129{
    130 assert(scip != NULL);
    131 assert(scip->set != NULL);
    132
    133 return scip->set->nconcsolvers;
    134}
    135
    136/** gets the initialized concurrent solvers */
    138 SCIP* scip /**< SCIP datastructure */
    139 )
    140{
    141 assert(scip != NULL);
    142 assert(scip->set != NULL);
    143
    144 return scip->set->concsolvers;
    145}
    146
    147/** adds an initialized concurrent solver */
    149 SCIP* scip, /**< SCIP datastructure */
    150 SCIP_CONCSOLVER* concsolver /**< concurrent solver of given SCIP instance */
    151 )
    152{
    153 assert(scip != NULL);
    154
    155 SCIP_CALL( SCIPsetIncludeConcsolver(scip->set, concsolver) );
    156
    157 return SCIP_OKAY;
    158}
    159
    160/** frees concurrent data */
    162 SCIP* scip /**< SCIP datastructure */
    163 )
    164{
    165 assert(scip != NULL);
    166
    167 if( scip->concurrent == NULL )
    168 return SCIP_OKAY;
    169
    170 assert(scip->concurrent->varperm != NULL);
    171
    172 /* check if we are the SCIP that is responsible for freeing this concurrent struct
    173 * or just a subscip */
    174 if( scip->concurrent->mainscip != scip )
    175 {
    176 /* we are just a subscip, so don't free the concurrent structure and add the
    177 * deterministic time that was counted in the subscip but not yet added to the main SCIP */
    178 scip->concurrent->mainscip->stat->detertimecnt += scip->stat->detertimecnt;
    179 scip->stat->detertimecnt = 0;
    180 scip->concurrent = NULL;
    181 }
    182 else
    183 {
    184 /* we are in the main SCIP so free the concurrent structure */
    185 if( scip->concurrent->wallclock != NULL )
    186 {
    187 SCIP_CALL( SCIPfreeClock(scip, &scip->concurrent->wallclock) );
    188 }
    189
    190 SCIPfreeBlockMemoryArray(scip, &scip->concurrent->varperm, scip->concurrent->nvars);
    191
    192 SCIPfreeBlockMemory(scip, &scip->concurrent);
    193 }
    194
    195 return SCIP_OKAY;
    196}
    197
    198/** increments the time counter for synchronization */
    200 SCIP* scip, /**< SCIP datastructure */
    201 SCIP_Real val /**< value by which the time counter for synchronization is incremented */
    202 )
    203{
    204 SCIP_Real syncfreq;
    205 SCIP* mainscip;
    206 SCIP_CLOCK* wallclock;
    207
    208 assert(scip != NULL);
    209
    210 if( scip->concurrent == NULL )
    211 return SCIP_OKAY;
    212
    213 syncfreq = SCIPconcsolverGetSyncFreq(scip->concurrent->concsolver);
    214 wallclock = scip->concurrent->wallclock;
    215 mainscip = scip->concurrent->mainscip;
    216
    217 if( wallclock == NULL )
    218 {
    219 scip->concurrent->dettime += val;
    220
    221 if( scip->concurrent->dettime >= syncfreq )
    222 {
    223 SCIP_EVENT* event;
    224
    225 SCIPconcsolverSetTimeSinceLastSync(scip->concurrent->concsolver, scip->concurrent->dettime);
    226 scip->concurrent->dettime = 0.0;
    227 SCIP_CALL( SCIPeventCreateSync(&event, SCIPblkmem(mainscip)) );
    228 SCIP_CALL( SCIPeventqueueAdd(mainscip->eventqueue, SCIPblkmem(mainscip), mainscip->set,
    229 NULL, NULL, NULL, mainscip->eventfilter, &event) );
    230 }
    231 }
    232 else
    233 {
    234 SCIP_Real timesincelastsync;
    235 timesincelastsync = SCIPgetClockTime(mainscip, wallclock);
    236
    237 if( timesincelastsync >= syncfreq )
    238 {
    239 SCIP_EVENT* event;
    240
    241 SCIPconcsolverSetTimeSinceLastSync(scip->concurrent->concsolver, timesincelastsync);
    242
    243 SCIP_CALL( SCIPeventCreateSync(&event, SCIPblkmem(mainscip)) );
    244 SCIP_CALL( SCIPeventqueueAdd(mainscip->eventqueue, SCIPblkmem(mainscip), mainscip->set,
    245 NULL, NULL, NULL, mainscip->eventfilter, &event) );
    246
    247 SCIP_CALL( SCIPresetClock(mainscip, wallclock) );
    248 SCIP_CALL( SCIPstartClock(mainscip, wallclock) );
    249 }
    250 }
    251
    252 return SCIP_OKAY;
    253}
    254
    255
    256/** synchronize with other concurrent solvers */
    258 SCIP* scip /**< SCIP datastructure */
    259 )
    260{
    261 assert(scip != NULL);
    262 assert(scip->concurrent != NULL);
    263
    264 SCIP_CALL( SCIPconcsolverSync(scip->concurrent->concsolver, scip->concurrent->mainscip->set) );
    265
    266 scip->concurrent->mainscip->concurrent->solidx = scip->concurrent->mainscip->stat->solindex;
    267
    268 if( scip->concurrent->eventglobalbnd != NULL )
    269 SCIPeventGlobalbndClearBoundChanges(scip->concurrent->eventglobalbnd);
    270
    271 return SCIP_OKAY;
    272}
    273
    274/** disables storing global bound changes */
    276 SCIP* scip /**< SCIP data structure */
    277 )
    278{
    279 assert(scip != NULL);
    280 assert(scip->concurrent != NULL);
    281
    282 if( scip->concurrent->eventglobalbnd != NULL )
    283 SCIPeventGlobalbndDisableBoundStorage(scip->concurrent->eventglobalbnd);
    284}
    285
    286/** enables storing global bound changes */
    288 SCIP* scip /**< SCIP data structure */
    289 )
    290{
    291 assert(scip != NULL);
    292 assert(scip->concurrent != NULL);
    293
    294 if( scip->concurrent->eventglobalbnd != NULL )
    295 SCIPeventGlobalbndEnableBoundStorage(scip->concurrent->eventglobalbnd);
    296}
    297
    298/** gets total memory usage of all concurrent solvers together */
    300 SCIP* scip /**< SCIP data structure */
    301 )
    302{
    304
    305 assert(scip != NULL);
    306
    307 if( scip->concurrent == NULL || scip->concurrent->mainscip != scip || scip->concurrent->concsolver == NULL )
    308 return memtotal;
    309 else
    310 {
    311 SCIP_Longint concmemtotal = SCIPconcsolverGetMemTotal(scip->concurrent->concsolver);
    312 return MAX(memtotal, concmemtotal);
    313 }
    314}
    315
    316/** gets the dualbound in the last synchronization */
    318 SCIP* scip /**< SCIP data structure */
    319 )
    320{
    321 SCIP_SYNCSTORE* syncstore;
    322
    323 assert(scip != NULL);
    324
    325 syncstore = SCIPgetSyncstore(scip);
    326 assert(syncstore != NULL);
    327
    328 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPsyncstoreGetLastLowerbound(syncstore));
    329}
    330
    331/** gets the primalbound in the last synchronization */
    333 SCIP* scip /**< SCIP data structure */
    334 )
    335{
    336 SCIP_SYNCSTORE* syncstore;
    337
    338 assert(scip != NULL);
    339
    340 syncstore = SCIPgetSyncstore(scip);
    341 assert(syncstore != NULL);
    342
    343 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPsyncstoreGetLastUpperbound(syncstore));
    344}
    345
    346/** gets the gap in the last synchronization */
    348 SCIP* scip /**< SCIP data structure */
    349 )
    350{
    351 SCIP_Real primalbound;
    352 SCIP_Real dualbound;
    353
    354 primalbound = SCIPgetConcurrentPrimalbound(scip);
    355 dualbound = SCIPgetConcurrentDualbound(scip);
    356
    357 return SCIPcomputeGap(SCIPepsilon(scip), SCIPinfinity(scip), primalbound, dualbound);
    358}
    359
    360/** gives the total number of tightened bounds received from other concurrent solvers */
    362 SCIP* scip /**< SCIP data structure */
    363 )
    364{
    365 assert(scip->concurrent != NULL);
    366
    367 return scip->concurrent->propsync != NULL ? SCIPpropSyncGetNTightenedBnds(scip->concurrent->propsync) : 0;
    368}
    369
    370/** gives the total number of tightened bounds for integer variables received from
    371 * other concurrent solvers */
    373 SCIP* scip /**< SCIP data structure */
    374 )
    375{
    376 assert(scip->concurrent != NULL);
    377
    378 return scip->concurrent->propsync != NULL ? SCIPpropSyncGetNTightenedIntBnds(scip->concurrent->propsync) : 0;
    379}
    380
    381/** pass a solution to the given SCIP instance using that was received via synchronization by using
    382 * the sync heuristic */
    384 SCIP* scip, /**< SCIP datastructure */
    385 SCIP_SOL* sol /**< solution */
    386 )
    387{
    388 assert(scip != NULL);
    389 assert(scip->concurrent != NULL);
    390 assert(sol != NULL);
    391
    392 SCIP_CALL( SCIPheurSyncPassSol(scip, scip->concurrent->heursync, sol) );
    393
    394 return SCIP_OKAY;
    395}
    396
    397/** adds a global boundchange to the given SCIP, by passing it to the sync propagator */
    399 SCIP* scip, /**< SCIP data structure */
    400 SCIP_VAR* var, /**< variable for bound */
    401 SCIP_Real val, /**< value of bound */
    402 SCIP_BOUNDTYPE bndtype /**< type of bound */
    403 )
    404{
    405 assert(scip != NULL);
    406 assert(var != NULL);
    407 assert(scip->concurrent != NULL);
    408 assert(scip->concurrent->propsync != NULL);
    409
    410 SCIP_CALL( SCIPpropSyncAddBndchg(scip->concurrent->mainscip, scip->concurrent->propsync, var, val, bndtype) );
    411
    412 return SCIP_OKAY;
    413}
    414
    415/** copy the nodenumber, depth, time, and runnumber of one solution to another one */
    417 SCIP_SOL* source, /**< source for solution statistics */
    418 SCIP_SOL* target /**< target for solution statistics */
    419 )
    420{
    421 assert(source != NULL);
    422 assert(target != NULL);
    423
    424 target->depth = source->depth;
    425 target->time = source->time;
    426 target->nodenum = source->nodenum;
    427 target->runnum = source->runnum;
    428
    429 return SCIP_OKAY;
    430}
    431
    432
    433/** get variable index of original variable that is the same between concurrent solvers */
    435 SCIP* scip, /**< SCIP data structure */
    436 SCIP_VAR* var /**< variable */
    437 )
    438{
    439 int idx;
    440
    441 assert(scip != NULL);
    442 assert(scip->concurrent != NULL);
    443 assert(scip->concurrent->varperm != NULL);
    444 assert(var != NULL);
    445 assert(SCIPvarIsOriginal(var));
    446
    447 /* variables with index larger than nvars do not correspond to active variables in the original */
    448 idx = SCIPvarGetIndex(var);
    449 assert( idx >= 0 );
    450 if( idx < scip->concurrent->nvars )
    451 return scip->concurrent->varperm[idx];
    452 return -1;
    453}
    454
    455/** is the solution new since the last synchronization point */
    457 SCIP* scip, /**< SCIP data structure */
    458 SCIP_SOL* sol /**< the solution */
    459 )
    460{
    461 assert(scip != NULL);
    462 assert(scip->concurrent != NULL);
    463 assert(sol != NULL);
    464
    465 return SCIPsolGetIndex(sol) >= scip->concurrent->solidx;
    466}
    467
    468/** gets the global lower bound changes since the last synchronization point */
    470 SCIP* scip /**< SCIP data structure */
    471 )
    472{
    473 assert(scip != NULL);
    474 assert(scip->concurrent != NULL);
    475
    476 if( scip->concurrent->eventglobalbnd != NULL )
    477 return SCIPeventGlobalbndGetBoundChanges(scip->concurrent->eventglobalbnd);
    478
    479 return NULL;
    480}
    481
    482/** executes the concurrent solver corresponding to the current thread */
    483static
    485 void* args /**< SCIP data structure passed in as a void pointer */
    486 )
    487{
    488 SCIP_CONCURRENTDATA* concurrentdata;
    489 SCIP* scip;
    490 int solverindex;
    491
    492 assert(args != NULL);
    493
    494 concurrentdata = (SCIP_CONCURRENTDATA*) args;
    495 scip = concurrentdata->scip;
    496 solverindex = concurrentdata->solverindex;
    497
    498 SCIP_CALL( SCIPconcsolverExec(scip->set->concsolvers[solverindex]) );
    499 SCIP_CALL( SCIPconcsolverSync(scip->set->concsolvers[solverindex], scip->set) );
    500
    501 return SCIP_OKAY;
    502}
    503
    504/** start solving in parallel using the given set of concurrent solvers */
    506 SCIP* scip /**< pointer to scip datastructure */
    507 )
    508{
    509 SCIP_SYNCSTORE* syncstore;
    510 int idx;
    511 int jobid;
    512 int i;
    513 SCIP_RETCODE retcode;
    514 SCIP_CONCSOLVER** concsolvers;
    515 int nconcsolvers;
    516 SCIP_CONCURRENTDATA** concurrentdata;
    517
    518 assert(scip != NULL);
    519
    520 syncstore = SCIPgetSyncstore(scip);
    521 concsolvers = scip->set->concsolvers;
    522 nconcsolvers = scip->set->nconcsolvers;
    523
    524 assert(SCIPsyncstoreIsInitialized(syncstore));
    525 assert(SCIPsyncstoreGetNSolvers(syncstore) == nconcsolvers);
    526
    528 jobid = SCIPtpiGetNewJobID();
    529
    530 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &concurrentdata, nconcsolvers) );
    531 for( i = 0; i < nconcsolvers; ++i )
    532 {
    533 SCIP_CALL( SCIPallocBlockMemory(scip, &concurrentdata[i]) ); /*lint !e866*/
    534 }
    535
    537 {
    539 {
    540 for( i = 0; i < nconcsolvers; ++i )
    541 {
    542 SCIP_JOB* job;
    543 SCIP_SUBMITSTATUS status;
    544
    545 concurrentdata[i]->scip = scip;
    546 concurrentdata[i]->solverindex = i;
    547
    548 SCIP_CALL_ABORT( SCIPtpiCreateJob(&job, jobid, execConcsolver, concurrentdata[i]) );
    549 SCIP_CALL_ABORT( SCIPtpiSubmitJob(job, &status) );
    550
    551 assert(status == SCIP_SUBMIT_SUCCESS);
    552 }
    553 }
    554 }
    555
    556 retcode = SCIPtpiCollectJobs(jobid);
    557 idx = SCIPsyncstoreGetWinner(syncstore);
    558 assert(idx >= 0 && idx < nconcsolvers);
    559
    560 /* a paranoid safeguard for running in optimized mode */
    561 if( idx < 0 || idx >= nconcsolvers )
    562 idx = 0;
    563
    564 SCIP_CALL( SCIPconcsolverGetSolvingData(concsolvers[idx], scip) );
    565
    566 for( i = nconcsolvers - 1; i >= 0; i-- )
    567 SCIPfreeBlockMemory(scip, &concurrentdata[i]); /*lint !e866*/
    568 SCIPfreeBlockMemoryArray(scip, &concurrentdata, nconcsolvers);
    569
    570 return retcode;
    571}
    572
    573/** copy solving statistics */
    575 SCIP* source, /**< SCIP data structure */
    576 SCIP* target /**< target SCIP data structure */
    577 )
    578{
    579 SCIP_Real tmptime;
    580 SCIP_HEUR* heur;
    581 SCIP_NODE* root;
    582 SCIP_PROP* prop;
    583 SCIP_SEPA* sepa;
    584 SCIP_PRESOL* presol;
    585 SCIP_HEUR** heurs;
    586 int nheurs;
    587 SCIP_PROP** props;
    588 int nprops;
    589 SCIP_SEPA** sepas;
    590 int nsepas;
    591 SCIP_PRESOL** presols;
    592 int npresols;
    593 int i;
    594
    595 assert(source != NULL);
    596 assert(target != NULL);
    597
    598 heurs = SCIPgetHeurs(target);
    599 nheurs = SCIPgetNHeurs(target);
    600
    601 for( i = 0; i < nheurs; ++i )
    602 {
    603 heur = SCIPfindHeur(source, SCIPheurGetName(heurs[i]));
    604
    605 if( heur != NULL )
    606 {
    607 heurs[i]->nbestsolsfound += heur->nbestsolsfound;
    608 heurs[i]->ncalls += heur->ncalls;
    609 heurs[i]->nsolsfound += heur->nsolsfound;
    610 /* TODO divesets */
    611 tmptime = SCIPgetClockTime(target, heurs[i]->setuptime);
    612 tmptime += SCIPgetClockTime(source, heur->setuptime);
    613 SCIP_CALL( SCIPsetClockTime(target, heurs[i]->setuptime, tmptime) );
    614
    615 tmptime = SCIPgetClockTime(target, heurs[i]->heurclock);
    616 tmptime += SCIPgetClockTime(source, heur->heurclock);
    617 SCIP_CALL( SCIPsetClockTime(target, heurs[i]->heurclock, tmptime) );
    618 }
    619 }
    620
    621 props = SCIPgetProps(target);
    622 nprops = SCIPgetNProps(target);
    623
    624 for( i = 0; i < nprops; ++i )
    625 {
    626 prop = SCIPfindProp(source, SCIPpropGetName(props[i]));
    627
    628 if( prop != NULL )
    629 {
    630 props[i]->ncalls += prop->ncalls;
    631 props[i]->nrespropcalls += prop->nrespropcalls;
    632 props[i]->ncutoffs += prop->ncutoffs;
    633 props[i]->ndomredsfound += prop->ndomredsfound;
    634
    635 tmptime = SCIPgetClockTime(target, props[i]->proptime);
    636 tmptime += SCIPgetClockTime(source, prop->proptime);
    637 SCIP_CALL( SCIPsetClockTime(target, props[i]->proptime, tmptime) );
    638
    639 tmptime = SCIPgetClockTime(target, props[i]->sbproptime);
    640 tmptime += SCIPgetClockTime(source, prop->sbproptime);
    641 SCIP_CALL( SCIPsetClockTime(target, props[i]->sbproptime, tmptime) );
    642
    643 tmptime = SCIPgetClockTime(target, props[i]->resproptime);
    644 tmptime += SCIPgetClockTime(source, prop->resproptime);
    645 SCIP_CALL( SCIPsetClockTime(target, props[i]->resproptime, tmptime) );
    646
    647 tmptime = SCIPgetClockTime(target, props[i]->presoltime);
    648 tmptime += SCIPgetClockTime(source, prop->presoltime);
    649 SCIP_CALL( SCIPsetClockTime(target, props[i]->presoltime, tmptime) );
    650
    651 tmptime = SCIPgetClockTime(target, props[i]->setuptime);
    652 tmptime += SCIPgetClockTime(source, prop->setuptime);
    653 SCIP_CALL( SCIPsetClockTime(target, props[i]->setuptime, tmptime) );
    654 }
    655 }
    656
    657 presols = SCIPgetPresols(target);
    658 npresols = SCIPgetNPresols(target);
    659
    660 for( i = 0; i < npresols; ++i )
    661 {
    662 presol = SCIPfindPresol(source, SCIPpresolGetName(presols[i]));
    663
    664 if( presol != NULL )
    665 {
    666 presols[i]->ncalls += presol->ncalls;
    667 presols[i]->nfixedvars += presol->nfixedvars;
    668 presols[i]->naggrvars += presol->naggrvars;
    669 presols[i]->nchgvartypes += presol->nchgvartypes;
    670 presols[i]->nchgbds += presol->nchgbds;
    671 presols[i]->naddholes += presol->naddholes;
    672 presols[i]->ndelconss += presol->ndelconss;
    673 presols[i]->naddconss += presol->naddconss;
    674 presols[i]->nupgdconss += presol->nupgdconss;
    675 presols[i]->nchgcoefs += presol->nchgcoefs;
    676 presols[i]->nchgsides += presol->nchgsides;
    677 presols[i]->nfixedvars += presol->nfixedvars;
    678 presols[i]->nfixedvars += presol->nfixedvars;
    679 presols[i]->nfixedvars += presol->nfixedvars;
    680
    681 tmptime = SCIPgetClockTime(target, presols[i]->setuptime);
    682 tmptime += SCIPgetClockTime(source, presol->setuptime);
    683 SCIP_CALL( SCIPsetClockTime(target, presols[i]->setuptime, tmptime) );
    684
    685 tmptime = SCIPgetClockTime(target, presols[i]->presolclock);
    686 tmptime += SCIPgetClockTime(source, presol->presolclock);
    687 SCIP_CALL( SCIPsetClockTime(target, presols[i]->presolclock, tmptime) );
    688 }
    689 }
    690
    691 sepas = SCIPgetSepas(target);
    692 nsepas = SCIPgetNSepas(target);
    693
    694 for( i = 0; i < nsepas; ++i )
    695 {
    696 sepa = SCIPfindSepa(source, SCIPsepaGetName(sepas[i]));
    697
    698 if( sepa != NULL )
    699 {
    700 sepas[i]->lastsepanode = sepa->lastsepanode;
    701 sepas[i]->ncalls += sepa->ncalls;
    702 sepas[i]->nrootcalls += sepa->nrootcalls;
    703 sepas[i]->ncutoffs += sepa->ncutoffs;
    704 sepas[i]->ncutsfound += sepa->ncutsfound;
    705 sepas[i]->ncutsaddedviapool += sepa->ncutsaddedviapool;
    706 sepas[i]->ncutsaddeddirect += sepa->ncutsaddeddirect;
    707 sepas[i]->ncutsappliedviapool += sepa->ncutsappliedviapool;
    708 sepas[i]->ncutsapplieddirect += sepa->ncutsapplieddirect;
    709 sepas[i]->nconssfound += sepa->nconssfound;
    710 sepas[i]->ndomredsfound += sepa->ndomredsfound;
    711 sepas[i]->maxbounddist = MAX(sepas[i]->maxbounddist, sepa->maxbounddist);
    712
    713 tmptime = SCIPgetClockTime(target, sepas[i]->setuptime);
    714 tmptime += SCIPgetClockTime(source, sepa->setuptime);
    715 SCIP_CALL( SCIPsetClockTime(target, sepas[i]->setuptime, tmptime) );
    716
    717 tmptime = SCIPgetClockTime(target, sepas[i]->sepaclock);
    718 tmptime += SCIPgetClockTime(source, sepa->sepaclock);
    719 SCIP_CALL( SCIPsetClockTime(target, sepas[i]->sepaclock, tmptime) );
    720 }
    721 }
    722
    723 target->primal->nsolsfound = source->primal->nsolsfound;
    724 target->primal->nbestsolsfound = source->primal->nbestsolsfound;
    725 target->primal->nlimsolsfound = source->primal->nlimsolsfound;
    726 SCIPprobSetDualbound(target->transprob, SCIPprobExternObjval(target->transprob, target->origprob, target->set, SCIPgetDualbound(source)));
    727 root = SCIPgetRootNode(target);
    728
    729 if( root != NULL )
    730 {
    731 /* in the copied SCIP the dualbound is in the transformed space of the target */
    732 root->lowerbound = SCIPgetDualbound(source);
    733 root->estimate = root->lowerbound;
    734 target->stat->rootlowerbound = root->lowerbound;
    735 }
    736
    737 target->stat->nlpiterations = source->stat->nlpiterations;
    738 target->stat->nrootlpiterations = source->stat->nrootlpiterations;
    741 target->stat->nduallpiterations = source->stat->nduallpiterations;
    747 target->stat->nnodelpiterations = source->stat->nnodelpiterations;
    748 target->stat->ninitlpiterations = source->stat->ninitlpiterations;
    752 target->stat->nsblpiterations = source->stat->nsblpiterations;
    755 target->stat->nnodes = source->stat->nnodes;
    756 target->stat->ninternalnodes = source->stat->ninternalnodes;
    757 target->stat->nobjleaves = source->stat->nobjleaves;
    758 target->stat->nfeasleaves = source->stat->nfeasleaves;
    759 target->stat->ninfeasleaves = source->stat->ninfeasleaves;
    760 target->stat->ntotalnodes = source->stat->ntotalnodes;
    762 target->stat->ncreatednodes = source->stat->ncreatednodes;
    763 target->stat->ncreatednodesrun = source->stat->ncreatednodesrun;
    764 target->stat->nactivatednodes = source->stat->nactivatednodes;
    765 target->stat->ndeactivatednodes = source->stat->ndeactivatednodes;
    766 target->stat->nearlybacktracks = source->stat->nearlybacktracks;
    768 target->stat->nbacktracks = source->stat->nbacktracks;
    769 target->stat->ndelayedcutoffs = source->stat->ndelayedcutoffs;
    770 target->stat->nreprops = source->stat->nreprops;
    771 target->stat->nrepropboundchgs = source->stat->nrepropboundchgs;
    772 target->stat->nrepropcutoffs = source->stat->nrepropcutoffs;
    773 target->stat->nlpsolsfound = source->stat->nlpsolsfound;
    774 target->stat->npssolsfound = source->stat->npssolsfound;
    775 target->stat->nsbsolsfound = source->stat->nsbsolsfound;
    776 target->stat->nlpbestsolsfound = source->stat->nlpbestsolsfound;
    777 target->stat->npsbestsolsfound = source->stat->npsbestsolsfound;
    778 target->stat->nsbbestsolsfound = source->stat->nsbbestsolsfound;
    780 target->stat->lastdispnode = source->stat->lastdispnode;
    781 target->stat->lastdivenode = source->stat->lastdivenode;
    782 target->stat->lastconflictnode = source->stat->lastconflictnode;
    783 target->stat->bestsolnode = source->stat->bestsolnode;
    784 target->stat->domchgcount = source->stat->domchgcount;
    785 target->stat->nboundchgs = source->stat->nboundchgs;
    786 target->stat->nholechgs = source->stat->nholechgs;
    787 target->stat->nprobboundchgs = source->stat->nprobboundchgs;
    788 target->stat->nprobholechgs = source->stat->nprobholechgs;
    789 target->stat->nsbdowndomchgs = source->stat->nsbdowndomchgs;
    790 target->stat->nsbupdomchgs = source->stat->nsbupdomchgs;
    792 target->stat->nnodesbeforefirst = source->stat->nnodesbeforefirst;
    793 target->stat->ninitconssadded = source->stat->ninitconssadded;
    794 target->stat->firstlpdualbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, source->stat->firstlpdualbound);
    795 target->stat->vsidsweight = source->stat->vsidsweight;
    796 target->stat->firstprimalbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, source->stat->firstprimalbound);
    797 target->stat->firstprimaltime = source->stat->firstprimaltime;
    798 target->stat->firstsolgap = source->stat->firstsolgap;
    799 target->stat->lastsolgap = source->stat->lastsolgap;
    800 target->stat->primalzeroittime = source->stat->primalzeroittime;
    801 target->stat->dualzeroittime = source->stat->dualzeroittime;
    802 target->stat->barrierzeroittime = source->stat->barrierzeroittime;
    803 target->stat->maxcopytime = MAX(source->stat->maxcopytime, target->stat->maxcopytime);
    804 target->stat->mincopytime = MIN(source->stat->mincopytime, target->stat->mincopytime);
    805 target->stat->firstlptime = source->stat->firstlptime;
    806 target->stat->lastbranchvalue = source->stat->lastbranchvalue;
    807 target->stat->dualrefintegral = source->stat->dualrefintegral;
    808 target->stat->primalrefintegral = source->stat->primalrefintegral;
    810 target->stat->previousgap = source->stat->previousgap;
    814 target->stat->lastlowerbound = source->stat->lastdualbound;
    815 target->stat->lastupperbound = source->stat->lastprimalbound;
    816 target->stat->lastdualbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, target->stat->lastlowerbound);
    817 target->stat->lastprimalbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, target->stat->lastupperbound);
    819 target->stat->referencebound = source->stat->referencebound;
    820
    821 /*tmptime = SCIPgetClockTime(target, target->stat->solvingtime);
    822 tmptime += SCIPgetClockTime(source, source->stat->solvingtime);
    823 SCIP_CALL( SCIPsetClockTime(target, target->stat->solvingtime, tmptime) );*/
    824
    825 /* TODO */
    826 tmptime = SCIPgetClockTime(target, target->stat->solvingtimeoverall);
    827 tmptime += SCIPgetClockTime(source, source->stat->solvingtimeoverall);
    828 SCIP_CALL( SCIPsetClockTime(target, target->stat->solvingtimeoverall, tmptime) );
    829
    830 tmptime = SCIPgetClockTime(target, target->stat->presolvingtime);
    831 tmptime += SCIPgetClockTime(source, source->stat->presolvingtime);
    832 SCIP_CALL( SCIPsetClockTime(target, target->stat->presolvingtime, tmptime) );
    833
    834 tmptime = SCIPgetClockTime(target, target->stat->presolvingtimeoverall);
    835 tmptime += SCIPgetClockTime(source, source->stat->presolvingtimeoverall);
    836 SCIP_CALL( SCIPsetClockTime(target, target->stat->presolvingtimeoverall, tmptime) );
    837
    838 tmptime = SCIPgetClockTime(target, target->stat->primallptime);
    839 tmptime += SCIPgetClockTime(source, source->stat->primallptime);
    840 SCIP_CALL( SCIPsetClockTime(target, target->stat->primallptime, tmptime) );
    841
    842 tmptime = SCIPgetClockTime(target, target->stat->duallptime);
    843 tmptime += SCIPgetClockTime(source, source->stat->duallptime);
    844 SCIP_CALL( SCIPsetClockTime(target, target->stat->duallptime, tmptime) );
    845
    846 tmptime = SCIPgetClockTime(target, target->stat->lexduallptime);
    847 tmptime += SCIPgetClockTime(source, source->stat->lexduallptime);
    848 SCIP_CALL( SCIPsetClockTime(target, target->stat->lexduallptime, tmptime) );
    849
    850 tmptime = SCIPgetClockTime(target, target->stat->barrierlptime);
    851 tmptime += SCIPgetClockTime(source, source->stat->barrierlptime);
    852 SCIP_CALL( SCIPsetClockTime(target, target->stat->barrierlptime, tmptime) );
    853
    854 tmptime = SCIPgetClockTime(target, target->stat->divinglptime);
    855 tmptime += SCIPgetClockTime(source, source->stat->divinglptime);
    856 SCIP_CALL( SCIPsetClockTime(target, target->stat->divinglptime, tmptime) );
    857
    858 tmptime = SCIPgetClockTime(target, target->stat->strongbranchtime);
    859 tmptime += SCIPgetClockTime(source, source->stat->strongbranchtime);
    860 SCIP_CALL( SCIPsetClockTime(target, target->stat->strongbranchtime, tmptime) );
    861
    862 tmptime = SCIPgetClockTime(target, target->stat->conflictlptime);
    863 tmptime += SCIPgetClockTime(source, source->stat->conflictlptime);
    864 SCIP_CALL( SCIPsetClockTime(target, target->stat->conflictlptime, tmptime) );
    865
    866 tmptime = SCIPgetClockTime(target, target->stat->lpsoltime);
    867 tmptime += SCIPgetClockTime(source, source->stat->lpsoltime);
    868 SCIP_CALL( SCIPsetClockTime(target, target->stat->lpsoltime, tmptime) );
    869
    870 tmptime = SCIPgetClockTime(target, target->stat->pseudosoltime);
    871 tmptime += SCIPgetClockTime(source, source->stat->pseudosoltime);
    872 SCIP_CALL( SCIPsetClockTime(target, target->stat->pseudosoltime, tmptime) );
    873
    874 tmptime = SCIPgetClockTime(target, target->stat->sbsoltime);
    875 tmptime += SCIPgetClockTime(source, source->stat->sbsoltime);
    876 SCIP_CALL( SCIPsetClockTime(target, target->stat->sbsoltime, tmptime) );
    877
    878 tmptime = SCIPgetClockTime(target, target->stat->nodeactivationtime);
    879 tmptime += SCIPgetClockTime(source, source->stat->nodeactivationtime);
    880 SCIP_CALL( SCIPsetClockTime(target, target->stat->nodeactivationtime, tmptime) );
    881
    882 tmptime = SCIPgetClockTime(target, target->stat->nlpsoltime);
    883 tmptime += SCIPgetClockTime(source, source->stat->nlpsoltime);
    884 SCIP_CALL( SCIPsetClockTime(target, target->stat->nlpsoltime, tmptime) );
    885
    886 tmptime = SCIPgetClockTime(target, target->stat->strongpropclock);
    887 tmptime += SCIPgetClockTime(source, source->stat->strongpropclock);
    888 SCIP_CALL( SCIPsetClockTime(target, target->stat->strongpropclock, tmptime) );
    889
    890 tmptime = SCIPgetClockTime(target, target->stat->reoptupdatetime);
    891 tmptime += SCIPgetClockTime(source, source->stat->reoptupdatetime);
    892 SCIP_CALL( SCIPsetClockTime(target, target->stat->reoptupdatetime, tmptime) );
    893
    894 heur = source->stat->firstprimalheur;
    895
    896 if( heur != NULL )
    897 target->stat->firstprimalheur = SCIPfindHeur(target, SCIPheurGetName(heur));
    898
    899 target->stat->status = source->stat->status;
    900 target->stat->lastbranchdir = source->stat->lastbranchdir;
    901 target->stat->lastsblpsolstats[0] = source->stat->lastsblpsolstats[0];
    902 target->stat->lastsblpsolstats[1] = source->stat->lastsblpsolstats[1];
    903 target->stat->nnz = source->stat->nnz;
    904 target->stat->lpcount = source->stat->lpcount;
    905 target->stat->nlps = source->stat->nlps;
    906 target->stat->nrootlps = source->stat->nrootlps;
    907 target->stat->nprimallps = source->stat->nprimallps;
    908 target->stat->nprimalzeroitlps = source->stat->nprimalzeroitlps;
    909 target->stat->nduallps = source->stat->nduallps;
    910 target->stat->ndualzeroitlps = source->stat->ndualzeroitlps;
    911 target->stat->nlexduallps = source->stat->nlexduallps;
    912 target->stat->nbarrierlps = source->stat->nbarrierlps;
    913 target->stat->nbarrierzeroitlps = source->stat->nbarrierzeroitlps;
    914 target->stat->nprimalresolvelps = source->stat->nprimalresolvelps;
    915 target->stat->ndualresolvelps = source->stat->ndualresolvelps;
    917 target->stat->nnodelps = source->stat->nnodelps;
    918 target->stat->ninitlps = source->stat->ninitlps;
    919 target->stat->ndivinglps = source->stat->ndivinglps;
    920 target->stat->ndivesetlps = source->stat->ndivesetlps;
    921 target->stat->nsbdivinglps = source->stat->nsbdivinglps;
    922 target->stat->nstrongbranchs = source->stat->nstrongbranchs;
    924 target->stat->nconflictlps = source->stat->nconflictlps;
    925 target->stat->nnlps = source->stat->nnlps;
    926 target->stat->nisstoppedcalls = source->stat->nisstoppedcalls;
    927 target->stat->totaldivesetdepth = source->stat->totaldivesetdepth;
    928 target->stat->ndivesetcalls = source->stat->ndivesetcalls;
    929 target->stat->nruns = source->stat->nruns;
    930 target->stat->nconfrestarts = source->stat->nconfrestarts;
    931 target->stat->nrootboundchgs = source->stat->nrootboundchgs;
    932 target->stat->nrootboundchgsrun = source->stat->nrootboundchgsrun;
    933 target->stat->nrootintfixings = source->stat->nrootintfixings;
    935 target->stat->prevrunnvars = source->stat->prevrunnvars;
    936 target->stat->npricerounds = source->stat->npricerounds;
    937 target->stat->nseparounds = source->stat->nseparounds;
    938 target->stat->maxdepth = source->stat->maxdepth;
    939 target->stat->maxtotaldepth = source->stat->maxtotaldepth;
    940 target->stat->plungedepth = source->stat->plungedepth;
    941 target->stat->npresolrounds += source->stat->npresolrounds;
    942 target->stat->npresolroundsfast += source->stat->npresolroundsfast;
    943 target->stat->npresolroundsmed += source->stat->npresolroundsmed;
    944 target->stat->npresolroundsext += source->stat->npresolroundsext;
    945 target->stat->npresolfixedvars += source->stat->npresolfixedvars;
    946 target->stat->npresolaggrvars += source->stat->npresolaggrvars;
    947 target->stat->npresolchgvartypes += source->stat->npresolchgvartypes;
    948 target->stat->npresolchgbds += source->stat->npresolchgbds;
    949 target->stat->npresoladdholes += source->stat->npresoladdholes;
    950 target->stat->npresoldelconss += source->stat->npresoldelconss;
    951 target->stat->npresoladdconss += source->stat->npresoladdconss;
    952 target->stat->npresolupgdconss += source->stat->npresolupgdconss;
    953 target->stat->npresolchgcoefs += source->stat->npresolchgcoefs;
    954 target->stat->npresolchgsides += source->stat->npresolchgsides;
    955 target->stat->nrunsbeforefirst = source->stat->nrunsbeforefirst;
    956 target->stat->firstprimaldepth = source->stat->firstprimaldepth;
    957 target->stat->ncopies += source->stat->ncopies;
    958 target->stat->nreoptruns = source->stat->nreoptruns;
    959
    960 /* set the stage but do not set to earlier stage */
    961 target->set->stage = MAX(source->set->stage, target->set->stage);
    962
    963 return SCIP_OKAY;
    964}
    void SCIPconcsolverSetTimeSinceLastSync(SCIP_CONCSOLVER *concsolver, SCIP_Real time)
    Definition: concsolver.c:532
    SCIP_RETCODE SCIPconcsolverExec(SCIP_CONCSOLVER *concsolver)
    Definition: concsolver.c:325
    SCIP_Real SCIPconcsolverGetSyncFreq(SCIP_CONCSOLVER *concsolver)
    Definition: concsolver.c:510
    SCIP_RETCODE SCIPconcsolverGetSolvingData(SCIP_CONCSOLVER *concsolver, SCIP *scip)
    Definition: concsolver.c:343
    SCIP_RETCODE SCIPconcsolverSync(SCIP_CONCSOLVER *concsolver, SCIP_SET *set)
    Definition: concsolver.c:375
    SCIP_Longint SCIPconcsolverGetMemTotal(SCIP_CONCSOLVER *concsolver)
    Definition: concsolver.c:520
    datastructures for concurrent solvers
    SCIP_Real SCIPgetConcurrentDualbound(SCIP *scip)
    Definition: concurrent.c:317
    SCIP_RETCODE SCIPconcurrentSolve(SCIP *scip)
    Definition: concurrent.c:505
    SCIP_Real SCIPgetConcurrentPrimalbound(SCIP *scip)
    Definition: concurrent.c:332
    SCIP_RETCODE SCIPcreateConcurrent(SCIP *scip, SCIP_CONCSOLVER *concsolver, int *varperm, int nvars)
    Definition: concurrent.c:67
    SCIP_RETCODE SCIPsynchronize(SCIP *scip)
    Definition: concurrent.c:257
    SCIP_RETCODE SCIPincrementConcurrentTime(SCIP *scip, SCIP_Real val)
    Definition: concurrent.c:199
    int SCIPgetConcurrentVaridx(SCIP *scip, SCIP_VAR *var)
    Definition: concurrent.c:434
    SCIP_RETCODE SCIPfreeConcurrent(SCIP *scip)
    Definition: concurrent.c:161
    SCIP_RETCODE SCIPaddConcurrentBndchg(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
    Definition: concurrent.c:398
    SCIP_RETCODE SCIPcopySolStats(SCIP_SOL *source, SCIP_SOL *target)
    Definition: concurrent.c:416
    SCIP_Longint SCIPgetConcurrentMemTotal(SCIP *scip)
    Definition: concurrent.c:299
    SCIP_BOUNDSTORE * SCIPgetConcurrentGlobalBoundChanges(SCIP *scip)
    Definition: concurrent.c:469
    SCIP_RETCODE SCIPaddConcurrentSolver(SCIP *scip, SCIP_CONCSOLVER *concsolver)
    Definition: concurrent.c:148
    static SCIP_RETCODE execConcsolver(void *args)
    Definition: concurrent.c:484
    SCIP_CONCSOLVER ** SCIPgetConcurrentSolvers(SCIP *scip)
    Definition: concurrent.c:137
    SCIP_Bool SCIPIsConcurrentSolNew(SCIP *scip, SCIP_SOL *sol)
    Definition: concurrent.c:456
    SCIP_Longint SCIPgetConcurrentNTightenedBnds(SCIP *scip)
    Definition: concurrent.c:361
    void SCIPenableConcurrentBoundStorage(SCIP *scip)
    Definition: concurrent.c:287
    int SCIPgetNConcurrentSolvers(SCIP *scip)
    Definition: concurrent.c:126
    SCIP_RETCODE SCIPcopyConcurrentSolvingStats(SCIP *source, SCIP *target)
    Definition: concurrent.c:574
    SCIP_RETCODE SCIPaddConcurrentSol(SCIP *scip, SCIP_SOL *sol)
    Definition: concurrent.c:383
    SCIP_Real SCIPgetConcurrentGap(SCIP *scip)
    Definition: concurrent.c:347
    struct SCIP_ConcurrentData SCIP_CONCURRENTDATA
    Definition: concurrent.c:64
    void SCIPdisableConcurrentBoundStorage(SCIP *scip)
    Definition: concurrent.c:275
    SCIP_Longint SCIPgetConcurrentNTightenedIntBnds(SCIP *scip)
    Definition: concurrent.c:372
    helper functions for concurrent scip solvers
    #define NULL
    Definition: def.h:248
    #define SCIP_Longint
    Definition: def.h:141
    #define SCIP_Bool
    Definition: def.h:91
    #define MIN(x, y)
    Definition: def.h:224
    #define SCIP_Real
    Definition: def.h:156
    #define FALSE
    Definition: def.h:94
    #define MAX(x, y)
    Definition: def.h:220
    #define SCIP_CALL_ABORT(x)
    Definition: def.h:334
    #define SCIP_CALL(x)
    Definition: def.h:355
    wrappers for OpenMP defines
    #define TPI_SINGLE
    Definition: def_openmp.h:83
    #define TPI_PARA
    Definition: def_openmp.h:78
    SCIP_RETCODE SCIPeventqueueAdd(SCIP_EVENTQUEUE *eventqueue, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENT **event)
    Definition: event.c:2561
    SCIP_RETCODE SCIPeventCreateSync(SCIP_EVENT **event, BMS_BLKMEM *blkmem)
    Definition: event.c:555
    internal methods for managing events
    void SCIPeventGlobalbndClearBoundChanges(SCIP_EVENTHDLR *eventhdlr)
    SCIP_RETCODE SCIPincludeEventHdlrGlobalbnd(SCIP *scip)
    void SCIPeventGlobalbndEnableBoundStorage(SCIP_EVENTHDLR *eventhdlr)
    SCIP_BOUNDSTORE * SCIPeventGlobalbndGetBoundChanges(SCIP_EVENTHDLR *eventhdlr)
    void SCIPeventGlobalbndDisableBoundStorage(SCIP_EVENTHDLR *eventhdlr)
    eventhdlr for storing all global bound changes
    SCIP_Real SCIPcomputeGap(SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound)
    Definition: misc.c:11180
    SCIP_RETCODE SCIPheurSyncPassSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
    Definition: heur_sync.c:194
    SCIP_Longint SCIPpropSyncGetNTightenedBnds(SCIP_PROP *prop)
    Definition: prop_sync.c:363
    SCIP_RETCODE SCIPpropSyncAddBndchg(SCIP *scip, SCIP_PROP *prop, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
    Definition: prop_sync.c:323
    SCIP_Longint SCIPpropSyncGetNTightenedIntBnds(SCIP_PROP *prop)
    Definition: prop_sync.c:378
    SCIP_RETCODE SCIPincludeHeurSync(SCIP *scip)
    Definition: heur_sync.c:162
    SCIP_RETCODE SCIPincludePropSync(SCIP *scip)
    Definition: prop_sync.c:288
    SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
    Definition: scip_event.c:241
    SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
    Definition: scip_heur.c:276
    int SCIPgetNHeurs(SCIP *scip)
    Definition: scip_heur.c:287
    SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
    Definition: scip_heur.c:263
    const char * SCIPheurGetName(SCIP_HEUR *heur)
    Definition: heur.c:1467
    #define SCIPfreeBlockMemoryArray(scip, ptr, num)
    Definition: scip_mem.h:110
    BMS_BLKMEM * SCIPblkmem(SCIP *scip)
    Definition: scip_mem.c:57
    #define SCIPallocBlockMemoryArray(scip, ptr, num)
    Definition: scip_mem.h:93
    #define SCIPfreeBlockMemory(scip, ptr)
    Definition: scip_mem.h:108
    SCIP_Longint SCIPgetMemTotal(SCIP *scip)
    Definition: scip_mem.c:113
    #define SCIPallocBlockMemory(scip, ptr)
    Definition: scip_mem.h:89
    #define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
    Definition: scip_mem.h:105
    SCIP_SYNCSTORE * SCIPgetSyncstore(SCIP *scip)
    SCIP_PRESOL ** SCIPgetPresols(SCIP *scip)
    Definition: scip_presol.c:257
    SCIP_PRESOL * SCIPfindPresol(SCIP *scip, const char *name)
    Definition: scip_presol.c:244
    int SCIPgetNPresols(SCIP *scip)
    Definition: scip_presol.c:270
    const char * SCIPpresolGetName(SCIP_PRESOL *presol)
    Definition: presol.c:625
    SCIP_PROP * SCIPfindProp(SCIP *scip, const char *name)
    Definition: scip_prop.c:333
    int SCIPgetNProps(SCIP *scip)
    Definition: scip_prop.c:359
    const char * SCIPpropGetName(SCIP_PROP *prop)
    Definition: prop.c:951
    SCIP_PROP ** SCIPgetProps(SCIP *scip)
    Definition: scip_prop.c:346
    int SCIPgetNSepas(SCIP *scip)
    Definition: scip_sepa.c:279
    const char * SCIPsepaGetName(SCIP_SEPA *sepa)
    Definition: sepa.c:746
    SCIP_SEPA * SCIPfindSepa(SCIP *scip, const char *name)
    Definition: scip_sepa.c:253
    SCIP_SEPA ** SCIPgetSepas(SCIP *scip)
    Definition: scip_sepa.c:266
    int SCIPsolGetIndex(SCIP_SOL *sol)
    Definition: sol.c:4290
    SCIP_Real SCIPgetDualbound(SCIP *scip)
    SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
    Definition: scip_timing.c:144
    SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
    Definition: scip_timing.c:127
    SCIP_RETCODE SCIPcreateWallClock(SCIP *scip, SCIP_CLOCK **clck)
    Definition: scip_timing.c:110
    SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
    Definition: scip_timing.c:319
    SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
    Definition: scip_timing.c:161
    SCIP_RETCODE SCIPsetClockTime(SCIP *scip, SCIP_CLOCK *clck, SCIP_Real sec)
    Definition: scip_timing.c:334
    SCIP_Real SCIPinfinity(SCIP *scip)
    SCIP_Real SCIPepsilon(SCIP *scip)
    SCIP_NODE * SCIPgetRootNode(SCIP *scip)
    Definition: scip_tree.c:110
    int SCIPvarGetIndex(SCIP_VAR *var)
    Definition: var.c:23652
    SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
    Definition: var.c:23417
    primal heuristic that adds given solutions
    SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
    Definition: prob.c:2520
    void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
    Definition: prob.c:1702
    internal methods for storing and manipulating the main problem
    propagator for applying global bound changes that were communicated by other concurrent solvers
    SCIP callable library.
    SCIP_RETCODE SCIPsetIncludeConcsolver(SCIP_SET *set, SCIP_CONCSOLVER *concsolver)
    Definition: set.c:4794
    internal methods for global SCIP settings
    internal methods for problem statistics
    SCIP_CLOCK * heurclock
    Definition: struct_heur.h:114
    SCIP_CLOCK * setuptime
    Definition: struct_heur.h:113
    SCIP_Longint ncalls
    Definition: struct_heur.h:99
    SCIP_Longint nsolsfound
    Definition: struct_heur.h:100
    SCIP_Longint nbestsolsfound
    Definition: struct_heur.h:101
    SCIP_Real lowerbound
    Definition: struct_tree.h:144
    SCIP_Real estimate
    Definition: struct_tree.h:146
    SCIP_CLOCK * setuptime
    Definition: struct_presol.h:58
    SCIP_CLOCK * presolclock
    Definition: struct_presol.h:59
    SCIP_Longint nbestsolsfound
    Definition: struct_primal.h:52
    SCIP_Longint nsolsfound
    Definition: struct_primal.h:49
    SCIP_Longint nlimsolsfound
    Definition: struct_primal.h:50
    SCIP_CLOCK * resproptime
    Definition: struct_prop.h:69
    SCIP_CLOCK * presoltime
    Definition: struct_prop.h:70
    SCIP_Longint ncutoffs
    Definition: struct_prop.h:50
    SCIP_CLOCK * setuptime
    Definition: struct_prop.h:66
    SCIP_CLOCK * sbproptime
    Definition: struct_prop.h:68
    SCIP_CLOCK * proptime
    Definition: struct_prop.h:67
    SCIP_Longint ndomredsfound
    Definition: struct_prop.h:51
    SCIP_Longint ncalls
    Definition: struct_prop.h:48
    SCIP_Longint nrespropcalls
    Definition: struct_prop.h:49
    SCIP_Longint nrootcalls
    Definition: struct_sepa.h:50
    SCIP_Longint ncutoffs
    Definition: struct_sepa.h:51
    SCIP_Longint ncutsaddedviapool
    Definition: struct_sepa.h:55
    SCIP_Longint ndomredsfound
    Definition: struct_sepa.h:60
    SCIP_Longint ncutsfound
    Definition: struct_sepa.h:52
    SCIP_Longint lastsepanode
    Definition: struct_sepa.h:48
    SCIP_CLOCK * sepaclock
    Definition: struct_sepa.h:75
    SCIP_Longint nconssfound
    Definition: struct_sepa.h:59
    SCIP_Longint ncalls
    Definition: struct_sepa.h:49
    SCIP_Longint ncutsappliedviapool
    Definition: struct_sepa.h:57
    SCIP_CLOCK * setuptime
    Definition: struct_sepa.h:74
    SCIP_Longint ncutsapplieddirect
    Definition: struct_sepa.h:58
    SCIP_Longint ncutsaddeddirect
    Definition: struct_sepa.h:56
    SCIP_Real maxbounddist
    Definition: struct_sepa.h:61
    SCIP_STAGE stage
    Definition: struct_set.h:76
    int depth
    Definition: struct_sol.h:89
    int runnum
    Definition: struct_sol.h:88
    SCIP_Real time
    Definition: struct_sol.h:76
    SCIP_Longint nodenum
    Definition: struct_sol.h:77
    SCIP_Longint nnlps
    Definition: struct_stat.h:250
    SCIP_Longint nlexdualresolvelpiterations
    Definition: struct_stat.h:73
    SCIP_STATUS status
    Definition: struct_stat.h:201
    SCIP_Longint nearlybacktracks
    Definition: struct_stat.h:96
    SCIP_Longint ndualresolvelpiterations
    Definition: struct_stat.h:72
    SCIP_Real rootlowerbound
    Definition: struct_stat.h:133
    SCIP_Longint nrootstrongbranchs
    Definition: struct_stat.h:227
    SCIP_Longint nprimalresolvelpiterations
    Definition: struct_stat.h:71
    int npresoladdholes
    Definition: struct_stat.h:286
    SCIP_Longint nprimallps
    Definition: struct_stat.h:209
    SCIP_Real dualrefintegral
    Definition: struct_stat.h:146
    SCIP_CLOCK * strongpropclock
    Definition: struct_stat.h:193
    SCIP_Longint nsbdowndomchgs
    Definition: struct_stat.h:121
    SCIP_Real previousgap
    Definition: struct_stat.h:149
    SCIP_Longint nprimalzeroitlps
    Definition: struct_stat.h:210
    SCIP_Longint nreprops
    Definition: struct_stat.h:100
    SCIP_CLOCK * sbsoltime
    Definition: struct_stat.h:189
    SCIP_Real lastsolgap
    Definition: struct_stat.h:138
    SCIP_Longint nnodes
    Definition: struct_stat.h:84
    int npresolupgdconss
    Definition: struct_stat.h:289
    SCIP_Longint nsblpiterations
    Definition: struct_stat.h:79
    SCIP_Longint ntotalnodes
    Definition: struct_stat.h:89
    SCIP_CLOCK * strongbranchtime
    Definition: struct_stat.h:178
    SCIP_Real previousdualrefgap
    Definition: struct_stat.h:150
    int ndivesetcalls
    Definition: struct_stat.h:254
    SCIP_CLOCK * barrierlptime
    Definition: struct_stat.h:175
    SCIP_Real dualzeroittime
    Definition: struct_stat.h:140
    SCIP_Longint nduallps
    Definition: struct_stat.h:211
    SCIP_Longint ninfeasleaves
    Definition: struct_stat.h:88
    SCIP_Longint nrepropcutoffs
    Definition: struct_stat.h:102
    SCIP_Longint nduallpiterations
    Definition: struct_stat.h:68
    SCIP_Longint ncreatednodesrun
    Definition: struct_stat.h:93
    SCIP_Longint ndelayedcutoffs
    Definition: struct_stat.h:99
    SCIP_CLOCK * nodeactivationtime
    Definition: struct_stat.h:190
    SCIP_Longint nlps
    Definition: struct_stat.h:207
    SCIP_CLOCK * reoptupdatetime
    Definition: struct_stat.h:194
    SCIP_Real lastlowerbound
    Definition: struct_stat.h:155
    SCIP_Longint ndualresolvelps
    Definition: struct_stat.h:217
    SCIP_Real rootlpbestestimate
    Definition: struct_stat.h:158
    SCIP_Longint nbarrierlpiterations
    Definition: struct_stat.h:70
    SCIP_Longint domchgcount
    Definition: struct_stat.h:116
    SCIP_Longint nnodelps
    Definition: struct_stat.h:219
    SCIP_Longint nconflictlps
    Definition: struct_stat.h:228
    SCIP_LPSOLSTAT lastsblpsolstats[2]
    Definition: struct_stat.h:203
    SCIP_Longint nnz
    Definition: struct_stat.h:204
    SCIP_CLOCK * divinglptime
    Definition: struct_stat.h:177
    SCIP_Longint nrootsblpiterations
    Definition: struct_stat.h:80
    SCIP_Longint ndivesetlpiterations
    Definition: struct_stat.h:77
    SCIP_Longint lpcount
    Definition: struct_stat.h:205
    SCIP_Longint nprobholechgs
    Definition: struct_stat.h:120
    SCIP_CLOCK * presolvingtime
    Definition: struct_stat.h:170
    int prevrunnvars
    Definition: struct_stat.h:262
    SCIP_Longint nrootfirstlpiterations
    Definition: struct_stat.h:66
    SCIP_Longint nbacktracks
    Definition: struct_stat.h:98
    SCIP_Real maxcopytime
    Definition: struct_stat.h:142
    SCIP_Longint ninitconssadded
    Definition: struct_stat.h:125
    int nseparounds
    Definition: struct_stat.h:270
    SCIP_Longint ndivesetlps
    Definition: struct_stat.h:223
    SCIP_Real previousprimalrefgap
    Definition: struct_stat.h:151
    SCIP_Longint nlpiterations
    Definition: struct_stat.h:64
    SCIP_Longint nprimalresolvelps
    Definition: struct_stat.h:216
    SCIP_Longint ndivinglpiterations
    Definition: struct_stat.h:76
    SCIP_CLOCK * nlpsoltime
    Definition: struct_stat.h:191
    int nconfrestarts
    Definition: struct_stat.h:257
    int firstprimaldepth
    Definition: struct_stat.h:308
    SCIP_Longint nfeasleaves
    Definition: struct_stat.h:87
    SCIP_Longint nsbsolsfound
    Definition: struct_stat.h:106
    int npricerounds
    Definition: struct_stat.h:269
    SCIP_CLOCK * solvingtimeoverall
    Definition: struct_stat.h:169
    int npresolroundsext
    Definition: struct_stat.h:281
    SCIP_Longint lastdivenode
    Definition: struct_stat.h:113
    SCIP_Longint nlexdualresolvelps
    Definition: struct_stat.h:218
    int npresolaggrvars
    Definition: struct_stat.h:283
    SCIP_Longint ndeactivatednodes
    Definition: struct_stat.h:95
    int nrootboundchgs
    Definition: struct_stat.h:258
    SCIP_Longint nrepropboundchgs
    Definition: struct_stat.h:101
    SCIP_Longint nnodesaboverefbound
    Definition: struct_stat.h:97
    SCIP_Real firstlpdualbound
    Definition: struct_stat.h:132
    SCIP_Longint nlexduallpiterations
    Definition: struct_stat.h:69
    SCIP_Longint nrootlpiterations
    Definition: struct_stat.h:65
    SCIP_Real firstprimaltime
    Definition: struct_stat.h:136
    int nrootintfixingsrun
    Definition: struct_stat.h:261
    SCIP_Longint nlexduallps
    Definition: struct_stat.h:213
    SCIP_Longint ninternalnodes
    Definition: struct_stat.h:85
    int nrootintfixings
    Definition: struct_stat.h:260
    SCIP_Real firstsolgap
    Definition: struct_stat.h:137
    SCIP_Real lastdualbound
    Definition: struct_stat.h:154
    SCIP_Longint lastdispnode
    Definition: struct_stat.h:112
    SCIP_Real vsidsweight
    Definition: struct_stat.h:134
    int npresolchgvartypes
    Definition: struct_stat.h:284
    SCIP_Longint lastconflictnode
    Definition: struct_stat.h:114
    int nrunsbeforefirst
    Definition: struct_stat.h:307
    SCIP_Real primalrefintegral
    Definition: struct_stat.h:147
    SCIP_Longint ntotalinternalnodes
    Definition: struct_stat.h:90
    SCIP_Longint nobjleaves
    Definition: struct_stat.h:86
    SCIP_HEUR * firstprimalheur
    Definition: struct_stat.h:200
    SCIP_Real referencebound
    Definition: struct_stat.h:159
    SCIP_CLOCK * duallptime
    Definition: struct_stat.h:173
    SCIP_BRANCHDIR lastbranchdir
    Definition: struct_stat.h:202
    SCIP_CLOCK * pseudosoltime
    Definition: struct_stat.h:188
    SCIP_CLOCK * presolvingtimeoverall
    Definition: struct_stat.h:171
    int npresoldelconss
    Definition: struct_stat.h:287
    SCIP_Longint nnodesbeforefirst
    Definition: struct_stat.h:124
    SCIP_Longint nlpbestsolsfound
    Definition: struct_stat.h:107
    SCIP_Longint nboundchgs
    Definition: struct_stat.h:117
    int npresolchgbds
    Definition: struct_stat.h:285
    int npresolroundsfast
    Definition: struct_stat.h:279
    SCIP_Real firstlptime
    Definition: struct_stat.h:144
    int nrootboundchgsrun
    Definition: struct_stat.h:259
    SCIP_Longint ndivinglps
    Definition: struct_stat.h:222
    SCIP_Longint nholechgs
    Definition: struct_stat.h:118
    SCIP_Longint npsbestsolsfound
    Definition: struct_stat.h:109
    SCIP_Real lastupperbound
    Definition: struct_stat.h:157
    SCIP_Real barrierzeroittime
    Definition: struct_stat.h:141
    int npresolchgcoefs
    Definition: struct_stat.h:290
    SCIP_Longint totaldivesetdepth
    Definition: struct_stat.h:252
    SCIP_Longint ninitlps
    Definition: struct_stat.h:221
    int maxdepth
    Definition: struct_stat.h:272
    SCIP_Real previntegralevaltime
    Definition: struct_stat.h:152
    SCIP_Longint nexternalsolsfound
    Definition: struct_stat.h:111
    SCIP_Longint nisstoppedcalls
    Definition: struct_stat.h:251
    int maxtotaldepth
    Definition: struct_stat.h:273
    SCIP_Longint ndualzeroitlps
    Definition: struct_stat.h:212
    SCIP_Longint nrootlps
    Definition: struct_stat.h:208
    SCIP_Longint nsbdivinglps
    Definition: struct_stat.h:224
    SCIP_Longint nnodelpiterations
    Definition: struct_stat.h:74
    SCIP_Real lastprimalbound
    Definition: struct_stat.h:153
    SCIP_Longint nactivatednodes
    Definition: struct_stat.h:94
    int plungedepth
    Definition: struct_stat.h:274
    SCIP_Longint bestsolnode
    Definition: struct_stat.h:115
    SCIP_Longint nsbbestsolsfound
    Definition: struct_stat.h:110
    SCIP_Longint nsbtimesiterlimhit
    Definition: struct_stat.h:123
    int nreoptruns
    Definition: struct_stat.h:310
    SCIP_Real primalzeroittime
    Definition: struct_stat.h:139
    SCIP_CLOCK * primallptime
    Definition: struct_stat.h:172
    int npresoladdconss
    Definition: struct_stat.h:288
    SCIP_Longint nconflictlpiterations
    Definition: struct_stat.h:81
    int npresolroundsmed
    Definition: struct_stat.h:280
    SCIP_Longint nstrongbranchs
    Definition: struct_stat.h:226
    SCIP_Real mincopytime
    Definition: struct_stat.h:143
    SCIP_Longint npssolsfound
    Definition: struct_stat.h:105
    SCIP_Longint nbarrierzeroitlps
    Definition: struct_stat.h:215
    SCIP_CLOCK * lpsoltime
    Definition: struct_stat.h:186
    SCIP_Longint nprimallpiterations
    Definition: struct_stat.h:67
    SCIP_Real primaldualintegral
    Definition: struct_stat.h:148
    SCIP_Longint nbarrierlps
    Definition: struct_stat.h:214
    SCIP_Longint nlpsolsfound
    Definition: struct_stat.h:103
    SCIP_Longint nsbupdomchgs
    Definition: struct_stat.h:122
    SCIP_Real lastbranchvalue
    Definition: struct_stat.h:145
    int npresolrounds
    Definition: struct_stat.h:278
    SCIP_Longint ninitlpiterations
    Definition: struct_stat.h:75
    SCIP_Longint nprobboundchgs
    Definition: struct_stat.h:119
    int npresolchgsides
    Definition: struct_stat.h:291
    SCIP_Longint ncreatednodes
    Definition: struct_stat.h:92
    SCIP_CLOCK * conflictlptime
    Definition: struct_stat.h:179
    SCIP_Longint nsbdivinglpiterations
    Definition: struct_stat.h:78
    SCIP_Real firstprimalbound
    Definition: struct_stat.h:135
    SCIP_CLOCK * lexduallptime
    Definition: struct_stat.h:174
    int npresolfixedvars
    Definition: struct_stat.h:282
    SCIP_PROB * origprob
    Definition: struct_scip.h:83
    SCIP_STAT * stat
    Definition: struct_scip.h:82
    SCIP_EVENTFILTER * eventfilter
    Definition: struct_scip.h:92
    SCIP_EVENTQUEUE * eventqueue
    Definition: struct_scip.h:91
    SCIP_SET * set
    Definition: struct_scip.h:75
    SCIP_PROB * transprob
    Definition: struct_scip.h:102
    SCIP_PRIMAL * primal
    Definition: struct_scip.h:98
    concurrent data struct
    datastructures for primal heuristics
    datastructures for presolvers
    datastructures for collecting primal CIP solutions and primal informations
    datastructures for propagators
    SCIP main data structure.
    datastructures for separators
    datastructures for global SCIP settings
    datastructures for storing primal CIP solutions
    data structures for branch and bound tree
    SCIP_Real SCIPsyncstoreGetLastUpperbound(SCIP_SYNCSTORE *syncstore)
    Definition: syncstore.c:272
    SCIP_Real SCIPsyncstoreGetLastLowerbound(SCIP_SYNCSTORE *syncstore)
    Definition: syncstore.c:283
    int SCIPsyncstoreGetWinner(SCIP_SYNCSTORE *syncstore)
    Definition: syncstore.c:531
    void SCIPsyncstoreSetSolveIsStopped(SCIP_SYNCSTORE *syncstore, SCIP_Bool stopped)
    Definition: syncstore.c:259
    SCIP_Bool SCIPsyncstoreIsInitialized(SCIP_SYNCSTORE *syncstore)
    Definition: syncstore.c:795
    int SCIPsyncstoreGetNSolvers(SCIP_SYNCSTORE *syncstore)
    Definition: syncstore.c:555
    the function declarations for the synchronization store
    the type definitions for the SCIP parallel interface
    SCIP_RETCODE SCIPtpiCreateJob(SCIP_JOB **job, int jobid, SCIP_RETCODE(*jobfunc)(void *args), void *jobarg)
    Definition: tpi_none.c:156
    SCIP_RETCODE SCIPtpiSubmitJob(SCIP_JOB *job, SCIP_SUBMITSTATUS *status)
    Definition: tpi_none.c:180
    SCIP_RETCODE SCIPtpiCollectJobs(int jobid)
    Definition: tpi_none.c:193
    int SCIPtpiGetNewJobID(void)
    Definition: tpi_none.c:172
    enum SCIP_BoundType SCIP_BOUNDTYPE
    Definition: type_lp.h:60
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    the type definitions for the synchronization store
    @ SCIP_PARA_DETERMINISTIC
    enum SCIP_Submitstatus SCIP_SUBMITSTATUS
    Definition: type_tpi.h:50
    @ SCIP_SUBMIT_SUCCESS
    Definition: type_tpi.h:48