Scippy

SCIP

Solving Constraint Integer Programs

concsolver_scip.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-2017 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file concsolver_scip.c
17  * @ingroup PARALLEL
18  * @brief implementation of concurrent solver interface for SCIP
19  * @author Robert Lion Gottwald
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #include "scip/concsolver_scip.h"
25 #include "scip/concsolver.h"
26 #include "scip/concurrent.h"
27 #include "scip/syncstore.h"
28 #include "scip/boundstore.h"
29 #include <string.h>
30 
31 
32 /* event handler for synchronization */
33 
34 #define EVENTHDLR_NAME "sync"
35 #define EVENTHDLR_DESC "event handler for synchronization of concurrent scip sovlers"
36 
37 /*
38  * Data structures
39  */
40 
41 /** event handler data */
42 struct SCIP_EventhdlrData
43 {
44  int filterpos;
45 };
46 
47 /*
48  * Callback methods of event handler
49  */
50 
51 /** destructor of event handler to free user data (called when SCIP is exiting) */
52 static
53 SCIP_DECL_EVENTFREE(eventFreeSync)
54 { /*lint --e{715}*/
55  SCIP_EVENTHDLRDATA* eventhdlrdata;
56 
57  assert(scip != NULL);
58  assert(eventhdlr != NULL);
59  assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0);
60 
61  eventhdlrdata = SCIPeventhdlrGetData(eventhdlr);
62  assert(eventhdlrdata != NULL);
63 
64  SCIPfreeBlockMemory(scip, &eventhdlrdata);
65 
66  SCIPeventhdlrSetData(eventhdlr, NULL);
67 
68  return SCIP_OKAY;
69 }
70 
71 
72 
73 /** initialization method of event handler (called after problem was transformed) */
74 static
75 SCIP_DECL_EVENTINIT(eventInitSync)
76 { /*lint --e{715}*/
77  SCIP_EVENTHDLRDATA* eventhdlrdata;
78  SCIP_SYNCSTORE* syncstore;
79 
80  assert(scip != NULL);
81  assert(eventhdlr != NULL);
82  assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0);
83 
84  eventhdlrdata = SCIPeventhdlrGetData(eventhdlr);
85  assert(eventhdlrdata != NULL);
86 
87  syncstore = SCIPgetSyncstore(scip);
88  assert(syncstore != NULL);
89 
90  if( eventhdlrdata->filterpos < 0 && SCIPsyncstoreIsInitialized(syncstore) )
91  {
92  /* notify SCIP that your event handler wants to react on synchronization events */
93  SCIP_CALL( SCIPcatchEvent(scip, SCIP_EVENTTYPE_SYNC, eventhdlr, NULL, &eventhdlrdata->filterpos) );
94  }
95 
96  return SCIP_OKAY;
97 }
98 
99 /** deinitialization method of event handler (called before transformed problem is freed) */
100 static
101 SCIP_DECL_EVENTEXIT(eventExitSync)
102 { /*lint --e{715}*/
103  SCIP_EVENTHDLRDATA* eventhdlrdata;
104 
105  assert(scip != NULL);
106  assert(eventhdlr != NULL);
107  assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0);
108 
109  eventhdlrdata = SCIPeventhdlrGetData(eventhdlr);
110  assert(eventhdlrdata != NULL);
111 
112  /* notify SCIP that your event handler wants to drop the event type synchronization found */
113  if( eventhdlrdata->filterpos >= 0 )
114  {
115  SCIP_CALL( SCIPdropEvent(scip, SCIP_EVENTTYPE_SYNC, eventhdlr, NULL, eventhdlrdata->filterpos) );
116  eventhdlrdata->filterpos = -1;
117  }
118 
119  return SCIP_OKAY;
120 }
121 
122 /** execution method of event handler */
123 static
124 SCIP_DECL_EVENTEXEC(eventExecSync)
125 { /*lint --e{715}*/
126  assert(eventhdlr != NULL);
127  assert(strcmp(SCIPeventhdlrGetName(eventhdlr), EVENTHDLR_NAME) == 0);
128  assert(event != NULL);
129  assert(scip != NULL);
130 
132 
133  return SCIP_OKAY;
134 }
135 
136 
137 /** includes event handler for synchronization found */
138 static
140  SCIP* scip /**< SCIP data structure */
141  )
142 {
143  SCIP_EVENTHDLR* eventhdlr;
144  SCIP_EVENTHDLRDATA* eventhdlrdata;
145 
146  SCIP_CALL( SCIPallocBlockMemory(scip, &eventhdlrdata) );
147  eventhdlrdata->filterpos = -1;
148 
149  /* create event handler for events on watched variables */
150  SCIP_CALL( SCIPincludeEventhdlrBasic(scip, &eventhdlr, EVENTHDLR_NAME, EVENTHDLR_DESC, eventExecSync, eventhdlrdata) );
151  assert(eventhdlr != NULL);
152 
153  SCIP_CALL( SCIPsetEventhdlrFree(scip, eventhdlr, eventFreeSync) );
154  SCIP_CALL( SCIPsetEventhdlrInit(scip, eventhdlr, eventInitSync) );
155  SCIP_CALL( SCIPsetEventhdlrExit(scip, eventhdlr, eventExitSync) );
156 
157  return SCIP_OKAY;
158 }
159 
160 /** data for a concurrent solver type */
161 struct SCIP_ConcSolverTypeData
162 {
163  SCIP_Bool loademphasis; /**< should emphasis settings be loaded whe ncreatig an instance of this concurrent solver */
164  SCIP_PARAMEMPHASIS emphasis; /**< parameter emphasis that will be loaded if loademphasis is true */
165 };
166 
167 /** data for a concurrent solver */
168 struct SCIP_ConcSolverData
169 {
170  SCIP* solverscip; /**< the concurrent solvers private scip datastructure */
171  SCIP_VAR** vars; /**< array of variables in the order of the main SCIP's variable array */
172  int nvars; /**< number of variables in the above arrays */
173 };
174 
175 /** Disable dual reductions that might cut off optimal solutions. Although they keep at least
176  * one optimal solution intact, communicating these bounds may cut off all optimal solutions,
177  * if different optimal solutions were kept in different concurrent solvers. */
178 static
180  SCIP* scip /**< SCIP datastructure */
181  )
182 {
183  SCIP_Bool commvarbnds;
184 
185  SCIP_CALL( SCIPgetBoolParam(scip, "concurrent/commvarbnds", &commvarbnds) );
186 
187  if( !commvarbnds )
188  return SCIP_OKAY;
189 
190  SCIP_CALL( SCIPsetBoolParam(scip, "misc/allowdualreds", FALSE) );
191  return SCIP_OKAY;
192 }
193 
194 /** sets the child selection rule based on the index of the concurrent solver */
195 static
197  SCIP_CONCSOLVER* concsolver /**< the concurrent solver */
198  )
199 {
200  SCIP_CONCSOLVERDATA* data;
201  static char childsel[] = { 'h', 'i', 'p', 'r', 'l', 'd', 'u' };
202 
203  assert(concsolver != NULL);
204 
205  data = SCIPconcsolverGetData(concsolver);
206  assert(data != NULL);
207 
208  SCIP_CALL( SCIPsetCharParam(data->solverscip, "nodeselection/childsel", childsel[SCIPconcsolverGetIdx(concsolver) % 7]) );
209 
210  return SCIP_OKAY;
211 }
212 
213 /** initialize the concurrent SCIP solver, i.e. setup the copy of the problem and the
214  * mapping of the variables */
215 static
217  SCIP* scip, /**< the main SCIP instance */
218  SCIP_CONCSOLVER* concsolver /**< the concurrent solver to set up */
219  )
220 {
221  int i;
222  SCIP_VAR** vars;
223  SCIP_Bool valid;
224  SCIP_HASHMAP* varmapfw;
225  SCIP_CONCSOLVERDATA* data;
226  int* varperm;
227 
228  assert(scip != NULL);
229  assert(concsolver != NULL);
230 
231  data = SCIPconcsolverGetData(concsolver);
232  assert(data != NULL);
233 
234  data->nvars = SCIPgetNVars(scip);
235  vars = SCIPgetVars(scip);
236 
237  /* create the concurrent solver's SCIP instance and set up the problem */
238  SCIP_CALL( SCIPcreate(&data->solverscip) );
239  SCIP_CALL( SCIPhashmapCreate(&varmapfw, SCIPblkmem(data->solverscip), data->nvars) );
240  SCIP_CALL( SCIPcopy(scip, data->solverscip, varmapfw, NULL, SCIPconcsolverGetName(concsolver), TRUE, FALSE, FALSE, &valid) );
241  assert(valid);
242 
243  /* allocate memory for the arrays to store the variable mapping */
244  SCIP_CALL( SCIPallocBlockMemoryArray(data->solverscip, &data->vars, data->nvars) );
245  SCIP_CALL( SCIPallocBufferArray(data->solverscip, &varperm, data->nvars) );
246 
247  /* set up the arrays for the variable mapping */
248  for( i = 0; i < data->nvars; i++ )
249  {
250  SCIP_VAR* var;
251  var = (SCIP_VAR*) SCIPhashmapGetImage(varmapfw, vars[i]);
252  varperm[SCIPvarGetIndex(var)] = i;
253  data->vars[i] = var;
254  }
255 
256  /* create the concurrent data structure for the concurrent solver's SCIP */
257  /* this assert fails on check/instances/Orbitope/packorb_1-FullIns_3.cip
258  * assert(SCIPgetNOrigVars(data->solverscip) == data->nvars);
259  * also fails on check/instances/Orbitope/partorb_1-FullIns_3.cip
260  * TODO: test if this leads to any problems
261  */
262  SCIP_CALL( SCIPcreateConcurrent(data->solverscip, concsolver, varperm) );
263  SCIPfreeBufferArray(data->solverscip, &varperm);
264 
265  /* free the hashmap */
266  SCIPhashmapFree(&varmapfw);
267 
268  return SCIP_OKAY;
269 }
270 
271 /* creates an instance of a concurrent SCIP solver */
272 static
273 SCIP_DECL_CONCSOLVERCREATEINST(concsolverScipCreateInstance)
274 {
275  SCIP_CONCSOLVERDATA* data;
276  SCIP_CONCSOLVERTYPEDATA* typedata;
277  char* prefix;
278  char filename[SCIP_MAXSTRLEN];
279  SCIP_Bool changechildsel;
280 
281  assert(scip != NULL);
282  assert(concsolvertype != NULL);
283  assert(concsolver != NULL);
284 
285  typedata = SCIPconcsolverTypeGetData(concsolvertype);
286 
287  SCIP_ALLOC( BMSallocMemory(&data) );
288  SCIPconcsolverSetData(concsolver, data);
289 
290  SCIP_CALL( initConcsolver(scip, concsolver) );
291 
292  /* check if emphasis setting should be loaded */
293  if( typedata->loademphasis )
294  {
295  SCIP_PARAM** params;
296  SCIP_PARAM** fixedparams;
297  int nparams;
298  int nfixedparams;
299  int i;
300 
301  params = SCIPgetParams(data->solverscip);
302  nparams = SCIPgetNParams(data->solverscip);
303  SCIP_CALL( SCIPallocBufferArray(data->solverscip, &fixedparams, nparams) );
304  nfixedparams = 0;
305 
306  /* fix certain parameters before loading emphasis to avoid setting them to default values */
307  for( i = 0; i < nparams; ++i )
308  {
309  const char* paramname;
310 
311  paramname = SCIPparamGetName(params[i]);
312 
313  if( strncmp(paramname, "limits/", 7) == 0 ||
314  strncmp(paramname, "numerics/", 9) == 0 ||
315  strncmp(paramname, "memory/", 7) == 0 ||
316  strncmp(paramname, "concurrent/sync/", 16) == 0 ||
317  strncmp(paramname, "heuristics/sync/", 16) == 0 ||
318  strncmp(paramname, "propagating/sync/", 17) == 0 )
319  {
320  fixedparams[nfixedparams++] = params[i];
321  SCIP_CALL( SCIPfixParam(data->solverscip, paramname) );
322  }
323  }
324 
325  SCIP_CALL( SCIPsetEmphasis(data->solverscip, typedata->emphasis, TRUE) );
326 
327  for( i = 0; i < nfixedparams; ++i )
328  SCIP_CALL( SCIPunfixParam(data->solverscip, SCIPparamGetName(fixedparams[i])) );
329 
330  SCIPfreeBufferArray(data->solverscip, &fixedparams);
331  }
332 
333  /* load settings file if it exists */
334  SCIP_CALL( SCIPgetStringParam(scip, "concurrent/paramsetprefix", &prefix) );
335  (void) SCIPsnprintf(filename, SCIP_MAXSTRLEN, "%s%s.set", prefix, SCIPconcsolverGetName(concsolver));
336 
337  if( SCIPfileExists(filename) )
338  {
339  /* load settings file and print info message */
340  SCIPinfoMessage(scip, NULL, "reading parameter file <%s> for concurrent solver <%s>\n", filename, SCIPconcsolverGetName(concsolver));
341  SCIP_CALL( SCIPreadParams(data->solverscip, filename) );
342  }
343  else
344  {
345  /* print message about missing setting files only in verblevel full */
346  SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "skipping non existent parameter file <%s> for concurrent solver <%s>\n",
347  filename, SCIPconcsolverGetName(concsolver));
348  }
349 
350  /* include eventhandler for synchronization */
351  SCIP_CALL( includeEventHdlrSync(data->solverscip) );
352 
353  /* disable output for subscip */
354  SCIP_CALL( SCIPsetIntParam(data->solverscip, "display/verblevel", 0) );
355 
356  /* use wall clock time in subscips */
357  SCIP_CALL( SCIPsetIntParam(data->solverscip, "timing/clocktype", (int)SCIP_CLOCKTYPE_WALL) );
358 
359  /* don't catch ctrlc since already caught in main scip */
360  SCIP_CALL( SCIPsetBoolParam(data->solverscip, "misc/catchctrlc", FALSE) );
361 
362  /* one solver can do all dual reductions and share them with the other solvers */
363  if( SCIPconcsolverGetIdx(concsolver) != 0 )
364  {
365  SCIP_CALL( disableConflictingDualReductions(data->solverscip) );
366  }
367 
368  /* set different child selection rules if corresponding parameter is TRUE */
369  SCIP_CALL( SCIPgetBoolParam(scip, "concurrent/changechildsel", &changechildsel) );
370  if( changechildsel )
371  {
372  SCIP_CALL( setChildSelRule(concsolver) );
373  }
374 
375  return SCIP_OKAY;
376 }
377 
378 /** destroys an instance of a concurrent SCIP solver */
379 static
380 SCIP_DECL_CONCSOLVERDESTROYINST(concsolverScipDestroyInstance)
381 {
382  SCIP_CONCSOLVERDATA* data;
383 
384  assert(concsolver != NULL);
385 
386  data = SCIPconcsolverGetData(concsolver);
387  assert(data != NULL);
388  assert(data->solverscip != NULL);
389 
390  /* free the array with the variable mapping */
391  SCIPfreeBlockMemoryArray(data->solverscip, &data->vars, data->nvars);
392 
393  /* free subscip */
394  SCIP_CALL( SCIPfree(&data->solverscip) );
395  BMSfreeMemory(&data);
396  SCIPconcsolverSetData(concsolver, NULL);
397 
398  return SCIP_OKAY;
399 }
400 
401 /** frees the data of a concurrent solver type */
402 static
403 SCIP_DECL_CONCSOLVERTYPEFREEDATA(concsolverTypeScipFreeData)
404 {
405  BMSfreeMemory(data);
406 }
407 
408 /** initializes the random and permutation seeds with the given one
409  * and enables permutation of constraints and variables
410  */
411 static
412 SCIP_DECL_CONCSOLVERINITSEEDS(concsolverScipInitSeeds)
413 {
414  SCIP_CONCSOLVERDATA* data;
415 
416  assert(concsolver != NULL);
417 
418  data = SCIPconcsolverGetData(concsolver);
419  assert(data != NULL);
420 
421  SCIPinfoMessage(data->solverscip, NULL, "initializing seeds to %d in concurrent solver '%s'\n", (int) seed, SCIPconcsolverGetName(concsolver));
422 
423  SCIP_CALL( SCIPsetIntParam(data->solverscip, "randomization/randomseedshift", (int) seed) );
424  SCIP_CALL( SCIPsetIntParam(data->solverscip, "randomization/permutationseed", (int) seed) );
425  SCIP_CALL( SCIPsetBoolParam(data->solverscip, "randomization/permutevars", TRUE) );
426  SCIP_CALL( SCIPsetBoolParam(data->solverscip, "randomization/permuteconss", TRUE) );
427 
428  return SCIP_OKAY;
429 }
430 
431 /** installs the solving status of this concurrent solver and the solving statistics
432  * into the given SCIP instance
433  */
434 static
435 SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(concsolverGetSolvingData)
436 {
437  SCIP_CONCSOLVERDATA* data;
438  SCIP_VAR** vars;
439  int nvars;
440  int nsols;
441  SCIP_SOL** sols;
442  SCIP_Real* solvals;
443  SCIP_HEUR* heur;
444  int i;
445 
446  assert(concsolver != NULL);
447 
448  data = SCIPconcsolverGetData(concsolver);
449  assert(data != NULL);
450  assert(data->solverscip != NULL);
451 
452  assert(scip != NULL);
453  vars = SCIPgetVars(scip);
454  nvars = SCIPgetNVars(scip);
455 
456  nsols = SCIPgetNSols(data->solverscip);
457  sols = SCIPgetSols(data->solverscip);
458 
459  assert(nvars == data->nvars);
460 
461  /* allocate buffer array used for translating the solution to the given SCIP */
462  SCIP_CALL( SCIPallocBufferArray(scip, &solvals, nvars) );
463 
464  /* add the solutions to the given SCIP */
465  for( i = 0; i < nsols; ++i )
466  {
467  SCIP_SOL* sol;
468  SCIP_Bool stored;
469  SCIP_CALL( SCIPgetSolVals(data->solverscip, sols[i], nvars, data->vars, solvals) );
470 
471  heur = SCIPsolGetHeur(sols[i]);
472 
473  if( heur != NULL )
474  heur = SCIPfindHeur(scip, SCIPheurGetName(heur));
475 
476  SCIP_CALL( SCIPcreateSol(scip, &sol, heur) );
477  SCIP_CALL( SCIPsetSolVals(scip, sol, nvars, vars, solvals) );
478 
479  SCIP_CALL( SCIPcopySolStats(sols[i], sol) );
480 
481  SCIP_CALL( SCIPaddSolFree(scip, &sol, &stored) );
482  }
483 
484  /* free the buffer array */
485  SCIPfreeBufferArray(scip, &solvals);
486 
487  /* copy solving statistics and status from the solver SCIP to the given SCIP */
488  SCIP_CALL( SCIPcopyConcurrentSolvingStats(data->solverscip, scip) );
489 
490  return SCIP_OKAY;
491 }
492 
493 /** start solving the problem until the solving reaches a limit, gets interrupted, or
494  * just finished successfully
495  */
496 static
497 SCIP_DECL_CONCSOLVEREXEC(concsolverScipExec)
498 {
499  SCIP_CONCSOLVERDATA* data;
500  assert(concsolver != NULL);
501 
502  data = SCIPconcsolverGetData(concsolver);
503  assert(data != NULL);
504 
505  /* print info message that solving has started */
506  SCIPinfoMessage(data->solverscip, NULL, "starting solve in concurrent solver '%s'\n", SCIPconcsolverGetName(concsolver));
507 
508  /* solve */
509  SCIP_CALL( SCIPsolve(data->solverscip) );
510 
511  /* print info message with status */
512  SCIPinfoMessage(data->solverscip, NULL, "concurrent solver '%s' stopped with status ", SCIPconcsolverGetName(concsolver));
513  SCIP_CALL( SCIPprintStatus(data->solverscip, NULL) );
514  SCIPinfoMessage(data->solverscip, NULL, "\n");
515 
516  /* set solving statistics */
517  *solvingtime = SCIPgetSolvingTime(data->solverscip);
518  *nlpiterations = SCIPgetNLPIterations(data->solverscip);
519  *nnodes = SCIPgetNNodes(data->solverscip);
520 
521  return SCIP_OKAY;
522 }
523 
524 /** stops the concurrent solver as soon as possible */
525 static
526 SCIP_DECL_CONCSOLVERSTOP(concsolverScipStop)
527 {
528  SCIP_CONCSOLVERDATA* data;
529  assert(concsolver != NULL);
530 
531  data = SCIPconcsolverGetData(concsolver);
532  assert(data != NULL);
533 
534  SCIP_CALL( SCIPinterruptSolve(data->solverscip) );
535 
536  return SCIP_OKAY;
537 }
538 
539 /** writes new solutions and global boundchanges to the iven synchronization data */
540 static
541 SCIP_DECL_CONCSOLVERSYNCWRITE(concsolverScipSyncWrite)
542 {
543  int i;
544  int nsols;
545  SCIP_SOL** sols;
546  SCIP_CONCSOLVERDATA* data;
547  SCIP_BOUNDSTORE* boundstore;
548  int concsolverid;
549  SCIP_STATUS solverstatus;
550 
551 
552  data = SCIPconcsolverGetData(concsolver);
553  assert(data != NULL);
554  concsolverid = SCIPconcsolverGetIdx(concsolver);
555  solverstatus = SCIPgetStatus(data->solverscip);
556 
557  SCIPsyncdataSetStatus(syncdata, solverstatus, concsolverid);
558  SCIPsyncdataSetLowerbound(syncdata, SCIPgetDualbound(data->solverscip));
559  SCIPsyncdataSetUpperbound(syncdata, SCIPgetPrimalbound(data->solverscip));
560 
561  *nsolsshared = 0;
562 
563  if( SCIPsyncdataGetStatus(syncdata) != SCIP_STATUS_UNKNOWN )
564  return SCIP_OKAY;
565 
566  SCIPdebugMessage("syncing in concurrent solver %s\n", SCIPconcsolverGetName(concsolver));
567 
568  /* consider at most maxcandsols many solutions, and since
569  * the solution array is sorted, we will cosider the best
570  * solutions
571  */
572  nsols = SCIPgetNSols(data->solverscip);
573  nsols = MIN(nsols, maxcandsols);
574  sols = SCIPgetSols(data->solverscip);
575 
576  for( i = 0; i < nsols; ++i )
577  {
578  if( SCIPIsConcurrentSolNew(data->solverscip, sols[i]) )
579  {
580  SCIP_Real solobj;
581  SCIP_Real* solvals;
582 
583  solobj = SCIPgetSolOrigObj(data->solverscip, sols[i]);
584 
585  SCIPdebugMessage("adding sol to spi in concurrent solver %s\n", SCIPconcsolverGetName(concsolver));
586  SCIPsyncdataGetSolutionBuffer(syncstore, syncdata, solobj, concsolverid, &solvals);
587 
588  /* if syncstore has no place for this solution we can stop since the next solution will have
589  * a worse objective value and thus won't be accepted either
590  */
591  if( solvals == NULL )
592  break;
593 
594  ++(*nsolsshared);
595  SCIP_CALL( SCIPgetSolVals(data->solverscip, sols[i], data->nvars, data->vars, solvals) );
596 
597  /* if we have added the maximum number of solutions we can also stop */
598  if( *nsolsshared == maxsharedsols )
599  break;
600  }
601  }
602 
603  boundstore = SCIPgetConcurrentGlobalBoundChanges(data->solverscip);
604 
605  if( boundstore != NULL )
606  SCIP_CALL( SCIPsyncdataAddBoundChanges(syncstore, syncdata, boundstore) );
607 
608  SCIPsyncdataAddMemTotal(syncdata, SCIPgetMemTotal(data->solverscip));
609 
610  return SCIP_OKAY;
611 }
612 
613 /** reads the solutions and bounds from the given synchronization data */
614 static
615 SCIP_DECL_CONCSOLVERSYNCREAD(concsolverScipSyncRead)
616 { /*lint --e{715}*/
617  int i;
618  int nsols;
619  SCIP_Real** solvals;
620  SCIP_CONCSOLVERDATA* data;
621  SCIP_BOUNDSTORE* boundstore;
622  int* concsolverids;
623  int concsolverid;
624  int nbndchgs;
625 
626  data = SCIPconcsolverGetData(concsolver);
627  assert(data != NULL);
628 
629  concsolverid = SCIPconcsolverGetIdx(concsolver);
630 
631  /* get solutions from synchronization data */
632  SCIPsyncdataGetSolutions(syncdata, &solvals, &concsolverids, &nsols);
633  *nsolsrecvd = 0;
634 
635  for( i = 0; i < nsols; ++i )
636  {
637  SCIP_SOL* newsol;
638 
639  /* do not add own solutions */
640  if( concsolverids[i] == concsolverid )
641  continue;
642 
643  /* solution is from other solver so translate to this solvers variable space
644  * and add it to the SCIP
645  */
646  ++(*nsolsrecvd);
647  SCIP_CALL( SCIPcreateOrigSol(data->solverscip, &newsol, NULL) );
648 
649  SCIP_CALL( SCIPsetSolVals(data->solverscip, newsol, data->nvars, data->vars, solvals[i]) );
650  SCIPdebugMessage("adding solution in concurrent solver %s\n", SCIPconcsolverGetName(concsolver));
651  SCIP_CALL( SCIPaddConcurrentSol(data->solverscip, newsol) );
652  }
653 
654  /* get bound changes from the synchronization data and add it to this
655  * concurrent solvers SCIP
656  */
657  *ntighterbnds = 0;
658  *ntighterintbnds = 0;
659  boundstore = SCIPsyncdataGetBoundChgs(syncdata);
660  nbndchgs = SCIPboundstoreGetNChgs(boundstore);
661 
662  for( i = 0; i < nbndchgs; ++i )
663  {
664  SCIP_VAR* var;
665  SCIP_BOUNDTYPE boundtype;
666  SCIP_Real newbound;
667 
668  var = data->vars[SCIPboundstoreGetChgVaridx(boundstore, i)];
669  boundtype = SCIPboundstoreGetChgType(boundstore, i);
670  newbound = SCIPboundstoreGetChgVal(boundstore, i);
671 
672  SCIP_CALL( SCIPvarGetProbvarBound(&var, &newbound, &boundtype) );
673 
674  /* cannot change bounds of multi-aggregated variables so dont pass this bound-change to the propagator */
676  return SCIP_OKAY;
677 
678  /* if bound is not better than also don't pass this bound to the propagator and
679  * don't waste memory for storing this boundchange
680  */
681  if( boundtype == SCIP_BOUNDTYPE_LOWER && SCIPisGE(data->solverscip, SCIPvarGetLbGlobal(var), newbound) )
682  return SCIP_OKAY;
683 
684  if( boundtype == SCIP_BOUNDTYPE_UPPER && SCIPisLE(data->solverscip, SCIPvarGetUbGlobal(var), newbound) )
685  return SCIP_OKAY;
686 
687  /* bound is better so incremented counters for statistics and pass it to the sync propagator */
688  ++(*ntighterbnds);
689 
691  ++(*ntighterintbnds);
692 
693  SCIP_CALL( SCIPaddConcurrentBndchg(data->solverscip, var, newbound, boundtype) );
694  }
695 
696  return SCIP_OKAY;
697 }
698 
699 
700 /** creates the concurrent SCIP solver plugins and includes them in SCIP */
702  SCIP* scip /**< SCIP datastructure */
703  )
704 {
706  assert(scip != NULL);
707 
708  /* include concurrent solvers for SCIP for all emphasis settings and without an emphasis setting.
709  * For the SCIP without an emphasis setting we set the default preferred priority to 1 and for the other types to 0
710  * so that the default concurent solve will use multiple SCIP's using settings as specified by the user in the main SCIP
711  */
712  SCIP_CALL( SCIPallocMemory(scip, &data) );
713  data->loademphasis = FALSE;
714  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip", 1.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
715  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
716  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
717 
718  SCIP_CALL( SCIPallocMemory(scip, &data) );
719  data->loademphasis = TRUE;
720  data->emphasis = SCIP_PARAMEMPHASIS_DEFAULT;
721  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-default", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
722  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
723  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
724 
725  SCIP_CALL( SCIPallocMemory(scip, &data) );
726  data->loademphasis = TRUE;
727  data->emphasis = SCIP_PARAMEMPHASIS_CPSOLVER;
728  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-cpsolver", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
729  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
730  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
731 
732  SCIP_CALL( SCIPallocMemory(scip, &data) );
733  data->loademphasis = TRUE;
734  data->emphasis = SCIP_PARAMEMPHASIS_EASYCIP;
735  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-easycip", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
736  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
737  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
738 
739  SCIP_CALL( SCIPallocMemory(scip, &data) );
740  data->loademphasis = TRUE;
741  data->emphasis = SCIP_PARAMEMPHASIS_FEASIBILITY;
742  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-feas", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
743  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
744  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
745 
746  SCIP_CALL( SCIPallocMemory(scip, &data) );
747  data->loademphasis = TRUE;
748  data->emphasis = SCIP_PARAMEMPHASIS_HARDLP;
749  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-hardlp", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
750  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
751  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
752 
753  SCIP_CALL( SCIPallocMemory(scip, &data) );
754  data->loademphasis = TRUE;
755  data->emphasis = SCIP_PARAMEMPHASIS_OPTIMALITY;
756  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-opti", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
757  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
758  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
759 
760  SCIP_CALL( SCIPallocMemory(scip, &data) );
761  data->loademphasis = TRUE;
762  data->emphasis = SCIP_PARAMEMPHASIS_COUNTER;
763  SCIP_CALL( SCIPincludeConcsolverType(scip, "scip-counter", 0.0, concsolverScipCreateInstance, concsolverScipDestroyInstance, concsolverScipInitSeeds,
764  concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
765  concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
766 
767  return SCIP_OKAY;
768 }
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
Definition: scip.h:22604
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_PARAM ** SCIPgetParams(SCIP *scip)
Definition: scip.c:5178
SCIP_RETCODE SCIPgetStringParam(SCIP *scip, const char *name, char **value)
Definition: scip.c:4527
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
Definition: scip.c:46300
struct SCIP_ConcSolverTypeData SCIP_CONCSOLVERTYPEDATA
#define SCIPallocBlockMemoryArray(scip, ptr, num)
Definition: scip.h:22587
static SCIP_DECL_CONCSOLVEREXEC(concsolverScipExec)
static SCIP_RETCODE includeEventHdlrSync(SCIP *scip)
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
Definition: scip.c:42327
static SCIP_DECL_EVENTEXIT(eventExitSync)
int SCIPboundstoreGetNChgs(SCIP_BOUNDSTORE *boundstore)
Definition: boundstore.c:188
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
Definition: scip.c:43396
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:17276
static SCIP_DECL_CONCSOLVERTYPEFREEDATA(concsolverTypeScipFreeData)
#define SCIP_MAXSTRLEN
Definition: def.h:259
SCIP_STATUS SCIPsyncdataGetStatus(SCIP_SYNCDATA *syncdata)
Definition: syncstore.c:505
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
Definition: scip.c:40584
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
Definition: scip.c:8685
static SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(concsolverGetSolvingData)
void SCIPsyncdataSetUpperbound(SCIP_SYNCDATA *syncdata, SCIP_Real upperbound)
Definition: syncstore.c:676
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47009
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: scip.c:8611
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:138
SCIP_SOL ** SCIPgetSols(SCIP *scip)
Definition: scip.c:39826
#define FALSE
Definition: def.h:64
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
Definition: misc.c:2793
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:278
char * SCIPconcsolverGetName(SCIP_CONCSOLVER *concsolver)
Definition: concsolver.c:246
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10011
#define TRUE
Definition: def.h:63
void SCIPsyncdataSetLowerbound(SCIP_SYNCDATA *syncdata, SCIP_Real lowerbound)
Definition: syncstore.c:687
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
const char * SCIPparamGetName(SCIP_PARAM *param)
Definition: paramset.c:641
datastructures for concurrent solvers
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip.h:22602
#define SCIPdebugMessage
Definition: pub_message.h:77
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:2931
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip.h:22632
SCIP_RETCODE SCIPcreate(SCIP **scip)
Definition: scip.c:748
#define BMSfreeMemory(ptr)
Definition: memory.h:127
#define SCIPallocBlockMemory(scip, ptr)
Definition: scip.h:22585
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip.c:1343
SCIP_RETCODE SCIPcreateOrigSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip.c:38109
void SCIPconcsolverSetData(SCIP_CONCSOLVER *concsolver, SCIP_CONCSOLVERDATA *data)
Definition: concsolver.c:235
static SCIP_DECL_CONCSOLVERSYNCWRITE(concsolverScipSyncWrite)
static SCIP_RETCODE initConcsolver(SCIP *scip, SCIP_CONCSOLVER *concsolver)
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: event.c:298
SCIP_Bool SCIPfileExists(const char *filename)
Definition: misc.c:10184
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition: var.c:17286
void SCIPsyncdataGetSolutionBuffer(SCIP_SYNCSTORE *syncstore, SCIP_SYNCDATA *syncdata, SCIP_Real solobj, int ownerid, SCIP_Real **buffer)
Definition: syncstore.c:700
SCIP_RETCODE SCIPincludeConcsolverType(SCIP *scip, const char *name, SCIP_Real prefpriodefault, SCIP_DECL_CONCSOLVERCREATEINST((*concsolvercreateinst)), SCIP_DECL_CONCSOLVERDESTROYINST((*concsolverdestroyinst)), SCIP_DECL_CONCSOLVERINITSEEDS((*concsolverinitseeds)), SCIP_DECL_CONCSOLVEREXEC((*concsolverexec)), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA((*concsolvercopysolvdata)), SCIP_DECL_CONCSOLVERSTOP((*concsolverstop)), SCIP_DECL_CONCSOLVERSYNCWRITE((*concsolversyncwrite)), SCIP_DECL_CONCSOLVERSYNCREAD((*concsolversyncread)), SCIP_DECL_CONCSOLVERTYPEFREEDATA((*concsolvertypefreedata)), SCIP_CONCSOLVERTYPEDATA *data)
Definition: scip.c:7948
int SCIPboundstoreGetChgVaridx(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:152
implementation of concurrent solver interface for SCIP
SCIP_RETCODE SCIPsolve(SCIP *scip)
Definition: scip.c:16109
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition: heur.c:1198
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
Definition: scip.c:8225
#define SCIPallocMemory(scip, ptr)
Definition: scip.h:22551
SCIP_RETCODE SCIPaddConcurrentBndchg(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
Definition: concurrent.c:377
SCIP_Bool SCIPsyncstoreIsInitialized(SCIP_SYNCSTORE *syncstore)
Definition: syncstore.c:776
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
Definition: scip.c:8657
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip.c:38942
SCIP_Real SCIPgetDualbound(SCIP *scip)
Definition: scip.c:43250
void SCIPsyncdataSetStatus(SCIP_SYNCDATA *syncdata, SCIP_STATUS status, int solverid)
Definition: syncstore.c:633
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
Definition: scip.c:4630
SCIP_STATUS SCIPgetStatus(SCIP *scip)
Definition: scip.c:928
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition: scip.c:46725
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
Definition: scip.c:8671
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
Definition: misc.c:2826
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip.c:4432
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
Definition: sol.c:2548
the interface of the boundstore structure
SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)
Definition: scip.c:4567
#define SCIP_CALL(x)
Definition: def.h:350
SCIP_RETCODE SCIPprintStatus(SCIP *scip, FILE *file)
Definition: scip.c:951
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
Definition: scip.c:5061
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip.c:1360
SCIP_RETCODE SCIPaddConcurrentSol(SCIP *scip, SCIP_SOL *sol)
Definition: concurrent.c:362
static SCIP_DECL_CONCSOLVERSTOP(concsolverScipStop)
static SCIP_RETCODE disableConflictingDualReductions(SCIP *scip)
the function declarations for the synchronization store
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip.h:22620
static SCIP_DECL_EVENTFREE(eventFreeSync)
#define SCIP_Bool
Definition: def.h:61
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip.c:41152
void SCIPsyncdataAddMemTotal(SCIP_SYNCDATA *syncdata, SCIP_Longint memtotal)
Definition: syncstore.c:665
static SCIP_DECL_EVENTEXEC(eventExecSync)
enum SCIP_Status SCIP_STATUS
Definition: type_stat.h:57
SCIP_SYNCSTORE * SCIPgetSyncstore(SCIP *scip)
Definition: scip.c:42011
static SCIP_DECL_CONCSOLVERSYNCREAD(concsolverScipSyncRead)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
Definition: scip.c:4688
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip.c:41186
int SCIPgetNSols(SCIP *scip)
Definition: scip.c:39777
SCIP_RETCODE SCIPcopyConcurrentSolvingStats(SCIP *source, SCIP *target)
Definition: concurrent.c:526
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
Definition: scip.c:38988
SCIP_RETCODE SCIPfixParam(SCIP *scip, const char *name)
Definition: scip.c:4549
SCIP_CONCSOLVERDATA * SCIPconcsolverGetData(SCIP_CONCSOLVER *concsolver)
Definition: concsolver.c:225
helper functions for concurrent scip solvers
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)
Definition: scip.c:4862
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
Definition: var.c:11879
int SCIPgetNVars(SCIP *scip)
Definition: scip.c:11806
enum SCIP_ParamEmphasis SCIP_PARAMEMPHASIS
Definition: type_paramset.h:73
static SCIP_DECL_CONCSOLVERCREATEINST(concsolverScipCreateInstance)
SCIP_RETCODE SCIPcopySolStats(SCIP_SOL *source, SCIP_SOL *target)
Definition: concurrent.c:395
int SCIPconcsolverGetIdx(SCIP_CONCSOLVER *concsolver)
Definition: concsolver.c:568
SCIP_RETCODE SCIPincludeConcurrentScipSolvers(SCIP *scip)
SCIP_Longint SCIPgetMemTotal(SCIP *scip)
Definition: scip.c:46781
SCIP_Real SCIPboundstoreGetChgVal(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:176
SCIP_BOUNDSTORE * SCIPsyncdataGetBoundChgs(SCIP_SYNCDATA *syncdata)
Definition: syncstore.c:609
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
Definition: scip.c:4952
static SCIP_DECL_CONCSOLVERDESTROYINST(concsolverScipDestroyInstance)
SCIP_RETCODE SCIPcopy(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
Definition: scip.c:3795
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip.c:11761
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
Definition: var.c:16781
#define EVENTHDLR_NAME
#define SCIP_Real
Definition: def.h:149
#define BMSallocMemory(ptr)
Definition: memory.h:101
SCIP_Bool SCIPIsConcurrentSolNew(SCIP *scip, SCIP_SOL *sol)
Definition: concurrent.c:429
int SCIPvarGetIndex(SCIP_VAR *var)
Definition: var.c:16959
static SCIP_RETCODE setChildSelRule(SCIP_CONCSOLVER *concsolver)
SCIP_BOUNDSTORE * SCIPgetConcurrentGlobalBoundChanges(SCIP *scip)
Definition: concurrent.c:442
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
Definition: var.c:16827
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip.c:38807
static SCIP_DECL_EVENTINIT(eventInitSync)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:46983
SCIP_CONCSOLVERTYPEDATA * SCIPconcsolverTypeGetData(SCIP_CONCSOLVERTYPE *concsolvertype)
Definition: concsolver.c:115
#define nnodes
Definition: gastrans.c:65
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
Definition: scip.c:17318
#define EVENTHDLR_DESC
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:288
#define SCIP_EVENTTYPE_SYNC
Definition: type_event.h:100
SCIP_BOUNDTYPE SCIPboundstoreGetChgType(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:164
#define SCIP_ALLOC(x)
Definition: def.h:361
SCIP_Longint SCIPgetNNodes(SCIP *scip)
Definition: scip.c:42127
int SCIPgetNParams(SCIP *scip)
Definition: scip.c:5192
static SCIP_DECL_CONCSOLVERINITSEEDS(concsolverScipInitSeeds)
SCIP_RETCODE SCIPsyncdataAddBoundChanges(SCIP_SYNCSTORE *syncstore, SCIP_SYNCDATA *syncdata, SCIP_BOUNDSTORE *boundstore)
Definition: syncstore.c:759
SCIP_RETCODE SCIPsynchronize(SCIP *scip)
Definition: concurrent.c:236
void SCIPsyncdataGetSolutions(SCIP_SYNCDATA *syncdata, SCIP_Real ***solvalues, int **solowner, int *nsols)
Definition: syncstore.c:591
struct SCIP_ConcSolverData SCIP_CONCSOLVERDATA
SCIP_RETCODE SCIPfree(SCIP **scip)
Definition: scip.c:780
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip.c:37872
SCIP_RETCODE SCIPcreateConcurrent(SCIP *scip, SCIP_CONCSOLVER *concsolver, int *varperm)
Definition: concurrent.c:48