Scippy

SCIP

Solving Constraint Integer Programs

sepa_partition.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 scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file sepa_partition.c
17  * @brief partition-separator. Searches for two partitions of size 2 and 3 (extension of triangle-inequalities).
18  * @author Leon Eifler
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 #include <assert.h>
23 #include <string.h>
24 
25 #include "sepa_partition.h"
26 
27 #include "probdata_cyc.h"
28 #include "scip/cons_linear.h"
29 #include "scip/cutsel_hybrid.h"
30 
31 #define SEPA_NAME "partition"
32 #define SEPA_DESC "separator to separate partition-inequalities in cycle-clustering application"
33 #define SEPA_PRIORITY 1500
34 #define SEPA_FREQ 5
35 #define SEPA_MAXBOUNDDIST 0.0
36 #define SEPA_USESSUBSCIP FALSE /**< does the separator use a secondary SCIP instance? */
37 #define SEPA_DELAY FALSE /**< should separation method be delayed, if other separators found cuts? */
38 #define MAXCUTS 2000 /**< maximal number of cuts that can be added to cut pool */
39 #define MAXCUTSCREATED 10000 /**< maximal number of cuts to select from */
40 #define MAXROUNDS 20 /**< maximal number of separation rounds per node */
41 #define MAXTRIANGLEDISTANCE -0.2 /**< maximal negative violation of triangle-inequality to construct cut from */
42 
43 
44 /** Given two partitions S, T creates the corresponding cut and adds it do SCIP */
45 static
47  SCIP* scip, /**< SCIP data structure */
48  SCIP_SEPA* sepa, /**< separator */
49  SCIP_ROW*** cuts, /**< array to store generated cut */
50  int* cutsize, /**< size of the cut array */
51  int* ncutscreated, /**< number of created cuts */
52  int* firstpart, /**< the first partition */
53  int* secondpart, /**< the second partition */
54  int nfirst, /**< number of states in first partition */
55  int nsecond, /**< number of states in second partition */
56  SCIP_Real** violations, /**< array to stor the violation of each cut */
57  SCIP_Real violation /**< violation of the cut that should be created */
58  )
59 {
60  SCIP_VAR**** edgevars;
61  char cutname[SCIP_MAXSTRLEN];
62  int i;
63  int j;
64  int inda;
65  int indb;
66 
67  edgevars = SCIPcycGetEdgevars(scip);
68 
69  assert(NULL != edgevars);
70 
71  if( *cutsize - 1 <= *ncutscreated )
72  {
73  *cutsize = *cutsize * 2;
74  SCIP_CALL( SCIPreallocBufferArray(scip, cuts, (int) *cutsize) );
75  SCIP_CALL( SCIPreallocBufferArray(scip, violations, (int) *cutsize) );
76  }
77 
78  (*violations)[*ncutscreated] = violation;
79 
80  /* create cut */
81  (void) SCIPsnprintf(cutname, SCIP_MAXSTRLEN, "PartitionCut_%d_%d", nfirst, nsecond);
82  SCIP_CALL( SCIPcreateEmptyRowSepa(scip, &((*cuts)[*ncutscreated]), sepa, cutname, -SCIPinfinity(scip),
83  (SCIP_Real) MIN(nfirst, nsecond), FALSE, FALSE, TRUE) );
84 
85  SCIP_CALL( SCIPcacheRowExtensions(scip, (*cuts)[*ncutscreated]) );
86 
87  for( i = 0; i < nfirst; ++i )
88  {
89  for( j = 0; j < i; ++j )
90  {
91  inda = MAX(firstpart[i], firstpart[j]);
92  indb = MIN(firstpart[i], firstpart[j]);
93  SCIP_CALL( SCIPaddVarToRow(scip, (*cuts)[*ncutscreated], getEdgevar(edgevars, inda, indb, 0), -1.0) );
94  }
95  }
96 
97  for( i = 0; i < nsecond; ++i )
98  {
99  for( j = 0; j < i; ++j )
100  {
101  inda = MAX(secondpart[i], secondpart[j]);
102  indb = MIN(secondpart[i], secondpart[j]);
103  SCIP_CALL( SCIPaddVarToRow(scip, (*cuts)[*ncutscreated], getEdgevar(edgevars, inda, indb, 0), -1.0) );
104  }
105  }
106 
107  for( i = 0; i < nfirst; ++i )
108  {
109  for( j = 0; j < nsecond; ++j )
110  {
111  SCIP_CALL( SCIPaddVarToRow(scip, (*cuts)[*ncutscreated],
112  getEdgevar(edgevars, firstpart[i], secondpart[j], 1), 1.0) );
113  }
114  }
115 
116  SCIP_CALL( SCIPflushRowExtensions(scip, (*cuts)[*ncutscreated]) );
117 
118  SCIPdebug( SCIP_CALL( SCIPprintRow(scip, (*cuts)[*ncutscreated], NULL) ) );
119  (*ncutscreated)++;
120 
121  return SCIP_OKAY;
122 }
123 
124 /** copy method for separator plugins (called when SCIP copies plugins) */
125 static
126 SCIP_DECL_SEPACOPY(sepaCopyPartition)
127 { /*lint --e{715}*/
128  assert(scip != NULL);
129  assert(sepa != NULL);
130  assert(strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0);
131 
132  /* call inclusion method of constraint handler */
134 
135  return SCIP_OKAY;
136 }
137 
138 /** LP solution separation method of separator */
139 static
140 SCIP_DECL_SEPAEXECLP(sepaExeclpPartition)
141 { /*lint --e{715}*/
142  SCIP_VAR**** edgevars;
143  SCIP_Real* fractionality;
144  SCIP_DIGRAPH* edgegraph;
145  int* idx;
146  int states[5];
147  SCIP_Real violation;
148  SCIP_Real violationchg;
149  SCIP_Real bestvalue;
150  SCIP_Real lpvalforward;
151  SCIP_Real lpvalincluster;
152  SCIP_Real goodscorefac;
153  SCIP_Real badscorefac;
154  SCIP_Real goodmaxparall;
155  SCIP_Real maxparall;
156  SCIP_Real dircutoffdist;
157  SCIP_Real efficacyweight;
158  SCIP_Real objparalweight;
159  SCIP_Real intsuppweight;
160  SCIP_Real* violations;
161  SCIP_ROW** cuts;
162  int cutsize;
163  int ncutscreated;
164  int ncutsapplied;
165  int* firstpart;
166  int* secondpart;
167  int** successors;
168  int* nsuccessors;
169  int nfirst;
170  int nsecond;
171  int nstates;
172  int rounds;
173  int i;
174  int j;
175  int k;
176  int l;
177  SCIP_Bool usecutselection;
178 
179 
180  /* get necessary probdata */
181  edgevars = SCIPcycGetEdgevars(scip);
182  edgegraph = SCIPcycGetEdgeGraph(scip);
183  nstates = SCIPcycGetNBins(scip);
184  rounds = SCIPsepaGetNCallsAtNode(sepa);
185  cutsize = MAXCUTS;
186  ncutscreated = 0;
187 
188  SCIP_CALL( SCIPgetBoolParam(scip, "cycleclustering/usecutselection", &usecutselection) );
189 
190  assert(nstates > 0);
191  assert(NULL != edgevars);
192  assert(NULL != edgegraph);
193 
194  *result = SCIP_DIDNOTFIND;
195 
196  if( SCIPcycGetNCluster(scip) == 3 || rounds >= MAXROUNDS )
197  {
198  *result = SCIP_DIDNOTRUN;
199  return SCIP_OKAY;
200  }
201 
202  /* allocate memory */
203  SCIP_CALL( SCIPallocBufferArray(scip, &successors, 5) );
204  SCIP_CALL( SCIPallocBufferArray(scip, &nsuccessors, 5) );
205  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &fractionality, nstates) );
206  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &idx, nstates) );
207  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &firstpart, nstates) );
208  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &secondpart, nstates) );
209  SCIP_CALL( SCIPallocBufferArray(scip, &cuts, cutsize) );
210  SCIP_CALL( SCIPallocBufferArray(scip, &violations, cutsize) );
211 
212  /* sort edges by decreasing fractionality of lp-solution */
213  for( i = 0; i < nstates; ++i )
214  {
215  idx[i] = i;
216  fractionality[i] = 0;
217  successors[0] = SCIPdigraphGetSuccessors(edgegraph, i);
218  nsuccessors[0] = SCIPdigraphGetNSuccessors(edgegraph, i);
219 
220  for( j = 0; j < nsuccessors[0]; ++j )
221  {
222  states[0] = i;
223  states[1] = successors[0][j];
224 
225  lpvalforward = SCIPvarGetLPSol(getEdgevar(edgevars, states[0], states[1], 1));
226  lpvalincluster = SCIPvarGetLPSol(getEdgevar(edgevars, MAX(states[0],states[1]), MIN(states[0],states[1]), 0));
227  fractionality[states[0]] += MIN(lpvalforward, 1 - lpvalforward) + MIN(1 - lpvalincluster, lpvalincluster);
228  }
229  }
230 
231  /* sort by fractionality of edgevars */
232  SCIPsortDownRealInt(fractionality, idx, nstates);
233 
234  /* we try to construct partition inequalities from triangle-inequalities that are almost satisfied at equality */
235  for( i = 0; i < nstates && ncutscreated < MAXCUTSCREATED; ++i )
236  {
237  states[0] = idx[i];
238  successors[0] = SCIPdigraphGetSuccessors(edgegraph, states[0]);
239  nsuccessors[0] = SCIPdigraphGetNSuccessors(edgegraph, states[0]);
240 
241  for( j = 0; j < nsuccessors[0] && ncutscreated < MAXCUTSCREATED; ++j )
242  {
243  states[1] = successors[0][j];
244  successors[1] = SCIPdigraphGetSuccessors(edgegraph, states[1]);
245  nsuccessors[1] = SCIPdigraphGetNSuccessors(edgegraph, states[1]);
246 
247  for( k = 0; k < nsuccessors[1] && ncutscreated < MAXCUTSCREATED; ++k )
248  {
249  states[2] = successors[1][k];
250  successors[2] = SCIPdigraphGetSuccessors(edgegraph, states[2]);
251  nsuccessors[2] = SCIPdigraphGetNSuccessors(edgegraph, states[2]);
252 
253  /* check if all edges in triangle exist */
254  if( !edgesExist(edgevars, states, 3) )
255  continue;
256 
257  if( states[1] > states[2] )
258  {
259  /* first case, construct partition with 2 predecessors and 3 successors */
260  nfirst = 1;
261  firstpart[0] = states[0];
262  firstpart[1] = -1;
263  nsecond = 2;
264  secondpart[0] = states[1];
265  secondpart[1] = states[2];
266  secondpart[2] = -1;
267 
268  /* get violation of trianlge inequality for these three states */
269  violation = SCIPvarGetLPSol(getEdgevar(edgevars, states[0], states[1], 1));
270  violation += SCIPvarGetLPSol(getEdgevar(edgevars, states[0], states[2], 1));
271  violation -= SCIPvarGetLPSol(getEdgevar(edgevars, states[1], states[2], 0));
272  violation -= 1;
273 
274  if( SCIPisGE(scip, violation, MAXTRIANGLEDISTANCE) )
275  {
276  /* add a state to second partition*/
277  bestvalue = -SCIPinfinity(scip);
278  secondpart[2] = -1;
279  for( l = 0; l < nsuccessors[2]; ++l )
280  {
281  states[3] = successors[2][l];
282  if( !edgesExist(edgevars, states, 4) )
283  continue;
284 
285  violationchg = SCIPvarGetLPSol(getEdgevar(edgevars, states[0], states[3], 1));
286  violationchg -= SCIPvarGetLPSol(getEdgevar(edgevars,
287  MAX(states[1],states[3]), MIN(states[1],states[3]), 0));
288  violationchg -= SCIPvarGetLPSol(getEdgevar(edgevars,
289  MAX(states[2],states[3]), MIN(states[2],states[3]), 0));
290 
291  if( violationchg > bestvalue )
292  {
293  bestvalue = violationchg;
294  secondpart[2] = states[3];
295  }
296  }
297 
298  states[3] = secondpart[2];
299 
300  /* if we did not find a state that we can add we can stop */
301  if( states[3] == -1 )
302  continue;
303 
304  successors[3] = SCIPdigraphGetSuccessors(edgegraph, states[3]);
305  nsuccessors[3] = SCIPdigraphGetNSuccessors(edgegraph, states[3]);
306 
307  nsecond++;
308  violation += bestvalue;
309 
310  /* add one more state to first partition */
311  bestvalue = -SCIPinfinity(scip);
312  for( l = 0; l < nsuccessors[3]; ++l )
313  {
314  states[4] = successors[3][l];
315 
316  if( !edgesExist(edgevars, states, 5) )
317  continue;
318 
319  /* compute what has changed from the violation of the 1-4 inequality */
320  violationchg = -SCIPvarGetLPSol(getEdgevar(edgevars,
321  MAX(states[0], states[4]), MIN(states[0],states[4]), 0)) - 1.0;
322  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, states[4], secondpart[0], 1));
323  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, states[4], secondpart[1], 1));
324  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, states[4], secondpart[2], 1));
325 
326  /* create cut if inequality is violated by lp-solution */
327  if( SCIPisPositive(scip, violation + violationchg) )
328  {
329  firstpart[1] = states[4];
330  nfirst = 2;
331  SCIP_CALL( createPartitionCut(scip, sepa, &cuts, &cutsize, &ncutscreated, firstpart, secondpart,
332  nfirst, nsecond, &violations, violation + violationchg) );
333 
334  break;
335  }
336  }
337  }
338 
339  /* now try to find partition with 3 in first and 2 in second set */
340  nfirst = 2;
341  firstpart[0] = states[1];
342  firstpart[1] = states[2];
343  firstpart[2] = -1;
344  nsecond = 1;
345  secondpart[0] = states[0];
346  secondpart[1] = -1;
347 
348  violation = SCIPvarGetLPSol(getEdgevar(edgevars, states[1], states[0], 1));
349  violation += SCIPvarGetLPSol(getEdgevar(edgevars, states[2], states[0], 1));
350  violation -= SCIPvarGetLPSol(getEdgevar(edgevars, states[1], states[2], 0));
351  violation -= 1;
352 
353  if( SCIPisGE(scip, violation, MAXTRIANGLEDISTANCE) )
354  {
355  /* add a state to second partition*/
356  bestvalue = -SCIPinfinity(scip);
357  firstpart[2] = -1;
358  for( l = 0; l < nsuccessors[2]; ++l )
359  {
360  states[3] = successors[2][l];
361  if( !edgesExist(edgevars, states, 4) )
362  continue;
363 
364  violationchg = SCIPvarGetLPSol(getEdgevar(edgevars, states[3], states[0], 1));
365  violationchg -= SCIPvarGetLPSol(getEdgevar(edgevars,
366  MAX(states[1],states[3]), MIN(states[1],states[3]), 0));
367  violationchg -= SCIPvarGetLPSol(getEdgevar(edgevars,
368  MAX(states[2],states[3]), MIN(states[2],states[3]), 0));
369 
370  if( violationchg > bestvalue )
371  {
372  bestvalue = violationchg;
373  firstpart[2] = states[3];
374  }
375  }
376 
377  states[3] = firstpart[2];
378 
379  if( states[3] == -1 )
380  continue;
381  nfirst++;
382 
383  successors[3] = SCIPdigraphGetSuccessors(edgegraph, states[3]);
384  nsuccessors[3] = SCIPdigraphGetNSuccessors(edgegraph, states[3]);
385 
386  violation += bestvalue;
387 
388  /* add one more state to second partition */
389  bestvalue = -SCIPinfinity(scip);
390  for( l = 0; l < nsuccessors[3]; ++l )
391  {
392  states[4] = successors[3][l];
393 
394  if( !edgesExist(edgevars, states, 5) )
395  continue;
396 
397  violationchg = -SCIPvarGetLPSol(getEdgevar(edgevars,
398  MAX(states[0], states[4]), MIN(states[0],states[4]), 0)) - 1.0;
399  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, firstpart[0], states[4], 1));
400  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, firstpart[1], states[4], 1));
401  violationchg += SCIPvarGetLPSol(getEdgevar(edgevars, firstpart[2], states[4], 1));
402  violationchg += SCIPvarGetLPSol(edgevars[firstpart[2]][states[4]][1]);
403 
404  if( SCIPisPositive(scip, violation + violationchg) )
405  {
406  secondpart[1] = states[4];
407  nsecond = 2;
408  SCIP_CALL( createPartitionCut(scip, sepa, &cuts, &cutsize, &ncutscreated, firstpart,
409  secondpart, nfirst, nsecond, &violations, violation + violationchg) );
410 
411  break;
412  }
413  }
414  }
415  }
416  }
417  }
418  }
419 
420  /* apply the cuts with the highest violation or use cut-selection */
421  if( usecutselection )
422  {
423  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/goodscorefac", &goodscorefac) );
424  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/badscorefac", &badscorefac) );
425  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/goodmaxparall", &goodmaxparall) );
426  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/maxparall", &maxparall) );
427  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/dircutoffdist", &dircutoffdist) );
428  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/efficacyweight", &efficacyweight) );
429  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/objparalweight", &objparalweight) );
430  SCIP_CALL( SCIPgetRealParam(scip, "cycleclustering/intsuppweight", &intsuppweight) );
431 
432  SCIP_CALL( SCIPselectCutsHybrid(scip, cuts, NULL, NULL, goodscorefac, badscorefac,
433  goodmaxparall, maxparall, dircutoffdist, efficacyweight, objparalweight, intsuppweight,
434  ncutscreated, 0, MAXCUTS, &ncutsapplied) );
435  }
436  else
437  {
438  SCIPsortDownRealPtr(violations, ((void **) cuts), ncutscreated);
439  ncutsapplied = MIN(ncutscreated, MAXCUTS);
440  }
441 
442  for( j = 0; j < ncutsapplied; ++j )
443  {
444  SCIP_CALL( SCIPaddPoolCut(scip, cuts[j]) );
445  *result = SCIP_SEPARATED;
446  }
447 
448  SCIPfreeBlockMemoryArray(scip, &fractionality, nstates);
449  SCIPfreeBlockMemoryArray(scip, &idx, nstates);
450  SCIPfreeBlockMemoryArray(scip, &firstpart, nstates);
451  SCIPfreeBlockMemoryArray(scip, &secondpart, nstates);
452 
453  for( i = 0; i < ncutscreated; ++i )
454  {
455  SCIP_CALL( SCIPreleaseRow(scip, &(cuts[i])) );
456  }
457 
458  SCIPfreeBufferArray(scip, &cuts);
459  SCIPfreeBufferArray(scip, &violations);
460  SCIPfreeBufferArray(scip, &nsuccessors);
461  SCIPfreeBufferArray(scip, &successors);
462 
463  return SCIP_OKAY;
464 }
465 
466 /** creates the Partition separator and includes it in SCIP */
468  SCIP* scip /**< SCIP data structure */
469  )
470 {
471  SCIP_SEPA* sepa;
472 
473  /* include separator */
475  SEPA_USESSUBSCIP, SEPA_DELAY, sepaExeclpPartition, NULL, NULL) );
476 
477  assert(sepa != NULL);
478 
479  /* set non fundamental callbacks via setter functions */
480  SCIP_CALL( SCIPsetSepaCopy(scip, sepa, sepaCopyPartition) );
481 
482  return SCIP_OKAY;
483 }
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
Definition: scip_mem.h:101
simple partition-separator
#define SCIPallocBlockMemoryArray(scip, ptr, num)
Definition: scip_mem.h:84
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1626
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1649
SCIP_VAR * getEdgevar(SCIP_VAR ****edgevars, int state1, int state2, int direction)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:298
#define SCIP_MAXSTRLEN
Definition: def.h:293
#define MAXCUTSCREATED
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
Definition: scip_lp.c:1686
hybrid cut selector
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)
Definition: misc.c:7721
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPincludeSepaPartition(SCIP *scip)
void SCIPsortDownRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
SCIP_VAR **** SCIPcycGetEdgevars(SCIP *scip)
#define FALSE
Definition: def.h:87
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10755
#define TRUE
Definition: def.h:86
#define SCIPdebug(x)
Definition: pub_message.h:84
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:720
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
#define SEPA_DESC
#define SEPA_MAXBOUNDDIST
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:127
static SCIP_RETCODE createPartitionCut(SCIP *scip, SCIP_SEPA *sepa, SCIP_ROW ***cuts, int *cutsize, int *ncutscreated, int *firstpart, int *secondpart, int nfirst, int nsecond, SCIP_Real **violations, SCIP_Real violation)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: scip_sepa.c:142
#define SEPA_PRIORITY
#define SEPA_FREQ
static SCIP_DECL_SEPAEXECLP(sepaExeclpPartition)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:847
#define MAXTRIANGLEDISTANCE
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip_param.c:241
#define NULL
Definition: lpi_spx1.cpp:155
SCIP_Bool edgesExist(SCIP_VAR ****edgevars, int *states, int nstates)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
Definition: var.c:18284
#define SCIP_CALL(x)
Definition: def.h:384
#define SEPA_NAME
int SCIPcycGetNBins(SCIP *scip)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: scip_sepa.c:100
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:115
int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)
Definition: misc.c:7706
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPselectCutsHybrid(SCIP *scip, SCIP_ROW **cuts, SCIP_ROW **forcedcuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real goodscorefac, SCIP_Real badscorefac, SCIP_Real goodmaxparall, SCIP_Real maxparall, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, int nforcedcuts, int maxselectedcuts, int *nselectedcuts)
#define MAX(x, y)
Definition: tclique_def.h:83
#define MAXROUNDS
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:352
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1444
problem data for cycle clustering problem
Constraint handler for linear constraints in their most general form, .
#define SEPA_DELAY
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1553
#define MAXCUTS
int SCIPcycGetNCluster(SCIP *scip)
SCIP_DIGRAPH * SCIPcycGetEdgeGraph(SCIP *scip)
#define SCIP_Real
Definition: def.h:177
static SCIP_DECL_SEPACOPY(sepaCopyPartition)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
Definition: scip_lp.c:2197
#define SEPA_USESSUBSCIP
#define SCIPreallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:119