A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scip.zib.de/doc/html/heur__dins_8c_source.php below:

SCIP Doxygen Documentation: heur_dins.c Source File

62#define HEUR_NAME "dins" 63#define HEUR_DESC "distance induced neighborhood search by Ghosh" 64#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS 65#define HEUR_PRIORITY -1105000 68#define HEUR_MAXDEPTH -1 69#define HEUR_TIMING SCIP_HEURTIMING_AFTERLPNODE 70#define HEUR_USESSUBSCIP TRUE 72#define DEFAULT_NODESOFS 5000LL 73#define DEFAULT_MAXNODES 5000LL 74#define DEFAULT_MINNODES 50LL 75#define DEFAULT_MINIMPROVE 0.01 76#define DEFAULT_NODESQUOT 0.05 77#define DEFAULT_LPLIMFAC 1.5 78#define DEFAULT_MINFIXINGRATE 0.3 79#define DEFAULT_NWAITINGNODES 200LL 80#define DEFAULT_NEIGHBORHOODSIZE 18 81#define DEFAULT_SOLNUM 5 82#define DEFAULT_USELPROWS FALSE 84#define DEFAULT_COPYCUTS TRUE 87#define DEFAULT_BESTSOLLIMIT 3 88#define DEFAULT_USEUCT FALSE 92#define EVENTHDLR_NAME "Dins" 93#define EVENTHDLR_DESC "LP event handler for "

HEUR_NAME " heuristic"

113 int

neighborhoodsize;

159 if

(

REALABS

(lpsol - mipsol) >= 0.5 )

167

range = 2*lpsol-mipsol;

169 if

( mipsol >= lpsol )

172

*lbptr =

MAX

(*lbptr, range);

183

*ubptr =

MIN

(*ubptr, range);

193

*lbptr =

MAX

(*lbptr, lbglobal);

194

*ubptr =

MIN

(*ubptr, ubglobal);

199

*lbptr =

MAX

(mipsol, lbglobal);

200

*ubptr =

MIN

(mipsol, ubglobal);

229

assert(vars !=

NULL

);

230

assert(fixedvars !=

NULL

);

231

assert(fixedvals !=

NULL

);

232

assert(binfixings !=

NULL

);

233

assert(intfixings !=

NULL

);

234

assert(heur !=

NULL

);

238

assert(bestsol !=

NULL

);

244

checklength =

MIN

(nsols, heurdata->solnum);

245

assert(sols !=

NULL

);

249 if

( heurdata->deltalength < nbinvars )

254

assert(newsize >= nbinvars);

259 for

( i = heurdata->deltalength; i < newsize; i++ )

260

heurdata->delta[i] =

TRUE

;

262

heurdata->deltalength = newsize;

265

delta = heurdata->delta;

269

*intfixings = *binfixings = 0;

270 for

( i = 0; i < nbinvars; i++ )

287 if

( nsols > 1 && heurdata->lastnsolsfound != nsolsfound && delta[i] )

290 for

( j = 1; delta[i] && j < checklength &&

SCIPgetSolHeur

(

scip

, sols[j]) != heur ; j++ )

301

fixedvars[nfixedvars] = vars[i];

302

fixedvals[nfixedvars] = mipsolval;

308

*binfixings = nfixedvars;

311

heurdata->lastnsolsfound = nsolsfound;

314 for

( i = nbinvars; i < nbinvars + nintvars; ++i )

323

fixedvars[(nfixedvars)] = vars[i];

324

fixedvals[(nfixedvars)] = lb;

329

*intfixings = nfixedvars - *binfixings;

347 for

( i = nbinvars; i < nbinvars + nintvars; ++i )

352 if

( subvars[i] ==

NULL

)

358 if

( ub - lb >= 0.5 )

402

assert(bestsol !=

NULL

);

411

rhs = (

SCIP_Real

) heurdata->neighborhoodsize;

414 for

( i = 0; i < nbinvars; i++ )

416 if

( subvars[i] ==

NULL

)

429

consvals[nconsvars] = -1.0;

434

consvals[nconsvars] = 1.0;

435

consvars[nconsvars++] = subvars[i];

440

lhs, rhs,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

FALSE

,

FALSE

,

TRUE

,

TRUE

,

FALSE

) );

493

heurdata->uselprows, heurdata->copycuts, &success,

NULL

) );

497 if

( eventhdlr ==

NULL

)

503 SCIPdebugMsg

(

scip

,

"Copying the SCIP instance was %ssuccessful.\n"

, success ?

""

:

"not "

);

505 SCIPdebugMsg

(

scip

,

"DINS subproblem: %d vars (%d binvars & %d intvars), %d cons\n"

,

509 for

( i = 0; i < nvars; i++ )

516 if

( nbinvars - binfixings > heurdata->neighborhoodsize )

522 if

( intfixings < nintvars )

524

assert(nintvars > 0);

543

heurdata->nodelimit = nsubnodes;

599

cutoff =

MIN

(upperbound, cutoff);

608

cutoff =

MIN

(upperbound, cutoff);

613 if

( !heurdata->uselprows )

615

assert(eventhdlr !=

NULL

);

630 if

( !heurdata->uselprows )

632

assert(eventhdlr !=

NULL

);

674

assert(eventhdlr !=

NULL

);

675

assert(eventdata !=

NULL

);

677

assert(event !=

NULL

);

681

assert(heurdata !=

NULL

);

703

assert(heur !=

NULL

);

718

assert(heur !=

NULL

);

723

assert(heurdata !=

NULL

);

740

assert(heur !=

NULL

);

745

assert(heurdata !=

NULL

);

748

heurdata->usednodes = 0;

749

heurdata->lastnsolsfound = 0;

755 if

( heurdata->deltalength > 0 )

758 for

( i = 0; i < heurdata->deltalength; i++ )

759

heurdata->delta[i] =

TRUE

;

770

assert(heur !=

NULL

);

775

assert(heurdata !=

NULL

);

778 if

( heurdata->deltalength > 0 )

808

assert(heur !=

NULL

);

810

assert(result !=

NULL

);

816 if

( nodeinfeasible )

833

assert(heurdata !=

NULL

);

849

maxnnodes += heurdata->nodesofs;

852

nsubnodes = maxnnodes - heurdata->usednodes;

853

nsubnodes =

MIN

(nsubnodes , heurdata->maxnodes);

856 if

( nsubnodes < heurdata->minnodes )

864

assert(nbinvars <= nvars);

867 if

( nbinvars == 0 && nintvars == 0 )

877

assert(vars !=

NULL

);

883

binfixings = intfixings = 0;

888 if

( binfixings + intfixings == nbinvars + nintvars )

892 if

( (binfixings + intfixings) / (

SCIP_Real

)(

MAX

(nbinvars + nintvars, 1)) < heurdata->minfixingrate )

900

retcode =

wrapperDins

(

scip

, subscip, heur, heurdata, vars, fixedvars, fixedvals, result, nvars, nbinvars, nintvars, binfixings, intfixings, nsubnodes);

933

assert(heur !=

NULL

);

943 "number of nodes added to the contingent of the total nodes"

,

946 "contingent of sub problem nodes in relation to the number of nodes of the original problem"

,

949 "minimum number of nodes required to start the subproblem"

,

952 "number of pool-solutions to be checked for flag array update (for hard fixing of binary variables)"

,

955 "radius (using Manhattan metric) of the incumbent's neighborhood to be searched"

,

958 "maximum number of nodes to regard in the subproblem"

,

961 "factor by which " HEUR_NAME " should at least improve the incumbent"

,

964 "number of nodes without incumbent change that heuristic should wait"

,

968 "factor by which the limit on the number of LP depends on the node limit"

,

972 "minimum percentage of integer variables that have to be fixable"

,

976 "should subproblem be created out of the rows in the LP rows?"

,

980 "if uselprows == FALSE, should all active cuts from cutpool be copied to constraints in subproblem?"

,

984 "should uct node selection be used at the beginning of the search?"

,

988 "limit on number of improving incumbent solutions in sub-CIP"

,

Constraint handler for linear constraints in their most general form, .

#define SCIP_CALL_ABORT(x)

#define SCIP_LONGINT_FORMAT

SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)

SCIP_RETCODE SCIPtranslateSubSols(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_Bool *success, int *solindex)

SCIP_RETCODE SCIPcheckCopyLimits(SCIP *sourcescip, SCIP_Bool *success)

SCIP_RETCODE SCIPcopyLimits(SCIP *sourcescip, SCIP *targetscip)

SCIP_Bool SCIPisStopped(SCIP *scip)

SCIP_RETCODE SCIPfree(SCIP **scip)

SCIP_RETCODE SCIPcreate(SCIP **scip)

int SCIPgetNIntVars(SCIP *scip)

const char * SCIPgetProbName(SCIP *scip)

SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)

SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)

int SCIPgetNVars(SCIP *scip)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

int SCIPgetNConss(SCIP *scip)

int SCIPgetNBinVars(SCIP *scip)

void SCIPhashmapFree(SCIP_HASHMAP **hashmap)

void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)

SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)

SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)

SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)

SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)

SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)

SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)

SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)

SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)

SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)

SCIP_RETCODE SCIPincludeHeurDins(SCIP *scip)

SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)

SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)

SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)

const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)

SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)

SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)

SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)

SCIP_RETCODE SCIPsetHeurExitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXITSOL((*heurexitsol)))

SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))

SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)

SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)

SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))

SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)

SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)

SCIP_RETCODE SCIPsetHeurInitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINITSOL((*heurinitsol)))

const char * SCIPheurGetName(SCIP_HEUR *heur)

void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)

SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)

SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)

SCIP_Real SCIPgetLPObjval(SCIP *scip)

#define SCIPfreeBlockMemoryArray(scip, ptr, num)

int SCIPcalcMemGrowSize(SCIP *scip, int num)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

#define SCIPallocBlockMemoryArray(scip, ptr, num)

#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)

#define SCIPfreeBlockMemory(scip, ptr)

#define SCIPallocBlockMemory(scip, ptr)

SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)

SCIP_SOL * SCIPgetBestSol(SCIP *scip)

SCIP_HEUR * SCIPgetSolHeur(SCIP *scip, SCIP_SOL *sol)

int SCIPgetNSols(SCIP *scip)

SCIP_Longint SCIPgetSolNodenum(SCIP *scip, SCIP_SOL *sol)

SCIP_SOL ** SCIPgetSols(SCIP *scip)

SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)

SCIP_RETCODE SCIPtransformProb(SCIP *scip)

SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)

SCIP_RETCODE SCIPsolve(SCIP *scip)

SCIP_Longint SCIPgetNSolsFound(SCIP *scip)

SCIP_Real SCIPgetUpperbound(SCIP *scip)

SCIP_Longint SCIPgetNNodes(SCIP *scip)

SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)

SCIP_Real SCIPgetLowerbound(SCIP *scip)

SCIP_Longint SCIPgetNLPs(SCIP *scip)

SCIP_Real SCIPgetCutoffbound(SCIP *scip)

SCIP_RETCODE SCIPcopyLargeNeighborhoodSearch(SCIP *sourcescip, SCIP *subscip, SCIP_HASHMAP *varmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool uselprows, SCIP_Bool copycuts, SCIP_Bool *success, SCIP_Bool *valid)

SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPsumepsilon(SCIP *scip)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)

SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)

SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)

SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

int SCIPsnprintf(char *t, int len, const char *s,...)

#define DEFAULT_NODESQUOT

#define DEFAULT_NWAITINGNODES

static SCIP_DECL_EVENTEXEC(eventExecDins)

static SCIP_RETCODE determineVariableFixings(SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_VAR **vars, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nbinvars, int nintvars, int *binfixings, int *intfixings)

static SCIP_DECL_HEUREXITSOL(heurExitsolDins)

#define DEFAULT_NEIGHBORHOODSIZE

#define DEFAULT_MINFIXINGRATE

#define DEFAULT_MINIMPROVE

#define DEFAULT_USELPROWS

#define DEFAULT_BESTSOLLIMIT

static SCIP_DECL_HEURCOPY(heurCopyDins)

static SCIP_DECL_HEURFREE(heurFreeDins)

static void computeIntegerVariableBounds(SCIP *scip, SCIP_VAR *var, SCIP_Real *lbptr, SCIP_Real *ubptr)

static SCIP_RETCODE addLocalBranchingConstraint(SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEURDATA *heurdata)

static SCIP_RETCODE reboundIntegerVariables(SCIP *scip, SCIP *subscip, SCIP_VAR **vars, SCIP_VAR **subvars, int nbinvars, int nintvars)

static SCIP_DECL_HEUREXEC(heurExecDins)

static SCIP_RETCODE wrapperDins(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_VAR **vars, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, SCIP_RESULT *result, int nvars, int nbinvars, int nintvars, int binfixings, int intfixings, SCIP_Longint nsubnodes)

static SCIP_DECL_HEURINITSOL(heurInitsolDins)

methods commonly used by primal heuristics

memory allocation routines

BMS_BLKMEM * SCIPblkmem(SCIP *scip)

public methods for managing events

public methods for primal heuristics

public methods for message output

public data structures and miscellaneous methods

public methods for problem variables

public methods for branching rule plugins and branching

public methods for constraint handler plugins and constraints

public methods for problem copies

public methods for event handler plugins and event handlers

public methods for primal heuristic plugins and divesets

public methods for the LP relaxation, rows and columns

public methods for memory management

public methods for message handling

public methods for node selector plugins

public methods for numerical tolerances

public methods for SCIP parameter handling

public methods for global and local (sub)problems

public methods for solutions

public methods for querying solving statistics

public methods for SCIP variables

struct SCIP_EventData SCIP_EVENTDATA

#define SCIP_EVENTTYPE_LPSOLVED

struct SCIP_HeurData SCIP_HEURDATA

enum SCIP_Result SCIP_RESULT

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