A RetroSearch Logo

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

Search Query:

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

SCIP Doxygen Documentation: misc_rowprep.c Source File

50#define ROWPREP_SCALEUP_VIOLNONZERO (10.0*SCIPepsilon(scip)) 51#define ROWPREP_SCALEUP_MINVIOLFACTOR 2.0 52#define ROWPREP_SCALEUP_MAXMINCOEF (1.0 / SCIPfeastol(scip)) 53#define ROWPREP_SCALEUP_MAXMAXCOEF SCIPgetHugeValue(scip) 54#define ROWPREP_SCALEUP_MAXSIDE SCIPgetHugeValue(scip) 55#define ROWPREP_SCALEDOWN_MINMAXCOEF (1.0 / SCIPfeastol(scip)) 56#define ROWPREP_SCALEDOWN_MINCOEF SCIPfeastol(scip) 59#define M_SQRT2 sqrt(2.0) 107

assert(rowprep !=

NULL

);

110 switch

( rowprep->

nvars

)

123

tmp1 = rowprep->

coefs

[0];

125

rowprep->

coefs

[1] = tmp1;

127

tmp2 = rowprep->

vars

[0];

128

rowprep->

vars

[0] = rowprep->

vars

[1];

129

rowprep->

vars

[1] = tmp2;

139 for

( i = 0; i < rowprep->

nvars

; ++i )

147 while

( rowprep->

nvars

> 0 && rowprep->

coefs

[rowprep->

nvars

-1] == 0.0 )

177 if

( rowprep->

nvars

> 0 )

183

mincoef = maxcoef = 1.0;

189 while

( maxcoef / mincoef > maxcoefrange )

191 SCIPdebugMsg

(

scip

,

"cut coefficients have very large range: mincoef = %g maxcoef = %g\n"

, mincoef, maxcoef);

196

assert(rowprep->

nvars

> 1);

212 for

( pos = 0; pos < 2; ++pos )

214

var = rowprep->

vars

[pos ? rowprep->

nvars

-1 : maxcoefidx];

215

coef = rowprep->

coefs

[pos ? rowprep->

nvars

-1 : maxcoefidx];

224

ref =

MAX

(lb,

MIN

(ub, ref));

233

loss[pos] =

REALABS

(coef) * (ref - lb);

242

loss[pos] =

REALABS

(coef) * (ub - ref);

244

assert(loss[pos] >= 0.0);

246 SCIPdebugMsg

(

scip

,

"aggregating %g*<%s> %c= ... with <%s>[%g] %c= %g looses %g\n"

,

258

pos = (loss[1] ==

SCIP_INVALID

|| loss[1] > loss[0]) ? 0 : 1;

261

var = rowprep->

vars

[pos ? rowprep->

nvars

-1 : maxcoefidx];

262

coef = rowprep->

coefs

[pos ? rowprep->

nvars

-1 : maxcoefidx];

285

rowprep->

coefs

[maxcoefidx] = 0.0;

309 if

( maxcoefidx > 0 )

312 for

( i = maxcoefidx; i < rowprep->

nvars

; ++i )

314

rowprep->

vars

[i-maxcoefidx] = rowprep->

vars

[i];

315

rowprep->

coefs

[i-maxcoefidx] = rowprep->

coefs

[i];

317

rowprep->

nvars

-= maxcoefidx;

338

assert(rowprep !=

NULL

);

339

assert(viol !=

NULL

);

346 if

( *viol >= minviol )

367

*viol = ldexp(*viol, scaleexp);

393 if

( *viol > minviol && !

SCIPisInfinity

(

scip

, *viol) && scalefactor * *viol < minviol )

395

assert(minviol > 0.0);

412

*viol = ldexp(*viol, scaleexp);

432

assert(rowprep !=

NULL

);

453 SCIPdebugMsg

(

scip

,

"var with almost zero coef in boundchange-row %.15g*<%s> <=/>= %.15g; scaling up\n"

,

459 for

( i = 0; i < rowprep->

nvars

; ++i )

461

coef = rowprep->

coefs

[i];

463 if

( coef != roundcoef &&

SCIPisEQ

(

scip

, coef, roundcoef) )

468

var = rowprep->

vars

[i];

470 if

( rowprep->

local

)

475 if

( rowprep->

local

)

483 SCIPdebugMsg

(

scip

,

"var <%s> [%g,%g] has almost integral coef %.15g, round coefficient to %g and add constant %g\n"

,

493 SCIPdebugMsg

(

scip

,

"var <%s> [%g,%g] has almost integral coef %.15g, round coefficient to %g without relaxing side (!)\n"

,

496

rowprep->

coefs

[i] = roundcoef;

506 while

( rowprep->

nvars

> 0 && rowprep->

coefs

[rowprep->

nvars

-1] == 0.0 )

531

rowprep->

side

= 0.0;

542#undef SCIProwprepGetNVars 543#undef SCIProwprepGetVars 544#undef SCIProwprepGetCoefs 545#undef SCIProwprepGetSide 546#undef SCIProwprepGetSidetype 547#undef SCIProwprepIsLocal 548#undef SCIProwprepGetName 549#undef SCIProwprepGetNModifiedVars 550#undef SCIProwprepGetModifiedVars 551#undef SCIProwprepSetCoef 552#undef SCIProwprepAddSide 553#undef SCIProwprepAddConstant 554#undef SCIProwprepSetSidetype 555#undef SCIProwprepSetLocal 556#undef SCIProwprepRecordModifications 571

assert(rowprep !=

NULL

);

576

(*rowprep)->sidetype = sidetype;

577

(*rowprep)->local = local;

589

assert(rowprep !=

NULL

);

590

assert(*rowprep !=

NULL

);

606

assert(target !=

NULL

);

607

assert(source !=

NULL

);

619

(*target)->recordmodifications =

FALSE

;

620

(*target)->modifiedvars =

NULL

;

621

(*target)->modifiedvarssize = 0;

622

(*target)->nmodifiedvars = 0;

623

(*target)->modifiedside =

FALSE

;

633

assert(rowprep !=

NULL

);

635 return

rowprep->

nvars

;

643

assert(rowprep !=

NULL

);

645 return

rowprep->

vars

;

653

assert(rowprep !=

NULL

);

655 return

rowprep->

coefs

;

663

assert(rowprep !=

NULL

);

665 return

rowprep->

side

;

673

assert(rowprep !=

NULL

);

683

assert(rowprep !=

NULL

);

685 return

rowprep->

local

;

693

assert(rowprep !=

NULL

);

695 return

rowprep->

name

;

703

assert(rowprep !=

NULL

);

713

assert(rowprep !=

NULL

);

723

assert(rowprep !=

NULL

);

726

rowprep->

side

= 0.0;

740

assert(rowprep !=

NULL

);

742

rowprep->

coefs

[idx] = newcoef;

751

assert(rowprep !=

NULL

);

753

rowprep->

side

+= side;

774

assert(rowprep !=

NULL

);

785

assert(rowprep !=

NULL

);

787

rowprep->

local

= islocal;

795

assert(rowprep !=

NULL

);

810

assert(rowprep !=

NULL

);

812 if

( *rowprep->

name

!=

'\0'

)

817 for

( i = 0; i < rowprep->

nvars

; ++i )

843

assert(rowprep !=

NULL

);

845 if

( *rowprep->

name

!=

'\0'

)

853 for

( i = 0; i < rowprep->

nvars

; ++i )

855

coef = rowprep->

coefs

[i];

856

var = rowprep->

vars

[i];

860 if

(

REALABS

(term) > maxterm )

873

violation = activity - rowprep->

side

;

876

violation = rowprep->

side

- activity;

896

assert(rowprep !=

NULL

);

921

assert(rowprep !=

NULL

);

922

assert(var !=

NULL

);

947

assert(rowprep !=

NULL

);

948

assert(vars !=

NULL

|| nvars == 0);

949

assert(coefs !=

NULL

|| nvars == 0);

960

rowprep->

nvars

+= nvars;

988 for

( i = 0; i < rowprep->

nvars

; ++i )

1005 if

( reliable !=

NULL

)

1015 if

( reliable !=

NULL

)

1023

term = rowprep->

coefs

[i] * val;

1026 if

( reliable !=

NULL

&&

REALABS

(term) > maxterm )

1033

violation = activity - rowprep->

side

;

1036

violation = rowprep->

side

- activity;

1045 if

( reliable !=

NULL

)

1047 if

( violation != 0.0 )

1050

(void) frexp(maxterm / violation, &exponent);

1051

*reliable = exponent <= 50;

1057 return MAX

(violation, 0.0);

1073

assert(rowprep !=

NULL

);

1097

assert(rowprep !=

NULL

);

1099 if

( rowprep->

nvars

<= 1 )

1108 while

( j < rowprep->nvars )

1110 if

( rowprep->

vars

[i] == rowprep->

vars

[j] )

1125

rowprep->

coefs

[i] = 0.0;

1133

rowprep->

coefs

[i] = 0.0;

1136 if

( rowprep->

coefs

[i] == 0.0 )

1140

rowprep->

vars

[i] = rowprep->

vars

[j];

1148

rowprep->

vars

[i+1] = rowprep->

vars

[j];

1162

rowprep->

coefs

[i] = 0.0;

1170

rowprep->

coefs

[i] = 0.0;

1174 if

( rowprep->

coefs

[i] == 0.0 )

1178

rowprep->

nvars

= i+1;

1231 if

( rowprep->

nvars

> 0 )

1246

assert(myviol >= 0.0);

1249 if

( rowprep->

nvars

> 0 )

1261 if

( minviol > 0.0 )

1291 if

( coefrange !=

NULL

)

1293 if

( rowprep->

nvars

> 0 )

1301 if

( success !=

NULL

)

1315 SCIPdebugMsg

(

scip

,

"rowprep coefficient %g is beyond value for infinity\n"

, rowprep->

coefs

[0]);

1327 if

( *success && minviol > 0.0 )

1333 if

( !violreliable )

1338 else if

( myviol < minviol )

1340 SCIPdebugMsg

(

scip

,

"rowprep violation %g is below minimal violation %g\n"

, myviol, minviol);

1390

assert(maxcoefbound >= 1.0);

1405 if

( rowprep->

nvars

> 0 )

1419 if

( rowprep->

nvars

> 0 )

1436 if

(

REALABS

(rowprep->

coefs

[0]) < 1.0/maxcoefbound )

1438 else if

(

REALABS

(rowprep->

coefs

[0]) > maxcoefbound )

1461 if

( success !=

NULL

)

1475 SCIPdebugMsg

(

scip

,

"rowprep coefficient %g is beyond value for infinity\n"

, rowprep->

coefs

[0]);

1525 if

( frac < minfrac )

1528 else if

( frac < minfrac0 )

1533 for

( i = 0; i < rowprep->

nvars

; ++i )

1540 if

( frac < minfrac )

1543 else if

( frac < minfrac0 )

1550 SCIPdebugMsg

(

scip

,

"minimal fractional of rowprep coefs and side is %g, max coef/side is %g\n"

,

MIN

(minfrac, minfrac0), maxval);

1567 if

( factor < minscaleup )

1568

factor = minscaleup;

1573

makeintegral =

FALSE

;

1575 else if

( minscaleup > 1.0 )

1577

factor = minscaleup;

1582 if

( success !=

NULL

)

1595

factor = pow(2.0, factor);

1601 for

( i = 0; i < rowprep->

nvars

; ++i )

1602

rowprep->

coefs

[i] *= factor;

1605

rowprep->

side

*= factor;

1609 SCIPinfoMessage

(

scip

,

NULL

,

"scaled up rowprep by %g (minfrac=%g, minscaleup=%g), maxval is now %g\n"

, factor, minfrac, minscaleup, maxval);

1613 if

( success !=

NULL

)

1616 else if

( success !=

NULL

)

1635

assert(rowprep !=

NULL

);

1636

assert(factor > 0.0);

1639

v = frexp(factor, &expon);

1645 for

( i = 0; i < rowprep->

nvars

; ++i )

1646

rowprep->

coefs

[i] = ldexp(rowprep->

coefs

[i], expon);

1649

rowprep->

side

= ldexp(rowprep->

side

, expon);

1663

assert(row !=

NULL

);

1664

assert(rowprep !=

NULL

);

1665

assert(conshdlr !=

NULL

);

1686

assert(row !=

NULL

);

1687

assert(rowprep !=

NULL

);

1688

assert(cons !=

NULL

);

1709

assert(row !=

NULL

);

1710

assert(rowprep !=

NULL

);

void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)

#define SCIPduplicateBlockMemory(scip, ptr, source)

int SCIPcalcMemGrowSize(SCIP *scip, int num)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

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

#define SCIPfreeBlockMemory(scip, ptr)

#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)

#define SCIPallocBlockMemory(scip, ptr)

#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)

SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)

SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)

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 SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)

SCIP_Real SCIPgetSepaMinEfficacy(SCIP *scip)

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

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

SCIP_Real SCIPinfinity(SCIP *scip)

SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)

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

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

SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPepsilon(SCIP *scip)

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

int SCIPgetDepth(SCIP *scip)

SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

SCIP_VAR ** SCIProwprepGetVars(SCIP_ROWPREP *rowprep)

void SCIProwprepReset(SCIP_ROWPREP *rowprep)

SCIP_RETCODE SCIPcleanupRowprep2(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefbound, SCIP_Bool *success)

SCIP_Real SCIProwprepGetSide(SCIP_ROWPREP *rowprep)

SCIP_RETCODE SCIPensureRowprepSize(SCIP *scip, SCIP_ROWPREP *rowprep, int size)

void SCIPmergeRowprepTerms(SCIP *scip, SCIP_ROWPREP *rowprep)

int SCIProwprepGetNModifiedVars(SCIP_ROWPREP *rowprep)

SCIP_Real SCIPgetRowprepViolation(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Bool *reliable)

void SCIProwprepSetCoef(SCIP_ROWPREP *rowprep, int idx, SCIP_Real newcoef)

SCIP_Real SCIPscaleupRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real minscaleup, SCIP_Bool *success)

SCIP_Real * SCIProwprepGetCoefs(SCIP_ROWPREP *rowprep)

SCIP_VAR ** SCIProwprepGetModifiedVars(SCIP_ROWPREP *rowprep)

char * SCIProwprepGetName(SCIP_ROWPREP *rowprep)

void SCIProwprepSetSidetype(SCIP_ROWPREP *rowprep, SCIP_SIDETYPE sidetype)

SCIP_Bool SCIPisRowprepViolationReliable(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol)

SCIP_Bool SCIProwprepIsLocal(SCIP_ROWPREP *rowprep)

void SCIPprintRowprepSol(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, FILE *file)

void SCIProwprepAddConstant(SCIP_ROWPREP *rowprep, SCIP_Real constant)

SCIP_SIDETYPE SCIProwprepGetSidetype(SCIP_ROWPREP *rowprep)

SCIP_RETCODE SCIPgetRowprepRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_SEPA *sepa)

SCIP_RETCODE SCIPaddRowprepTerm(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)

SCIP_RETCODE SCIPgetRowprepRowCons(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONS *cons)

SCIP_RETCODE SCIPgetRowprepRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONSHDLR *conshdlr)

SCIP_RETCODE SCIPcreateRowprep(SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_SIDETYPE sidetype, SCIP_Bool local)

int SCIPscaleRowprep(SCIP_ROWPREP *rowprep, SCIP_Real factor)

int SCIProwprepGetNVars(SCIP_ROWPREP *rowprep)

void SCIProwprepRecordModifications(SCIP_ROWPREP *rowprep)

SCIP_RETCODE SCIPaddRowprepTerms(SCIP *scip, SCIP_ROWPREP *rowprep, int nvars, SCIP_VAR **vars, SCIP_Real *coefs)

void SCIProwprepSetLocal(SCIP_ROWPREP *rowprep, SCIP_Bool islocal)

void SCIProwprepAddSide(SCIP_ROWPREP *rowprep, SCIP_Real side)

SCIP_RETCODE SCIPcopyRowprep(SCIP *scip, SCIP_ROWPREP **target, SCIP_ROWPREP *source)

SCIP_RETCODE SCIPcleanupRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real minviol, SCIP_Real *viol, SCIP_Bool *success)

void SCIPfreeRowprep(SCIP *scip, SCIP_ROWPREP **rowprep)

void SCIPprintRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, FILE *file)

void SCIPsortDownRealRealPtr(SCIP_Real *realarray1, SCIP_Real *realarray2, void **ptrarray, int len)

void SCIPsortPtrReal(void **ptrarray, SCIP_Real *realarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)

#define BMSclearMemory(ptr)

#define BMScopyMemoryArray(ptr, source, num)

#define ROWPREP_SCALEUP_MAXSIDE

#define ROWPREP_SCALEUP_MAXMAXCOEF

#define ROWPREP_SCALEDOWN_MINMAXCOEF

static SCIP_RETCODE rowprepCleanupIntegralCoefs(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real *viol)

#define ROWPREP_SCALEUP_MAXMINCOEF

static SCIP_RETCODE rowprepCleanupImproveCoefrange(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefrange)

static void rowprepCleanupSide(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real *viol)

#define ROWPREP_SCALEUP_VIOLNONZERO

static SCIP_RETCODE rowprepCleanupSortTerms(SCIP *scip, SCIP_ROWPREP *rowprep)

#define ROWPREP_SCALEDOWN_MINCOEF

static SCIP_RETCODE rowprepRecordModifiedVar(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var)

static void rowprepCleanupScaleup(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real *viol, SCIP_Real minviol)

static void rowprepCleanupScaledown(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_Real *viol, SCIP_Real minviol)

#define ROWPREP_SCALEUP_MINVIOLFACTOR

public methods for message output

preparation of a linear inequality to become a SCIP_ROW

methods for sorting joint arrays of various types

public methods for problem variables

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 separator plugins

public methods for solutions

public methods for the branch-and-bound tree

SCIP_Real SCIPsetGetSepaMaxCoefRatioRowprep(SCIP_SET *set)

internal methods for global SCIP settings

char name[SCIP_MAXSTRLEN]

SCIP_Bool recordmodifications

miscellaneous datastructures

SCIP main data structure.

enum SCIP_SideType SCIP_SIDETYPE

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