SCIP Doxygen Documentation
Loading...
Searching...
No Matches
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 )
72{
73 int nvars;
74
75 assert(scip != NULL);
76 assert(concsolver != NULL);
77 assert(varperm != NULL);
78 assert(scip->concurrent == NULL);
79
80 SCIP_CALL( SCIPallocBlockMemory(scip, &scip->concurrent) );
81
83 scip->concurrent->varperm = NULL;
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, SCIPgetNOrigVars(scip));
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 SCIPconcsolverSetTimeSinceLastSync(scip->concurrent->concsolver, scip->concurrent->dettime);
225 scip->concurrent->dettime = 0.0;
226 SCIP_CALL( SCIPeventCreateSync(&event, SCIPblkmem(mainscip)) );
227 SCIP_CALL( SCIPeventqueueAdd(mainscip->eventqueue, SCIPblkmem(mainscip), mainscip->set,
228 NULL, NULL, NULL, mainscip->eventfilter, &event) );
229 }
230 }
231 else
232 {
233 SCIP_Real timesincelastsync;
234 timesincelastsync = SCIPgetClockTime(mainscip, wallclock);
235
236 if( timesincelastsync >= syncfreq )
237 {
238 SCIP_EVENT* event;
239 SCIPconcsolverSetTimeSinceLastSync(scip->concurrent->concsolver, timesincelastsync);
240
241 SCIP_CALL( SCIPeventCreateSync(&event, SCIPblkmem(mainscip)) );
242 SCIP_CALL( SCIPeventqueueAdd(mainscip->eventqueue, SCIPblkmem(mainscip), mainscip->set,
243 NULL, NULL, NULL, mainscip->eventfilter, &event) );
244
245 SCIP_CALL( SCIPresetClock(mainscip, wallclock) );
246 SCIP_CALL( SCIPstartClock(mainscip, wallclock) );
247 }
248 }
249
250 return SCIP_OKAY;
251}
252
253
254/** synchronize with other concurrent solvers */
256 SCIP* scip /**< SCIP datastructure */
257 )
258{
259 assert(scip != NULL);
260 assert(scip->concurrent != NULL);
261
262 SCIP_CALL( SCIPconcsolverSync(scip->concurrent->concsolver, scip->concurrent->mainscip->set) );
263
264 scip->concurrent->mainscip->concurrent->solidx = scip->concurrent->mainscip->stat->solindex;
265
266 if( scip->concurrent->eventglobalbnd != NULL )
267 SCIPeventGlobalbndClearBoundChanges(scip->concurrent->eventglobalbnd);
268
269 return SCIP_OKAY;
270}
271
272/** disables storing global bound changes */
274 SCIP* scip /**< SCIP data structure */
275 )
276{
277 assert(scip != NULL);
278 assert(scip->concurrent != NULL);
279
280 if( scip->concurrent->eventglobalbnd != NULL )
281 SCIPeventGlobalbndDisableBoundStorage(scip->concurrent->eventglobalbnd);
282}
283
284/** enables storing global bound changes */
286 SCIP* scip /**< SCIP data structure */
287 )
288{
289 assert(scip != NULL);
290 assert(scip->concurrent != NULL);
291
292 if( scip->concurrent->eventglobalbnd != NULL )
293 SCIPeventGlobalbndEnableBoundStorage(scip->concurrent->eventglobalbnd);
294}
295
296/** gets total memory usage of all concurrent solvers together */
298 SCIP* scip /**< SCIP data structure */
299 )
300{
302
303 assert(scip != NULL);
304
305 if( scip->concurrent == NULL || scip->concurrent->mainscip != scip || scip->concurrent->concsolver == NULL )
306 return memtotal;
307 else
308 {
309 SCIP_Longint concmemtotal = SCIPconcsolverGetMemTotal(scip->concurrent->concsolver);
310 return MAX(memtotal, concmemtotal);
311 }
312}
313
314/** gets the dualbound in the last synchronization */
316 SCIP* scip /**< SCIP data structure */
317 )
318{
319 SCIP_SYNCSTORE* syncstore;
320
321 assert(scip != NULL);
322
323 syncstore = SCIPgetSyncstore(scip);
324 assert(syncstore != NULL);
325
326 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPsyncstoreGetLastLowerbound(syncstore));
327}
328
329/** gets the primalbound in the last synchronization */
331 SCIP* scip /**< SCIP data structure */
332 )
333{
334 SCIP_SYNCSTORE* syncstore;
335
336 assert(scip != NULL);
337
338 syncstore = SCIPgetSyncstore(scip);
339 assert(syncstore != NULL);
340
341 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPsyncstoreGetLastUpperbound(syncstore));
342}
343
344/** gets the gap in the last synchronization */
346 SCIP* scip /**< SCIP data structure */
347 )
348{
349 SCIP_Real primalbound;
350 SCIP_Real dualbound;
351
352 primalbound = SCIPgetConcurrentPrimalbound(scip);
353 dualbound = SCIPgetConcurrentDualbound(scip);
354
355 return SCIPcomputeGap(SCIPepsilon(scip), SCIPinfinity(scip), primalbound, dualbound);
356}
357
358/** gives the total number of tightened bounds received from other concurrent solvers */
360 SCIP* scip /**< SCIP data structure */
361 )
362{
363 assert(scip->concurrent != NULL);
364
365 return scip->concurrent->propsync != NULL ? SCIPpropSyncGetNTightenedBnds(scip->concurrent->propsync) : 0;
366}
367
368/** gives the total number of tightened bounds for integer variables received from
369 * other concurrent solvers */
371 SCIP* scip /**< SCIP data structure */
372 )
373{
374 assert(scip->concurrent != NULL);
375
376 return scip->concurrent->propsync != NULL ? SCIPpropSyncGetNTightenedIntBnds(scip->concurrent->propsync) : 0;
377}
378
379/** pass a solution to the given SCIP instance using that was received via synchronization by using
380 * the sync heuristic */
382 SCIP* scip, /**< SCIP datastructure */
383 SCIP_SOL* sol /**< solution */
384 )
385{
386 assert(scip != NULL);
387 assert(scip->concurrent != NULL);
388 assert(sol != NULL);
389
390 SCIP_CALL( SCIPheurSyncPassSol(scip, scip->concurrent->heursync, sol) );
391
392 return SCIP_OKAY;
393}
394
395/** adds a global boundchange to the given SCIP, by passing it to the sync propagator */
397 SCIP* scip, /**< SCIP data structure */
398 SCIP_VAR* var, /**< variable for bound */
399 SCIP_Real val, /**< value of bound */
400 SCIP_BOUNDTYPE bndtype /**< type of bound */
401 )
402{
403 assert(scip != NULL);
404 assert(var != NULL);
405 assert(scip->concurrent != NULL);
406 assert(scip->concurrent->propsync != NULL);
407
408 SCIP_CALL( SCIPpropSyncAddBndchg(scip->concurrent->mainscip, scip->concurrent->propsync, var, val, bndtype) );
409
410 return SCIP_OKAY;
411}
412
413/** copy the nodenumber, depth, time, and runnumber of one solution to another one */
415 SCIP_SOL* source, /**< source for solution statistics */
416 SCIP_SOL* target /**< target for solution statistics */
417 )
418{
419 assert(source != NULL);
420 assert(target != NULL);
421
422 target->depth = source->depth;
423 target->time = source->time;
424 target->nodenum = source->nodenum;
425 target->runnum = source->runnum;
426
427 return SCIP_OKAY;
428}
429
430
431/** get variable index of original variable that is the same between concurrent solvers */
433 SCIP* scip, /**< SCIP data structure */
434 SCIP_VAR* var /**< variable */
435 )
436{
437 assert(scip != NULL);
438 assert(scip->concurrent != NULL);
439 assert(scip->concurrent->varperm != NULL);
440 assert(var != NULL);
443
444 return scip->concurrent->varperm[SCIPvarGetIndex(var)];
445}
446
447/** is the solution new since the last synchronization point */
449 SCIP* scip, /**< SCIP data structure */
450 SCIP_SOL* sol /**< the solution */
451 )
452{
453 assert(scip != NULL);
454 assert(scip->concurrent != NULL);
455 assert(sol != NULL);
456
457 return SCIPsolGetIndex(sol) >= scip->concurrent->solidx;
458}
459
460/** gets the global lower bound changes since the last synchronization point */
462 SCIP* scip /**< SCIP data structure */
463 )
464{
465 assert(scip != NULL);
466 assert(scip->concurrent != NULL);
467
468 if( scip->concurrent->eventglobalbnd != NULL )
469 return SCIPeventGlobalbndGetBoundChanges(scip->concurrent->eventglobalbnd);
470
471 return NULL;
472}
473
474/** executes the concurrent solver corresponding to the current thread */
475static
477 void* args /**< SCIP data structure passed in as a void pointer */
478 )
479{
480 SCIP_CONCURRENTDATA* concurrentdata;
481 SCIP* scip;
482 int solverindex;
483
484 assert(args != NULL);
485
486 concurrentdata = (SCIP_CONCURRENTDATA*) args;
487 scip = concurrentdata->scip;
488 solverindex = concurrentdata->solverindex;
489
490 SCIP_CALL( SCIPconcsolverExec(scip->set->concsolvers[solverindex]) );
491 SCIP_CALL( SCIPconcsolverSync(scip->set->concsolvers[solverindex], scip->set) );
492
493 return SCIP_OKAY;
494}
495
496/** start solving in parallel using the given set of concurrent solvers */
498 SCIP* scip /**< pointer to scip datastructure */
499 )
500{
501 SCIP_SYNCSTORE* syncstore;
502 int idx;
503 int jobid;
504 int i;
505 SCIP_RETCODE retcode;
506 SCIP_CONCSOLVER** concsolvers;
507 int nconcsolvers;
508 SCIP_CONCURRENTDATA** concurrentdata;
509
510 assert(scip != NULL);
511
512 syncstore = SCIPgetSyncstore(scip);
513 concsolvers = scip->set->concsolvers;
514 nconcsolvers = scip->set->nconcsolvers;
515
517 assert(SCIPsyncstoreGetNSolvers(syncstore) == nconcsolvers);
518
520 jobid = SCIPtpiGetNewJobID();
521
522 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &concurrentdata, nconcsolvers) );
523 for( i = 0; i < nconcsolvers; ++i )
524 {
525 SCIP_CALL( SCIPallocBlockMemory(scip, &concurrentdata[i]) ); /*lint !e866*/
526 }
527
529 {
531 {
532 for( i = 0; i < nconcsolvers; ++i )
533 {
534 /* cppcheck-suppress unassignedVariable */
535 SCIP_JOB* job;
536 SCIP_SUBMITSTATUS status;
537
538 concurrentdata[i]->scip = scip;
539 concurrentdata[i]->solverindex = i;
540
541 SCIP_CALL_ABORT( SCIPtpiCreateJob(&job, jobid, execConcsolver, concurrentdata[i]) );
542 SCIP_CALL_ABORT( SCIPtpiSubmitJob(job, &status) );
543
544 assert(status == SCIP_SUBMIT_SUCCESS);
545 }
546 }
547 }
548
549 retcode = SCIPtpiCollectJobs(jobid);
550 idx = SCIPsyncstoreGetWinner(syncstore);
551 assert(idx >= 0 && idx < nconcsolvers);
552
553 /* a paranoid safeguard for running in optimized mode */
554 if( idx < 0 || idx >= nconcsolvers )
555 idx = 0;
556
557 SCIP_CALL( SCIPconcsolverGetSolvingData(concsolvers[idx], scip) );
558
559 for( i = nconcsolvers - 1; i >= 0; i-- )
560 SCIPfreeBlockMemory(scip, &concurrentdata[i]); /*lint !e866*/
561 SCIPfreeBlockMemoryArray(scip, &concurrentdata, nconcsolvers);
562
563 return retcode;
564}
565
566/** copy solving statistics */
568 SCIP* source, /**< SCIP data structure */
569 SCIP* target /**< target SCIP data structure */
570 )
571{
572 SCIP_Real tmptime;
573 SCIP_HEUR* heur;
574 SCIP_NODE* root;
575 SCIP_PROP* prop;
576 SCIP_SEPA* sepa;
577 SCIP_PRESOL* presol;
578 SCIP_HEUR** heurs;
579 int nheurs;
580 SCIP_PROP** props;
581 int nprops;
582 SCIP_SEPA** sepas;
583 int nsepas;
584 SCIP_PRESOL** presols;
585 int npresols;
586 int i;
587
588 assert(source != NULL);
589 assert(target != NULL);
590
591 heurs = SCIPgetHeurs(target);
592 nheurs = SCIPgetNHeurs(target);
593
594 for( i = 0; i < nheurs; ++i )
595 {
596 heur = SCIPfindHeur(source, SCIPheurGetName(heurs[i]));
597
598 if( heur != NULL )
599 {
600 heurs[i]->nbestsolsfound += heur->nbestsolsfound;
601 heurs[i]->ncalls += heur->ncalls;
602 heurs[i]->nsolsfound += heur->nsolsfound;
603 /* TODO divesets */
604 tmptime = SCIPgetClockTime(target, heurs[i]->setuptime);
605 tmptime += SCIPgetClockTime(source, heur->setuptime);
606 SCIP_CALL( SCIPsetClockTime(target, heurs[i]->setuptime, tmptime) );
607
608 tmptime = SCIPgetClockTime(target, heurs[i]->heurclock);
609 tmptime += SCIPgetClockTime(source, heur->heurclock);
610 SCIP_CALL( SCIPsetClockTime(target, heurs[i]->heurclock, tmptime) );
611 }
612 }
613
614 props = SCIPgetProps(target);
615 nprops = SCIPgetNProps(target);
616
617 for( i = 0; i < nprops; ++i )
618 {
619 prop = SCIPfindProp(source, SCIPpropGetName(props[i]));
620
621 if( prop != NULL )
622 {
623 props[i]->ncalls += prop->ncalls;
624 props[i]->nrespropcalls += prop->nrespropcalls;
625 props[i]->ncutoffs += prop->ncutoffs;
626 props[i]->ndomredsfound += prop->ndomredsfound;
627
628 tmptime = SCIPgetClockTime(target, props[i]->proptime);
629 tmptime += SCIPgetClockTime(source, prop->proptime);
630 SCIP_CALL( SCIPsetClockTime(target, props[i]->proptime, tmptime) );
631
632 tmptime = SCIPgetClockTime(target, props[i]->sbproptime);
633 tmptime += SCIPgetClockTime(source, prop->sbproptime);
634 SCIP_CALL( SCIPsetClockTime(target, props[i]->sbproptime, tmptime) );
635
636 tmptime = SCIPgetClockTime(target, props[i]->resproptime);
637 tmptime += SCIPgetClockTime(source, prop->resproptime);
638 SCIP_CALL( SCIPsetClockTime(target, props[i]->resproptime, tmptime) );
639
640 tmptime = SCIPgetClockTime(target, props[i]->presoltime);
641 tmptime += SCIPgetClockTime(source, prop->presoltime);
642 SCIP_CALL( SCIPsetClockTime(target, props[i]->presoltime, tmptime) );
643
644 tmptime = SCIPgetClockTime(target, props[i]->setuptime);
645 tmptime += SCIPgetClockTime(source, prop->setuptime);
646 SCIP_CALL( SCIPsetClockTime(target, props[i]->setuptime, tmptime) );
647 }
648 }
649
650 presols = SCIPgetPresols(target);
651 npresols = SCIPgetNPresols(target);
652
653 for( i = 0; i < npresols; ++i )
654 {
655 presol = SCIPfindPresol(source, SCIPpresolGetName(presols[i]));
656
657 if( presol != NULL )
658 {
659 presols[i]->ncalls += presol->ncalls;
660 presols[i]->nfixedvars += presol->nfixedvars;
661 presols[i]->naggrvars += presol->naggrvars;
662 presols[i]->nchgvartypes += presol->nchgvartypes;
663 presols[i]->nchgbds += presol->nchgbds;
664 presols[i]->naddholes += presol->naddholes;
665 presols[i]->ndelconss += presol->ndelconss;
666 presols[i]->naddconss += presol->naddconss;
667 presols[i]->nupgdconss += presol->nupgdconss;
668 presols[i]->nchgcoefs += presol->nchgcoefs;
669 presols[i]->nchgsides += presol->nchgsides;
670 presols[i]->nfixedvars += presol->nfixedvars;
671 presols[i]->nfixedvars += presol->nfixedvars;
672 presols[i]->nfixedvars += presol->nfixedvars;
673
674 tmptime = SCIPgetClockTime(target, presols[i]->setuptime);
675 tmptime += SCIPgetClockTime(source, presol->setuptime);
676 SCIP_CALL( SCIPsetClockTime(target, presols[i]->setuptime, tmptime) );
677
678 tmptime = SCIPgetClockTime(target, presols[i]->presolclock);
679 tmptime += SCIPgetClockTime(source, presol->presolclock);
680 SCIP_CALL( SCIPsetClockTime(target, presols[i]->presolclock, tmptime) );
681 }
682 }
683
684 sepas = SCIPgetSepas(target);
685 nsepas = SCIPgetNSepas(target);
686
687 for( i = 0; i < nsepas; ++i )
688 {
689 sepa = SCIPfindSepa(source, SCIPsepaGetName(sepas[i]));
690
691 if( sepa != NULL )
692 {
693 sepas[i]->lastsepanode = sepa->lastsepanode;
694 sepas[i]->ncalls += sepa->ncalls;
695 sepas[i]->nrootcalls += sepa->nrootcalls;
696 sepas[i]->ncutoffs += sepa->ncutoffs;
697 sepas[i]->ncutsfound += sepa->ncutsfound;
698 sepas[i]->ncutsaddedviapool += sepa->ncutsaddedviapool;
699 sepas[i]->ncutsaddeddirect += sepa->ncutsaddeddirect;
701 sepas[i]->ncutsapplieddirect += sepa->ncutsapplieddirect;
702 sepas[i]->nconssfound += sepa->nconssfound;
703 sepas[i]->ndomredsfound += sepa->ndomredsfound;
704 sepas[i]->maxbounddist = MAX(sepas[i]->maxbounddist, sepa->maxbounddist);
705
706 tmptime = SCIPgetClockTime(target, sepas[i]->setuptime);
707 tmptime += SCIPgetClockTime(source, sepa->setuptime);
708 SCIP_CALL( SCIPsetClockTime(target, sepas[i]->setuptime, tmptime) );
709
710 tmptime = SCIPgetClockTime(target, sepas[i]->sepaclock);
711 tmptime += SCIPgetClockTime(source, sepa->sepaclock);
712 SCIP_CALL( SCIPsetClockTime(target, sepas[i]->sepaclock, tmptime) );
713 }
714 }
715
716 target->primal->nsolsfound = source->primal->nsolsfound;
717 target->primal->nbestsolsfound = source->primal->nbestsolsfound;
718 target->primal->nlimsolsfound = source->primal->nlimsolsfound;
719 SCIPprobSetDualbound(target->transprob, SCIPprobExternObjval(target->transprob, target->origprob, target->set, SCIPgetDualbound(source)));
720 root = SCIPgetRootNode(target);
721
722 if( root != NULL )
723 {
724 /* in the copied SCIP the dualbound is in the transformed space of the target */
725 root->lowerbound = SCIPgetDualbound(source);
726 root->estimate = root->lowerbound;
727 target->stat->rootlowerbound = root->lowerbound;
728 }
729
730 target->stat->nlpiterations = source->stat->nlpiterations;
731 target->stat->nrootlpiterations = source->stat->nrootlpiterations;
734 target->stat->nduallpiterations = source->stat->nduallpiterations;
740 target->stat->nnodelpiterations = source->stat->nnodelpiterations;
741 target->stat->ninitlpiterations = source->stat->ninitlpiterations;
745 target->stat->nsblpiterations = source->stat->nsblpiterations;
748 target->stat->nnodes = source->stat->nnodes;
749 target->stat->ninternalnodes = source->stat->ninternalnodes;
750 target->stat->nobjleaves = source->stat->nobjleaves;
751 target->stat->nfeasleaves = source->stat->nfeasleaves;
752 target->stat->ninfeasleaves = source->stat->ninfeasleaves;
753 target->stat->ntotalnodes = source->stat->ntotalnodes;
755 target->stat->ncreatednodes = source->stat->ncreatednodes;
756 target->stat->ncreatednodesrun = source->stat->ncreatednodesrun;
757 target->stat->nactivatednodes = source->stat->nactivatednodes;
758 target->stat->ndeactivatednodes = source->stat->ndeactivatednodes;
759 target->stat->nearlybacktracks = source->stat->nearlybacktracks;
761 target->stat->nbacktracks = source->stat->nbacktracks;
762 target->stat->ndelayedcutoffs = source->stat->ndelayedcutoffs;
763 target->stat->nreprops = source->stat->nreprops;
764 target->stat->nrepropboundchgs = source->stat->nrepropboundchgs;
765 target->stat->nrepropcutoffs = source->stat->nrepropcutoffs;
766 target->stat->nlpsolsfound = source->stat->nlpsolsfound;
767 target->stat->npssolsfound = source->stat->npssolsfound;
768 target->stat->nsbsolsfound = source->stat->nsbsolsfound;
769 target->stat->nlpbestsolsfound = source->stat->nlpbestsolsfound;
770 target->stat->npsbestsolsfound = source->stat->npsbestsolsfound;
771 target->stat->nsbbestsolsfound = source->stat->nsbbestsolsfound;
773 target->stat->lastdispnode = source->stat->lastdispnode;
774 target->stat->lastdivenode = source->stat->lastdivenode;
775 target->stat->lastconflictnode = source->stat->lastconflictnode;
776 target->stat->bestsolnode = source->stat->bestsolnode;
777 target->stat->domchgcount = source->stat->domchgcount;
778 target->stat->nboundchgs = source->stat->nboundchgs;
779 target->stat->nholechgs = source->stat->nholechgs;
780 target->stat->nprobboundchgs = source->stat->nprobboundchgs;
781 target->stat->nprobholechgs = source->stat->nprobholechgs;
782 target->stat->nsbdowndomchgs = source->stat->nsbdowndomchgs;
783 target->stat->nsbupdomchgs = source->stat->nsbupdomchgs;
785 target->stat->nnodesbeforefirst = source->stat->nnodesbeforefirst;
786 target->stat->ninitconssadded = source->stat->ninitconssadded;
787 target->stat->firstlpdualbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, source->stat->firstlpdualbound);
788 target->stat->vsidsweight = source->stat->vsidsweight;
789 target->stat->firstprimalbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, source->stat->firstprimalbound);
790 target->stat->firstprimaltime = source->stat->firstprimaltime;
791 target->stat->firstsolgap = source->stat->firstsolgap;
792 target->stat->lastsolgap = source->stat->lastsolgap;
793 target->stat->primalzeroittime = source->stat->primalzeroittime;
794 target->stat->dualzeroittime = source->stat->dualzeroittime;
795 target->stat->barrierzeroittime = source->stat->barrierzeroittime;
796 target->stat->maxcopytime = MAX(source->stat->maxcopytime, target->stat->maxcopytime);
797 target->stat->mincopytime = MIN(source->stat->mincopytime, target->stat->mincopytime);
798 target->stat->firstlptime = source->stat->firstlptime;
799 target->stat->lastbranchvalue = source->stat->lastbranchvalue;
800 target->stat->dualrefintegral = source->stat->dualrefintegral;
801 target->stat->primalrefintegral = source->stat->primalrefintegral;
803 target->stat->previousgap = source->stat->previousgap;
807 target->stat->lastlowerbound = source->stat->lastdualbound;
808 target->stat->lastupperbound = source->stat->lastprimalbound;
809 target->stat->lastdualbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, target->stat->lastlowerbound);
810 target->stat->lastprimalbound = SCIPprobExternObjval(target->transprob, target->origprob, target->set, target->stat->lastupperbound);
812 target->stat->referencebound = source->stat->referencebound;
813
814 /*tmptime = SCIPgetClockTime(target, target->stat->solvingtime);
815 tmptime += SCIPgetClockTime(source, source->stat->solvingtime);
816 SCIP_CALL( SCIPsetClockTime(target, target->stat->solvingtime, tmptime) );*/
817
818 /* TODO */
819 tmptime = SCIPgetClockTime(target, target->stat->solvingtimeoverall);
820 tmptime += SCIPgetClockTime(source, source->stat->solvingtimeoverall);
821 SCIP_CALL( SCIPsetClockTime(target, target->stat->solvingtimeoverall, tmptime) );
822
823 tmptime = SCIPgetClockTime(target, target->stat->presolvingtime);
824 tmptime += SCIPgetClockTime(source, source->stat->presolvingtime);
825 SCIP_CALL( SCIPsetClockTime(target, target->stat->presolvingtime, tmptime) );
826
827 tmptime = SCIPgetClockTime(target, target->stat->presolvingtimeoverall);
828 tmptime += SCIPgetClockTime(source, source->stat->presolvingtimeoverall);
829 SCIP_CALL( SCIPsetClockTime(target, target->stat->presolvingtimeoverall, tmptime) );
830
831 tmptime = SCIPgetClockTime(target, target->stat->primallptime);
832 tmptime += SCIPgetClockTime(source, source->stat->primallptime);
833 SCIP_CALL( SCIPsetClockTime(target, target->stat->primallptime, tmptime) );
834
835 tmptime = SCIPgetClockTime(target, target->stat->duallptime);
836 tmptime += SCIPgetClockTime(source, source->stat->duallptime);
837 SCIP_CALL( SCIPsetClockTime(target, target->stat->duallptime, tmptime) );
838
839 tmptime = SCIPgetClockTime(target, target->stat->lexduallptime);
840 tmptime += SCIPgetClockTime(source, source->stat->lexduallptime);
841 SCIP_CALL( SCIPsetClockTime(target, target->stat->lexduallptime, tmptime) );
842
843 tmptime = SCIPgetClockTime(target, target->stat->barrierlptime);
844 tmptime += SCIPgetClockTime(source, source->stat->barrierlptime);
845 SCIP_CALL( SCIPsetClockTime(target, target->stat->barrierlptime, tmptime) );
846
847 tmptime = SCIPgetClockTime(target, target->stat->divinglptime);
848 tmptime += SCIPgetClockTime(source, source->stat->divinglptime);
849 SCIP_CALL( SCIPsetClockTime(target, target->stat->divinglptime, tmptime) );
850
851 tmptime = SCIPgetClockTime(target, target->stat->strongbranchtime);
852 tmptime += SCIPgetClockTime(source, source->stat->strongbranchtime);
853 SCIP_CALL( SCIPsetClockTime(target, target->stat->strongbranchtime, tmptime) );
854
855 tmptime = SCIPgetClockTime(target, target->stat->conflictlptime);
856 tmptime += SCIPgetClockTime(source, source->stat->conflictlptime);
857 SCIP_CALL( SCIPsetClockTime(target, target->stat->conflictlptime, tmptime) );
858
859 tmptime = SCIPgetClockTime(target, target->stat->lpsoltime);
860 tmptime += SCIPgetClockTime(source, source->stat->lpsoltime);
861 SCIP_CALL( SCIPsetClockTime(target, target->stat->lpsoltime, tmptime) );
862
863 tmptime = SCIPgetClockTime(target, target->stat->pseudosoltime);
864 tmptime += SCIPgetClockTime(source, source->stat->pseudosoltime);
865 SCIP_CALL( SCIPsetClockTime(target, target->stat->pseudosoltime, tmptime) );
866
867 tmptime = SCIPgetClockTime(target, target->stat->sbsoltime);
868 tmptime += SCIPgetClockTime(source, source->stat->sbsoltime);
869 SCIP_CALL( SCIPsetClockTime(target, target->stat->sbsoltime, tmptime) );
870
871 tmptime = SCIPgetClockTime(target, target->stat->nodeactivationtime);
872 tmptime += SCIPgetClockTime(source, source->stat->nodeactivationtime);
873 SCIP_CALL( SCIPsetClockTime(target, target->stat->nodeactivationtime, tmptime) );
874
875 tmptime = SCIPgetClockTime(target, target->stat->nlpsoltime);
876 tmptime += SCIPgetClockTime(source, source->stat->nlpsoltime);
877 SCIP_CALL( SCIPsetClockTime(target, target->stat->nlpsoltime, tmptime) );
878
879 tmptime = SCIPgetClockTime(target, target->stat->strongpropclock);
880 tmptime += SCIPgetClockTime(source, source->stat->strongpropclock);
881 SCIP_CALL( SCIPsetClockTime(target, target->stat->strongpropclock, tmptime) );
882
883 tmptime = SCIPgetClockTime(target, target->stat->reoptupdatetime);
884 tmptime += SCIPgetClockTime(source, source->stat->reoptupdatetime);
885 SCIP_CALL( SCIPsetClockTime(target, target->stat->reoptupdatetime, tmptime) );
886
887 heur = source->stat->firstprimalheur;
888
889 if( heur != NULL )
890 target->stat->firstprimalheur = SCIPfindHeur(target, SCIPheurGetName(heur));
891
892 target->stat->status = source->stat->status;
893 target->stat->lastbranchdir = source->stat->lastbranchdir;
894 target->stat->lastsblpsolstats[0] = source->stat->lastsblpsolstats[0];
895 target->stat->lastsblpsolstats[1] = source->stat->lastsblpsolstats[1];
896 target->stat->nnz = source->stat->nnz;
897 target->stat->lpcount = source->stat->lpcount;
898 target->stat->nlps = source->stat->nlps;
899 target->stat->nrootlps = source->stat->nrootlps;
900 target->stat->nprimallps = source->stat->nprimallps;
901 target->stat->nprimalzeroitlps = source->stat->nprimalzeroitlps;
902 target->stat->nduallps = source->stat->nduallps;
903 target->stat->ndualzeroitlps = source->stat->ndualzeroitlps;
904 target->stat->nlexduallps = source->stat->nlexduallps;
905 target->stat->nbarrierlps = source->stat->nbarrierlps;
906 target->stat->nbarrierzeroitlps = source->stat->nbarrierzeroitlps;
907 target->stat->nprimalresolvelps = source->stat->nprimalresolvelps;
908 target->stat->ndualresolvelps = source->stat->ndualresolvelps;
910 target->stat->nnodelps = source->stat->nnodelps;
911 target->stat->ninitlps = source->stat->ninitlps;
912 target->stat->ndivinglps = source->stat->ndivinglps;
913 target->stat->ndivesetlps = source->stat->ndivesetlps;
914 target->stat->nsbdivinglps = source->stat->nsbdivinglps;
915 target->stat->nstrongbranchs = source->stat->nstrongbranchs;
917 target->stat->nconflictlps = source->stat->nconflictlps;
918 target->stat->nnlps = source->stat->nnlps;
919 target->stat->nisstoppedcalls = source->stat->nisstoppedcalls;
920 target->stat->totaldivesetdepth = source->stat->totaldivesetdepth;
921 target->stat->ndivesetcalls = source->stat->ndivesetcalls;
922 target->stat->nruns = source->stat->nruns;
923 target->stat->nconfrestarts = source->stat->nconfrestarts;
924 target->stat->nrootboundchgs = source->stat->nrootboundchgs;
925 target->stat->nrootboundchgsrun = source->stat->nrootboundchgsrun;
926 target->stat->nrootintfixings = source->stat->nrootintfixings;
928 target->stat->prevrunnvars = source->stat->prevrunnvars;
929 target->stat->npricerounds = source->stat->npricerounds;
930 target->stat->nseparounds = source->stat->nseparounds;
931 target->stat->maxdepth = source->stat->maxdepth;
932 target->stat->maxtotaldepth = source->stat->maxtotaldepth;
933 target->stat->plungedepth = source->stat->plungedepth;
934 target->stat->npresolrounds += source->stat->npresolrounds;
935 target->stat->npresolroundsfast += source->stat->npresolroundsfast;
936 target->stat->npresolroundsmed += source->stat->npresolroundsmed;
937 target->stat->npresolroundsext += source->stat->npresolroundsext;
938 target->stat->npresolfixedvars += source->stat->npresolfixedvars;
939 target->stat->npresolaggrvars += source->stat->npresolaggrvars;
940 target->stat->npresolchgvartypes += source->stat->npresolchgvartypes;
941 target->stat->npresolchgbds += source->stat->npresolchgbds;
942 target->stat->npresoladdholes += source->stat->npresoladdholes;
943 target->stat->npresoldelconss += source->stat->npresoldelconss;
944 target->stat->npresoladdconss += source->stat->npresoladdconss;
945 target->stat->npresolupgdconss += source->stat->npresolupgdconss;
946 target->stat->npresolchgcoefs += source->stat->npresolchgcoefs;
947 target->stat->npresolchgsides += source->stat->npresolchgsides;
948 target->stat->nrunsbeforefirst = source->stat->nrunsbeforefirst;
949 target->stat->firstprimaldepth = source->stat->firstprimaldepth;
950 target->stat->ncopies += source->stat->ncopies;
951 target->stat->nreoptruns = source->stat->nreoptruns;
952
953 /* set the stage but do not set to earlier stage */
954 target->set->stage = MAX(source->set->stage, target->set->stage);
955
956 return SCIP_OKAY;
957}
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:315
SCIP_RETCODE SCIPconcurrentSolve(SCIP *scip)
Definition concurrent.c:497
SCIP_Real SCIPgetConcurrentPrimalbound(SCIP *scip)
Definition concurrent.c:330
SCIP_RETCODE SCIPsynchronize(SCIP *scip)
Definition concurrent.c:255
SCIP_RETCODE SCIPincrementConcurrentTime(SCIP *scip, SCIP_Real val)
Definition concurrent.c:199
int SCIPgetConcurrentVaridx(SCIP *scip, SCIP_VAR *var)
Definition concurrent.c:432
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:396
SCIP_RETCODE SCIPcopySolStats(SCIP_SOL *source, SCIP_SOL *target)
Definition concurrent.c:414
SCIP_Longint SCIPgetConcurrentMemTotal(SCIP *scip)
Definition concurrent.c:297
SCIP_RETCODE SCIPcreateConcurrent(SCIP *scip, SCIP_CONCSOLVER *concsolver, int *varperm)
Definition concurrent.c:67
SCIP_BOUNDSTORE * SCIPgetConcurrentGlobalBoundChanges(SCIP *scip)
Definition concurrent.c:461
SCIP_RETCODE SCIPaddConcurrentSolver(SCIP *scip, SCIP_CONCSOLVER *concsolver)
Definition concurrent.c:148
static SCIP_RETCODE execConcsolver(void *args)
Definition concurrent.c:476
SCIP_CONCSOLVER ** SCIPgetConcurrentSolvers(SCIP *scip)
Definition concurrent.c:137
SCIP_Bool SCIPIsConcurrentSolNew(SCIP *scip, SCIP_SOL *sol)
Definition concurrent.c:448
SCIP_Longint SCIPgetConcurrentNTightenedBnds(SCIP *scip)
Definition concurrent.c:359
void SCIPenableConcurrentBoundStorage(SCIP *scip)
Definition concurrent.c:285
int SCIPgetNConcurrentSolvers(SCIP *scip)
Definition concurrent.c:126
SCIP_RETCODE SCIPcopyConcurrentSolvingStats(SCIP *source, SCIP *target)
Definition concurrent.c:567
SCIP_RETCODE SCIPaddConcurrentSol(SCIP *scip, SCIP_SOL *sol)
Definition concurrent.c:381
SCIP_Real SCIPgetConcurrentGap(SCIP *scip)
Definition concurrent.c:345
struct SCIP_ConcurrentData SCIP_CONCURRENTDATA
Definition concurrent.c:64
void SCIPdisableConcurrentBoundStorage(SCIP *scip)
Definition concurrent.c:273
SCIP_Longint SCIPgetConcurrentNTightenedIntBnds(SCIP *scip)
Definition concurrent.c:370
helper functions for concurrent scip solvers
#define NULL
Definition def.h:266
#define SCIP_Longint
Definition def.h:157
#define SCIP_Bool
Definition def.h:91
#define MIN(x, y)
Definition def.h:242
#define SCIP_Real
Definition def.h:172
#define FALSE
Definition def.h:94
#define MAX(x, y)
Definition def.h:238
#define SCIP_CALL_ABORT(x)
Definition def.h:352
#define SCIP_CALL(x)
Definition def.h:373
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:2240
SCIP_RETCODE SCIPeventCreateSync(SCIP_EVENT **event, BMS_BLKMEM *blkmem)
Definition event.c:483
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
int SCIPgetNOrigVars(SCIP *scip)
Definition scip_prob.c:2432
SCIP_Real SCIPcomputeGap(SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound)
Definition misc.c:11233
SCIP_RETCODE SCIPheurSyncPassSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
Definition heur_sync.c:190
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:161
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:1453
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
Definition scip_mem.h:110
#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)
SCIP_PRESOL * SCIPfindPresol(SCIP *scip, const char *name)
int SCIPgetNPresols(SCIP *scip)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
Definition presol.c:599
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:941
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:743
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:2835
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPcreateWallClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPsetClockTime(SCIP *scip, SCIP_CLOCK *clck, SCIP_Real sec)
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:17785
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
Definition var.c:17575
return SCIP_OKAY
static SCIP_SOL * sol
assert(minobj< SCIPgetCutoffbound(scip))
int nvars
SCIP_VAR * var
primal heuristic that adds given solutions
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition scip_mem.c:57
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition prob.c:2157
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition prob.c:1494
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:4535
internal methods for global SCIP settings
internal methods for problem statistics
SCIP_CLOCK * heurclock
SCIP_CLOCK * setuptime
SCIP_Longint ncalls
Definition struct_heur.h:99
SCIP_Longint nsolsfound
SCIP_Longint nbestsolsfound
SCIP_Real lowerbound
SCIP_Real estimate
SCIP_CLOCK * setuptime
SCIP_CLOCK * presolclock
SCIP_Longint nbestsolsfound
SCIP_Longint nsolsfound
SCIP_Longint nlimsolsfound
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:75
int depth
Definition struct_sol.h:88
int runnum
Definition struct_sol.h:87
SCIP_Real time
Definition struct_sol.h:76
SCIP_Longint nodenum
Definition struct_sol.h:77
SCIP_Longint nnlps
SCIP_Longint nlexdualresolvelpiterations
Definition struct_stat.h:71
SCIP_STATUS status
SCIP_Longint nearlybacktracks
Definition struct_stat.h:94
SCIP_Longint ndualresolvelpiterations
Definition struct_stat.h:70
SCIP_Real rootlowerbound
SCIP_Longint nrootstrongbranchs
SCIP_Longint nprimalresolvelpiterations
Definition struct_stat.h:69
int npresoladdholes
SCIP_Longint nprimallps
SCIP_Real dualrefintegral
SCIP_CLOCK * strongpropclock
SCIP_Longint nsbdowndomchgs
SCIP_Real previousgap
SCIP_Longint nprimalzeroitlps
SCIP_Longint nreprops
Definition struct_stat.h:98
SCIP_CLOCK * sbsoltime
SCIP_Real lastsolgap
SCIP_Longint nnodes
Definition struct_stat.h:82
int npresolupgdconss
SCIP_Longint nsblpiterations
Definition struct_stat.h:77
SCIP_Longint ntotalnodes
Definition struct_stat.h:87
SCIP_CLOCK * strongbranchtime
SCIP_Real previousdualrefgap
int ndivesetcalls
SCIP_CLOCK * barrierlptime
SCIP_Real dualzeroittime
SCIP_Longint nduallps
SCIP_Longint ninfeasleaves
Definition struct_stat.h:86
SCIP_Longint nrepropcutoffs
SCIP_Longint nduallpiterations
Definition struct_stat.h:66
SCIP_Longint ncreatednodesrun
Definition struct_stat.h:91
SCIP_Longint ndelayedcutoffs
Definition struct_stat.h:97
SCIP_CLOCK * nodeactivationtime
SCIP_Longint nlps
SCIP_CLOCK * reoptupdatetime
SCIP_Real lastlowerbound
SCIP_Longint ndualresolvelps
SCIP_Real rootlpbestestimate
SCIP_Longint nbarrierlpiterations
Definition struct_stat.h:68
SCIP_Longint domchgcount
SCIP_Longint nnodelps
SCIP_Longint nconflictlps
SCIP_LPSOLSTAT lastsblpsolstats[2]
SCIP_Longint nnz
SCIP_CLOCK * divinglptime
SCIP_Longint nrootsblpiterations
Definition struct_stat.h:78
SCIP_Longint ndivesetlpiterations
Definition struct_stat.h:75
SCIP_Longint lpcount
SCIP_Longint nprobholechgs
SCIP_CLOCK * presolvingtime
int prevrunnvars
SCIP_Longint nrootfirstlpiterations
Definition struct_stat.h:64
SCIP_Longint nbacktracks
Definition struct_stat.h:96
SCIP_Real maxcopytime
SCIP_Longint ninitconssadded
int nseparounds
SCIP_Longint ndivesetlps
SCIP_Real previousprimalrefgap
SCIP_Longint nlpiterations
Definition struct_stat.h:62
SCIP_Longint nprimalresolvelps
SCIP_Longint ndivinglpiterations
Definition struct_stat.h:74
SCIP_CLOCK * nlpsoltime
int nconfrestarts
int firstprimaldepth
SCIP_Longint nfeasleaves
Definition struct_stat.h:85
SCIP_Longint nsbsolsfound
int npricerounds
SCIP_CLOCK * solvingtimeoverall
int npresolroundsext
SCIP_Longint lastdivenode
SCIP_Longint nlexdualresolvelps
int npresolaggrvars
SCIP_Longint ndeactivatednodes
Definition struct_stat.h:93
int nrootboundchgs
SCIP_Longint nrepropboundchgs
Definition struct_stat.h:99
SCIP_Longint nnodesaboverefbound
Definition struct_stat.h:95
SCIP_Real firstlpdualbound
SCIP_Longint nlexduallpiterations
Definition struct_stat.h:67
SCIP_Longint nrootlpiterations
Definition struct_stat.h:63
SCIP_Real firstprimaltime
int nrootintfixingsrun
SCIP_Longint nlexduallps
SCIP_Longint ninternalnodes
Definition struct_stat.h:83
int nrootintfixings
SCIP_Real firstsolgap
SCIP_Real lastdualbound
SCIP_Longint lastdispnode
SCIP_Real vsidsweight
int npresolchgvartypes
SCIP_Longint lastconflictnode
int nrunsbeforefirst
SCIP_Real primalrefintegral
SCIP_Longint ntotalinternalnodes
Definition struct_stat.h:88
SCIP_Longint nobjleaves
Definition struct_stat.h:84
SCIP_HEUR * firstprimalheur
SCIP_Real referencebound
SCIP_CLOCK * duallptime
SCIP_BRANCHDIR lastbranchdir
SCIP_CLOCK * pseudosoltime
SCIP_CLOCK * presolvingtimeoverall
int npresoldelconss
SCIP_Longint nnodesbeforefirst
SCIP_Longint nlpbestsolsfound
SCIP_Longint nboundchgs
int npresolchgbds
int npresolroundsfast
SCIP_Real firstlptime
int nrootboundchgsrun
SCIP_Longint ndivinglps
SCIP_Longint nholechgs
SCIP_Longint npsbestsolsfound
SCIP_Real lastupperbound
SCIP_Real barrierzeroittime
int npresolchgcoefs
SCIP_Longint totaldivesetdepth
SCIP_Longint ninitlps
SCIP_Real previntegralevaltime
SCIP_Longint nexternalsolsfound
SCIP_Longint nisstoppedcalls
int maxtotaldepth
SCIP_Longint ndualzeroitlps
SCIP_Longint nrootlps
SCIP_Longint nsbdivinglps
SCIP_Longint nnodelpiterations
Definition struct_stat.h:72
SCIP_Real lastprimalbound
SCIP_Longint nactivatednodes
Definition struct_stat.h:92
int plungedepth
SCIP_Longint bestsolnode
SCIP_Longint nsbbestsolsfound
SCIP_Longint nsbtimesiterlimhit
SCIP_Real primalzeroittime
SCIP_CLOCK * primallptime
int npresoladdconss
SCIP_Longint nconflictlpiterations
Definition struct_stat.h:79
int npresolroundsmed
SCIP_Longint nstrongbranchs
SCIP_Real mincopytime
SCIP_Longint npssolsfound
SCIP_Longint nbarrierzeroitlps
SCIP_CLOCK * lpsoltime
SCIP_Longint nprimallpiterations
Definition struct_stat.h:65
SCIP_Real primaldualintegral
SCIP_Longint nbarrierlps
SCIP_Longint nlpsolsfound
SCIP_Longint nsbupdomchgs
SCIP_Real lastbranchvalue
int npresolrounds
SCIP_Longint ninitlpiterations
Definition struct_stat.h:73
SCIP_Longint nprobboundchgs
int npresolchgsides
SCIP_Longint ncreatednodes
Definition struct_stat.h:90
SCIP_CLOCK * conflictlptime
SCIP_Longint nsbdivinglpiterations
Definition struct_stat.h:76
SCIP_Real firstprimalbound
SCIP_CLOCK * lexduallptime
int npresolfixedvars
SCIP_PROB * origprob
Definition struct_scip.h:81
SCIP_STAT * stat
Definition struct_scip.h:80
SCIP_EVENTFILTER * eventfilter
Definition struct_scip.h:89
SCIP_EVENTQUEUE * eventqueue
Definition struct_scip.h:90
SCIP_SET * set
Definition struct_scip.h:73
SCIP_PROB * transprob
Definition struct_scip.h:99
SCIP_PRIMAL * primal
Definition struct_scip.h:95
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
struct SCIP_Clock SCIP_CLOCK
Definition type_clock.h:49
struct SCIP_ConcSolver SCIP_CONCSOLVER
struct SCIP_Event SCIP_EVENT
Definition type_event.h:156
struct SCIP_Heur SCIP_HEUR
Definition type_heur.h:76
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition type_lp.h:59
struct SCIP_Presol SCIP_PRESOL
Definition type_presol.h:50
struct SCIP_Prop SCIP_PROP
Definition type_prop.h:51
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
Definition type_scip.h:39
struct SCIP_Sepa SCIP_SEPA
Definition type_sepa.h:51
struct SCIP_Sol SCIP_SOL
Definition type_sol.h:57
the type definitions for the synchronization store
@ SCIP_PARA_DETERMINISTIC
struct SCIP_SyncStore SCIP_SYNCSTORE
struct SCIP_BoundStore SCIP_BOUNDSTORE
enum SCIP_Submitstatus SCIP_SUBMITSTATUS
Definition type_tpi.h:50
@ SCIP_SUBMIT_SUCCESS
Definition type_tpi.h:48
struct SCIP_Job SCIP_JOB
Definition type_tpi.h:67
struct SCIP_Node SCIP_NODE
Definition type_tree.h:63
struct SCIP_Var SCIP_VAR
Definition type_var.h:119