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

SCIP Doxygen Documentation: cons_sos2.c Source File

110#define CONSHDLR_NAME "SOS2" 111#define CONSHDLR_DESC "SOS2 constraint handler" 112#define CONSHDLR_SEPAPRIORITY 10 113#define CONSHDLR_ENFOPRIORITY 100 114#define CONSHDLR_CHECKPRIORITY -10 115#define CONSHDLR_SEPAFREQ 0 116#define CONSHDLR_PROPFREQ 1 117#define CONSHDLR_EAGERFREQ 100 119#define CONSHDLR_MAXPREROUNDS -1 120#define CONSHDLR_DELAYSEPA FALSE 121#define CONSHDLR_DELAYPROP FALSE 122#define CONSHDLR_NEEDSCONS TRUE 124#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 125#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST 128#define EVENTHDLR_NAME "SOS2" 129#define EVENTHDLR_DESC "bound change event handler for SOS2 constraints" 131#define EVENTHDLR_EVENT_TYPE (SCIP_EVENTTYPE_BOUNDCHANGED | SCIP_EVENTTYPE_GBDCHANGED) 146struct

SCIP_ConshdlrData

162

*infeasible =

FALSE

;

181 SCIP_CALL

(

SCIPcreateConsLinear

(

scip

, &cons,

"branch"

, 1, &var, &val, 0.0, 0.0,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

215

*infeasible =

FALSE

;

233

*tightened = *tightened || tighten;

237

*tightened = *tightened || tighten;

255

assert( cons !=

NULL

);

256

assert( var !=

NULL

);

275

assert( cons !=

NULL

);

276

assert( var !=

NULL

);

295

assert( consdata !=

NULL

);

296

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

298 if

( num > consdata->maxvars )

304 if

( reserveWeights )

306

consdata->maxvars = newsize;

308

assert( num <= consdata->maxvars );

325

assert( cons !=

NULL

);

326

assert( consdata !=

NULL

);

327

assert( var !=

NULL

);

338

assert( conshdlrdata !=

NULL

);

339

assert( conshdlrdata->eventhdlr !=

NULL

);

346

assert( consdata->nfixednonzeros >= 0 );

348

++consdata->nfixednonzeros;

355 if

( consdata->row !=

NULL

)

385

assert( var !=

NULL

);

386

assert( cons !=

NULL

);

389

assert( consdata !=

NULL

);

391 if

( consdata->weights ==

NULL

&& consdata->maxvars > 0 )

405

assert( var !=

NULL

);

409

assert( consdata->weights !=

NULL

);

410

assert( consdata->maxvars >= consdata->nvars+1 );

413 for

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

415 if

( consdata->weights[pos] > weight )

418

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

421 for

(j = consdata->nvars; j > pos; --j)

423

consdata->vars[j] = consdata->vars[j-1];

424

consdata->weights[j] = consdata->weights[j-1];

428

consdata->vars[pos] = var;

429

consdata->weights[pos] = weight;

450

assert( var !=

NULL

);

451

assert( cons !=

NULL

);

454

assert( consdata !=

NULL

);

455

assert( consdata->nvars >= 0 );

465

assert( var !=

NULL

);

468 if

( consdata->weights !=

NULL

)

478

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

479 if

( consdata->weights !=

NULL

)

481 if

( consdata->nvars > 0 )

482

consdata->weights[consdata->nvars] = consdata->weights[consdata->nvars-1] + 1.0;

484

consdata->weights[consdata->nvars] = 0.0;

507

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

516 for

(j = pos; j < consdata->nvars-1; ++j)

518

consdata->vars[j] = consdata->vars[j+1];

519 if

( consdata->weights !=

NULL

)

520

consdata->weights[j] = consdata->weights[j+1];

573 int

lastFixedNonzero;

575 int

localnremovedvars;

580

assert( cons !=

NULL

);

581

assert( consdata !=

NULL

);

582

assert( eventhdlr !=

NULL

);

583

assert( cutoff !=

NULL

);

584

assert( success !=

NULL

);

585

assert( ndelconss !=

NULL

);

586

assert( nfixedvars !=

NULL

);

587

assert( nremovedvars !=

NULL

);

595 if

( consdata->nvars <= 2 )

609

lastFixedNonzero = -1;

610

vars = consdata->vars;

611

lastzero = consdata->nvars;

612

localnremovedvars = 0;

615 for

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

624

assert(vars == consdata->vars);

657 if

( lastFixedNonzero != -1 && lastFixedNonzero != j + 1 )

659 SCIPdebugMsg

(

scip

,

"The problem is infeasible: two non-consecutive variables have bounds that keep them from being 0.\n"

);

665 if

( nfixednonzeros > 2 )

667 SCIPdebugMsg

(

scip

,

"The problem is infeasible: more than two variables have bounds that keep them from being 0.\n"

);

672 if

( lastFixedNonzero == -1)

673

lastFixedNonzero = j;

680 if

( j == consdata->nvars - 1 )

690 else if

( lastzero > j + 1 )

694

lastzero = consdata->nvars;

698

assert(vars == consdata->vars);

701 if

( lastzero < consdata->nvars )

703

assert(lastzero >= 0);

705 for

( j = lastzero; j >= 0; --j )

713

localnremovedvars += (lastzero + 1);

718

assert(vars == consdata->vars);

720

*nremovedvars += localnremovedvars;

723 if

( lastFixedNonzero >= 0 )

725

lastFixedNonzero -= localnremovedvars;

726

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

731 if

( consdata->nvars <= 2 )

744

oldnfixedvars = *nfixedvars;

747 if

( nfixednonzeros == 1 )

749

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

754 for

( j = 0; j < lastFixedNonzero - 1; ++j )

768 for

( j = lastFixedNonzero + 2; j < consdata->nvars; ++j )

783 if

( *nfixedvars > oldnfixedvars )

787 else if

( nfixednonzeros == 2 )

789

assert(0 < lastFixedNonzero && lastFixedNonzero < consdata->nvars);

797 for

( j = 0; j < lastFixedNonzero - 1; ++j )

811 for

( j = lastFixedNonzero + 1; j < consdata->nvars; ++j )

849

assert( cons !=

NULL

);

850

assert( consdata !=

NULL

);

851

assert( cutoff !=

NULL

);

852

assert( ngen !=

NULL

);

858 if

( consdata->nfixednonzeros > 2 )

860 SCIPdebugMsg

(

scip

,

"the node is infeasible, more than 2 variables are fixed to be nonzero.\n"

);

867 if

( consdata->nfixednonzeros == 1 )

873 int

firstFixedNonzero;

877

firstFixedNonzero = -1;

878

nvars = consdata->nvars;

879

vars = consdata->vars;

880

assert( vars !=

NULL

);

883 for

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

887

firstFixedNonzero = j;

891

assert( firstFixedNonzero >= 0 );

896 for

(j = 0; j < firstFixedNonzero-1; ++j)

900

assert( ! infeasible );

907 for

(j = firstFixedNonzero+2; j < nvars; ++j)

916 SCIPdebugMsg

(

scip

,

"the node is infeasible: variable <%s> is fixed nonzero and variable <%s> with distance at least 2 as well.\n"

,

928 else if

( consdata->nfixednonzeros == 2 )

935 int

firstFixedNonzero;

939

firstFixedNonzero = -1;

940

nvars = consdata->nvars;

941

vars = consdata->vars;

942

assert( vars !=

NULL

);

945 for

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

949

firstFixedNonzero = j;

953

assert( 0 <= firstFixedNonzero && firstFixedNonzero < nvars-1 );

959 for

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

963

assert( ! infeasible );

964

allVarFixed = allVarFixed && success;

970 for

(j = firstFixedNonzero+2; j < nvars; ++j)

979 SCIPdebugMsg

(

scip

,

"the node is infeasible: variable <%s> is fixed nonzero and variable <%s> with distance at least 2 as well.\n"

,

984

allVarFixed = allVarFixed && success;

1000 if

( *ngen > ngenold )

1060

assert( conshdlr !=

NULL

);

1061

assert( conss !=

NULL

);

1062

assert( result !=

NULL

);

1071 for

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

1084

assert( cons !=

NULL

);

1087

assert( consdata !=

NULL

);

1089

nvars = consdata->nvars;

1090

vars = consdata->vars;

1118 for

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

1138

assert( 0 < lastNonzero && lastNonzero < nvars );

1143 w

= weight1/weight2;

1146

assert( 0 <= ind && ind < nvars-1 );

1153 if

( cnt > maxNonzeros )

1170

assert( consdata !=

NULL

);

1171

nvars = consdata->nvars;

1172

vars = consdata->vars;

1174

assert( 0 < maxInd && maxInd < nvars-1 );

1183 for

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

1193 for

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

1196

assert( ! infeasible );

1202 for

(j = maxInd+1; j < nvars; ++j)

1211 for

(j = maxInd+1; j < nvars; ++j)

1214

assert( ! infeasible );

1259

assert( conshdlr !=

NULL

);

1260

assert( cons !=

NULL

);

1263

assert( consdata !=

NULL

);

1264

assert( consdata->row ==

NULL

);

1266

nvars = consdata->nvars;

1267

vars = consdata->vars;

1268

assert( vars !=

NULL

);

1271 for

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

1307

lhs = minLb + minLb2;

1308

rhs = maxUb + maxUb2;

1324

consdata->row = row;

1340

assert( conshdlr !=

NULL

);

1359

assert( conshdlr !=

NULL

);

1363

assert(conshdlrdata !=

NULL

);

1378

assert( conshdlr !=

NULL

);

1382 for

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

1386

assert( conss !=

NULL

);

1387

assert( conss[c] !=

NULL

);

1389

assert( consdata !=

NULL

);

1394 if

( consdata->row !=

NULL

)

1408

assert( conshdlr !=

NULL

);

1409

assert( cons !=

NULL

);

1410

assert( consdata !=

NULL

);

1423

assert( conshdlrdata !=

NULL

);

1424

assert( conshdlrdata->eventhdlr !=

NULL

);

1426 for

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

1434 if

( (*consdata)->weights !=

NULL

)

1440 if

( (*consdata)->row !=

NULL

)

1444

assert( (*consdata)->row ==

NULL

);

1463

assert( conshdlr !=

NULL

);

1465

assert( sourcecons !=

NULL

);

1466

assert( targetcons !=

NULL

);

1470

assert( conshdlrdata !=

NULL

);

1471

assert( conshdlrdata->eventhdlr !=

NULL

);

1477

assert( sourcedata !=

NULL

);

1478

assert( sourcedata->nvars > 0 );

1479

assert( sourcedata->nvars <= sourcedata->maxvars );

1484

consdata->nvars = sourcedata->nvars;

1485

consdata->maxvars = sourcedata->nvars;

1486

consdata->row =

NULL

;

1487

consdata->nfixednonzeros = 0;

1491 if

( sourcedata->weights !=

NULL

)

1496

consdata->weights =

NULL

;

1498 for

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

1500

assert( sourcedata->vars[j] != 0 );

1505

++(consdata->nfixednonzeros);

1518 for

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

1525 if

( consdata->nfixednonzeros > 0 )

1539 SCIPdebug

(

int

oldnfixedvars = *nfixedvars; )

1540 SCIPdebug

(

int

oldndelconss = *ndelconss; )

1546

assert( conshdlr !=

NULL

);

1548

assert( result !=

NULL

);

1554 if

( nrounds == 0 || nnewfixedvars > 0 || nnewaggrvars > 0 || nnewchgcoefs > 0 )

1559

assert( eventhdlr !=

NULL

);

1564 for

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

1571

assert( conss !=

NULL

);

1572

assert( conss[c] !=

NULL

);

1577

assert( consdata !=

NULL

);

1578

assert( consdata->nvars >= 0 );

1579

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

1595

(*nchgcoefs) += nremovedvars;

1597 SCIPdebug

(

SCIPdebugMsg

(

scip

,

"presolving fixed %d variables, removed %d variables, and deleted %d constraints.\n"

,

1598

*nfixedvars - oldnfixedvars, nremovedvars, *ndelconss - oldndelconss); )

1611

assert( conshdlr !=

NULL

);

1614

*infeasible =

FALSE

;

1617 for

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

1621

assert( conss !=

NULL

);

1622

assert( conss[c] !=

NULL

);

1624

assert( consdata !=

NULL

);

1629 if

( consdata->row ==

NULL

)

1657

assert( conshdlr !=

NULL

);

1658

assert( conss !=

NULL

);

1660

assert( result !=

NULL

);

1665 for

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

1671

assert( conss[c] !=

NULL

);

1673

assert( consdata !=

NULL

);

1677 if

( consdata->row ==

NULL

)

1683

row = consdata->row;

1697 else if

( ngen > 0 )

1713

assert( conshdlr !=

NULL

);

1714

assert( conss !=

NULL

);

1716

assert( result !=

NULL

);

1721 for

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

1727

assert( conss[c] !=

NULL

);

1729

assert( consdata !=

NULL

);

1733

row = consdata->row;

1753 else if

( ngen > 0 )

1765

assert( conshdlr !=

NULL

);

1766

assert( conss !=

NULL

);

1768

assert( result !=

NULL

);

1781

assert( conshdlr !=

NULL

);

1782

assert( conss !=

NULL

);

1784

assert( result !=

NULL

);

1797

assert( conshdlr !=

NULL

);

1798

assert( conss !=

NULL

);

1800

assert( result !=

NULL

);

1820

assert( conshdlr !=

NULL

);

1821

assert( conss !=

NULL

);

1823

assert( result !=

NULL

);

1828 for

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

SCIP_FEASIBLE

|| completely); ++c)

1835

assert( conss[c] !=

NULL

);

1837

assert( consdata !=

NULL

);

1841 for

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

1846 if

( firstNonzero < 0 )

1851 if

( j > firstNonzero+1 )

1890

assert( conshdlr !=

NULL

);

1891

assert( conss !=

NULL

);

1893

assert( result !=

NULL

);

1899 for

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

1905

assert( conss[c] !=

NULL

);

1908

assert( consdata !=

NULL

);

1939

assert( cons !=

NULL

);

1941

assert( infervar !=

NULL

);

1942

assert( bdchgidx !=

NULL

);

1943

assert( result !=

NULL

);

1949

assert( consdata !=

NULL

);

1950

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

1951

var = consdata->vars[inferinfo];

1952

assert( var != infervar );

1993

assert( conshdlr !=

NULL

);

1994

assert( cons !=

NULL

);

1999

assert( consdata !=

NULL

);

2003

vars = consdata->vars;

2004

nvars = consdata->nvars;

2005

assert( vars !=

NULL

);

2007 for

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

2033

assert( conshdlr !=

NULL

);

2034

assert( cons !=

NULL

);

2038

assert( consdata !=

NULL

);

2040 for

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

2045 if

( consdata->weights ==

NULL

)

2063 const char

* consname;

2068

assert( sourcescip !=

NULL

);

2069

assert( sourcecons !=

NULL

);

2071

assert( valid !=

NULL

);

2083

assert( sourceconsdata !=

NULL

);

2086

nvars = sourceconsdata->nvars;

2087

assert( nvars >= 0 );

2090 if

( sourceconsdata->weights !=

NULL

)

2096

sourcevars = sourceconsdata->vars;

2098 for

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

2100

assert( sourcevars !=

NULL

);

2108

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

2132 SCIP_CALL

(

SCIPcreateConsSOS2

(

scip

, cons, name, 0,

NULL

,

NULL

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

2135 while

( *s !=

'\0'

)

2144

t = strchr(t,

'('

);

2148 SCIPerrorMessage

(

"Syntax error: expected opening '(' at input: %s\n"

, s);

2159

weight = strtod(s, &t);

2171

t = strchr(t,

')'

);

2175 SCIPerrorMessage

(

"Syntax error: expected closing ')' at input %s\n"

, s);

2210

assert(consdata !=

NULL

);

2212 if

( varssize < consdata->nvars )

2213

(*success) =

FALSE

;

2216

assert(vars !=

NULL

);

2233

assert(consdata !=

NULL

);

2235

(*nvars) = consdata->nvars;

2260

assert(success !=

NULL

);

2263

assert(consdata !=

NULL

);

2267

nconsvars = consdata->nvars;

2269

assert(consvars !=

NULL

);

2278 for

( i = 0; i < nconsvars - 1; ++i )

2283 for

( j = i; j < i + 2; ++j )

2285

locvars[0] = consvars[j];

2335

assert(success !=

NULL

);

2338

assert(consdata !=

NULL

);

2342

nconsvars = consdata->nvars;

2344

assert(consvars !=

NULL

);

2353 for

( i = 0; i < nconsvars - 1; ++i )

2358 for

( j = i; j < i + 2; ++j )

2360

locvars[0] = consvars[j];

2380

allownegation =

TRUE

;

2386 if

( allownegation )

2406 for

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

2446

assert( eventhdlr !=

NULL

);

2447

assert( eventdata !=

NULL

);

2449

assert( event !=

NULL

);

2452

assert( cons !=

NULL

);

2454

assert( consdata !=

NULL

);

2455

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

2461 switch

( eventtype )

2466

++(consdata->nfixednonzeros);

2471

++(consdata->nfixednonzeros);

2476

--(consdata->nfixednonzeros);

2481

--(consdata->nfixednonzeros);

2485

assert(var !=

NULL

);

2496

assert(var !=

NULL

);

2509

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

2512

oldbound, newbound, consdata->nfixednonzeros);

2531

conshdlrdata->eventhdlr =

NULL

;

2534

eventExecSOS2,

NULL

) );

2535 if

( conshdlrdata->eventhdlr ==

NULL

)

2544

consEnfolpSOS2, consEnfopsSOS2, consCheckSOS2, consLockSOS2, conshdlrdata) );

2545

assert(conshdlr !=

NULL

);

2611

modifiable =

FALSE

;

2615 if

( conshdlr ==

NULL

)

2623

consdata->vars =

NULL

;

2624

consdata->nvars = nvars;

2625

consdata->maxvars = nvars;

2626

consdata->row =

NULL

;

2627

consdata->nfixednonzeros = -1;

2628

consdata->weights =

NULL

;

2634 if

( weights !=

NULL

)

2644

assert( weights ==

NULL

);

2647 SCIP_CALL

(

SCIPcreateCons

(

scip

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

2648

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

2670 SCIP_CALL

(

SCIPcreateConsSOS2

(

scip

, cons, name, nvars, vars, weights,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

FALSE

,

FALSE

,

FALSE

,

FALSE

) );

2685

assert( var !=

NULL

);

2686

assert( cons !=

NULL

);

2710

assert( var !=

NULL

);

2711

assert( cons !=

NULL

);

2736

assert( cons !=

NULL

);

2746

assert( consdata !=

NULL

);

2748 return

consdata->nvars;

2761

assert( cons !=

NULL

);

2771

assert( consdata !=

NULL

);

2773 return

consdata->vars;

2786

assert( cons !=

NULL

);

2796

assert( consdata !=

NULL

);

2798 return

consdata->weights;

static SCIP_RETCODE branchCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)

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

#define CONSHDLR_NEEDSCONS

#define CONSHDLR_SEPAFREQ

static SCIP_DECL_CONSGETNVARS(consGetNVarsSOS2)

static SCIP_RETCODE propSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *cutoff, int *ngen)

#define CONSHDLR_CHECKPRIORITY

static SCIP_DECL_CONSSEPASOL(consSepasolSOS2)

#define CONSHDLR_PROP_TIMING

static SCIP_DECL_CONSEXITSOL(consExitsolSOS2)

static SCIP_DECL_CONSCOPY(consCopySOS2)

static SCIP_DECL_CONSRESPROP(consRespropSOS2)

static SCIP_RETCODE handleNewVariableSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Bool transformed)

static SCIP_RETCODE deleteVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)

#define CONSHDLR_MAXPREROUNDS

static SCIP_DECL_CONSHDLRCOPY(conshdlrCopySOS2)

#define CONSHDLR_SEPAPRIORITY

static SCIP_DECL_CONSPARSE(consParseSOS2)

static SCIP_DECL_CONSINITLP(consInitlpSOS2)

static SCIP_DECL_CONSENFORELAX(consEnforelaxSOS2)

static SCIP_DECL_EVENTEXEC(eventExecSOS2)

static SCIP_DECL_CONSENFOLP(consEnfolpSOS2)

static SCIP_RETCODE presolRoundSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *success, int *ndelconss, int *nfixedvars, int *nremovedvars)

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

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

static SCIP_DECL_CONSCHECK(consCheckSOS2)

static SCIP_RETCODE fixVariableZeroNode(SCIP *scip, SCIP_VAR *var, SCIP_NODE *node, SCIP_Bool *infeasible)

static SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphSOS2)

static SCIP_RETCODE inferVariableZero(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened, SCIP_Bool *success)

static SCIP_DECL_CONSPRESOL(consPresolSOS2)

static SCIP_DECL_CONSDELETE(consDeleteSOS2)

static SCIP_DECL_CONSENFOPS(consEnfopsSOS2)

static SCIP_DECL_CONSFREE(consFreeSOS2)

static SCIP_DECL_CONSGETVARS(consGetVarsSOS2)

static SCIP_DECL_CONSTRANS(consTransSOS2)

#define CONSHDLR_PROPFREQ

static SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphSOS2)

#define CONSHDLR_PRESOLTIMING

#define CONSHDLR_EAGERFREQ

#define EVENTHDLR_EVENT_TYPE

#define CONSHDLR_ENFOPRIORITY

#define CONSHDLR_DELAYSEPA

static SCIP_RETCODE generateRowSOS2(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool local)

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

static SCIP_RETCODE addVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)

static SCIP_RETCODE consdataEnsurevarsSizeSOS2(SCIP *scip, SCIP_CONSDATA *consdata, int num, SCIP_Bool reserveWeights)

static SCIP_DECL_CONSPRINT(consPrintSOS2)

static SCIP_DECL_CONSLOCK(consLockSOS2)

static SCIP_RETCODE enforceSOS2(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)

static SCIP_DECL_CONSPROP(consPropSOS2)

static SCIP_DECL_CONSSEPALP(consSepalpSOS2)

#define CONSHDLR_DELAYPROP

constraint handler for SOS type 2 constraints

SCIP_Real * SCIPgetWeightsSOS2(SCIP *scip, SCIP_CONS *cons)

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

SCIP_RETCODE SCIPappendVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)

int SCIPgetNVarsSOS2(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)

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 SCIPaddVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)

SCIP_RETCODE SCIPcreateConsBasicSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)

SCIP_RETCODE SCIPincludeConshdlrSOS2(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)

int SCIPgetNVars(SCIP *scip)

SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)

SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)

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

SCIP_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)

SCIP_Real SCIPcalcChildEstimateIncrease(SCIP *scip, SCIP_VAR *var, SCIP_Real varsol, SCIP_Real targetvalue)

SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)

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

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

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

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 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 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)

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 SCIPconsIsTransformed(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsEnforced(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_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)

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

SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)

SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)

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)

const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)

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_Real SCIPeventGetOldbound(SCIP_EVENT *event)

SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)

SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)

#define SCIPfreeBlockMemoryArray(scip, ptr, num)

int SCIPcalcMemGrowSize(SCIP *scip, int num)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

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

#define SCIPallocBlockMemoryArray(scip, ptr, num)

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

#define SCIPfreeBlockMemory(scip, ptr)

#define SCIPfreeBufferArrayNull(scip, ptr)

#define SCIPallocBlockMemory(scip, ptr)

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

SCIP_Real SCIProwGetLhs(SCIP_ROW *row)

SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)

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

SCIP_Real SCIProwGetRhs(SCIP_ROW *row)

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 SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)

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

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

SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)

SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)

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

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

SCIP_Real SCIPinfinity(SCIP *scip)

SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

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

SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisFeasGT(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_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)

SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)

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

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

SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)

SCIP_Real SCIPvarGetUbGlobal(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_Real SCIPvarGetLbLocal(SCIP_VAR *var)

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)

SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)

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

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

void SCIPsortRealPtr(SCIP_Real *realarray, 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 SCIPaddSymgraphValnode(SCIP *scip, SYM_GRAPH *graph, SCIP_Real val, int *nodeidx)

int SCIPgetSymgraphVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)

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)

int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)

memory allocation routines

#define BMScopyMemoryArray(ptr, source, num)

public methods for managing constraints

public methods for managing events

public methods for LP management

public methods for message output

public data structures and miscellaneous methods

methods for sorting joint arrays of various types

public methods for problem variables

public methods for branching rule plugins and branching

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 the LP relaxation, rows and columns

public methods for memory management

public methods for message handling

public methods for numerical tolerances

public methods for global and local (sub)problems

public methods for solutions

public methods for SCIP variables

structs for symmetry computations

methods for dealing with symmetry detection graphs

struct SCIP_ConshdlrData SCIP_CONSHDLRDATA

struct SCIP_ConsData SCIP_CONSDATA

#define SCIP_EVENTTYPE_GUBCHANGED

struct SCIP_EventData SCIP_EVENTDATA

#define SCIP_EVENTTYPE_UBTIGHTENED

#define SCIP_EVENTTYPE_LBRELAXED

#define SCIP_EVENTTYPE_GLBCHANGED

#define SCIP_EVENTTYPE_LBTIGHTENED

#define SCIP_EVENTTYPE_UBRELAXED

@ SCIP_BRANCHDIR_DOWNWARDS

enum SCIP_Result SCIP_RESULT

enum SCIP_Retcode SCIP_RETCODE

@ SYM_CONSOPTYPE_SOS2_TUPLE

@ SCIP_VARSTATUS_MULTAGGR


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