A RetroSearch Logo

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

Search Query:

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

SCIP Doxygen Documentation: cons_xor.c Source File

89#define CONSHDLR_NAME "xor" 90#define CONSHDLR_DESC "constraint handler for xor constraints: r = xor(x1, ..., xn)" 91#define CONSHDLR_SEPAPRIORITY +850200 92#define CONSHDLR_ENFOPRIORITY -850200 93#define CONSHDLR_CHECKPRIORITY -850200 94#define CONSHDLR_SEPAFREQ 0 95#define CONSHDLR_PROPFREQ 1 96#define CONSHDLR_EAGERFREQ 100 98#define CONSHDLR_MAXPREROUNDS -1 99#define CONSHDLR_DELAYSEPA FALSE 100#define CONSHDLR_DELAYPROP FALSE 101#define CONSHDLR_NEEDSCONS TRUE 103#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 104#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS 106#define EVENTHDLR_NAME "xor" 107#define EVENTHDLR_DESC "event handler for xor constraints" 109#define LINCONSUPGD_PRIORITY +600000 111#define DEFAULT_PRESOLPAIRWISE TRUE 112#define DEFAULT_ADDEXTENDEDFORM FALSE 113#define DEFAULT_ADDFLOWEXTENDED FALSE 114#define DEFAULT_SEPARATEPARITY FALSE 115#define DEFAULT_GAUSSPROPFREQ 5 116#define HASHSIZE_XORCONS 500 117#define DEFAULT_PRESOLUSEHASHING TRUE 118#define NMINCOMPARISONS 200000 119#define MINGAINPERNMINCOMPARISONS 1e-06 120#define MAXXORCONSSSYSTEM 1000 121#define MAXXORVARSSYSTEM 1000 149 unsigned int

deleteintvar:1;

150 unsigned int

propagated:1;

151 unsigned int

sorted:1;

152 unsigned int

changed:1;

156struct

SCIP_ConshdlrData

228

assert(conshdlrdata !=

NULL

);

229

assert(eventhdlr !=

NULL

);

234

(*conshdlrdata)->eventhdlr = eventhdlr;

246

assert(conshdlrdata !=

NULL

);

247

assert(*conshdlrdata !=

NULL

);

262

assert(consdata !=

NULL

);

263

assert(watchedvar1 == -1 || watchedvar1 != watchedvar2);

264

assert(watchedvar1 != -1 || watchedvar2 == -1);

265

assert(watchedvar1 == -1 || (0 <= watchedvar1 && watchedvar1 < consdata->nvars));

266

assert(watchedvar2 == -1 || (0 <= watchedvar2 && watchedvar2 < consdata->nvars));

269 if

( watchedvar1 == consdata->watchedvar2 || watchedvar2 == consdata->watchedvar1 )

273

tmp = consdata->watchedvar1;

274

consdata->watchedvar1 = consdata->watchedvar2;

275

consdata->watchedvar2 = tmp;

276

tmp = consdata->filterpos1;

277

consdata->filterpos1 = consdata->filterpos2;

278

consdata->filterpos2 = tmp;

280

assert(watchedvar1 == -1 || watchedvar1 != consdata->watchedvar2);

281

assert(watchedvar2 == -1 || watchedvar2 != consdata->watchedvar1);

284 if

( consdata->watchedvar1 != -1 && consdata->watchedvar1 != watchedvar1 )

286

assert(consdata->filterpos1 != -1);

290 if

( consdata->watchedvar2 != -1 && consdata->watchedvar2 != watchedvar2 )

292

assert(consdata->filterpos2 != -1);

298 if

( watchedvar1 != -1 && watchedvar1 != consdata->watchedvar1 )

303 if

( watchedvar2 != -1 && watchedvar2 != consdata->watchedvar2 )

310

consdata->watchedvar1 = watchedvar1;

311

consdata->watchedvar2 = watchedvar2;

324

assert(consdata !=

NULL

);

325

assert(consdata->nvars <= consdata->varssize);

327 if

( num > consdata->varssize )

333

consdata->varssize = newsize;

335

assert(num <= consdata->varssize);

353

assert(consdata !=

NULL

);

354

assert(nvars == 0 || vars !=

NULL

);

359

(*consdata)->rhs = rhs;

360

(*consdata)->intvar = intvar;

362

(*consdata)->rows[

r

] =

NULL

;

363

(*consdata)->nvars = nvars;

364

(*consdata)->varssize = nvars;

365

(*consdata)->watchedvar1 = -1;

366

(*consdata)->watchedvar2 = -1;

367

(*consdata)->filterpos1 = -1;

368

(*consdata)->filterpos2 = -1;

369

(*consdata)->deleteintvar = (intvar ==

NULL

);

370

(*consdata)->propagated =

FALSE

;

371

(*consdata)->sorted =

FALSE

;

372

(*consdata)->changed =

TRUE

;

373

(*consdata)->extvars =

NULL

;

374

(*consdata)->nextvars = 0;

375

(*consdata)->extvarssize = 0;

382 if

( (*consdata)->intvar !=

NULL

)

394

assert(conshdlr !=

NULL

);

396

assert(conshdlrdata !=

NULL

);

398 for

( v = (*consdata)->nvars - 1; v >= 0; --v )

406 if

( (*consdata)->intvar !=

NULL

)

424

assert(consdata !=

NULL

);

428 if

( consdata->rows[

r

] !=

NULL

)

445

assert(consdata !=

NULL

);

446

assert(*consdata !=

NULL

);

456 if

( (*consdata)->nextvars > 0 )

458

assert((*consdata)->extvars !=

NULL

);

459 for

( j = 0; j < (*consdata)->extvarssize; ++j )

461 if

( (*consdata)->extvars[j] !=

NULL

)

468

(*consdata)->nextvars = 0;

469

(*consdata)->extvarssize = 0;

474

assert((*consdata)->watchedvar1 == -1);

475

assert((*consdata)->watchedvar2 == -1);

482 if

( (*consdata)->intvar !=

NULL

)

507

assert(consdata !=

NULL

);

519 if

( consdata->intvar !=

NULL

)

543

assert(var !=

NULL

);

546

assert(consdata !=

NULL

);

547

assert(consdata->rows[0] ==

NULL

);

557

assert(var !=

NULL

);

561 if

( consdata->intvar !=

NULL

)

567

consdata->intvar = var;

568

consdata->changed =

TRUE

;

575 if

( consdata->rows[0] !=

NULL

)

577 SCIPerrorMessage

(

"cannot change intvar of xor constraint after LP relaxation was created\n"

);

595

assert(var !=

NULL

);

598

assert(consdata !=

NULL

);

599

assert(consdata->rows[0] ==

NULL

);

609

assert(var !=

NULL

);

613

consdata->vars[consdata->nvars] = var;

615

consdata->sorted = (consdata->nvars == 1);

616

consdata->changed =

TRUE

;

632

assert(conshdlr !=

NULL

);

634

assert(conshdlrdata !=

NULL

);

641 if

( consdata->rows[0] !=

NULL

)

643 SCIPerrorMessage

(

"cannot add coefficients to xor constraint after LP relaxation was created\n"

);

661

assert(eventhdlr !=

NULL

);

664

assert(consdata !=

NULL

);

665

assert(0 <= pos && pos < consdata->nvars);

682 if

( consdata->watchedvar1 == pos )

686 if

( consdata->watchedvar2 == pos )

691

assert(pos != consdata->watchedvar1);

692

assert(pos != consdata->watchedvar2);

695

consdata->vars[pos] = consdata->vars[consdata->nvars-1];

699 if

( consdata->watchedvar1 == consdata->nvars )

700

consdata->watchedvar1 = pos;

701 if

( consdata->watchedvar2 == consdata->nvars )

702

consdata->watchedvar2 = pos;

704

consdata->propagated =

FALSE

;

705

consdata->sorted =

FALSE

;

706

consdata->changed =

TRUE

;

717

assert(consdata !=

NULL

);

719 if

( !consdata->sorted )

721 if

( consdata->nvars <= 1 )

722

consdata->sorted =

TRUE

;

729 if

( consdata->watchedvar1 != -1 )

731

var1 = consdata->vars[consdata->watchedvar1];

732

assert(var1 !=

NULL

);

733

consdata->watchedvar1 = -1;

734 if

( consdata->watchedvar2 != -1 )

736

var2 = consdata->vars[consdata->watchedvar2];

737

assert(var2 !=

NULL

);

738

consdata->watchedvar2 = -1;

741

assert(consdata->watchedvar1 == -1);

742

assert(consdata->watchedvar2 == -1);

743

assert(var1 !=

NULL

|| var2 ==

NULL

);

746 SCIPsortPtr

((

void

**)consdata->vars, SCIPvarCompActiveAndNegated, consdata->nvars);

747

consdata->sorted =

TRUE

;

757 for

( v = consdata->nvars - 1; v >= 0; --v )

759 if

( consdata->vars[v] == var1 )

761

consdata->watchedvar1 = v;

762 if

( var2 ==

NULL

|| consdata->watchedvar2 != -1 )

765 else if

( consdata->vars[v] == var2 )

767

assert(consdata->vars[v] !=

NULL

);

768

consdata->watchedvar2 = v;

769 if

( consdata->watchedvar1 != -1 )

773

assert(consdata->watchedvar1 != -1);

774

assert(consdata->watchedvar2 != -1 || var2 ==

NULL

);

775

assert(consdata->watchedvar1 < consdata->nvars);

776

assert(consdata->watchedvar2 < consdata->nvars);

786 for

( v = 0; v < consdata->nvars; ++v )

821 if

( consdata1->nvars != consdata2->nvars )

827

assert(consdata1->sorted);

828

assert(consdata2->sorted);

830 for

( i = 0; i < consdata1->nvars ; ++i )

833 if

( consdata1->vars[i] != consdata2->vars[i] )

835

assert(

SCIPvarCompare

(consdata1->vars[i], consdata2->vars[i]) == 1 ||

855

assert(consdata !=

NULL

);

856

assert(consdata->sorted);

857

assert(consdata->nvars > 0);

860

assert(consdata->vars[0] !=

NULL

);

861

assert(consdata->vars[consdata->nvars / 2] !=

NULL

);

862

assert(consdata->vars[consdata->nvars - 1] !=

NULL

);

874 return SCIPhashFour

(consdata->nvars, minidx, mididx, maxidx);

893

assert(consdata !=

NULL

);

894

assert(consdata->nvars == 0 || consdata->vars !=

NULL

);

895

assert(nchgcoefs !=

NULL

);

901 while

( v < consdata->nvars )

905

var = consdata->vars[v];

918

consdata->rhs = !consdata->rhs;

933 if

( negated && consdata->intvar ==

NULL

)

938

consdata->rhs = !consdata->rhs;

957

assert(consdata->sorted);

965

v = consdata->nvars-2;

968 if

( consdata->vars[v] == consdata->vars[v+1] )

973

newvars[2] = consdata->vars[v];

977 SCIPdebugMsg

(

scip

,

"xor constraint <%s>: deleting pair of equal variables <%s>\n"

,

982

v =

MIN

(v, consdata->nvars-1);

990 if

( consdata->intvar !=

NULL

)

1010

newvars[1] = consdata->intvar;

1032 SCIPdebugMsg

(

scip

,

"xor constraint <%s>: deleting pair of negated variables <%s> and <%s>\n"

,

1037

consdata->rhs = !consdata->rhs;

1038

v =

MIN

(v, consdata->nvars-1);

1045 if

( consdata->rhs && consdata->intvar !=

NULL

)

1107

newvars[0] = consdata->intvar;

1109

newvars[1] = newvar;

1170

assert(cons !=

NULL

);

1171

assert(naddedconss !=

NULL

);

1179

assert(consdata !=

NULL

);

1182 if

( consdata->extvars !=

NULL

)

1186 if

( consdata->nvars <= 3 )

1190

assert(consdata->extvars ==

NULL

);

1191

assert(consdata->nextvars == 0);

1192

assert(consdata->extvarssize == 0);

1195

consdata->extvarssize = 4 * (consdata->nvars);

1199 for

( i = 0; i < consdata->nvars; ++i )

1217 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varnn, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1221 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varns, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1230

assert(!infeasible);

1237 if

( i == consdata->nvars-1 )

1239 if

( consdata->rhs )

1243 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varns, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1247 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varss, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1256

assert(!infeasible);

1265 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varnn, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1269 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varsn, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1278

assert(!infeasible);

1288 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varnn, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1292 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varns, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1296 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varsn, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1300 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varss, name, 0.0, 1.0, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1310 if

( varns !=

NULL

)

1315 if

( varsn !=

NULL

)

1321

vars[cnt] = consdata->vars[i];

1339 if

( varprevss !=

NULL

)

1341

vars[cnt] = varprevss;

1344 if

( varprevns !=

NULL

)

1346

vars[cnt] = varprevns;

1351 if

( varss !=

NULL

)

1356 if

( varsn !=

NULL

)

1377 if

( varprevnn !=

NULL

)

1379

vars[cnt] = varprevnn;

1382 if

( varprevsn !=

NULL

)

1384

vars[cnt] = varprevsn;

1389 if

( varnn !=

NULL

)

1394 if

( varns !=

NULL

)

1416

consdata->extvars[4*i] = varnn;

1417

consdata->extvars[4*i + 1] = varns;

1418

consdata->extvars[4*i + 2] = varsn;

1419

consdata->extvars[4*i + 3] = varss;

1421 if

( varnn !=

NULL

)

1422

++(consdata->nextvars);

1423 if

( varns !=

NULL

)

1424

++(consdata->nextvars);

1425 if

( varsn !=

NULL

)

1426

++(consdata->nextvars);

1427 if

( varss !=

NULL

)

1428

++(consdata->nextvars);

1476

assert(cons !=

NULL

);

1477

assert(naddedconss !=

NULL

);

1485

assert(consdata !=

NULL

);

1488 if

( consdata->extvars !=

NULL

)

1492 if

( consdata->nvars <= 3 )

1496

assert(consdata->extvars ==

NULL

);

1497

assert(consdata->nextvars == 0);

1500

consdata->extvarssize = consdata->nvars;

1501

consdata->nextvars = consdata->nvars;

1505 for

( i = 0; i < consdata->nvars; ++i )

1516 if

( i == consdata->nvars-1 )

1518 if

( consdata->rhs )

1532 SCIP_CALL

(

SCIPcreateVar

(

scip

, &artvar, name, lb, ub, 0.0,

SCIP_VARTYPE_IMPLINT

,

SCIPconsIsInitial

(cons),

SCIPconsIsRemovable

(cons),

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

1541

assert(!infeasible);

1555

vars[2] = consdata->vars[i];

1572

vars[2] = consdata->vars[i];

1589

vars[2] = consdata->vars[i];

1606

vars[2] = consdata->vars[i];

1620

consdata->extvars[i] = artvar;

1651

assert(consdata !=

NULL

);

1652

assert(consdata->rows[0] ==

NULL

);

1659 if

( consdata->intvar ==

NULL

)

1664

ub = consdata->nvars/2;

1670#ifdef WITH_DEBUG_SOLUTION 1671 if

( SCIPdebugIsMainscip(

scip

) )

1677 for

( v = consdata->nvars - 1; v >= 0; --v )

1680

count += (solval > 0.5 ? 1 : 0);

1682

assert((count - consdata->rhs) % 2 == 0);

1683

solval = (

SCIP_Real

) ((count - consdata->rhs) / 2);

1695

rhsval = (consdata->rhs ? 1.0 : 0.0);

1701 else if

( !consdata->rhs )

1707 for

(

r

= 0;

r

< 3; ++

r

)

1714 for

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

1727 if

( consdata->intvar !=

NULL

)

1741 for

(

r

= 0;

r

< 3; ++

r

)

1748 for

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

1761 if

( consdata->intvar !=

NULL

)

1785

assert(consdata !=

NULL

);

1786

assert(infeasible !=

NULL

);

1787

assert(!(*infeasible));

1789 if

( consdata->rows[0] ==

NULL

)

1793

assert(consdata->rows[0] !=

NULL

);

1794 for

(

r

= 0;

r

<

NROWS

&& !(*infeasible); ++

r

)

1811

assert(consdata !=

NULL

);

1813 if

( consdata->rows[0] ==

NULL

)

1840

assert(violated !=

NULL

);

1843

assert(consdata !=

NULL

);

1869 for

( i = 0; i < consdata->nvars; ++i )

1877

cenval = 1.0 - solval;

1882 if

( maxcenval < cenval )

1885

sumcenval += cenval;

1886

sumsolval += solval;

1893

viol =

MAX

(0.0, (odd ? 1.0 : 2.0 * maxcenval) - sumcenval);

1896 if

( consdata->intvar !=

NULL

)

1900 if

( viol < solval )

1920 if

( consdata->intvar ==

NULL

)

1988

assert(separated !=

NULL

);

1989

assert(cutoff !=

NULL

);

1993

assert(consdata !=

NULL

);

1995

*separated =

FALSE

;

1998 if

( consdata->rows[0] ==

NULL

)

2002

assert(consdata->rows[0] !=

NULL

);

2021 if

( separateparity && consdata->nvars > 3 )

2036 for

( j = 0; j < consdata->nvars; ++j )

2063 if

( (cnt - (

int

) consdata->rhs) % 2 == 1 )

2069 SCIPdebugMsg

(

scip

,

"found violated parity cut (efficiacy: %f)\n"

, 1.0 - sum);

2076 for

( j = 0; j < consdata->nvars; ++j )

2104 SCIPdebugMsg

(

scip

,

"found violated parity cut (efficiacy: %f, minval: %f)\n"

, 1.0 - (sum - 1.0 + 2.0 * minval), minval);

2112 for

( j = 0; j < consdata->nvars; ++j )

2140 SCIPdebugMsg

(

scip

,

"found violated parity cut (efficiacy: %f, maxval: %f)\n"

, 1.0 - (sum + 1.0 - 2.0 * maxval), maxval);

2148 for

( j = 0; j < consdata->nvars; ++j )

2204

assert(

b

!=

NULL

);

2209 for

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

2216 for

( i = 0; i < m && i < n; ++i )

2231 while

( k < m && A[p[k]][j] == 0 )

2253

assert(A[p[k]][j] != 0);

2263

assert(A[pi][s[i]] != 0);

2266 for

( k = i+1; k < m; ++k )

2270 if

( A[pk][s[i]] != 0 )

2272 for

( j = s[i]; j < n; ++j )

2273

A[pk][j] = A[pk][j] ^ A[pi][j];

2274 b

[pk] =

b

[pk] ^

b

[pi];

2279 if

( i % 100 == 99 )

2312

assert(

b

!=

NULL

);

2315

assert(

x

!=

NULL

);

2316

assert(

r

<= m &&

r

<= n);

2319 for

( k = 0; k < n; ++k )

2323 for

( i =

r

-1; i >= 0; --i )

2327

assert(i <= s[i] && s[i] <= n);

2331 for

( k = i+1; k <

r

; ++k )

2333

assert(i <= s[k] && s[k] <= n);

2334 if

( A[p[i]][s[k]] != 0 )

2335

val = val ^

x

[s[k]];

2378 int

nconssactive = 0;

2387

assert(conss !=

NULL

);

2388

assert(result !=

NULL

);

2393 SCIPdebugMsg

(

scip

,

"Checking feasibility via the linear equation system over GF2 using Gauss.\n"

);

2405 for

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

2409

xoractive[i] =

FALSE

;

2411

assert(conss[i] !=

NULL

);

2413

assert(consdata !=

NULL

);

2416 for

( j = 0; j < consdata->nvars; ++j )

2420

var = consdata->vars[j];

2421

assert(var !=

NULL

);

2427

assert(var !=

NULL

);

2442

xorvars[nvarsmat++] = var;

2450

xoractive[i] =

TRUE

;

2453#ifdef SCIP_DISABLED_CODE 2460 for

( j = 0; j < consdata->nvars; ++j )

2468 if

( ( cnt - consdata->rhs ) % 2 != 0 )

2477

assert(nvarsmat <= nvars);

2478

assert(nconssactive <= nconss);

2482 SCIPdebugMsg

(

scip

,

"Skip checking the xor system over GF2 (%d conss, %d vars).\n"

, nconssactive, nvarsmat);

2492 for

( j = 0; j < nvarsmat; ++j )

2505 for

( j = 0; j < nvarsmat; ++j )

2507

assert(0 <= xoridx[j] && xoridx[j] < nvarsmat);

2508

xorbackidx[xoridx[j]] = j;

2514 for

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

2516 if

( !xoractive[i] )

2519

assert(conss[i] !=

NULL

);

2521

assert(consdata !=

NULL

);

2522

assert(consdata->nvars > 0);

2528 b

[nconssmat] = (

Type

) consdata->rhs;

2529 for

( j = 0; j < consdata->nvars; ++j )

2534

var = consdata->vars[j];

2535

assert(var !=

NULL

);

2541

assert(var !=

NULL

);

2542 b

[nconssmat] = !

b

[nconssmat];

2559 b

[nconssmat] = !

b

[nconssmat];

2568 b

[nconssmat] = !

b

[nconssmat];

2571

assert(var !=

NULL

);

2587 b

[nconssmat] = !

b

[nconssmat];

2599

assert(idx < nvarsmat);

2600

idx = xorbackidx[idx];

2602

assert(idx < nvarsmat);

2603

A[nconssmat][idx] = !A[nconssmat][idx];

2609 SCIPdebugMsg

(

scip

,

"Found %d non-fixed variables in %d nonempty xor constraints.\n"

, nvarsmat, nconssmat);

2610

assert(nconssmat == nconssactive);

2618 for

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

2620 for

( j = 0; j < nvarsmat; ++j )

2631

assert(rank <= nconssmat && rank <= nvarsmat);

2639 for

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

2641 for

( j = 0; j < nvarsmat; ++j )

2649 for

( i = rank; i < nconssmat; ++i )

2651 if

(

b

[p[i]] != 0 )

2656 if

( i >= nconssmat )

2658 SCIPdebugMsg

(

scip

,

"System feasible with rank %d (nconss=%d)\n"

, rank, nconssmat);

2661 if

( rank == nvarsmat && noaggr )

2675 for

( j = 0; j < nvarsmat; ++j )

2681 for

( j = 0; j < nvarsmat; ++j )

2690

assert(!infeasible);

2694

assert(

x

[j] == 1);

2697

assert(!infeasible);

2712 if

( heurtrysol !=

NULL

)

2725 for

( j = 0; j < nvarsmat; ++j )

2734 for

( j = 0; j < nvarsmat; ++j )

2748 for

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

2758 for

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

2761

assert(consdata !=

NULL

);

2769 for

( j = 0; j < consdata->nvars; ++j )

2775

assert(!noaggr || nones % 2 == (

int

) consdata->rhs);

2776 if

( (

unsigned int

) nones != consdata->rhs )

2778

val = (

SCIP_Real

) (nones - (

int

) consdata->rhs)/2;

2817 for

( i = nconss - 1; i >= 0 ; --i )

2820

assert(consdata !=

NULL

);

2822 if

( consdata->nvars == 0 )

2825 if

( !xoractive[i] )

2857

assert(cons !=

NULL

);

2860

assert(consdata !=

NULL

);

2861

vars = consdata->vars;

2862

nvars = consdata->nvars;

2867

assert(infervar ==

NULL

|| infervar == consdata->intvar);

2870 for

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

2879 for

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

2896

assert(vars[i] == infervar);

2902

assert(consdata->intvar !=

NULL

);

2904 if

( infervar != consdata->intvar )

2910 for

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

2922

assert(consdata->intvar !=

NULL

);

2924 if

( infervar != consdata->intvar )

2929 for

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

3006

assert(cons !=

NULL

);

3007

assert(eventhdlr !=

NULL

);

3008

assert(cutoff !=

NULL

);

3009

assert(nfixedvars !=

NULL

);

3010

assert(nchgbds !=

NULL

);

3017

assert(consdata !=

NULL

);

3019

vars = consdata->vars;

3020

nvars = consdata->nvars;

3023 if

( consdata->propagated )

3036

watchedvar1 = consdata->watchedvar1;

3037

watchedvar2 = consdata->watchedvar2;

3040 if

( watchedvar1 != -1 )

3045 if

( watchedvar2 != -1 )

3052 if

( watchedvar1 == -1 )

3054

watchedvar1 = watchedvar2;

3057

assert(watchedvar1 != -1 || watchedvar2 == -1);

3060

odd = consdata->rhs;

3064 if

( watchedvar2 == -1 )

3066 for

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

3080 if

( watchedvar1 == -1 )

3082

assert(watchedvar2 == -1);

3085 else if

( watchedvar2 == -1 && watchedvar1 != i )

3093

assert(watchedvar1 != -1 || watchedvar2 == -1);

3096 if

( watchedvar1 == -1 )

3098

assert(watchedvar2 == -1);

3114 if

( consdata->intvar !=

NULL

)

3119

assert((nfixedones - (

int

) consdata->rhs) % 2 == 0);

3121

fixval = (nfixedones - (int) consdata->rhs)/2;

3129 SCIPdebugMsg

(

scip

,

"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n"

,

3140 SCIPdebugMsg

(

scip

,

"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n"

,

3154

assert(!infeasible);

3161

assert(!infeasible);

3178 if

( watchedvar2 == -1 )

3180

assert(watchedvar1 != -1);

3183 SCIPdebugMsg

(

scip

,

"constraint <%s>: only one unfixed variable -> fix <%s> to %u\n"

,

3187

assert(!infeasible);

3201

assert((nfixedones - (

int

) consdata->rhs) % 2 == 0);

3203

fixval = (nfixedones - (int) consdata->rhs)/2;

3210 SCIPdebugMsg

(

scip

,

"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n"

,

3221 SCIPdebugMsg

(

scip

,

"node infeasible: activity is %d, bounds of integral variable are [%g,%g]\n"

,

3235

assert(!infeasible);

3242

assert(!infeasible);

3257 if

( consdata->intvar !=

NULL

&& !consdata->deleteintvar )

3266

assert(nfixedzeros == 0);

3267

assert(nfixedones == 0);

3269 for

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

3277

assert(nfixedones + nfixedzeros < nvars);

3282

nonesmin = 2 * (int)(

SCIPvarGetLbLocal

(consdata->intvar) + 0.5) + (

int

) consdata->rhs;

3283

nonesmax = 2 * (int)(

SCIPvarGetUbLocal

(consdata->intvar) + 0.5) + (

int

) consdata->rhs;

3286 if

( nvars - nfixedzeros < nonesmin )

3288 SCIPdebugMsg

(

scip

,

"constraint <%s>: at most %d variables can take value 1, but there should be at least %d.\n"

,

SCIPconsGetName

(cons), nvars - nfixedones, nonesmin);

3299 if

( nfixedones > nonesmax )

3301 SCIPdebugMsg

(

scip

,

"constraint <%s>: at least %d variables are fixed to 1, but there should be at most %d.\n"

,

SCIPconsGetName

(cons), nfixedones, nonesmax);

3314

newlb = (

SCIP_Real

)((nfixedones + 1 - (

int

) consdata->rhs) / 2);

3315

newub = (

SCIP_Real

)((nvars - nfixedzeros - (

int

) consdata->rhs) / 2);

3323

assert(!infeasible);

3327

nonesmin = 2 * (int)(

SCIPvarGetLbLocal

(consdata->intvar) + 0.5) + (

int

) consdata->rhs;

3336

assert(!infeasible);

3340

nonesmax = 2 * (int)(

SCIPvarGetUbLocal

(consdata->intvar) + 0.5) + (

int

) consdata->rhs;

3343

assert(nvars - nfixedzeros >= nonesmin);

3344

assert(nfixedones <= nonesmax);

3347 if

( nvars - nfixedzeros == nonesmin )

3349 SCIPdebugMsg

(

scip

,

"constraint <%s>: fix %d free variables to 1 to reach lower bound of %d\n"

,

SCIPconsGetName

(cons), nvars - nfixedzeros - nfixedones, nonesmin);

3351 for

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

3356

assert(!infeasible);

3369 if

( nfixedones == nonesmax )

3371 SCIPdebugMsg

(

scip

,

"constraint <%s>: fix %d free variables to 0 to guarantee upper bound of %d\n"

,

SCIPconsGetName

(cons), nvars - nfixedzeros - nfixedones, nonesmax);

3373 for

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

3378

assert(!infeasible);

3395

consdata->propagated =

TRUE

;

3413

assert(result !=

NULL

);

3415 SCIPdebugMsg

(

scip

,

"resolving fixations according to rule %d\n"

, (

int

) proprule);

3446

assert(cons !=

NULL

);

3447

assert(nfixedvars !=

NULL

);

3448

assert(nchgcoefs !=

NULL

);

3449

assert(ndelconss !=

NULL

);

3450

assert(naddconss !=

NULL

);

3451

assert(cutoff !=

NULL

);

3458

assert(consdata !=

NULL

);

3460

vars = consdata->vars;

3461

nvars = consdata->nvars;

3467 if

( !consdata->deleteintvar )

3470#ifdef SCIP_DISABLED_CODE 3472 if

( !consdata->changed )

3523 if

( posnotinclq1 == v )

3529 for

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

3531 if

( posnotinclq1 == v1 )

3546 if

( posnotinclq1 == -1 )

3554 if

( restart || (posnotinclq2 != v && posnotinclq2 != v1) )

3561

posnotinclq1 = posnotinclq2;

3569

assert(vars[v] != vars[v1]);

3582 if

( posnotinclq1 == -1 )

3586 if

( consdata->rhs )

3611 SCIPdebugMsg

(

scip

,

"all variables of xor constraints <%s> are in one clique, so fixed all variables to 0\n"

,

3615 for

( v = nvars - 1; v >= 0; --v )

3620

assert(infeasible || fixed);

3624

*cutoff = infeasible;

3644 if

( !consdata->rhs )

3652 for

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

3654 if

( v == posnotinclq1 )

3659

assert(var !=

NULL

);

3688 if

( consdata->intvar !=

NULL

)

3700

*cutoff = infeasible;

3737

assert(conss !=

NULL

);

3738

assert(ndelconss !=

NULL

);

3741

hashtablesize = nconss;

3745

hashGetKeyXorcons, hashKeyEqXorcons, hashKeyValXorcons, (

void

*)

scip

) );

3748 for

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

3764

assert(conshdlrdata !=

NULL

);

3778

assert(consdata0 !=

NULL

);

3781 if

( consdata0->nvars <= 1 )

3783 if

( consdata0->nvars == 0 )

3786 if

( consdata0->rhs )

3800

assert(!infeasible);

3807 if

( consdata0->intvar !=

NULL

)

3813

assert(!infeasible);

3828

assert(consdata0->sorted);

3833 if

( cons1 !=

NULL

)

3842

assert(consdata1 !=

NULL

);

3843

assert(consdata0->nvars >= 1 && consdata0->nvars == consdata1->nvars);

3845

assert(consdata0->sorted && consdata1->sorted);

3846

assert(consdata0->vars[0] == consdata1->vars[0]);

3848 if

( consdata0->rhs != consdata1->rhs )

3855 if

( consdata0->intvar != consdata1->intvar && consdata0->intvar !=

NULL

)

3857 if

( consdata1->intvar !=

NULL

)

3893 if

( consdata0->changed &&

SCIPconsGetPos

(cons1) < *firstchange )

3936

assert(conss !=

NULL

);

3937

assert(firstchange <= chkind);

3938

assert(cutoff !=

NULL

);

3939

assert(nfixedvars !=

NULL

);

3940

assert(naggrvars !=

NULL

);

3941

assert(ndelconss !=

NULL

);

3942

assert(nchgcoefs !=

NULL

);

3945

cons0 = conss[chkind];

3950

assert(consdata0 !=

NULL

);

3951

assert(consdata0->nvars >= 1);

3956

assert(conshdlrdata !=

NULL

);

3970

assert(consdata0->sorted);

3973

cons0changed = consdata0->changed;

3974

consdata0->changed =

FALSE

;

3999

assert(consdata1 !=

NULL

);

4001 if

( !consdata1->deleteintvar )

4015 SCIPdebugMsg

(

scip

,

"preprocess xor constraint pair <%s>[chg:%u] and <%s>[chg:%u]\n"

,

4019 if

( !cons0changed && !consdata1->changed )

4023 if

( consdata1->nvars == 0 )

4025 if

( consdata1->rhs )

4033 if

( consdata1->intvar !=

NULL

)

4036

assert(!infeasible);

4048 else if

( consdata1->nvars == 1 )

4052

assert(!infeasible);

4058 if

( consdata1->intvar !=

NULL

)

4061

assert(!infeasible);

4075

assert(consdata0->sorted);

4079 else if

( consdata1->nvars == 2 )

4081 if

( !(consdata1->rhs) )

4085

&infeasible, &redundant, &aggregated) );

4091

&infeasible, &redundant, &aggregated) );

4093

assert(!infeasible);

4107

assert(consdata0->sorted);

4113 if

( consdata1->intvar !=

NULL

)

4117 if

( consdata1->rhs )

4120

assert(!infeasible);

4128

assert(!consdata1->rhs);

4132

&infeasible, &redundant, &aggregated) );

4133

assert(!infeasible);

4152

assert(consdata0->sorted);

4156

assert(consdata1->sorted);

4164

parity = (consdata0->rhs ^ consdata1->rhs);

4165

cons0hastwoothervars =

FALSE

;

4166

cons1hastwoothervars =

FALSE

;

4171 while

( (v0 < consdata0->nvars || v1 < consdata1->nvars) && !aborted )

4175

assert(v0 <= consdata0->nvars);

4176

assert(v1 <= consdata1->nvars);

4178 if

( v0 == consdata0->nvars )

4180 else if

( v1 == consdata1->nvars )

4189

assert(v0 < consdata0->nvars);

4190 if

( singlevar0 ==

NULL

)

4192

singlevar0 = consdata0->vars[v0];

4193 if

( cons1hastwoothervars )

4198

cons0hastwoothervars =

TRUE

;

4199 if

( singlevar1 !=

NULL

)

4207

assert(v1 < consdata1->nvars);

4208 if

( singlevar1 ==

NULL

)

4210

singlevar1 = consdata1->vars[v1];

4211 if

( cons0hastwoothervars )

4216

cons1hastwoothervars =

TRUE

;

4217 if

( singlevar0 !=

NULL

)

4225

assert(v0 < consdata0->nvars);

4226

assert(v1 < consdata1->nvars);

4228 if

( consdata0->vars[v0] != consdata1->vars[v1] )

4245 if

( (cons0hastwoothervars && singlevar1 !=

NULL

) || (cons1hastwoothervars && singlevar0 !=

NULL

) )

4249 if

( singlevar0 ==

NULL

&& singlevar1 ==

NULL

)

4255 SCIPdebugMsg

(

scip

,

"xor constraints <%s> and <%s> are redundant: delete <%s>\n"

,

4265 if

( consdata1->intvar !=

NULL

)

4275 if

( consdata0->intvar ==

NULL

)

4283

&infeasible, &redundant, &aggregated) );

4285

*cutoff = *cutoff || infeasible;

4299

newvars[0] = consdata1->intvar;

4301

newvars[1] = consdata0->intvar;

4322 SCIPdebugMsg

(

scip

,

"xor constraints <%s> and <%s> are contradicting\n"

,

4329 else if

( singlevar1 ==

NULL

)

4332 if

( !cons0hastwoothervars )

4335 SCIPdebugMsg

(

scip

,

"xor constraints <%s> and <%s> yield sum %u == <%s>\n"

,

4340

*cutoff = *cutoff || infeasible;

4354 SCIPdebugMsg

(

scip

,

"xor constraint <%s> is superset of <%s> with parity %u\n"

,

4358 for

( v = 0; v < consdata1->nvars; ++v )

4365

assert(consdata0->nvars >= 2);

4372

assert(consdata0->sorted);

4374 else if

( singlevar0 ==

NULL

)

4377 if

( !cons1hastwoothervars )

4380 SCIPdebugMsg

(

scip

,

"xor constraints <%s> and <%s> yield sum %u == <%s>\n"

,

4385

assert(infeasible || fixed);

4386

*cutoff = *cutoff || infeasible;

4399 SCIPdebugMsg

(

scip

,

"xor constraint <%s> is subset of <%s> with parity %u\n"

,

4403 for

( v = 0; v < consdata0->nvars; ++v )

4409

assert(consdata1->nvars >= 2);

4415

assert(consdata1->sorted);

4420

assert(!cons0hastwoothervars);

4421

assert(!cons1hastwoothervars);

4424 SCIPdebugMsg

(

scip

,

"xor constraints <%s> and <%s> yield sum %u == xor(<%s>,<%s>)\n"

,

4431

&infeasible, &redundant, &aggregated) );

4437

&infeasible, &redundant, &aggregated) );

4441

*cutoff = *cutoff || infeasible;

4452 if

( consdata1->intvar !=

NULL

)

4454 if

( consdata0->intvar ==

NULL

)

4462

&infeasible, &redundant, &aggregated) );

4464

*cutoff = *cutoff || infeasible;

4471 if

( !consdata0->sorted )

4473

assert(consdata0->sorted);

4475#ifdef SCIP_DISABLED_CODE 4537 if

( conshdlr ==

NULL

)

4544 if

( intvar !=

NULL

)

4556

assert(vars !=

NULL

|| nvars == 0);

4557 for

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

4570 SCIP_CALL

(

SCIPcreateCons

(

scip

, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,

4571

local, modifiable, dynamic, removable, stickingatnode) );

4619

assert(upgdcons !=

NULL

);

4628 if

( integral && nposcont + nnegcont == 0 && nposbin + nnegbin + nposimplbin + nnegimplbin >= nvars-1 && ncoeffspone + ncoeffsnone == nvars-1 && ncoeffspint + ncoeffsnint == 1 )

4630

assert(ncoeffspfrac + ncoeffsnfrac == 0);

4644 for

( j = nvars - 1; j >= 0; --j )

4648

parityvar = vars[j];

4658

postwo = (vals[j] > 0.0);

4672 if

( vals[j] < 0.0 )

4675

assert(xorvars[cnt] !=

NULL

);

4678

xorvars[cnt] = vars[j];

4683 if

( parityvar !=

NULL

)

4685

assert(cnt == nvars - 1);

4700

rhsparity = ((

SCIP_Bool

) (intrhs % 2));

4704 if

( (intrhs != 1 && intrhs != 0) || postwo )

4722

intrhshalfed = intrhs / 2;

4761

(

SCIP_Real

) (postwo ? intrhshalfed : -intrhshalfed), &infeasible, &redundant, &aggregated) );

4762

assert(!infeasible);

4792

assert(intvar !=

NULL

);

4805

assert(intvar != parityvar);

4838

assert(cons !=

NULL

);

4839

assert(graph !=

NULL

);

4840

assert(success !=

NULL

);

4843

assert(consdata !=

NULL

);

4846

nlocvars =

MAX

(consdata->nvars, 1);

4854 if

( consdata->intvar !=

NULL

)

4861

vars[0] = consdata->intvar;

4870

xorvars = consdata->vars;

4871 for

( i = 0; i < consdata->nvars; ++i )

4873

assert(xorvars[i] !=

NULL

);

4874

vars[i] = xorvars[i];

4878

nlocvars = consdata->nvars;

4899

assert(conshdlr !=

NULL

);

4918

assert(conshdlrdata !=

NULL

);

4935 for

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

4952

assert(conshdlrdata !=

NULL

);

4958 for

( v = (*consdata)->nvars - 1; v >= 0; --v )

4979

assert(sourcedata !=

NULL

);

4980

assert(sourcedata->nvars >= 1);

4981

assert(sourcedata->vars !=

NULL

);

5003

assert(infeasible !=

NULL

);

5005

*infeasible =

FALSE

;

5007 for

( i = 0; i < nconss && !(*infeasible); i++ )

5029

assert(conshdlrdata !=

NULL

);

5032 for

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

5037 else if

( separated )

5060

assert(conshdlrdata !=

NULL

);

5063 for

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

5068 else if

( separated )

5089

assert(conshdlrdata !=

NULL

);

5092 for

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

5126

assert(conshdlrdata !=

NULL

);

5129 for

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

5161 for

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

5184 for

( i = 0; i < nconss && ( *result ==

SCIP_FEASIBLE

|| completely ); ++i )

5205

assert(conshdlrdata !=

NULL

);

5212 for

( c = 0; c < nusefulconss && !cutoff; ++c )

5220 else if

( nfixedvars > 0 || nchgbds > 0 )

5231

freq = conshdlrdata->gausspropfreq;

5232 if

( (depth == 0 && freq == 0) || (freq > 0 && depth % freq == 0) )

5252

assert(conshdlr !=

NULL

);

5254

assert(conshdlrdata !=

NULL

);

5257 for

( c = nconss - 1; c >= 0; --c )

5260

assert(consdata !=

NULL

);

5262 for

( v = consdata->nvars - 1; v >= 0; --v )

5281

assert(conshdlr !=

NULL

);

5283

assert(conshdlrdata !=

NULL

);

5286 for

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

5289

assert(consdata !=

NULL

);

5293 for

( v = 0; v < consdata->nvars; ++v )

5322

assert(result !=

NULL

);

5324

oldnfixedvars = *nfixedvars;

5325

oldnchgbds = *nchgbds;

5326

oldnaggrvars = *naggrvars;

5327

oldndelconss = *ndelconss;

5328

oldnchgcoefs = *nchgcoefs;

5331

assert(conshdlrdata !=

NULL

);

5335

firstchange = INT_MAX;

5339

assert(cons !=

NULL

);

5341

assert(consdata !=

NULL

);

5345

consdata->propagated =

FALSE

;

5348 if

( firstchange == INT_MAX && consdata->changed )

5364

assert(consdata->nvars >= 2);

5367 if

( consdata->nvars == 2 )

5369 SCIPdebugMsg

(

scip

,

"xor constraint <%s> has only two unfixed variables, rhs=%u\n"

,

5372

assert(consdata->vars !=

NULL

);

5378 if

( !consdata->rhs )

5384

&cutoff, &redundant, &aggregated) );

5392

&cutoff, &redundant, &aggregated) );

5444 if

( firstchange < nconss && conshdlrdata->presolusehashing )

5448

nfixedvars, naggrvars, ndelconss, naddconss, &cutoff) );

5450 if

( conshdlrdata->presolpairwise )

5454

npaircomparisons = 0;

5455

lastndelconss = *ndelconss;

5464

&cutoff, nfixedvars, naggrvars, ndelconss, naddconss, nchgcoefs) );

5470

lastndelconss = *ndelconss;

5471

npaircomparisons = 0;

5481 else if

( *nfixedvars > oldnfixedvars || *nchgbds > oldnchgbds || *naggrvars > oldnaggrvars

5482

|| *ndelconss > oldndelconss || *nchgcoefs > oldnchgcoefs )

5492 int

naddedconss = 0;

5495

assert(cons !=

NULL

);

5497

assert(consdata !=

NULL

);

5499 if

( consdata->extvars !=

NULL

)

5502 if

( conshdlrdata->addflowextended )

5510

(*naddconss) += naddedconss;

5538

assert(consdata !=

NULL

);

5541 for

( i = 0; i < consdata->nvars; ++i )

5547 if

( consdata->intvar !=

NULL

)

5561

assert(conshdlr !=

NULL

);

5562

assert(cons !=

NULL

);

5578 const char

* consname;

5583

assert(sourcescip !=

NULL

);

5584

assert(sourcecons !=

NULL

);

5589

assert(sourceconsdata !=

NULL

);

5592

sourcevars = sourceconsdata->vars;

5593

nvars = sourceconsdata->nvars;

5594

intvar = sourceconsdata->intvar;

5595

targetintvar =

NULL

;

5604 if

( intvar !=

NULL

)

5607

assert(!(*valid) || targetintvar !=

NULL

);

5609 if

( targetintvar !=

NULL

)

5620

targetintvar, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable,

5631 for

( v = 0; v < nvars && *valid; ++v )

5634

assert(!(*valid) || targetvars[v] !=

NULL

);

5638 if

( *valid && intvar !=

NULL

)

5641

assert(!(*valid) || targetintvar !=

NULL

);

5652

targetintvar, initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable,

5689 if

( varssize < requiredsize )

5692

varssize = requiredsize;

5700

assert(varssize >= requiredsize);

5705

endptr = strchr(endptr,

'='

);

5708 if

( endptr ==

NULL

)

5718

str += *(str+1) ==

'='

? 2 : 1;

5734

str = strchr(str+1,

'='

);

5748 if

( intvar ==

NULL

)

5756

endptr = strchr(endptr,

')'

);

5758 if

( endptr ==

NULL

)

5766 if

( intvar !=

NULL

)

5770

initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );

5776

initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );

5802

assert(consdata !=

NULL

);

5804 if

( consdata->intvar !=

NULL

)

5807 if

( varssize < consdata->nvars + nintvar + consdata->nextvars )

5808

(*success) =

FALSE

;

5813 if

( consdata->intvar !=

NULL

)

5814

vars[consdata->nvars] = consdata->intvar;

5816 if

( consdata->nextvars > 0 )

5818

assert(consdata->extvars !=

NULL

);

5819

cnt = consdata->nvars + nintvar;

5820 for

( j = 0; j < consdata->extvarssize; ++j )

5822 if

( consdata->extvars[j] !=

NULL

)

5823

vars[cnt++] = consdata->extvars[j];

5825

assert(cnt == consdata->nvars + nintvar + consdata->nextvars);

5840

assert(cons !=

NULL

);

5843

assert(consdata !=

NULL

);

5845 if

( consdata->intvar ==

NULL

)

5846

(*nvars) = consdata->nvars + consdata->nextvars;

5848

(*nvars) = consdata->nvars + 1 + consdata->nextvars;

5882

assert(eventhdlr !=

NULL

);

5883

assert(eventdata !=

NULL

);

5884

assert(event !=

NULL

);

5887

assert(consdata !=

NULL

);

5895

consdata->sorted =

FALSE

;

5898

consdata->propagated =

FALSE

;

5919

eventExecXor,

NULL

) );

5927

consEnfolpXor, consEnfopsXor, consCheckXor, consLockXor,

5929

assert(conshdlr !=

NULL

);

5962 "constraints/xor/presolpairwise"

,

5963 "should pairwise constraint comparison be performed in presolving?"

,

5967 "constraints/xor/presolusehashing"

,

5968 "should hash table be used for detecting redundant constraints in advance?"

,

5972 "constraints/xor/addextendedform"

,

5973 "should the extended formulation be added in presolving?"

,

5977 "constraints/xor/addflowextended"

,

5978 "should the extended flow formulation be added (nonsymmetric formulation otherwise)?"

,

5982 "constraints/xor/separateparity"

,

5983 "should parity inequalities be separated?"

,

5987 "constraints/xor/gausspropfreq"

,

5988 "frequency for applying the Gauss propagator"

,

6036 if

( conshdlr ==

NULL

)

6043

assert(vars !=

NULL

|| nvars == 0);

6044 for

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

6057 SCIP_CALL

(

SCIPcreateCons

(

scip

, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,

6058

local, modifiable, dynamic, removable, stickingatnode) );

6101

assert(consdata !=

NULL

);

6103 return

consdata->nvars;

6124

assert(consdata !=

NULL

);

6126 return

consdata->vars;

6147

assert(consdata !=

NULL

);

6149 return

consdata->intvar;

6169

assert(consdata !=

NULL

);

6171 return

consdata->rhs;

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

Constraint handler for the set partitioning / packing / covering constraints .

static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)

static SCIP_DECL_CONSDELETE(consDeleteXor)

static SCIP_DECL_CONSGETVARS(consGetVarsXor)

static SCIP_RETCODE consdataFreeRows(SCIP *scip, SCIP_CONSDATA *consdata)

static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

static SCIP_DECL_CONSSEPASOL(consSepasolXor)

static SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphXor)

#define DEFAULT_SEPARATEPARITY

static SCIP_RETCODE consdataSwitchWatchedvars(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int watchedvar1, int watchedvar2)

#define CONSHDLR_NEEDSCONS

#define CONSHDLR_SEPAFREQ

static SCIP_RETCODE addExtendedAsymmetricFormulation(SCIP *scip, SCIP_CONS *cons, int *naggrvars, int *naddedconss)

static SCIP_DECL_CONSLOCK(consLockXor)

static SCIP_DECL_HASHKEYEQ(hashKeyEqXorcons)

static SCIP_RETCODE checkSystemGF2(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *currentsol, SCIP_RESULT *result)

static SCIP_DECL_EVENTEXEC(eventExecXor)

static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)

#define CONSHDLR_CHECKPRIORITY

static SCIP_RETCODE setIntvar(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

static SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphXor)

static SCIP_DECL_CONSEXITSOL(consExitsolXor)

#define DEFAULT_ADDFLOWEXTENDED

static SCIP_RETCODE createRelaxation(SCIP *scip, SCIP_CONS *cons)

static SCIP_DECL_CONSPRINT(consPrintXor)

#define CONSHDLR_PROP_TIMING

static SCIP_DECL_CONSINITPRE(consInitpreXor)

static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)

#define DEFAULT_GAUSSPROPFREQ

static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

#define CONSHDLR_MAXPREROUNDS

static SCIP_DECL_CONSCHECK(consCheckXor)

static SCIP_RETCODE cliquePresolve(SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *nchgcoefs, int *ndelconss, int *naddconss, SCIP_Bool *cutoff)

#define DEFAULT_PRESOLPAIRWISE

static SCIP_DECL_HASHKEYVAL(hashKeyValXorcons)

static SCIP_DECL_CONSGETNVARS(consGetNVarsXor)

#define CONSHDLR_SEPAPRIORITY

static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule)

static SCIP_Bool allRowsInLP(SCIP_CONSDATA *consdata)

#define MAXXORCONSSSYSTEM

static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_VAR *intvar)

static SCIP_DECL_CONSENFOPS(consEnfopsXor)

static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)

static SCIP_DECL_CONSPARSE(consParseXor)

static SCIP_DECL_CONSINITLP(consInitlpXor)

static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyXor)

static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)

static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool *violated)

#define DEFAULT_PRESOLUSEHASHING

static void solveRowEchelonGF2(int m, int n, int r, int *p, int *s, Type **A, Type *b, Type *x)

static SCIP_DECL_CONSENFOLP(consEnfolpXor)

static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_EVENTHDLR *eventhdlr)

static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nfixedvars, int *nchgbds)

static SCIP_DECL_CONSENFORELAX(consEnforelaxXor)

#define MINGAINPERNMINCOMPARISONS

static SCIP_RETCODE addExtendedFlowFormulation(SCIP *scip, SCIP_CONS *cons, int *naggrvars, int *naddedconss)

static SCIP_DECL_CONSFREE(consFreeXor)

static SCIP_RETCODE addConflictBounds(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_BDCHGIDX *bdchgidx, PROPRULE proprule)

#define CONSHDLR_PROPFREQ

static SCIP_DECL_CONSEXITPRE(consExitpreXor)

static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool separateparity, SCIP_Bool *separated, SCIP_Bool *cutoff)

#define CONSHDLR_PRESOLTIMING

static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, int *nchgcoefs, int *nfixedvars, int *naggrvars, int *ndelconss, int *naddconss, SCIP_Bool *cutoff)

static void consdataSort(SCIP_CONSDATA *consdata)

static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss, int *naddconss, int *nchgcoefs)

#define CONSHDLR_EAGERFREQ

#define DEFAULT_ADDEXTENDEDFORM

static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)

static SCIP_RETCODE createConsXorIntvar(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, SCIP_VAR *intvar, 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)

static SCIP_DECL_HASHGETKEY(hashGetKeyXorcons)

static SCIP_DECL_CONSCOPY(consCopyXor)

#define CONSHDLR_ENFOPRIORITY

static SCIP_DECL_LINCONSUPGD(linconsUpgdXor)

static SCIP_DECL_CONSPRESOL(consPresolXor)

#define LINCONSUPGD_PRIORITY

static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)

#define CONSHDLR_DELAYSEPA

static int computeRowEchelonGF2(SCIP *scip, int m, int n, int *p, int *s, Type **A, Type *b)

static SCIP_DECL_CONSRESPROP(consRespropXor)

static SCIP_DECL_CONSTRANS(consTransXor)

static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int *nchgcoefs, int *naggrvars, int *naddconss, SCIP_Bool *cutoff)

static SCIP_DECL_CONSSEPALP(consSepalpXor)

#define CONSHDLR_DELAYPROP

static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file, SCIP_Bool endline)

static SCIP_DECL_CONSPROP(consPropXor)

Constraint handler for XOR constraints, .

#define SCIPdebugGetSolVal(scip, var, val)

#define SCIPdebugAddSolVal(scip, var, val)

#define SCIP_MAXTREEDEPTH

SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)

int SCIPgetNVarsXor(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsBasicXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars)

SCIP_VAR * SCIPgetIntVarXor(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsXor(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Bool rhs, int nvars, SCIP_VAR **vars, 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 SCIPaddCoefSetppc(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

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 SCIPcreateConsSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, 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_Bool SCIPgetRhsXor(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR ** SCIPgetVarsXor(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPincludeConshdlrXor(SCIP *scip)

SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)

SCIP_Bool SCIPisTransformed(SCIP *scip)

SCIP_Bool SCIPisPresolveFinished(SCIP *scip)

SCIP_Bool SCIPisStopped(SCIP *scip)

SCIP_STAGE SCIPgetStage(SCIP *scip)

SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)

int SCIPgetNVars(SCIP *scip)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR ** SCIPgetVars(SCIP *scip)

void SCIPhashmapFree(SCIP_HASHMAP **hashmap)

int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)

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

SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)

SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)

void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)

#define SCIPhashFour(a, b, c, d)

SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)

void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)

SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)

SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)

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

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

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)

void SCIPswapPointers(void **pointer1, void **pointer2)

SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)

SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)

SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)

SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)

SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)

SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)

SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))

void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)

SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)

SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))

SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))

SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)

SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)

SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)

SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)))

SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))

SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))

SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))

const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)

SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))

SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))

SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)

SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)))

SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))

SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))

SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)

SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))

SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))

SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))

SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))

SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)

int SCIPconsGetPos(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)

SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)

SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)

SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)

SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, 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_Bool SCIPconsIsPropagated(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)

const char * SCIPconsGetName(SCIP_CONS *cons)

SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)

SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)

SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)

SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)

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

SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)

SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)

SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)

SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)

SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)

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

SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)

SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)

SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)

SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)

SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)

#define SCIPfreeBlockMemoryArray(scip, ptr, num)

int SCIPcalcMemGrowSize(SCIP *scip, int 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_Bool SCIPinProbing(SCIP *scip)

SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)

SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)

SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)

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 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_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)

SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)

SCIP_Bool SCIProwIsInLP(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)

void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)

SCIP_RETCODE SCIPcheckSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)

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

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

SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)

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

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

SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)

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

SCIP_Bool SCIPisFeasIntegral(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_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)

SCIP_Bool SCIPinRepropagation(SCIP *scip)

int SCIPgetDepth(SCIP *scip)

SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)

int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)

SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)

SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)

SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)

SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)

SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)

SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)

SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)

int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)

SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)

SCIP_Bool SCIPdoNotAggr(SCIP *scip)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)

SCIP_RETCODE SCIPparseVarsList(SCIP *scip, const char *str, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize, char **endptr, char delimiter, SCIP_Bool *success)

SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)

SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)

SCIP_Real SCIPvarGetObj(SCIP_VAR *var)

SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)

SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)

SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)

SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

int SCIPvarGetIndex(SCIP_VAR *var)

SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)

SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)

SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)

SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)

SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)

SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)

SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)

SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)

SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)

SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)

SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)

int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)

SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)

SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)

SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)

SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)

SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)

SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)

SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)

int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)

SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)

SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)

SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)

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

void SCIPsortRealIntPtr(SCIP_Real *realarray, int *intarray, void **ptrarray, int len)

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

SCIP_RETCODE SCIPskipSpace(char **s)

SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)

SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)

SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)

SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)

SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)

primal heuristic that tries a given solution

memory allocation routines

#define BMScopyMemoryArray(ptr, source, num)

#define BMSclearMemoryArray(ptr, num)

struct BMS_BlkMem BMS_BLKMEM

BMS_BLKMEM * SCIPblkmem(SCIP *scip)

public methods for managing constraints

public methods for managing events

public methods for LP management

public methods for message output

#define SCIPdebugPrintCons(x, y, z)

public data structures and miscellaneous methods

methods for sorting joint arrays of various types

public methods for problem variables

public methods for conflict handler plugins and conflict analysis

public methods for constraint handler plugins and constraints

public methods for problem copies

public methods for cuts and aggregation rows

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

public methods for SCIP parameter handling

public methods for global and local (sub)problems

public methods for the probing mode

public methods for solutions

public methods for the branch-and-bound tree

public methods for SCIP variables

structs for symmetry computations

methods for dealing with symmetry detection graphs

@ SCIP_CONFTYPE_PROPAGATION

struct SCIP_ConshdlrData SCIP_CONSHDLRDATA

struct SCIP_ConsData SCIP_CONSDATA

#define SCIP_EVENTTYPE_BOUNDCHANGED

struct SCIP_EventData SCIP_EVENTDATA

#define SCIP_EVENTTYPE_VARFIXED

enum SCIP_Result SCIP_RESULT

enum SCIP_Retcode SCIP_RETCODE

@ SCIP_STAGE_INITPRESOLVE

@ SCIP_STAGE_EXITPRESOLVE

enum SYM_Symtype SYM_SYMTYPE

#define SCIP_PRESOLTIMING_MEDIUM

#define SCIP_PRESOLTIMING_EXHAUSTIVE

@ SCIP_VARSTATUS_MULTAGGR

@ SCIP_VARSTATUS_AGGREGATED

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