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