Scippy

SCIP

Solving Constraint Integer Programs

substpsolver.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-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file substpsolver.c
17  * @brief Solver for Steiner tree (sub-) problems
18  * @author Daniel Rehfeldt
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #include "scip/scipdefplugins.h"
24 #include "substpsolver.h"
25 #include "solhistory.h"
26 
27 #include "pricer_stp.h"
28 #include "probdata_stp.h"
29 #include "cons_stp.h"
30 #include "reduce.h"
31 #include "cons_stpcomponents.h"
32 #include "heur_tm.h"
33 #include "reader_stp.h"
34 #include "heur_local.h"
35 #include "heur_prune.h"
36 #include "heur_ascendprune.h"
37 #include "heur_slackprune.h"
38 #include "heur_lurkprune.h"
39 #include "heur_rec.h"
40 #include "dialog_stp.h"
41 #include "prop_stp.h"
42 #include "branch_stp.h"
43 #include "dpterms.h"
44 #include "solstp.h"
45 #include "relax_stp.h"
46 #include "relax_stpdp.h"
47 
48 
49 //#define CHECK_BCOPT
50 
51 
52 /*
53  * Data structures
54  */
55 
56 
57 /** sub-problem */
59 {
60  SCIP* subscip; /**< SCIP or NULL (if dynamic programming is used) */
61  GRAPH* subgraph; /**< subgraph; OWNED! */
62  int* dpsubsol; /**< solution storage for dynamic programming case */
63  int nsubedges; /**< number of edges */
67 };
68 
69 
70 
71 /*
72  * Local methods
73  */
74 
75 #ifdef CHECK_BCOPT
76 #define CHECK_BCOPT_MAXNTERMS 50
77 
78 /** checks solution with dynamic programming */
79 static inline
80 SCIP_RETCODE checkSolWithDP(
81  GRAPH* graph, /**< sub-problem */
82  const int* edgesol /**< array to store edge solution; CONNECT/UNKNOWN */
83 )
84 {
85  return SCIP_ERROR;
86 }
87 
88 #endif
89 
90 
91 
92 
93 /** helper */
94 static
96  SCIP* subscip /**< sub-SCIP data structure */
97  )
98 {
99  SCIP_CALL( SCIPincludePricerStp(subscip) );
100 
102 
103  SCIP_CALL( SCIPincludeReaderStp(subscip) );
104 
105  SCIP_CALL( SCIPincludeDialogStp(subscip) );
106 
107  SCIP_CALL( SCIPincludeConshdlrStp(subscip) );
108 
110 
111  SCIP_CALL( SCIPincludeRelaxStp(subscip) );
112 
113  SCIP_CALL( SCIPincludeRelaxStpdp(subscip) );
114 
115  SCIP_CALL( SCIPStpIncludeHeurTM(subscip) );
116 
118 
119  SCIP_CALL( SCIPStpIncludeHeurRec(subscip) );
120 
122 
124 
126 
128 
130 
131  SCIP_CALL( SCIPincludePropStp(subscip) );
132 
133  return SCIP_OKAY;
134 }
135 
136 
137 /** helper */
138 static
140  SCIP* scip, /**< SCIP data structure */
141  const SUBSTP* substp, /**< sub-problem */
142  SCIP* subscip /**< sub-SCIP data structure */
143  )
144 {
145  SCIP_Real timelimit;
146  SCIP_CALL( SCIPgetRealParam(scip, "limits/time", &timelimit) );
147  timelimit -= SCIPgetSolvingTime(scip);
148 
149  assert(GT(timelimit, 0.0));
150 
151  /* do not abort subproblem on CTRL-C */
152  SCIP_CALL( SCIPsetBoolParam(subscip, "misc/catchctrlc", FALSE) );
153 
154  /* disable output to console? */
155  if( !substp->useOutput )
156  {
157  SCIP_CALL( SCIPsetIntParam(subscip, "display/verblevel", 0) );
158  }
159 
160  if( substp->subprobIsIndependent )
161  {
162  /* disable statistic timing inside sub SCIP */
163  SCIP_CALL( SCIPsetBoolParam(subscip, "timing/statistictiming", FALSE) );
164  }
165  else
166  {
167  /* disable STP presolving */
168  SCIP_CALL( SCIPsetIntParam(subscip, "stp/reduction", 0) );
169  }
170 
171  /* disable expensive resolving */
172  // SCIP_CALL( SCIPsetPresolving(subscip, SCIP_PARAMSETTING_FAST, TRUE) );
173 
174  SCIP_CALL( SCIPsetRealParam(subscip, "limits/time", timelimit) );
175 
176  /* set hard-coded default parameters */
178 
179  return SCIP_OKAY;
180 }
181 
182 
183 /** sets up the sub-SCIP */
184 static
186  SCIP* scip, /**< SCIP data structure */
187  const SUBSTP* substp, /**< sub-problem */
188  SCIP* subscip /**< sub-SCIP data structure */
189  )
190 {
191  SCIP_CALL( subscipSetupCallbacks(subscip) );
192 
193  SCIP_CALL( subscipSetupParameters(scip, substp, subscip) );
194 
195  return SCIP_OKAY;
196 }
197 
198 
199 /** solves sub-problem by using branch-and-cut */
200 static
202  SCIP* scip, /**< SCIP data structure */
203  SUBSTP* substp, /**< sub-problem */
204  SCIP_Bool* success /**< was sub-problem solved to optimality? */
205 )
206 {
207  SCIP* subscip = substp->subscip;
208  GRAPH* subgraph = substp->subgraph;
209  const SCIP_Bool isSubProb = !substp->subprobIsIndependent;
210 
211  assert(subscip);
212  assert(subgraph);
213 
214  *success = TRUE;
215 
216  SCIP_CALL( SCIPprobdataCreateFromGraph(subscip, 0.0, "subproblem", isSubProb, subgraph) );
217  SCIP_CALL( SCIPsolve(subscip) );
218 
219  if( SCIPgetStatus(subscip) == SCIP_STATUS_OPTIMAL )
220  {
221  SCIPdebugMessage("subproblem has been solved to optimality \n");
222  }
223  else
224  {
225  *success = FALSE;
226 
227  printf("solving of sub-problem interrupted (status=%d, time=%.2f)\n",
228  SCIPgetStatus(subscip), SCIPgetSolvingTime(subscip));
229  }
230 
231  /* NOTE: already moved into subscip */
232  substp->subgraph = NULL;
233 
234  return SCIP_OKAY;
235 }
236 
237 
238 /** gets solution */
239 static
241  SUBSTP* substp, /**< sub-problem */
242  int* subedgesSol /**< solution */
243  )
244 {
245  SCIP* subscip = substp->subscip;
246  SOLHISTORY* solhistory;
247  SCIP_SOL* subsol = SCIPgetBestSol(subscip);
249  const STP_Bool* edges_isInSol;
250  const int nsubedges = substp->nsubedges;
251 
252  assert(subgraph && subsol);
253  assert(nsubedges > 0);
254 
255  SCIP_CALL( solhistory_init(subscip, subgraph, &solhistory) );
256  SCIP_CALL( solhistory_computeHistory(subscip, subsol, subgraph, solhistory) );
257 
258  assert(nsubedges == solhistory->norgedges);
259  edges_isInSol = solhistory->orgedges_isInSol;
260 
261  for( int i = 0; i < nsubedges; i++ )
262  {
263  if( edges_isInSol[i] )
264  {
265  subedgesSol[i] = CONNECT;
266  }
267  else
268  {
269  subedgesSol[i] = UNKNOWN;
270  }
271  }
272 
273  solhistory_free(subscip, &solhistory);
274 
275  return SCIP_OKAY;
276 }
277 
278 /** Initializes default stuff */
279 static
281  SCIP* scip, /**< SCIP data structure */
282  GRAPH* subgraph, /**< subproblem to initialize from; NOTE: will be moved */
283  SUBSTP** substp /**< initialize */
284 )
285 {
286  SUBSTP* sub;
287 
288  assert(scip && subgraph);
289  assert(subgraph->edges >= 2);
290 
291  SCIP_CALL( SCIPallocMemory(scip, substp) );
292  sub = *substp;
293 
294  sub->subscip = NULL;
295  sub->subgraph = subgraph;
296  sub->nsubedges = subgraph->edges;
297  sub->useOutput = TRUE;
299  sub->dpsubsol = NULL;
300 
301  return SCIP_OKAY;
302 }
303 
304 
305 /*
306  * Interface methods
307  */
308 
309 
310 /** Initializes from given sub-graph. Decides automatically whether to use DP or B&C.
311  * NOTE: Sub-graph will be moved into internal data structure and also released
312  * once substp is freed! */
314  SCIP* scip, /**< SCIP data structure */
315  GRAPH* subgraph, /**< subproblem to initialize from; NOTE: will be moved */
316  SUBSTP** substp /**< initialize */
317 )
318 {
319  /* decide whether to do dynamic programming or branch-and-cut */
320  if( dpterms_isPromisingFully(subgraph) )
321  {
322  SCIP_CALL( substpsolver_initDP(scip, subgraph, substp) );
323  }
324  else
325  {
326  SCIP_CALL( substpsolver_initBC(scip, subgraph, substp) );
327 
328  }
329 
330  return SCIP_OKAY;
331 }
332 
333 
334 /** Initializes from given sub-graph, and always uses dynamic programming for solving
335  * NOTE: Sub-graph will be moved into internal data structure and also released
336  * once substp is freed! */
338  SCIP* scip, /**< SCIP data structure */
339  GRAPH* subgraph, /**< subproblem to initialize from; NOTE: will be moved */
340  SUBSTP** substp /**< initialize */
341 )
342 {
343  SUBSTP* sub;
344 
345  SCIP_CALL( initDefault(scip, subgraph, substp) );
346 
347  sub = *substp;
348  sub->useDP = TRUE;
349  SCIP_CALL( SCIPallocMemoryArray(scip, &(sub->dpsubsol), subgraph->edges) );
350 
351  return SCIP_OKAY;
352 }
353 
354 
355 
356 /** Initializes from given sub-graph, and always uses B&C for solving
357  * NOTE: Sub-graph will be moved into internal data structure and also released
358  * once substp is freed! */
360  SCIP* scip, /**< SCIP data structure */
361  GRAPH* subgraph, /**< subproblem to initialize from; NOTE: will be moved */
362  SUBSTP** substp /**< initialize */
363 )
364 {
365  SUBSTP* sub;
366 
367  SCIP_CALL( initDefault(scip, subgraph, substp) );
368 
369  sub = *substp;
370  sub->useDP = FALSE;
371  SCIP_CALL( SCIPcreate(&(sub->subscip)) );
372  SCIP_CALL( subscipSetup(scip, sub, sub->subscip) );
373 
374  return SCIP_OKAY;
375 }
376 
377 
378 
379 /** frees */
381  SCIP* scip, /**< SCIP data structure */
382  SUBSTP** substp /**< to be freed */
383  )
384 {
385  SUBSTP* sub;
386 
387  assert(scip && substp);
388 
389  sub = *substp;
390 
391  SCIPfreeMemoryArrayNull(scip, &(sub->dpsubsol));
392 
393  if( sub->subscip )
394  {
395  SCIPfree(&(sub->subscip));
396  }
397 
398  SCIPfreeMemory(scip, substp);
399 }
400 
401 
402 /** Transfers history. Useful in order to have (fixed and edge) pseudo-ancestors up-to-date.
403  * NOTE: fixed edges are not transferred! Only pseudo-ancestors */
405  const int* edgeMapToOrg, /**< maps edges of subgraph to original graph */
406  GRAPH* orggraph, /**< original graph */
407  SUBSTP* substp /**< sub-problem*/
408 )
409 {
410  assert(edgeMapToOrg && orggraph && substp);
411  assert(substp->subgraph);
412 
413  /* NOTE: no history needed in dynamic programming algorithm
414  * todo might want to change that to exploit ancestor conflicts */
415  if( substp->useDP )
416  {
417  assert(!substp->subscip);
418  return SCIP_OKAY;
419  }
420 
421  assert(substp->subscip);
422 
423  SCIP_CALL( graph_subgraphCompleteNewHistory(substp->subscip, edgeMapToOrg, orggraph, substp->subgraph) );
424 
425  return SCIP_OKAY;
426 }
427 
428 
429 /** initializes history, but does not transfer any information! */
431  SUBSTP* substp /**< sub-problem*/
432 )
433 {
434  assert(substp);
435  assert(substp->subgraph);
436 
437  if( substp->useDP )
438  {
439  assert(!substp->subscip);
440  return SCIP_OKAY;
441  }
442 
443  assert(substp->subscip);
444 
445  SCIP_CALL( graph_initHistory(substp->subscip, substp->subgraph) );
446 
447  return SCIP_OKAY;
448 }
449 
450 
451 /** solves sub-problem */
453  SCIP* scip, /**< SCIP data structure */
454  SUBSTP* substp, /**< sub-problem */
455  SCIP_Bool* success /**< was sub-problem solved to optimality? */
456 )
457 {
458  assert(scip && substp && success);
459  assert(substp->subgraph);
460 
461  if( substp->useDP )
462  {
463  assert(substp->dpsubsol);
464 
465  if( !graph_path_exists(substp->subgraph) )
466  {
467  SCIP_CALL( graph_path_init(scip, substp->subgraph) );
468  }
469 
470  SCIP_CALL( dpterms_solve(scip, substp->subgraph, substp->dpsubsol, success) );
471 
472  // todo add an extra flag to avoid deletion of graph in some cases?
473  graph_free(scip, &(substp->subgraph), TRUE);
474  }
475  else
476  {
477  SCIP_CALL( subscipSolve(scip, substp, success) );
478 
479  }
480 
481  assert(substp->subgraph == NULL);
482 
483  return SCIP_OKAY;
484 }
485 
486 
487 /** gets number of edges of subproblem */
489  const SUBSTP* substp /**< sub-problem */
490  )
491 {
492  assert(substp);
493  assert(substp->nsubedges >= 2);
494 
495  return substp->nsubedges;
496 }
497 
498 
499 /** gets solution to sub-problem */
501  SUBSTP* substp, /**< sub-problem */
502  int* edgesol /**< array to store edge solution; CONNECT/UNKNOWN */
503 )
504 {
505  assert(substp && edgesol);
506  assert(!substp->subgraph);
507 
508  if( !substp->useDP )
509  {
510  assert(substp->subscip);
511 
512  SCIP_CALL( subscipGetSol(substp, edgesol) );
513  }
514  else
515  {
516  assert(substp->dpsubsol);
517  BMScopyMemoryArray(edgesol, substp->dpsubsol, substp->nsubedges);
518  }
519 
520  return SCIP_OKAY;
521 }
522 
523 
524 /** sets to no output */
526  SUBSTP* substp /**< sub-problem */
527 )
528 {
529  assert(substp);
530  substp->useOutput = FALSE;
531 
532  if( substp->subscip )
533  {
534  SCIP_CALL( SCIPsetIntParam(substp->subscip, "display/verblevel", 0) );
535  }
536 
537  return SCIP_OKAY;
538 }
539 
540 
541 /** sets to independent problem */
543  SUBSTP* substp /**< sub-problem */
544 )
545 {
546  assert(substp);
547  substp->subprobIsIndependent = TRUE;
548  return SCIP_OKAY;
549 }
550 
551 
552 /** disables DP for solving sub-problems */
554  SUBSTP* substp /**< sub-problem */
555 )
556 {
557  assert(substp);
558  if( substp->subscip )
559  {
560  SCIP_CALL( SCIPsetIntParam(substp->subscip, "stp/usedp", 0) );
561  }
562 
563  return SCIP_OKAY;
564 }
565 
566 
567 /** sets full presolving */
569  SUBSTP* substp /**< sub-problem */
570 )
571 {
572  assert(substp);
573  if( substp->subscip )
574  {
575  SCIP_CALL( SCIPsetIntParam(substp->subscip, "stp/reduction", 2) );
576  }
577 
578  return SCIP_OKAY;
579 }
580 
581 
582 /** Gets optimal objective by B&C.
583  * NOTE: Meant for debugging only!
584  * NOTE: Need to be careful with recursion! Might run into infinite loop. */
586  SCIP* scip, /**< SCIP data structure */
587  const GRAPH* graph, /**< graph */
588  SCIP_Real* obj /**< to store solution */
589  )
590 {
591  int* soledges;
592  GRAPH* graph_copied;
593  SUBSTP* substp;
594  SCIP_Bool success;
595 
596  assert(graph);
597 
598  SCIP_CALL( SCIPallocMemoryArray(scip, &soledges, graph->edges) );
599 
600  SCIP_CALL( graph_copy(scip, graph, &graph_copied) );
601  graph_copied->is_packed = FALSE;
602 
603  SCIP_CALL( substpsolver_initBC(scip, graph_copied, &substp) );
605 
606  SCIP_CALL( substpsolver_setMute(substp) );
608  SCIP_CALL( substpsolver_solve(scip, substp, &success) );
609 
610  assert(success);
611 
612  SCIP_CALL( substpsolver_getSolution(substp, soledges) );
613 
614  substpsolver_free(scip, &substp);
615 
616  *obj = solstp_getObj(graph, soledges, 0.0);
617 
618  SCIPfreeMemoryArray(scip, &soledges);
619 
620  return SCIP_OKAY;
621 }
Steiner tree relaxator.
stp variable pricer
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
Definition: scip_timing.c:369
#define SCIPfreeMemoryArrayNull(scip, ptr)
Definition: scip_mem.h:72
SCIP_RETCODE SCIPincludePricerStp(SCIP *scip)
Definition: pricer_stp.c:370
Constraint handler for Steiner problems.
#define SCIPfreeMemoryArray(scip, ptr)
Definition: scip_mem.h:71
SCIP_RETCODE SCIPStpIncludeHeurTM(SCIP *scip)
Definition: heur_tm.c:3711
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:298
SCIP_RETCODE substpsolver_setMute(SUBSTP *substp)
Definition: substpsolver.c:525
#define SCIPallocMemoryArray(scip, ptr, num)
Definition: scip_mem.h:55
SCIP_RETCODE SCIPprobdataCreateFromGraph(SCIP *scip, SCIP_Real offset, const char *probname, SCIP_Bool isSubProb, GRAPH *graph_move)
SCIP_RETCODE substpsolver_getObjFromGraph(SCIP *scip, const GRAPH *graph, SCIP_Real *obj)
Definition: substpsolver.c:585
includes methods for Steiner tree problem solutions
SCIP_RETCODE SCIPStpIncludeHeurLocal(SCIP *scip)
Definition: heur_local.c:4353
SCIP_RETCODE substpsolver_setProbFullPresolve(SUBSTP *substp)
Definition: substpsolver.c:568
dual-ascent and reduction based primal heuristic for Steiner problems
static SCIP_RETCODE subscipSolve(SCIP *scip, SUBSTP *substp, SCIP_Bool *success)
Definition: substpsolver.c:201
SCIP_RETCODE SCIPincludeBranchruleStp(SCIP *scip)
Definition: branch_stp.c:1129
reduction and dual-cost based primal heuristic for Steiner problems
void graph_free(SCIP *, GRAPH **, SCIP_Bool)
Definition: graph_base.c:796
SCIP_RETCODE graph_path_init(SCIP *, GRAPH *)
Definition: graph_path.c:480
#define FALSE
Definition: def.h:87
Problem data for stp problem.
#define TRUE
Definition: def.h:86
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_Bool subprobIsIndependent
Definition: substpsolver.c:66
SCIP_RETCODE SCIPStpIncludeHeurRec(SCIP *scip)
Definition: heur_rec.c:2161
Dynamic programming solver for Steiner tree (sub-) problems with small number of terminals.
Steiner tree problem file reader.
#define SCIPdebugMessage
Definition: pub_message.h:87
SCIP_RETCODE substpsolver_init(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:313
SCIP_RETCODE SCIPcreate(SCIP **scip)
Definition: scip_general.c:283
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
Definition: scip_param.c:594
Components constraint handler for Steiner problems.
SCIP_RETCODE substpsolver_initBC(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:359
SCIP_RETCODE SCIPStpIncludeHeurPrune(SCIP *scip)
Definition: heur_prune.c:951
SCIP_RETCODE solhistory_init(SCIP *scip, const GRAPH *graph, SOLHISTORY **solhistory)
Definition: solhistory.c:389
includes methods working on the (reduction) history of solutions to Steiner tree problems ...
SCIP_RETCODE SCIPsolve(SCIP *scip)
Definition: scip_solve.c:2613
SCIP_RETCODE graph_subgraphCompleteNewHistory(SCIP *, const int *, GRAPH *, GRAPH *)
Definition: graph_sub.c:920
SCIP_RETCODE substpsolver_transferHistory(const int *edgeMapToOrg, GRAPH *orggraph, SUBSTP *substp)
Definition: substpsolver.c:404
static SCIP_RETCODE subscipSetupParameters(SCIP *scip, const SUBSTP *substp, SCIP *subscip)
Definition: substpsolver.c:139
SCIP_RETCODE SCIPincludeReaderStp(SCIP *scip)
Definition: reader_stp.c:257
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
Definition: scip_param.c:420
SCIP_STATUS SCIPgetStatus(SCIP *scip)
Definition: scip_general.c:474
SCIP_RETCODE graph_initHistory(SCIP *, GRAPH *)
Definition: graph_base.c:695
SCIP_RETCODE SCIPincludeConshdlrStp(SCIP *scip)
Definition: cons_stp.c:1051
stp user interface dialog
SCIP_RETCODE substpsolver_initHistory(SUBSTP *substp)
Definition: substpsolver.c:430
static SCIP_RETCODE subscipSetup(SCIP *scip, const SUBSTP *substp, SCIP *subscip)
Definition: substpsolver.c:185
static SCIP_RETCODE initDefault(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:280
#define NULL
Definition: lpi_spx1.cpp:155
Solver for Steiner tree (sub-) problems.
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_RETCODE SCIPStpIncludeHeurLurkPrune(SCIP *scip)
Improvement heuristic for Steiner problems.
unsigned char STP_Bool
Definition: portab.h:34
SCIP_RETCODE dpterms_solve(SCIP *, GRAPH *, int *, SCIP_Bool *)
Definition: dpterms_base.c:489
reduction-based primal heuristic for Steiner problems
SCIP_RETCODE substpsolver_setProbNoSubDP(SUBSTP *substp)
Definition: substpsolver.c:553
SCIP_RETCODE SCIPincludePropStp(SCIP *scip)
Definition: prop_stp.c:2610
propagator for Steiner tree problems, using the LP reduced costs
SCIP_RETCODE substpsolver_setProbIsIndependent(SUBSTP *substp)
Definition: substpsolver.c:542
SCIP_RETCODE solhistory_computeHistory(SCIP *scip, SCIP_SOL *scipsol, const GRAPH *g, SOLHISTORY *solhistory)
Definition: solhistory.c:437
#define GT(a, b)
Definition: portab.h:84
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPprobdataSetDefaultParams(SCIP *scip)
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
SCIP_RETCODE SCIPincludeRelaxStp(SCIP *scip)
Definition: relax_stp.c:332
SCIP_RETCODE substpsolver_getSolution(SUBSTP *substp, int *edgesol)
Definition: substpsolver.c:500
SCIP_RETCODE SCIPincludeDialogStp(SCIP *scip)
Definition: dialog_stp.c:48
SCIP_RETCODE SCIPStpIncludeHeurAscendPrune(SCIP *scip)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
Definition: scip_param.c:478
#define BMScopyMemoryArray(ptr, source, num)
Definition: memory.h:127
STP_Bool * orgedges_isInSol
Definition: solhistory.h:43
static SCIP_RETCODE subscipSetupCallbacks(SCIP *subscip)
Definition: substpsolver.c:95
SCIP_Bool dpterms_isPromisingFully(const GRAPH *)
Definition: dpterms_base.c:563
#define CONNECT
Definition: graphdefs.h:87
#define SCIPfreeMemory(scip, ptr)
Definition: scip_mem.h:69
Steiner vertex branching rule.
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip_sol.c:2304
SCIP_RETCODE SCIPincludeRelaxStpdp(SCIP *scip)
Definition: relax_stpdp.c:307
#define SCIP_Real
Definition: def.h:177
Primal recombination heuristic for Steiner problems.
SCIP_RETCODE graph_copy(SCIP *, const GRAPH *, GRAPH **)
Definition: graph_base.c:939
shortest paths based primal heuristics for Steiner problems
reduction based primal heuristic for Steiner problems
int edges
Definition: graphdefs.h:219
SCIP_RETCODE SCIPStpIncludeHeurSlackPrune(SCIP *scip)
int substpsolver_getNsubedges(const SUBSTP *substp)
Definition: substpsolver.c:488
void substpsolver_free(SCIP *scip, SUBSTP **substp)
Definition: substpsolver.c:380
static DPSUBSOL ** subsol
#define SCIPallocMemory(scip, ptr)
Definition: scip_mem.h:51
#define UNKNOWN
Definition: sepa_mcf.c:4095
SCIP_RETCODE substpsolver_initDP(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:337
SCIP_RETCODE substpsolver_solve(SCIP *scip, SUBSTP *substp, SCIP_Bool *success)
Definition: substpsolver.c:452
SCIP_Bool is_packed
Definition: graphdefs.h:265
includes various reduction methods for Steiner tree problems
default SCIP plugins
SCIP_Real solstp_getObj(const GRAPH *g, const int *soledge, SCIP_Real offset)
Definition: solstp.c:1859
GRAPH * SCIPprobdataGetGraph2(SCIP *scip)
static SCIP_RETCODE subscipGetSol(SUBSTP *substp, int *subedgesSol)
Definition: substpsolver.c:240
void solhistory_free(SCIP *scip, SOLHISTORY **solhistory)
Definition: solhistory.c:419
Steiner tree dynamic programming relaxator.
SCIP_RETCODE SCIPincludeConshdlrStpcomponents(SCIP *scip)
SCIP_Bool graph_path_exists(const GRAPH *)
Definition: graph_path.c:497
SCIP_RETCODE SCIPfree(SCIP **scip)
Definition: scip_general.c:315