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__rounding_8c_source.php below:

SCIP Doxygen Documentation: heur_rounding.c Source File

50#define HEUR_NAME "rounding" 51#define HEUR_DESC "LP rounding heuristic with infeasibility recovering" 52#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_ROUNDING 53#define HEUR_PRIORITY -1000 56#define HEUR_MAXDEPTH -1 57#define HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP 58#define HEUR_USESSUBSCIP FALSE 60#define DEFAULT_SUCCESSFACTOR 100 63#define DEFAULT_ONCEPERNODE FALSE 98

assert(violrows !=

NULL

);

99

assert(violrowpos !=

NULL

);

100

assert(nviolrows !=

NULL

);

106 if

( oldviol != newviol )

117

violpos = violrowpos[rowpos];

118

assert(0 <= violpos && violpos < *nviolrows);

119

assert(violrows[violpos] == row);

120

violrowpos[rowpos] = -1;

121 if

( violpos != *nviolrows-1 )

123

violrows[violpos] = violrows[*nviolrows-1];

131

assert(violrowpos[rowpos] == -1);

132

violrows[*nviolrows] = row;

133

violrowpos[rowpos] = *nviolrows;

160

assert(activities !=

NULL

);

161

assert(nviolrows !=

NULL

);

162

assert(0 <= *nviolrows && *nviolrows <= nlprows);

164

delta = newsolval - oldsolval;

169

assert(ncolrows == 0 || (colrows !=

NULL

&& colvals !=

NULL

));

171 for

(

r

= 0;

r

< ncolrows; ++

r

)

178

assert(-1 <= rowpos && rowpos < nlprows);

188

oldactivity = activities[rowpos];

191

newactivity = oldactivity + delta * colvals[

r

];

196

activities[rowpos] = newactivity;

239

assert(direction == +1 || direction == -1);

240

assert(roundvar !=

NULL

);

241

assert(oldsolval !=

NULL

);

242

assert(newsolval !=

NULL

);

253 for

( c = 0; c < nrowcols; ++c )

268 if

( direction * val < 0.0 )

272 if

( nlocks <= minnlocks )

275

deltaobj = obj * (roundval - solval);

279

bestdeltaobj = deltaobj;

282

*newsolval = roundval;

289

assert(direction * val > 0.0);

291 if

( nlocks <= minnlocks )

294

deltaobj = obj * (roundval - solval);

298

bestdeltaobj = deltaobj;

301

*newsolval = roundval;

369

assert(roundvar !=

NULL

);

370

assert(oldsolval !=

NULL

);

371

assert(newsolval !=

NULL

);

377 for

( v = 0; v < nlpcands; ++v )

389 if

( nlocks >= maxnlocks )

392

deltaobj = obj * (roundval - solval);

396

bestdeltaobj = deltaobj;

399

*newsolval = roundval;

405 if

( nlocks >= maxnlocks )

408

deltaobj = obj * (roundval - solval);

412

bestdeltaobj = deltaobj;

415

*newsolval = roundval;

434

assert(heur !=

NULL

);

449

assert(heur !=

NULL

);

455

assert(heurdata !=

NULL

);

471

assert(heurdata !=

NULL

);

475

heurdata->lastlp = -1;

490

assert(heurdata !=

NULL

);

505

assert(heurdata !=

NULL

);

506

heurdata->lastlp = -1;

509 if

( heurdata->oncepernode )

554

assert(result !=

NULL

);

569

assert(heurdata !=

NULL

);

573 if

( nlps == heurdata->lastlp )

575

heurdata->lastlp = nlps;

581 if

(

nnodes

% ((ncalls/heurdata->successfactor)/(nsolsfound+1)+1) != 0 )

597 SCIPdebugMsg

(

scip

,

"executing rounding heuristic: %d LP rows, %d fractionals\n"

, nlprows, nfrac);

608 for

(

r

= 0;

r

< nlprows; ++

r

)

621

violrows[nviolrows] = row;

622

violrowpos[

r

] = nviolrows;

626

violrowpos[

r

] = -1;

632

assert(sol !=

NULL

);

640 for

( c = 0; c < nlpcands; ++c )

644

minobj += obj * (bestroundval - lpcandssol[c]);

654 SCIPdebugMsg

(

scip

,

"rounding heuristic: nfrac=%d, nviolrows=%d, obj=%g (best possible obj: %g)\n"

,

670

row = violrows[nviolrows-1];

672

assert(0 <= rowpos && rowpos < nlprows);

673

assert(violrowpos[rowpos] == nviolrows-1);

675 SCIPdebugMsg

(

scip

,

"rounding heuristic: try to fix violated row <%s>: %g <= %g <= %g\n"

,

691 SCIPdebugMsg

(

scip

,

"rounding heuristic: search rounding variable and try to stay feasible\n"

);

696 if

( roundvar ==

NULL

)

698 SCIPdebugMsg

(

scip

,

"rounding heuristic: -> didn't find a rounding variable\n"

);

702 SCIPdebugMsg

(

scip

,

"rounding heuristic: -> round var <%s>, oldval=%g, newval=%g, obj=%g\n"

,

707

roundvar, oldsolval, newsolval) );

715 if

( obj > 0.0 && newsolval > oldsolval )

717 else if

( obj < 0.0 && newsolval < oldsolval )

720 SCIPdebugMsg

(

scip

,

"rounding heuristic: -> nfrac=%d, nviolrows=%d, obj=%g (best possible obj: %g)\n"

,

725 if

( nfrac == 0 && nviolrows == 0 )

775

assert(heur !=

NULL

);

787 "number of calls per found solution that are considered as standard success, a higher factor causes the heuristic to be called more often"

,

791 "should the heuristic only be called once per node?"

,

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 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 SCIPincludeHeurRounding(SCIP *scip)

SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)

SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)

SCIP_Real * SCIPcolGetVals(SCIP_COL *col)

SCIP_ROW ** SCIPcolGetRows(SCIP_COL *col)

int SCIPcolGetNLPNonz(SCIP_COL *col)

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 SCIPheurGetNSolsFound(SCIP_HEUR *heur)

SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit)))

SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)

void SCIPheurSetTimingmask(SCIP_HEUR *heur, SCIP_HEURTIMING timingmask)

SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)

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

SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))

const char * SCIPheurGetName(SCIP_HEUR *heur)

void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)

SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)

SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)

SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)

SCIP_Real SCIPgetLPObjval(SCIP *scip)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

#define SCIPfreeBlockMemory(scip, ptr)

#define SCIPallocBlockMemory(scip, ptr)

SCIP_Real SCIProwGetLhs(SCIP_ROW *row)

SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)

SCIP_Real SCIProwGetRhs(SCIP_ROW *row)

int SCIProwGetNLPNonz(SCIP_ROW *row)

int SCIProwGetLPPos(SCIP_ROW *row)

SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)

const char * SCIProwGetName(SCIP_ROW *row)

SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)

SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)

SCIP_Real * SCIProwGetVals(SCIP_ROW *row)

SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)

SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)

SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)

SCIP_RETCODE SCIPtrySol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)

SCIP_RETCODE SCIPlinkLPSol(SCIP *scip, SCIP_SOL *sol)

SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)

SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)

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

SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)

SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)

SCIP_Longint SCIPgetNNodes(SCIP *scip)

SCIP_Longint SCIPgetNLPs(SCIP *scip)

SCIP_Real SCIPgetCutoffbound(SCIP *scip)

SCIP_Real SCIPinfinity(SCIP *scip)

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

SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)

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

SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

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

SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)

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

SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)

int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)

SCIP_Real SCIPvarGetObj(SCIP_VAR *var)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

const char * SCIPvarGetName(SCIP_VAR *var)

int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)

static SCIP_RETCODE selectEssentialRounding(SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_VAR **lpcands, int nlpcands, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval)

#define DEFAULT_SUCCESSFACTOR

static SCIP_DECL_HEURCOPY(heurCopyRounding)

static SCIP_RETCODE updateActivities(SCIP *scip, SCIP_Real *activities, SCIP_ROW **violrows, int *violrowpos, int *nviolrows, int nlprows, SCIP_VAR *var, SCIP_Real oldsolval, SCIP_Real newsolval)

static void updateViolations(SCIP *scip, SCIP_ROW *row, SCIP_ROW **violrows, int *violrowpos, int *nviolrows, SCIP_Real oldactivity, SCIP_Real newactivity)

#define DEFAULT_ONCEPERNODE

static SCIP_RETCODE selectIncreaseRounding(SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval)

static SCIP_DECL_HEUREXEC(heurExecRounding)

static SCIP_DECL_HEUREXIT(heurExitRounding)

static SCIP_RETCODE selectDecreaseRounding(SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval)

static SCIP_DECL_HEUREXITSOL(heurExitsolRounding)

static SCIP_DECL_HEURINITSOL(heurInitsolRounding)

static SCIP_DECL_HEURFREE(heurFreeRounding)

static SCIP_RETCODE selectRounding(SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, int direction, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval)

static SCIP_DECL_HEURINIT(heurInitRounding)

LP rounding heuristic that tries to recover from intermediate infeasibilities.

memory allocation routines

public methods for primal heuristics

public methods for LP management

public methods for message output

public methods for problem variables

public methods for branching rule plugins and branching

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 numerical tolerances

public methods for SCIP parameter handling

public methods for solutions

public methods for querying solving statistics

struct SCIP_HeurData SCIP_HEURDATA

enum SCIP_Retcode SCIP_RETCODE

#define SCIP_HEURTIMING_AFTERLPNODE

enum SCIP_Vartype SCIP_VARTYPE


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