assert(
NULL!= edgevars);
80 if( *cutsize - 1 <= *ncutscreated )
82*cutsize = *cutsize * 2;
87(*violations)[*ncutscreated] = violation;
96 for( i = 0; i < nfirst; ++i )
98 for( j = 0; j < i; ++j )
100inda =
MAX(firstpart[i], firstpart[j]);
101indb =
MIN(firstpart[i], firstpart[j]);
106 for( i = 0; i < nsecond; ++i )
108 for( j = 0; j < i; ++j )
110inda =
MAX(secondpart[i], secondpart[j]);
111indb =
MIN(secondpart[i], secondpart[j]);
116 for( i = 0; i < nfirst; ++i )
118 for( j = 0; j < nsecond; ++j )
138assert(sepa !=
NULL);
200assert(
NULL!= edgevars);
201assert(
NULL!= edgegraph);
222 for( i = 0; i < nstates; ++i )
225fractionality[i] = 0;
229 for( j = 0; j < nsuccessors[0]; ++j )
232states[1] = successors[0][j];
236fractionality[states[0]] +=
MIN(lpvalforward, 1 - lpvalforward) +
MIN(1 - lpvalincluster, lpvalincluster);
250 for( j = 0; j < nsuccessors[0] && ncutscreated <
MAXCUTSCREATED; ++j )
252states[1] = successors[0][j];
256 for( k = 0; k < nsuccessors[1] && ncutscreated <
MAXCUTSCREATED; ++k )
258states[2] = successors[1][k];
266 if( states[1] > states[2] )
270firstpart[0] = states[0];
273secondpart[0] = states[1];
274secondpart[1] = states[2];
288 for( l = 0; l < nsuccessors[2]; ++l )
290states[3] = successors[2][l];
300 if( violationchg > bestvalue )
302bestvalue = violationchg;
303secondpart[2] = states[3];
307states[3] = secondpart[2];
310 if( states[3] == -1 )
317violation += bestvalue;
321 for( l = 0; l < nsuccessors[3]; ++l )
323states[4] = successors[3][l];
330 MAX(states[0], states[4]),
MIN(states[0],states[4]),
INCLUSTER)) - 1.0;
338firstpart[1] = states[4];
341nfirst, nsecond, &violations, violation + violationchg) );
350firstpart[0] = states[1];
351firstpart[1] = states[2];
354secondpart[0] = states[0];
367 for( l = 0; l < nsuccessors[2]; ++l )
369states[3] = successors[2][l];
379 if( violationchg > bestvalue )
381bestvalue = violationchg;
382firstpart[2] = states[3];
386states[3] = firstpart[2];
388 if( states[3] == -1 )
395violation += bestvalue;
399 for( l = 0; l < nsuccessors[3]; ++l )
401states[4] = successors[3][l];
407 MAX(states[0], states[4]),
MIN(states[0],states[4]),
INCLUSTER)) - 1.0;
415secondpart[1] = states[4];
418secondpart, nfirst, nsecond, &violations, violation + violationchg) );
430 if( usecutselection )
442goodmaxparall, maxparall, dircutoffdist, efficacyweight, objparalweight, intsuppweight,
443ncutscreated, 0,
MAXCUTS, &ncutsapplied) );
451 for( j = 0; j < ncutsapplied; ++j )
462 for( i = 0; i < ncutscreated; ++i )
486assert(sepa !=
NULL);
Constraint handler for linear constraints in their most general form, .
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)
int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)
int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
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)
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)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
void SCIPsortDownRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool edgesExist(SCIP_VAR ****edgevars, int *states, int nstates)
SCIP_VAR **** SCIPcycGetEdgevars(SCIP *scip)
int SCIPcycGetNBins(SCIP *scip)
SCIP_VAR * getEdgevar(SCIP_VAR ****edgevars, int state1, int state2, EDGETYPE edgetype)
int SCIPcycGetNCluster(SCIP *scip)
SCIP_DIGRAPH * SCIPcycGetEdgeGraph(SCIP *scip)
problem data for cycle clustering problem
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)
static SCIP_DECL_SEPAEXECLP(sepaExeclpPartition)
#define MAXTRIANGLEDISTANCE
#define SEPA_MAXBOUNDDIST
static SCIP_DECL_SEPACOPY(sepaCopyPartition)
SCIP_RETCODE SCIPincludeSepaPartition(SCIP *scip)
simple partition-separator
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4