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

SCIP Doxygen Documentation: heur_twoopt.c Source File

55#define HEUR_NAME "twoopt" 56#define HEUR_DESC "primal heuristic to improve incumbent solution by flipping pairs of variables" 57#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_ITERATIVE 58#define HEUR_PRIORITY -20100 61#define HEUR_MAXDEPTH -1 63#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE 64#define HEUR_USESSUBSCIP FALSE 67#define DEFAULT_INTOPT FALSE 68#define DEFAULT_WAITINGNODES 0 69#define DEFAULT_MATCHINGRATE 0.5 71#define DEFAULT_MAXNSLAVES 199 72#define DEFAULT_ARRAYSIZE 10 73#define DEFAULT_RANDSEED 37 176

assert(master !=

NULL

);

177

assert(slave !=

NULL

);

178

assert(activities !=

NULL

);

192

assert(ncolmasterrows == 0 || masterrows !=

NULL

);

198

assert(ncolslaverows == 0 || slaverows !=

NULL

);

201 for

(

int

i = 0; i < ncolmasterrows &&

SCIProwGetLPPos

(masterrows[i]) >= 0; ++i )

206

assert(rowpos < nrows);

210

activities[rowpos] += mastercolvals[i] * (int)masterdir * shiftval;

214 for

(

int

j = 0; j < ncolslaverows &&

SCIProwGetLPPos

(slaverows[j]) >= 0; ++j )

219

assert(rowpos < nrows);

224

activities[rowpos] += slavecolvals[j] * (int)slavedir * shiftval;

233 for

(

int

i = 0; i < ncolmasterrows &&

SCIProwGetLPPos

(masterrows[i]) >= 0; ++i )

268

assert(var1 !=

NULL

);

269

assert(var2 !=

NULL

);

279

assert(nnonzeros1 == 0 || rows1 !=

NULL

);

280

assert(nnonzeros2 == 0 || rows2 !=

NULL

);

284 for

(

int

i = 0; i < nnonzeros1 && i < nnonzeros2; ++i )

293 return

nnonzeros2 - nnonzeros1 ;

328

assert(var1 !=

NULL

);

329

assert(var2 !=

NULL

);

339

assert(nnonzeros1 == 0 || rows1 !=

NULL

);

340

assert(nnonzeros2 == 0 || rows2 !=

NULL

);

342 if

( nnonzeros1 == 0 && nnonzeros2 == 0 )

346 if

( matchingrate == 0.0 )

350

nrowmaximum =

MAX

(nnonzeros1, nnonzeros2);

352

nrowabs =

ABS

(nnonzeros1 - nnonzeros2);

353

nrows1not2 = nrowmaximum - nnonzeros2;

354

nrows2not1 = nrowmaximum - nnonzeros1;

359

assert(nrowmaximum > 0);

361 if

( (nrowmaximum - nrowabs) / (

SCIP_Real

) nrowmaximum < matchingrate )

368 while

( i < nnonzeros1 && j < nnonzeros2 )

433

assert(sol !=

NULL

);

434

assert(master !=

NULL

);

435

assert(slave !=

NULL

);

447

masterbound =

bound

- mastersolval;

448

masterbound =

SCIPisFeasLE

(

scip

, mastersolval + ceil(masterbound),

bound

) ? ceil(masterbound) : floor(masterbound);

453

masterbound = mastersolval -

bound

;

454

masterbound =

SCIPisFeasGE

(

scip

, mastersolval - ceil(masterbound),

bound

) ? ceil(masterbound) : floor(masterbound);

460

slavebound =

bound

- slavesolval;

461

slavebound =

SCIPisFeasLE

(

scip

, slavesolval + ceil(slavebound),

bound

) ? ceil(slavebound) : floor(slavebound);

466

slavebound = slavesolval -

bound

;

467

slavebound =

SCIPisFeasGE

(

scip

, slavesolval - ceil(slavebound),

bound

) ? ceil(slavebound) : floor(slavebound);

470 bound

=

MIN

(masterbound, slavebound);

487

assert(nslaverows == 0 || slavecolvals !=

NULL

);

488

assert(nmasterrows == 0 || mastercolvals !=

NULL

);

491

(

int

)masterdirection, nmasterrows,

SCIPvarGetName

(slave), (

int

)slavedirection, nslaverows);

498 while

( i < nslaverows || j < nmasterrows )

521

slaveincrement =

FALSE

;

524 if

( i < nslaverows )

527

slaveindex = INT_MAX;

529 if

( j < nmasterrows )

532

masterindex = INT_MAX;

534

assert(0 <= slaveindex && 0 <= masterindex);

536

assert(slaveindex < INT_MAX || masterindex < INT_MAX);

539 if

( slaveindex <= masterindex )

543

slaveincrement =

TRUE

;

544

masterincrement = (slaveindex == masterindex);

548

assert(j < nmasterrows);

552

masterincrement =

TRUE

;

554

assert(row !=

NULL

);

565 if

( slaveindex <= masterindex )

566

effect += (slavecolvals[i] * (int)slavedirection);

567 if

( masterindex <= slaveindex )

568

effect += (mastercolvals[j] * (int)masterdirection);

580

assert( rowpos < nrows );

584 SCIPdebugMsg

(

scip

,

" %g <= %g <= %g, bound = %g, effect = %g (%g * %d + %g * %d) (i=%d,j=%d)\n"

,

586

slaveindex <= masterindex ? slavecolvals[i] : 0.0, (

int

)slavedirection,

587

masterindex <= slaveindex ? mastercolvals[j] : 0.0, (

int

)masterdirection, i, j);

589

newval = (side - activities[rowpos]) / effect;

592 if

( newval <

bound

)

596

activity = activities[rowpos] + effect * ceil(newval);

600 bound

= ceil(newval);

602 bound

= floor(newval);

615 SCIPdebugMsg

(

scip

,

" No influence of row %s, effect %g, master coeff: %g slave coeff: %g (i=%d, j=%d)\n"

,

616 SCIProwGetName

(row), effect, mastercolvals[j], slavecolvals[i], i, j);

626 if

( slaveincrement )

628 if

( masterincrement )

648

assert(blockend !=

NULL

);

649

assert(varindex <= *blockend);

651

vars[varindex] = vars[*blockend];

674

assert(vars !=

NULL

);

676

assert(nblocks !=

NULL

);

677

assert(maxblocksize !=

NULL

);

678

assert(nblockvars !=

NULL

);

679

assert(blockstart !=

NULL

);

680

assert(blockend !=

NULL

);

681

assert(heur !=

NULL

);

682

assert(heurdata !=

NULL

);

688 SCIPsortPtr

((

void

**)(*varspointer), SCIPvarcolComp, nvars);

702 for

(

int

v = 1; v < nvars; ++v )

708 if

( v - startindex >= 2 )

710

assert(*nblocks < nvars/2);

711

(*nblockvars) += v - startindex;

712

(*maxblocksize) =

MAX

((*maxblocksize), v - startindex);

713

(*blockstart)[*nblocks] = startindex;

714

(*blockend)[*nblocks] = v - 1;

719 else if

( v == nvars - 1 && v - startindex >= 1 )

721

assert(*nblocks < nvars/2);

722

(*nblockvars) += v - startindex + 1;

723

(*maxblocksize) =

MAX

((*maxblocksize), v - startindex + 1);

724

(*blockstart)[*nblocks] = startindex;

725

(*blockend)[*nblocks] = v;

773

assert(heurdata !=

NULL

);

776 if

( heurdata->presolved )

784

heurdata->ntotalbinvars += nbinvars;

792

&nbinblockvars, &(heurdata->binblockstart), &(heurdata->binblockend), heur, heurdata) );

796

heurdata->binnblocks += heurdata->nbinblocks;

797

heurdata->binnblockvars += nbinblockvars;

798

heurdata->maxbinblocksize =

MAX

(maxbinblocksize, heurdata->maxbinblocksize);

800 SCIPstatisticMessage

(

" Twoopt BINARY presolving finished with <%d> blocks, <%d> block variables \n"

,

801

heurdata->nbinblocks, nbinblockvars);

805

heurdata->nbinvars = nbinvars;

806

heurdata->execute = nbinvars > 1 && heurdata->nbinblocks > 0;

808 if

( heurdata->intopt && nintvars > 1 )

810 SCIP_CALL

(

innerPresolve

(

scip

, &(vars[nbinvars]), &(heurdata->intvars), nintvars, &(heurdata->nintblocks), &maxintblocksize,

811

&nintblockvars, &(heurdata->intblockstart), &(heurdata->intblockend),

814

heurdata->execute = heurdata->execute || heurdata->nintblocks > 0;

818

heurdata->intnblocks += heurdata->nintblocks;

819

heurdata->intnblockvars += nintblockvars;

820

heurdata->ntotalintvars += nintvars;

821

heurdata->maxintblocksize =

MAX

(maxintblocksize, heurdata->maxintblocksize);

822 SCIPstatisticMessage

(

" Twoopt Integer presolving finished with <%d> blocks, <%d> block variables \n"

,

823

heurdata->nintblocks, nintblockvars);

827

heurdata->nintvars = nintvars;

830

heurdata->presolved =

TRUE

;

845

assert(heur !=

NULL

);

860

assert(heur !=

NULL

);

866

assert(heurdata !=

NULL

);

879

assert(heur !=

NULL

);

884

assert(heurdata !=

NULL

);

887

heurdata->nbinvars = 0;

888

heurdata->nintvars = 0;

889

heurdata->lastsolindex = -1;

890

heurdata->presolved =

FALSE

;

891

heurdata->nbinblocks = 0;

892

heurdata->nintblocks = 0;

900

heurdata->binnexchanges = 0;

901

heurdata->intnexchanges = 0;

902

heurdata->binnblockvars = 0;

903

heurdata->intnblockvars = 0;

904

heurdata->binnblocks = 0;

905

heurdata->intnblocks = 0;

907

heurdata->maxbinblocksize = 0;

908

heurdata->maxintblocksize = 0;

910

heurdata->ntotalbinvars = 0;

911

heurdata->ntotalintvars = 0;

920

heurdata->binvars =

NULL

;

921

heurdata->intvars =

NULL

;

922

heurdata->binblockstart =

NULL

;

923

heurdata->binblockend =

NULL

;

924

heurdata->intblockstart =

NULL

;

925

heurdata->intblockend =

NULL

;

954 int

* bestdirections;

960

assert(blockstart !=

NULL

&& blockend !=

NULL

);

961

assert(varboundserr !=

NULL

);

962

assert(activities !=

NULL

);

963

assert(worksol !=

NULL

);

964

assert(improvement !=

NULL

);

966

*varboundserr =

FALSE

;

975 for

(

int b

= 0;

b

< nblocks; ++

b

)

979

blocklen = blockend[

b

] - blockstart[

b

] + 1;

982 for

(

int

m = 0; m < blocklen; ++m )

997

master = vars[blockstart[

b

] + m];

1005

*varboundserr =

TRUE

;

1006 SCIPdebugMsg

(

scip

,

"Solution has violated variable bounds for var %s: %g <= %g <= %g \n"

,

1026

bestimprovement = 0.0;

1034 if

( heurdata->maxnslaves >= 0 && blocklen > heurdata->maxnslaves )

1035

firstslave =

SCIPrandomGetInt

(heurdata->randnumgen, blockstart[

b

] + m, blockend[

b

]);

1037

firstslave = blockstart[

b

] + m + 1;

1039

nslaves =

MIN

((heurdata->maxnslaves == -1 ? INT_MAX : heurdata->maxnslaves), blocklen);

1044 for

(

int

s = 0; s < nslaves; ++s )

1055

slaveindex = (firstslave + s - blockstart[

b

]) % blocklen;

1056

slaveindex += blockstart[

b

];

1059 if

( (blocklen <= heurdata->maxnslaves || heurdata->maxnslaves == -1) && slaveindex < blockstart[

b

] + m )

1062 if

( slaveindex == blockstart[

b

] + m )

1066

slave = vars[slaveindex];

1078

*varboundserr =

TRUE

;

1079 SCIPdebugMsg

(

scip

,

"Solution has violated variable bounds for var %s: %g <= %g <= %g \n"

,

1100

equaldirbound = 0.0;

1107

changedobj = (masterobj - slaveobj) * diffdirbound;

1113

changedobj = (slaveobj - masterobj) * diffdirbound;

1119 if

( (masterobj + slaveobj) * equaldirbound < changedobj )

1121

changedobj = (masterobj + slaveobj) * equaldirbound;

1128 if

( -(masterobj + slaveobj) * equaldirbound < changedobj )

1130

changedobj = -(masterobj + slaveobj) * equaldirbound;

1141

&& changedobj < bestimprovement )

1143

bestimprovement = changedobj;

1144

bestslavepos = slaveindex;

1145

bestdirection = directions;

1151 if

( directions / 2 == 1 )

1156 if

( directions % 2 == 1 )

1161 if

( bestmasterdir == bestslavedir )

1162

bestbound = equaldirbound;

1164

bestbound = diffdirbound;

1169 if

( bestslavepos >= 0 )

1171 if

( npairs == arraysize )

1177

arraysize = 2 * arraysize;

1179

assert( npairs < arraysize );

1181

bestmasters[npairs] = master;

1182

bestslaves[npairs] = vars[bestslavepos];

1183

objchanges[npairs] = ((int)bestslavedir *

SCIPvarGetObj

(bestslaves[npairs]) + (int)bestmasterdir * masterobj) * bestbound;

1184

bestdirections[npairs] = bestdirection;

1186

assert(objchanges[npairs] < 0);

1188 SCIPdebugMsg

(

scip

,

" Saved candidate pair {%s=%g, %s=%g} with objectives <%g>, <%g> to be set to {%g, %g} %d\n"

,

1190

masterobj,

SCIPvarGetObj

(bestslaves[npairs]), mastersolval + (

int

)bestmasterdir * bestbound,

SCIPgetSolVal

(

scip

, worksol, bestslaves[npairs])

1191

+ (

int

)bestslavedir * bestbound, bestdirections[npairs]);

1201 SCIPsortRealPtrPtrInt

(objchanges, (

void

**)bestmasters, (

void

**)bestslaves, bestdirections, npairs);

1203 for

(

int b

= 0;

b

< npairs; ++

b

)

1215

master = bestmasters[

b

];

1216

slave = bestslaves[

b

];

1222

assert(0 <= bestdirections[

b

] && bestdirections[

b

] < 4);

1224 if

( bestdirections[

b

] / 2 == 1 )

1229 if

( bestdirections[

b

] % 2 == 1 )

1243 SCIPdebugMsg

(

scip

,

" Promising candidates {%s=%g, %s=%g} with objectives <%g>, <%g> to be set to {%g, %g}\n"

,

1245

masterobj, slaveobj, mastersolval + (

int

)masterdir *

bound

, slavesolval + (

int

)slavedir *

bound

);

1249

changedobj = ((int)slavedir * slaveobj + (

int

)masterdir * masterobj) *

bound

;

1257

activities, nrows, &feasible) );

1267 SCIPdebugMsg

(

scip

,

" Feasible shift: <%s>[%g, %g] (obj: %f) <%f> --> <%f>\n"

,

1272#ifdef SCIP_STATISTIC 1275

++(heurdata->binnexchanges);

1277

++(heurdata->intnexchanges);

1280

*improvement =

TRUE

;

1300

assert(heurdata !=

NULL

);

1303

assert(heurdata->nbinvars <= 1 || heurdata->binvars !=

NULL

);

1305#ifdef SCIP_STATISTIC 1308 " Twoopt Binary Statistics : " 1309 "%6.2g %6.2g %4.2g %4.0g %6d (blocks/run, variables/run, varpercentage, avg. block size, max block size) \n"

,

1310

heurdata->nruns == 0 ? 0.0 : (

SCIP_Real

)heurdata->binnblocks/(heurdata->nruns),

1311

heurdata->nruns == 0 ? 0.0 : (

SCIP_Real

)heurdata->binnblockvars/(heurdata->nruns),

1312

heurdata->ntotalbinvars == 0 ? 0.0 : (

SCIP_Real

)heurdata->binnblockvars/(heurdata->ntotalbinvars) * 100.0,

1313

heurdata->binnblocks == 0 ? 0.0 : heurdata->binnblockvars/(

SCIP_Real

)(heurdata->binnblocks),

1314

heurdata->maxbinblocksize);

1317 " Twoopt Integer statistics : " 1318 "%6.2g %6.2g %4.2g %4.0g %6d (blocks/run, variables/run, varpercentage, avg block size, max block size) \n"

,

1319

heurdata->nruns == 0 ? 0.0 : (

SCIP_Real

)heurdata->intnblocks/(heurdata->nruns),

1320

heurdata->nruns == 0 ? 0.0 : (

SCIP_Real

)heurdata->intnblockvars/(heurdata->nruns),

1321

heurdata->ntotalintvars == 0 ? 0.0 : (

SCIP_Real

)heurdata->intnblockvars/(heurdata->ntotalintvars) * 100.0,

1322

heurdata->intnblocks == 0 ? 0.0 : heurdata->intnblockvars/(

SCIP_Real

)(heurdata->intnblocks),

1323

heurdata->maxintblocksize);

1326 " Twoopt results : " 1327 "%6d %6d %4d %4.2g (runs, binary exchanges, Integer shiftings, matching rate)\n"

,

1329

heurdata->binnexchanges,

1330

heurdata->intnexchanges,

1331

heurdata->matchingrate);

1334

heurdata->binnblockvars = 0;

1335

heurdata->binnblocks = 0;

1336

heurdata->intnblocks = 0;

1337

heurdata->intnblockvars = 0;

1338

heurdata->binnexchanges = 0;

1339

heurdata->intnexchanges = 0;

1343 if

( heurdata->binvars !=

NULL

)

1348 if

( heurdata->nbinblocks > 0 )

1350

assert(heurdata->binblockstart !=

NULL

);

1351

assert(heurdata->binblockend !=

NULL

);

1356

heurdata->nbinvars = 0;

1357

heurdata->nbinblocks = 0;

1359 if

( heurdata->nintblocks > 0 )

1361

assert(heurdata->intblockstart !=

NULL

);

1362

assert(heurdata->intblockend !=

NULL

);

1369 if

( heurdata->intvars !=

NULL

)

1374

heurdata->nbinblocks = 0;

1375

heurdata->nintblocks = 0;

1376

heurdata->nbinvars = 0;

1377

heurdata->nintvars = 0;

1379

assert(heurdata->binvars ==

NULL

);

1380

assert(heurdata->intvars ==

NULL

);

1395

assert(heur !=

NULL

);

1402

assert(heurdata !=

NULL

);

1403

assert(heurdata->binvars ==

NULL

&& heurdata->intvars ==

NULL

);

1404

assert(heurdata->binblockstart ==

NULL

&& heurdata->binblockend ==

NULL

);

1405

assert(heurdata->intblockstart ==

NULL

&& heurdata->intblockend ==

NULL

);

1408

heurdata->nbinvars = 0;

1409

heurdata->nintvars = 0;

1410

heurdata->lastsolindex = -1;

1411

heurdata->presolved =

FALSE

;

1413#ifdef SCIP_STATISTIC 1414

++(heurdata->nruns);

1431

assert(heur !=

NULL

);

1439

assert(heurdata !=

NULL

);

1441

nbinvars = heurdata->nbinvars;

1442

nintvars = heurdata->nintvars;

1445 if

( heurdata->binvars !=

NULL

)

1449 if

( heurdata->binblockstart !=

NULL

)

1451

assert(heurdata->binblockend !=

NULL

);

1456

heurdata->nbinvars = 0;

1457

heurdata->nbinblocks = 0;

1459 if

( heurdata->intblockstart !=

NULL

)

1461

assert(heurdata->intblockend !=

NULL

);

1466

heurdata->nintblocks = 0;

1469 if

( heurdata->intvars !=

NULL

)

1474

heurdata->nintvars = 0;

1476

assert(heurdata->binvars ==

NULL

&& heurdata->intvars ==

NULL

);

1477

assert(heurdata->binblockstart ==

NULL

&& heurdata->binblockend ==

NULL

);

1478

assert(heurdata->intblockstart ==

NULL

&& heurdata->intblockend ==

NULL

);

1501 int

ncolsforsorting;

1506

assert(heur !=

NULL

);

1508

assert(result !=

NULL

);

1512

assert(heurdata !=

NULL

);

1540

presolthiscall =

FALSE

;

1543

ncolsforsorting =

MIN

(ncols, ndiscvars);

1546 if

( !heurdata->presolved )

1550 for

(

int

i = 0; i < ncolsforsorting; ++i )

1554

presolthiscall =

TRUE

;

1557

assert(heurdata->presolved);

1559 SCIPdebugMsg

(

scip

,

" Twoopt heuristic is %sexecuting.\n"

, heurdata->execute ?

""

:

"not "

);

1562 if

( !heurdata->execute )

1565

nbinvars = heurdata->nbinvars;

1566

nintvars = heurdata->nintvars;

1567

ndiscvars = nbinvars + nintvars;

1587 for

(

int

i = 0; i < nlprows; ++i )

1592

assert(row !=

NULL

);

1606 if

( !presolthiscall )

1608 for

(

int

i = 0; i < ncolsforsorting; ++i )

1611 SCIPdebugMsg

(

scip

,

" Twoopt heuristic has initialized activities and sorted rows! \n"

);

1614

improvement =

FALSE

;

1615

varboundserr =

FALSE

;

1617 if

( heurdata->nbinblocks > 0 )

1619 SCIP_CALL

(

optimize

(

scip

, worksol, heurdata->binvars, heurdata->binblockstart, heurdata->binblockend, heurdata->nbinblocks,

1620 OPTTYPE_BINARY

, activities, nlprows, &improvement, &varboundserr, heurdata) );

1631 if

( heurdata->nintblocks > 0 )

1633

assert(heurdata->intopt);

1634 SCIP_CALL

(

optimize

(

scip

, worksol, heurdata->intvars, heurdata->intblockstart, heurdata->intblockend, heurdata->nintblocks,

1635 OPTTYPE_INTEGER

, activities, nlprows, &improvement, &varboundserr, heurdata) );

1640 if

( ! improvement || varboundserr )

1661#ifdef SCIP_STATISTIC 1676 SCIPdebugMsg

(

scip

,

"shifted solution should be feasible -> solve LP to fix continuous variables to best values\n"

);

1683 SCIPdebugMsg

(

scip

,

" Cont. variable <%s>, status %d with bounds [%g <= %g <= x <= %g <= %g]\n"

,

1703 for

(

int

i = 0; i < ndiscvars; ++i )

1717 for

(

int

i = 0; i < ndiscvars; ++i )

1730 SCIPwarningMessage

(

scip

,

"Error while solving LP in Twoopt heuristic; LP solve terminated with code <%d>\n"

,retstat);

1761#ifdef SCIP_STATISTIC 1800

assert(heur !=

NULL

);

1816 "nodes to wait after last best solution before calling heuristic"

,

1825 "parameter to determine the percentage of rows two variables have to share before they are considered equal"

,

#define SCIP_LONGINT_FORMAT

int SCIPgetNIntVars(SCIP *scip)

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

int SCIPgetNVars(SCIP *scip)

SCIP_VAR ** SCIPgetVars(SCIP *scip)

int SCIPgetNBinVars(SCIP *scip)

void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)

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

int SCIPcolGetNNonz(SCIP_COL *col)

SCIP_Real * SCIPcolGetVals(SCIP_COL *col)

SCIP_ROW ** SCIPcolGetRows(SCIP_COL *col)

void SCIPcolSort(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_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit)))

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_RETCODE SCIPchgVarLbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)

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

SCIP_Real SCIPgetVarLbDive(SCIP *scip, SCIP_VAR *var)

SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)

SCIP_RETCODE SCIPstartDive(SCIP *scip)

SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)

SCIP_RETCODE SCIPendDive(SCIP *scip)

SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)

SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)

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

int SCIPgetNLPRows(SCIP *scip)

SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)

#define SCIPfreeBlockMemoryArray(scip, ptr, num)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPreallocBufferArray(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)

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

SCIP_Real SCIProwGetLhs(SCIP_ROW *row)

SCIP_Real SCIProwGetRhs(SCIP_ROW *row)

int SCIProwGetLPPos(SCIP_ROW *row)

SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)

SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)

const char * SCIProwGetName(SCIP_ROW *row)

int SCIProwGetIndex(SCIP_ROW *row)

SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)

SCIP_SOL * SCIPgetBestSol(SCIP *scip)

SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)

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

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

SCIP_Longint SCIPsolGetNodenum(SCIP_SOL *sol)

SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)

SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)

int SCIPsolGetIndex(SCIP_SOL *sol)

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_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)

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

void SCIPsolSetHeur(SCIP_SOL *sol, SCIP_HEUR *heur)

SCIP_Longint SCIPgetNNodes(SCIP *scip)

SCIP_Longint SCIPgetNLPIterations(SCIP *scip)

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

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

SCIP_Bool SCIPisPositive(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 SCIPisFeasLE(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_Bool SCIPisZero(SCIP *scip, SCIP_Real val)

SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)

SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetObj(SCIP_VAR *var)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)

int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)

SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)

void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)

void SCIPsortRealPtrPtrInt(SCIP_Real *realarray, void **ptrarray1, void **ptrarray2, int *intarray, int len)

static SCIP_Real determineBound(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *master, DIRECTION masterdirection, SCIP_VAR *slave, DIRECTION slavedirection, SCIP_Real *activities, int nrows)

static SCIP_DECL_HEURINITSOL(heurInitsolTwoopt)

static void disposeVariable(SCIP_VAR **vars, int *blockend, int varindex)

static SCIP_DECL_HEUREXIT(heurExitTwoopt)

static SCIP_DECL_HEURFREE(heurFreeTwoopt)

#define DEFAULT_MATCHINGRATE

static SCIP_DECL_HEUREXEC(heurExecTwoopt)

#define DEFAULT_WAITINGNODES

static SCIP_Bool checkConstraintMatching(SCIP *scip, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_Real matchingrate)

static SCIP_DECL_SORTPTRCOMP(SCIPvarcolComp)

static SCIP_DECL_HEURCOPY(heurCopyTwoopt)

static int varColCompare(SCIP_VAR *var1, SCIP_VAR *var2)

static SCIP_DECL_HEUREXITSOL(heurExitsolTwoopt)

#define DEFAULT_ARRAYSIZE

#define DEFAULT_MAXNSLAVES

static SCIP_DECL_HEURINIT(heurInitTwoopt)

static SCIP_RETCODE shiftValues(SCIP *scip, SCIP_VAR *master, SCIP_VAR *slave, SCIP_Real mastersolval, DIRECTION masterdir, SCIP_Real slavesolval, DIRECTION slavedir, SCIP_Real shiftval, SCIP_Real *activities, int nrows, SCIP_Bool *feasible)

static SCIP_RETCODE innerPresolve(SCIP *scip, SCIP_VAR **vars, SCIP_VAR ***varspointer, int nvars, int *nblocks, int *maxblocksize, int *nblockvars, int **blockstart, int **blockend, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)

static SCIP_RETCODE optimize(SCIP *scip, SCIP_SOL *worksol, SCIP_VAR **vars, int *blockstart, int *blockend, int nblocks, OPTTYPE opttype, SCIP_Real *activities, int nrows, SCIP_Bool *improvement, SCIP_Bool *varboundserr, SCIP_HEURDATA *heurdata)

static SCIP_RETCODE presolveTwoOpt(SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)

Primal heuristic to improve incumbent solution by flipping pairs of variables.

memory allocation routines

public methods for primal heuristics

public methods for LP management

public methods for message output

#define SCIPstatisticMessage

public data structures and miscellaneous methods

methods for sorting joint arrays of various types

public methods for primal CIP solutions

public methods for problem variables

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 global and local (sub)problems

public methods for random numbers

public methods for solutions

public methods for querying solving statistics

struct SCIP_HeurData SCIP_HEURDATA

enum SCIP_Retcode SCIP_RETCODE

@ SCIP_VARTYPE_CONTINUOUS


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