A RetroSearch Logo

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

Search Query:

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

SCIP Doxygen Documentation: reader_opb.c Source File

122#define READER_NAME "opbreader" 123#define READER_DESC "file reader for pseudo-Boolean problem in opb format" 124#define READER_EXTENSION "opb" 126#define GENCONSNAMES TRUE 127#define LINEAROBJECTIVE TRUE 132#define INDICATORVARNAME "indicatorvar" 133#define INDICATORSLACKVARNAME "indslack" 134#define TOPCOSTCONSNAME "topcostcons" 139#define OPB_MAX_LINELEN 65536 140#define OPB_MAX_PUSHEDTOKENS 2 141#define OPB_INIT_COEFSSIZE 8192 180#if GENCONSNAMES == TRUE 201

assert(opbinput !=

NULL

);

203 SCIPerrorMessage

(

"Syntax error in line %d: %s found <%s>\n"

, opbinput->linenumber, msg, opbinput->token);

204 if

( opbinput->linebuf[opbinput->linebufsize - 1] ==

'\n'

)

213

opbinput->haserror =

TRUE

;

222

assert(opbinput !=

NULL

);

224 return

opbinput->haserror;

281

assert(hasdot !=

NULL

);

282

assert(exptype !=

NULL

);

284 if

( isdigit((

unsigned char

)c) )

286 else if

( (*exptype ==

OPB_EXP_NONE

) && !(*hasdot) && (c ==

'.'

) )

291 else if

( !firstchar && (*exptype ==

OPB_EXP_NONE

) && (c ==

'e'

|| c ==

'E'

) )

293 if

( nextc ==

'+'

|| nextc ==

'-'

)

298 else if

( isdigit((

unsigned char

)nextc) )

304 else if

( (*exptype ==

OPB_EXP_SIGNED

) && (c ==

'+'

|| c ==

'-'

) )

324

assert(opbinput !=

NULL

);

327

opbinput->linepos = 0;

328

opbinput->linebuf[opbinput->linebufsize - 2] =

'\0'

;

330 if

(

SCIPfgets

(opbinput->linebuf, opbinput->linebufsize, opbinput->file) ==

NULL

)

333

opbinput->linenumber++;

336 while

( opbinput->linebuf[opbinput->linebufsize - 2] !=

'\0'

)

343

opbinput->linebuf[newsize-2] =

'\0'

;

344 if

(

SCIPfgets

(opbinput->linebuf + opbinput->linebufsize - 1, newsize - opbinput->linebufsize + 1, opbinput->file) ==

NULL

)

346

opbinput->linebufsize = newsize;

349

opbinput->linebuf[opbinput->linebufsize - 1] =

'\0'

;

356

commentstart = strchr(opbinput->linebuf,

commentchars

[i]);

357 if

( commentstart !=

NULL

)

359

*commentstart =

'\0'

;

360

*(commentstart+1) =

'\0'

;

380

*pointer1 = *pointer2;

396

assert(opbinput !=

NULL

);

397

assert(opbinput->linepos < opbinput->linebufsize);

400 if

( opbinput->npushedtokens > 0 )

402 swapPointers

(&opbinput->token, &opbinput->pushedtokens[opbinput->npushedtokens-1]);

403

opbinput->npushedtokens--;

404 SCIPdebugMsg

(

scip

,

"(line %d) read token again: '%s'\n"

, opbinput->linenumber, opbinput->token);

409

buf = opbinput->linebuf;

412 if

( buf[opbinput->linepos] ==

'\0'

)

419

assert(opbinput->linepos == 0);

421

buf = opbinput->linebuf;

426

assert(opbinput->linepos < opbinput->linebufsize);

432 if

(

isValueChar

(buf[opbinput->linepos], buf[opbinput->linepos+1],

TRUE

, &hasdot, &exptype) )

440

opbinput->token[tokenlen] = buf[opbinput->linepos];

444 while

(

isValueChar

(buf[opbinput->linepos], buf[opbinput->linepos+1],

FALSE

, &hasdot, &exptype) );

453

opbinput->token[tokenlen] = buf[opbinput->linepos];

456 if

( tokenlen == 1 &&

isTokenChar

(opbinput->token[0]) )

466

&& (opbinput->token[tokenlen-1] ==

'<'

|| opbinput->token[tokenlen-1] ==

'>'

|| opbinput->token[tokenlen-1] ==

'='

)

467

&& buf[opbinput->linepos] ==

'='

)

471 else if

( opbinput->token[tokenlen-1] ==

'='

&& (buf[opbinput->linepos] ==

'<'

|| buf[opbinput->linepos] ==

'>'

) )

473

opbinput->token[tokenlen-1] = buf[opbinput->linepos];

478

opbinput->token[tokenlen] =

'\0'

;

480 SCIPdebugMsg

(

scip

,

"(line %d) read token: '%s'\n"

, opbinput->linenumber, opbinput->token);

491

assert(opbinput !=

NULL

);

494 swapPointers

(&opbinput->pushedtokens[opbinput->npushedtokens], &opbinput->token);

495

opbinput->npushedtokens++;

504

assert(opbinput !=

NULL

);

507 swapPointers

(&opbinput->pushedtokens[opbinput->npushedtokens], &opbinput->tokenbuf);

508

opbinput->npushedtokens++;

517

assert(opbinput !=

NULL

);

528

assert(opbinput !=

NULL

);

530 if

( *(opbinput->token) ==

';'

)

543

assert(opbinput !=

NULL

);

544

assert(sign !=

NULL

);

545

assert(*sign == +1 || *sign == -1);

547 if

( strlen(opbinput->token) == 1 )

549

assert(opbinput->token[1] ==

'\0'

);

551 if

( *opbinput->token ==

'+'

)

553 else if

( *opbinput->token ==

'-'

)

571

assert(opbinput !=

NULL

);

572

assert(value !=

NULL

);

584

val = strtod(opbinput->token, &endptr);

585 if

( endptr != opbinput->token && *endptr ==

'\0'

)

588 if

( strlen(opbinput->token) > 18 )

589

opbinput->nproblemcoeffs++;

604

assert(opbinput !=

NULL

);

606 if

( strcmp(opbinput->token,

"<"

) == 0 )

612 else if

( strcmp(opbinput->token,

">"

) == 0 )

618 else if

( strcmp(opbinput->token,

"="

) == 0 )

636

assert(opbinput !=

NULL

);

638 if

( strcmp(opbinput->token,

"["

) == 0 )

652

assert(opbinput !=

NULL

);

654 if

( strcmp(opbinput->token,

"]"

) == 0 )

674

initial = !dynamiccols;

675

removable = dynamiccols;

706

assert(opbinput !=

NULL

);

707

assert(vars !=

NULL

);

708

assert(nvars !=

NULL

);

709

assert(varssize !=

NULL

);

710

assert(*varssize >= 0);

714

name = opbinput->token;

715

assert(name !=

NULL

);

718 while

(!isdigit((

unsigned char

) *name ) && !

isTokenChar

(*name) && !opbinput->haserror )

744 if

( *nvars == *varssize )

750

(*vars)[*nvars] = var;

754

opbinput->haserror =

TRUE

;

756

name = opbinput->token;

777 int

*

const

nlincoefs,

783 int

*

const

ntermcoefs,

802

assert(opbinput !=

NULL

);

803

assert(name !=

NULL

);

804

assert(linvars !=

NULL

);

805

assert(lincoefs !=

NULL

);

806

assert(lincoefssize !=

NULL

);

807

assert(nlincoefs !=

NULL

);

808

assert(terms !=

NULL

);

809

assert(termcoefs !=

NULL

);

810

assert(ntermvars !=

NULL

);

811

assert(termcoefssize !=

NULL

);

812

assert(ntermcoefs !=

NULL

);

813

assert(newsection !=

NULL

);

825

*newsection =

FALSE

;

826

*isNonlinear =

FALSE

;

827

*issoftcons =

FALSE

;

840 if

( strcmp(opbinput->token,

":"

) == 0 )

846 SCIPdebugMsg

(

scip

,

"(line %d) read constraint name: '%s'\n"

, opbinput->linenumber, name);

851 syntaxError

(

scip

, opbinput,

"Soft top cost line needs to be the first non-comment line, and without any objective function.\n"

);

858 SCIPdebugMsg

(

scip

,

"(line %d) constraint has no name\n"

, opbinput->linenumber);

871

assert(

SCIPfeof

( opbinput->file ) );

872

opbinput->eof =

TRUE

;

894

haveweightstart =

FALSE

;

895

haveweightend =

FALSE

;

916 if

(

isSign

(opbinput, &coefsign) )

918 SCIPdebugMsg

(

scip

,

"(line %d) read coefficient sign: %+d\n"

, opbinput->linenumber, coefsign);

927 if

( (*nlincoefs > 0 || *ntermcoefs > 0 || ntmpcoefs > 0) && !havesign )

933 SCIPdebugMsg

(

scip

,

"(line %d) read coefficient value: %g with sign %+d\n"

, opbinput->linenumber, coef, coefsign);

942 if

( strcmp(name,

"soft"

) == 0 )

944

assert(ntmpcoefs == 0);

946

tmpcoefs[ntmpcoefs] = coefsign * coef;

954 if

( *nlincoefs == 0 && *ntermcoefs == 0 && ntmpcoefs == 0 && !havesign && !havevalue && strcmp(name,

"soft"

) != 0 &&

isStartingSoftConstraintWeight

(

scip

, opbinput) )

956 if

( !opbinput->wbo )

958 SCIPwarningMessage

(

scip

,

"Found in line %d a soft constraint, without having read a starting top-cost line.\n"

, opbinput->linenumber);

960

haveweightstart =

TRUE

;

966

*weight = coefsign * coef;

967 SCIPdebugMsg

(

scip

,

"(line %d) found soft constraint weight: %g\n"

, opbinput->linenumber, *weight);

972

haveweightend =

TRUE

;

980 if

( haveweightstart != haveweightend )

987 if

( strcmp(name,

"soft"

) == 0 )

999

*isNonlinear =

TRUE

;

1001 SCIPdebugMsg

(

scip

,

"(line %d) found linear term: %+g"

, opbinput->linenumber, coefsign * coef);

1005 for

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

1014

assert(*ntermcoefs <= *termcoefssize);

1016 if

( *ntermcoefs >= *termcoefssize )

1024

*termcoefssize = newsize;

1026

assert(*ntermcoefs < *termcoefssize);

1032

(*ntermvars)[*ntermcoefs] = ntmpvars;

1035 for

( --ntmpvars; ntmpvars >= 0; --ntmpvars )

1037

(*terms)[*ntermcoefs][ntmpvars] = tmpvars[ntmpvars];

1040

(*termcoefs)[*ntermcoefs] = coefsign * coef;

1045 SCIPwarningMessage

(

scip

,

"coefficient %g in line %d not integral.\n"

, (*termcoefs)[*ntermcoefs], opbinput->linenumber);

1060

assert(ntmpvars == 1);

1065

assert(*nlincoefs <= *lincoefssize);

1067 if

( *nlincoefs >= *lincoefssize )

1074

*lincoefssize = newsize;

1076

assert(*nlincoefs < *lincoefssize);

1079

(*linvars)[*nlincoefs] = tmpvars[0];

1080

(*lincoefs)[*nlincoefs] = coefsign * coef;

1085 SCIPwarningMessage

(

scip

,

"coefficient %g in line %d not integral.\n"

, (*lincoefs)[*nlincoefs], opbinput->linenumber);

1101 if

( !opbinput->haserror )

1104

assert(ntmpvars == 0);

1107 if

( ntmpcoefs > 0 )

1110

assert(ntmpcoefs == 1);

1112

assert(*nlincoefs == 0 && *ntermcoefs == 0);

1115

(*lincoefs)[*nlincoefs] = tmpcoefs[0];

1145 int

*

const

ntermvars,

1146 int const

ntermcoefs

1150

assert(opbinput !=

NULL

);

1152

assert(ncoefs == 0 || (linvars !=

NULL

&& coefs !=

NULL

));

1153

assert(ntermcoefs == 0 || (terms !=

NULL

&& ntermvars !=

NULL

&& termcoefs !=

NULL

));

1161 if

( strcmp(sense,

"max"

) == 0 )

1170 if

( ntermcoefs > 0 )

1172#if (LINEAROBJECTIVE == TRUE) 1180 for

( t = 0; t < ntermcoefs; ++t )

1182

assert(terms !=

NULL

);

1183

assert(ntermvars !=

NULL

);

1184

assert(termcoefs !=

NULL

);

1187

nvars = ntermvars[t];

1188

assert(vars !=

NULL

);

1205#ifdef WITH_DEBUG_SOLUTION 1206 if

( SCIPdebugIsMainscip(

scip

) )

1210 for

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

1243 for

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

1245 if

( termcoefs[v] < 0 )

1251 for

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

1273#ifdef WITH_DEBUG_SOLUTION 1274 if

( SCIPdebugIsMainscip(

scip

) )

1279 for

( t = 0; t < ntermcoefs; ++t )

1282

nvars = ntermvars[t];

1283

assert(vars !=

NULL

);

1286 for

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

1295

artval += (((val < 0.5) ? 0.0 : 1.0) * termcoefs[t]);

1306

ntermvars, termcoefs,

NULL

, 0.0,

FALSE

, var, 0.0, 0.0,

1320 for

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

1322

assert(linvars !=

NULL

);

1323

assert(coefs !=

NULL

);

1348 int

* nNonlinearConss

1389

assert(opbinput !=

NULL

);

1390

assert(nNonlinearConss !=

NULL

);

1396 SCIP_CALL

(

readCoefficients

(

scip

, opbinput, name, &linvars, &lincoefs, &nlincoefs, &lincoefssize, &terms, &termcoefs, &ntermvars, &termcoefssize,

1397

&ntermcoefs, &newsection, &isNonlinear, &issoftcons, &weight) );

1399 if

(

hasError

(opbinput) || opbinput->eof )

1403 if

( strcmp(name,

"min"

) == 0 || strcmp(name,

"max"

) == 0 )

1405 if

( opbinput->wbo )

1407 syntaxError

(

scip

, opbinput,

"Cannot have an objective function when having soft constraints.\n"

);

1412 SCIP_CALL

(

setObjective

(

scip

, opbinput, name, objscale, linvars, lincoefs, nlincoefs, terms, termcoefs, ntermvars, ntermcoefs) );

1414 else if

( strcmp(name,

"soft"

) == 0 )

1417

opbinput->wbo =

TRUE

;

1418 if

( nlincoefs == 0 )

1422

assert(nlincoefs == 1);

1423

assert(lincoefs !=

NULL

);

1424

opbinput->topcost = lincoefs[0];

1426 SCIPdebugMsg

(

scip

,

"Weighted Boolean Optimization problem has topcost of %g\n"

, opbinput->topcost);

1428 else if

( nlincoefs > 0 )

1429 syntaxError

(

scip

, opbinput,

"expected constraint sense '=' or '>='"

);

1439 if

( !

isSense

(opbinput, &sense) )

1441 syntaxError

(

scip

, opbinput,

"expected constraint sense '=' or '>='."

);

1452 if

(

isSign

(opbinput, &sidesign) )

1465

sidevalue *= sidesign;

1500

initial = initialconss;

1506

modifiable =

FALSE

;

1508

removable = dynamicrows;

1514

++(opbinput->nindvars);

1523 if

( ntermcoefs > 0 || issoftcons )

1525#if GENCONSNAMES == TRUE 1527

++(opbinput->consnumber);

1532

ntermvars, termcoefs, indvar, weight, issoftcons,

NULL

, lhs, rhs,

1533

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

FALSE

);

1539#if GENCONSNAMES == TRUE 1541

++(opbinput->consnumber);

1546

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

FALSE

);

1552 SCIPdebugMsg

(

scip

,

"(line %d) created constraint: "

, opbinput->linenumber);

1557

++(*nNonlinearConss);

1562 for

( t = ntermcoefs - 1; t >= 0; --t )

1564

assert(terms !=

NULL

);

1589 char

* commentstart;

1595

assert(opbinput !=

NULL

);

1596

assert(objoffset !=

NULL

);

1599

commentstart =

NULL

;

1603

opbinput->linebuf[opbinput->linebufsize - 2] =

'\0'

;

1607 if

(

SCIPfgets

(opbinput->linebuf, opbinput->linebufsize, opbinput->file) ==

NULL

)

1609

assert(

SCIPfeof

(opbinput->file) );

1614 while

( opbinput->linebuf[opbinput->linebufsize - 2] !=

'\0'

)

1621

opbinput->linebuf[newsize-2] =

'\0'

;

1622 if

(

SCIPfgets

(opbinput->linebuf + opbinput->linebufsize - 1, newsize - opbinput->linebufsize + 1, opbinput->file) ==

NULL

)

1624

opbinput->linebufsize = newsize;

1626

opbinput->linebuf[opbinput->linebufsize - 1] =

'\0'

;

1631

commentstart = strchr(opbinput->linebuf,

commentchars

[i]);

1634 if

( commentstart !=

NULL

)

1637

nproducts = strstr(opbinput->linebuf,

"#product= "

);

1638 if

( nproducts !=

NULL

)

1643

nproducts += strlen(

"#product= "

);

1649 SCIPdebugMsg

(

scip

,

"%d products supposed to be in file.\n"

, atoi(pos));

1654 if

( pos !=

NULL

&& strcmp(pos,

"sizeproduct="

) == 0 )

1667

str = strstr(opbinput->linebuf,

"Obj. scale : "

);

1670

str += strlen(

"Obj. scale : "

);

1671

*objscale = atof(str);

1676

str = strstr(opbinput->linebuf,

"Obj. offset : "

);

1679

str += strlen(

"Obj. offset : "

);

1680

*objoffset = atof(str);

1685

*commentstart =

'\0'

;

1691 while

(commentstart !=

NULL

&& !stop);

1701 const char

* filename

1706 int

nNonlinearConss;

1710

assert(opbinput !=

NULL

);

1713

opbinput->file =

SCIPfopen

(filename,

"r"

);

1714 if

( opbinput->file ==

NULL

)

1732 if

( objscale < 0.0 )

1733

opbinput->objsense = (

SCIP_OBJSENSE

)(-1 * (

int

)(opbinput->objsense));

1740

nNonlinearConss = 0;

1748 if

( opbinput->wbo )

1760

assert(nvars > 0 || vars !=

NULL

);

1766 for

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

1770

topcostvars[ntopcostvars] = vars[i];

1775

topcostrhs =

SCIPceil

(

scip

, opbinput->topcost - 1.0);

1778

-

SCIPinfinity

(

scip

), topcostrhs,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

FALSE

,

FALSE

,

FALSE

,

FALSE

,

FALSE

) );

1811

assert( vars !=

NULL

);

1812

assert( nvars > 0 );

1816 for

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

1829 for

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

1839 if

( vars[v] ==

NULL

)

1841 SCIPdebugMsg

(

scip

,

"A variable couldn't retransformed to an original variable.\n"

);

1852 SCIPdebugMsg

(

scip

,

"A variable couldn't retransformed to an original variable or a negated variable of an original variable (scalar = %g, constant = %g).\n"

, scalar, constant);

1877

assert(vars !=

NULL

);

1879

assert(nvars !=

NULL

);

1880

assert(constant !=

NULL

);

1886 if

( requiredsize > *nvars )

1892

assert( requiredsize <= *nvars );

1896 for

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

1900 if

( vars[v] ==

NULL

)

1923

assert(resvars !=

NULL

);

1924

assert(nresvars !=

NULL

);

1925

assert(andvars !=

NULL

);

1926

assert(nandvars !=

NULL

);

1927

assert(existandconshdlr !=

NULL

);

1928

assert(existands !=

NULL

);

1937 if

( conshdlr !=

NULL

)

1941 int

* shouldnotbeinand;

1951

*existandconshdlr =

TRUE

;

1966 for

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

1969

assert( conshdlr !=

NULL

);

1973

andconss[nandconss] = origconss[c];

1984

assert(andconss !=

NULL

|| nandconss == 0);

1986

*nresvars = nandconss;

1988 if

( nandconss > 0 )

1992

assert(andconss !=

NULL

);

1999 for

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

2003

assert(andconss[c] !=

NULL

);

2012

assert((*andvars)[c] !=

NULL

&& (*nandvars)[c] > 0);

2013

assert((*resvars)[c] !=

NULL

);

2017 SCIPsortPtrPtrInt

((

void

**)(*resvars), (

void

**)(*andvars), (*nandvars), SCIPvarComp, (*nresvars));

2020

*existands =

FALSE

;

2027

assert(*nandvars !=

NULL

|| *nresvars == 0);

2028 for

(

r

= *nresvars - 1;

r

>= 0; --

r

)

2031

shouldnotbeinand[ncontainedands] =

r

;

2035

assert(*nandvars !=

NULL

);

2036 while

( v < (*nandvars)[

r

] )

2038

assert(*andvars !=

NULL

);

2039

assert(*resvars !=

NULL

);

2040 if

(

SCIPsortedvecFindPtr

((

void

**)(*resvars), SCIPvarComp, (*andvars)[

r

][v], *nresvars, &pos) )

2054 for

(

a

= ncontainedands - 1;

a

>= 0; --

a

)

2055 if

( shouldnotbeinand[

a

] == pos )

2057 SCIPwarningMessage

(

scip

,

"This should not happen here. The and-constraint with resultant variable: "

);

2074

shouldnotbeinand[ncontainedands] = pos;

2080

(*nandvars)[

r

] = (*nandvars)[

r

] + (*nandvars)[pos] - 1;

2084 for

(

a

= (*nandvars)[pos] - 1;

a

>= 0; --

a

)

2085

(*andvars)[

r

][(*nandvars)[

r

] -

a

- 1] = (*andvars)[pos][

a

];

2104

*existands =

FALSE

;

2105

*existandconshdlr =

FALSE

;

2118

assert( linebuffer !=

NULL

);

2119

assert( linecnt !=

NULL

);

2122

linebuffer[0] =

'\0'

;

2136

assert( linebuffer !=

NULL

);

2137

assert( linecnt !=

NULL

);

2140 if

( (*linecnt) > 0 )

2142

linebuffer[(*linecnt)] =

'\0'

;

2156 const char

* extension

2160

assert(linebuffer !=

NULL

);

2161

assert(linecnt !=

NULL

);

2162

assert(extension !=

NULL

);

2168

(void) strncat(linebuffer, extension,

OPB_MAX_LINELEN

- (

unsigned int

)(*linecnt));

2169

(*linecnt) += (int) strlen(extension);

2182 int const

*

const

nandvars,

2187 char const

*

const

multisymbol,

2202

assert(file !=

NULL

);

2203

assert(vars !=

NULL

|| nvars == 0);

2204

assert(resvars !=

NULL

|| nresvars == 0);

2205

assert(andvars !=

NULL

|| nandvars ==

NULL

);

2206

assert(multisymbol !=

NULL

);

2215 for

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

2244 if

( topcostcons !=

NULL

)

2247

assert(conshdlr !=

NULL

);

2271 if

( conshdlr !=

NULL

)

2280

assert(conss !=

NULL

|| nconss == 0);

2282 for

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

2291

assert(cons !=

NULL

);

2296

assert(linvars !=

NULL

|| nlinvars == 0);

2297

topcostfound =

FALSE

;

2299 for

(

w

= 0;

w

< nlinvars; ++

w

)

2302

topcostfound =

TRUE

;

2305

assert(!topcostfound);

2306

topcostfound =

FALSE

;

2326 if

( conshdlr !=

NULL

)

2335

assert(conss !=

NULL

|| nconss == 0);

2337 for

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

2346

assert(cons !=

NULL

);

2351

assert(topvars !=

NULL

|| ntopvars == 0);

2352

topcostfound =

FALSE

;

2354 for

(

w

= 0;

w

< ntopvars; ++

w

)

2357

topcostfound =

TRUE

;

2360

assert(!topcostfound);

2361

topcostfound =

FALSE

;

2383 if

( conshdlr !=

NULL

)

2392

assert(conss !=

NULL

|| nconss == 0);

2394 for

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

2403

assert(cons !=

NULL

);

2408

assert(topvars !=

NULL

|| ntopvars == 0);

2409

topcostfound =

FALSE

;

2411 for

(

w

= 0;

w

< ntopvars; ++

w

)

2414

topcostfound =

TRUE

;

2417

assert(!topcostfound);

2418

topcostfound =

FALSE

;

2451

assert(mult * 10 > mult);

2478 for

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

2483 for

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

2488

assert(var !=

NULL

);

2495

assert( linecnt != 0 );

2507

assert(andvars !=

NULL

);

2508

assert(nandvars !=

NULL

);

2509

assert(pos >= 0 && nandvars[pos] > 0 && andvars[pos] !=

NULL

);

2510

assert(andvars[pos][nandvars[pos] - 1] !=

NULL

);

2520 for

(

a

= nandvars[pos] - 2;

a

>= 0; --

a

)

2549 char const

*

const

type,

2557 int const

*

const

nandvars,

2560 char const

*

const

multisymbol

2571

assert(strcmp(type,

"="

) == 0 || strcmp(type,

">="

) == 0);

2572

assert(mult !=

NULL

);

2573

assert(resvars !=

NULL

);

2574

assert(nresvars > 0);

2575

assert(andvars !=

NULL

&& nandvars !=

NULL

);

2580 for

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

2584 if

(

ABS

(*mult) >

ABS

(*mult * 10) )

2592 if

(

ABS

(*mult) >

ABS

(*mult * 10) )

2598 if

(

ABS

(*mult) != 1 )

2603 for

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

2615 for

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

2620

assert( var !=

NULL

);

2629

assert(andvars !=

NULL

);

2630

assert(nandvars !=

NULL

);

2631

assert(pos >= 0 && nandvars[pos] > 0 && andvars[pos] !=

NULL

);

2632

assert(andvars[pos][nandvars[pos] - 1] !=

NULL

);

2647 for

(

a

= nandvars[pos] - 2;

a

>= 0; --

a

)

2691 int const

*

const

nandvars,

2694 char const

*

const

multisymbol

2706

assert(vars !=

NULL

|| nvars == 0);

2707

assert(resvars !=

NULL

);

2708

assert(nresvars > 0);

2709

assert(andvars !=

NULL

&& nandvars !=

NULL

);

2714

nactivevars = nvars;

2717

activeconstant = 0.0;

2731 for

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

2732

activevals[v] = 1.0;

2742 if

( activevars !=

NULL

)

2750

retcode =

printNLRow

(

scip

, file,

"="

, activevars, activevals, nactivevars, rhs - activeconstant, resvars,

2751

nresvars, andvars, nandvars, weight, &mult, multisymbol);

2758

retcode =

printNLRow

(

scip

, file,

">="

, activevars, activevals, nactivevars, lhs - activeconstant, resvars,

2759

nresvars, andvars, nandvars, weight, &mult, multisymbol);

2767

retcode =

printNLRow

(

scip

, file,

">="

, activevars, activevals, nactivevars, rhs - activeconstant, resvars,

2768

nresvars, andvars, nandvars, weight, &mult, multisymbol);

2793 const char

* multisymbol

2803

assert(strcmp(type,

"="

) == 0 || strcmp(type,

">="

) == 0);

2804

assert(mult !=

NULL

);

2815 for

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

2819 if

(

ABS

(*mult) >

ABS

(*mult * 10) )

2827 if

(

ABS

(*mult) >

ABS

(*mult * 10) )

2833 if

(

ABS

(*mult) != 1 )

2844 for

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

2849

assert( var !=

NULL

);

2888 const char

* multisymbol

2900

assert( vars !=

NULL

|| nvars == 0 );

2905

nactivevars = nvars;

2908

activeconstant = 0.0;

2922 for

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

2923

activevals[v] = 1.0;

2933 if

( activevars !=

NULL

)

2941

retcode =

printRow

(

scip

, file,

"="

, activevars, activevals, nactivevars, rhs - activeconstant, weight, &mult,

2949

retcode =

printRow

(

scip

, file,

">="

, activevars, activevals, nactivevars, lhs - activeconstant, weight, &mult,

2958

retcode =

printRow

(

scip

, file,

">="

, activevars, activevals, nactivevars, rhs - activeconstant, weight, &mult,

2977 int

* nindicatorconss

2981 const char

* conshdlrname;

2986

assert(conss !=

NULL

|| nconss == 0);

2987

assert(nlinearconss !=

NULL

);

2988

assert(nindicatorconss !=

NULL

);

2991

*nindicatorconss = 0;

2994 for

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

3001

assert(cons !=

NULL

);

3003

assert(conshdlr !=

NULL

);

3007 if

( strcmp(conshdlrname,

"and"

) == 0 )

3010 if

( strcmp(conshdlrname,

"pseudoboolean"

) == 0 )

3013

++(*nindicatorconss);

3018 if

( strcmp(conshdlrname,

"indicator"

) == 0 )

3020

++(*nindicatorconss);

3060 int const

*

const

nandvars,

3061 char const

*

const

multisymbol,

3068 const char

* conshdlrname;

3080

assert(file !=

NULL

);

3081

assert(conss !=

NULL

|| nconss == 0);

3082

assert(vars !=

NULL

|| nvars == 0);

3083

assert(resvars !=

NULL

|| nresvars == 0);

3084

assert(andvars !=

NULL

|| nandvars == 0);

3085

assert(multisymbol !=

NULL

);

3092 if

( conshdlr !=

NULL

)

3099

assert(indconss !=

NULL

|| nindconss == 0);

3101 if

( nindconss > 0 )

3107

assert(indconss !=

NULL

);

3109 for

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

3111

assert(indconss[c] !=

NULL

);

3113

assert(lincons !=

NULL

);

3124 if

( conshdlr !=

NULL

)

3131

assert(pbconss !=

NULL

|| npbconss == 0);

3140 for

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

3142

assert(pbconss[c] !=

NULL

);

3144

assert(lincons !=

NULL

);

3162 for

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

3165

assert(conshdlr !=

NULL

);

3169 if

( strcmp(conshdlrname,

"pseudoboolean"

) == 0 )

3171 if

( !pbhashmapcreated )

3175

pbhashmapcreated =

TRUE

;

3179

assert(lincons !=

NULL

);

3184 else if

( strcmp(conshdlrname,

"indicator"

) == 0 )

3186 if

( !indhashmapcreated )

3190

indhashmapcreated =

TRUE

;

3194

assert(lincons !=

NULL

);

3203 for

( c = 0; c < nconss && retcode ==

SCIP_OKAY

; ++c )

3210

assert(cons !=

NULL

);

3213

assert(conshdlr !=

NULL

);

3221 if

( linconssofindicatorsmap !=

NULL

)

3225 if

( artcons !=

NULL

)

3229 if

( linconssofpbsmap !=

NULL

)

3233 if

( artcons !=

NULL

)

3237 if

( indvar !=

NULL

)

3243 SCIPwarningMessage

(

scip

,

"pseudoboolean constraint <%s> will not be printed because its indicator variable has no objective value(= weight of this soft constraint)\n"

,

SCIPconsGetName

(artcons));

3263

topcostfound =

TRUE

;

3269 if

( strcmp(conshdlrname,

"linear"

) == 0 )

3276

weight, transformed, multisymbol);

3285 else if

( strcmp(conshdlrname,

"setppc"

) == 0 )

3296

andvars, nandvars, weight, transformed, multisymbol);

3301

consvars,

NULL

, nconsvars, 1.0, 1.0, weight, transformed, multisymbol);

3308

consvars,

NULL

, nconsvars, -

SCIPinfinity

(

scip

), 1.0, resvars, nresvars, andvars, nandvars,

3309

weight, transformed, multisymbol);

3322

weight, transformed, multisymbol);

3332 else if

( strcmp(conshdlrname,

"logicor"

) == 0 )

3338

resvars, nresvars, andvars, nandvars, weight, transformed, multisymbol);

3347 else if

( strcmp(conshdlrname,

"knapsack"

) == 0 )

3357 for

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

3364

weight, transformed, multisymbol);

3374 else if

( strcmp(conshdlrname,

"varbound"

) == 0 )

3388 SCIPgetRhsVarbound

(

scip

, cons), resvars, nresvars, andvars, nandvars, weight, transformed, multisymbol);

3399 else if

( strcmp(conshdlrname,

"indicator"

) == 0 )

3406

assert(indvar !=

NULL

);

3411

assert(indvar !=

NULL

);

3427

assert(slackvar !=

NULL

);

3438

assert(lincons !=

NULL

);

3452 for

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

3456 if

( consvars[v] == slackvar )

3458

assert(nonbinarypos == -1);

3474 if

( nonbinarypos == -1 )

3496

assert(0 <= nonbinarypos && nonbinarypos < nconsvars);

3500

consvars[nonbinarypos] = consvars[nconsvars];

3501

consvals[nonbinarypos] = consvals[nconsvars];

3507

resvars, nresvars, andvars, nandvars,

3508

weight, transformed, multisymbol);

3514

weight, transformed, multisymbol);

3523 SCIPwarningMessage

(

scip

,

"indicator constraint <%s> will not be printed because the indicator variable has no objective value(= weight of this soft constraint)\n"

,

SCIPconsGetName

(cons) );

3529 else if

( strcmp(conshdlrname,

"and"

) == 0 )

3534

assert(existandconshdlr);

3536 else if

( strcmp(conshdlrname,

"pseudoboolean"

) == 0 )

3554

assert(cons !=

NULL

);

3556 SCIPerrorMessage

(

"Cannot print constraint %s with non-integral coefficient or sides in opb-format\n"

,

3562 if

( linconssofpbsmap !=

NULL

)

3567 if

( linconssofindicatorsmap !=

NULL

)

3584 char const

*

const

multisymbol,

3594

assert(file !=

NULL

);

3595

assert(vars !=

NULL

|| nvars == 0);

3596

assert(printedfixing !=

NULL

);

3597

assert(multisymbol !=

NULL

);

3602 for

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

3609

assert( vars !=

NULL

);

3623

assert(lb > -0.5 && ub < 1.5);

3628 if

( lb > 0.5 || ub < 0.5 )

3630 if

( transformed ) {

3658 int const

*

const

nandvars,

3660 char const

*

const

multisymbol,

3672

assert(file !=

NULL

);

3673

assert(resvars !=

NULL

|| nresvars == 0);

3674

assert(nandvars !=

NULL

|| nresvars == 0);

3675

assert(andvars !=

NULL

|| nandvars ==

NULL

);

3676

assert(multisymbol !=

NULL

);

3682 for

(

r

= nresvars - 1;

r

>= 0; --

r

)

3689

assert( resvars !=

NULL

);

3690

resvar = resvars[

r

];

3705 if

( lb > 0.5 || ub < 0.5 )

3718

assert( andvars !=

NULL

&& nandvars !=

NULL

);

3719

assert( andvars[

r

] !=

NULL

|| nandvars[

r

] == 0 );

3722 for

( v = nandvars[

r

] - 1; v >= 0; --v )

3724

assert( andvars[

r

] !=

NULL

);

3725

assert( andvars[

r

][v] !=

NULL

);

3739 if

( lb > 0.5 || ub < 0.5 )

3756 for

(

r

= nresvars - 1;

r

>= 0; --

r

)

3758

assert( resvars !=

NULL

);

3759

resvar = resvars[

r

];

3769

assert( andvars !=

NULL

&& nandvars !=

NULL

);

3770

assert( andvars[

r

] !=

NULL

|| nandvars[

r

] == 0 );

3775 for

( v = nandvars[

r

] - 1; v >= 0; --v )

3777

assert( andvars[

r

] !=

NULL

);

3778

assert( andvars[

r

][v] !=

NULL

);

3791 else if

( rhslhs == 1 )

3797

assert( andvars !=

NULL

&& nandvars !=

NULL

);

3798

assert( andvars[

r

] !=

NULL

|| nandvars[

r

] == 0 );

3801 for

( v = nandvars[

r

] - 1; v >= 0; --v )

3803

assert( andvars[

r

] !=

NULL

);

3804

assert( andvars[

r

][v] !=

NULL

);

3827

firstprinted =

FALSE

;

3829

assert( andvars !=

NULL

&& nandvars !=

NULL

);

3830

assert( andvars[

r

] !=

NULL

|| nandvars[

r

] == 0 );

3832 for

( v = nandvars[

r

] - 1; v >= 0; --v )

3834

assert( andvars[

r

] !=

NULL

);

3835

assert( andvars[

r

][v] !=

NULL

);

3842

firstprinted =

TRUE

;

3850

assert(transformed);

3867

assert(andvars !=

NULL

);

3868

assert(nandvars !=

NULL

);

3869

assert(pos >= 0 && nandvars[pos] > 0 && andvars[pos] !=

NULL

);

3870

assert(andvars[pos][nandvars[pos] - 1] !=

NULL

);

3879 for

(

a

= nandvars[pos] - 2;

a

>= 0; --

a

)

3933 int const

*

const

nandvars,

3944 int

nindicatorconss;

3947

assert( vars !=

NULL

|| nvars == 0 );

3948

assert( conss !=

NULL

|| nconss == 0 );

3949

assert( result !=

NULL

);

3961 SCIPinfoMessage

(

scip

, file,

"* Variables : %d\n"

, nvars - nresvars - nindicatorconss);

3966

SCIPvarGetHashkey, SCIPvarIsHashkeyEq, SCIPvarGetHashkeyVal,

NULL

) );

3970

objsense, objscale, objoffset, multisymbol, existands, transformed) );

3973

retcode =

writeOpbConstraints

(

scip

, file, conss, nconss, vars, nvars, resvars, nresvars, andvars, nandvars,

3974

multisymbol, existandconshdlr, existands, transformed);

3976 if

( existands && (retcode ==

SCIP_OKAY

) )

4002 const char

* filename,

4011

assert(reader !=

NULL

);

4014

opbinput.file =

NULL

;

4016

opbinput.linebuf[0] =

'\0'

;

4019

opbinput.token[0] =

'\0'

;

4021

opbinput.tokenbuf[0] =

'\0'

;

4027

opbinput.npushedtokens = 0;

4028

opbinput.linenumber = 1;

4029

opbinput.linepos = 0;

4031

opbinput.eof =

FALSE

;

4032

opbinput.haserror =

FALSE

;

4033

opbinput.nproblemcoeffs = 0;

4034

opbinput.wbo =

FALSE

;

4036

opbinput.nindvars = 0;

4037#if GENCONSNAMES == TRUE 4038

opbinput.consnumber = 0;

4058 if

( opbinput.nproblemcoeffs > 0 )

4060 SCIPwarningMessage

(

scip

,

"there might be <%d> coefficients or weight out of range!\n"

, opbinput.nproblemcoeffs);

4064 if

( opbinput.haserror )

4115 if

( nintvars > 0 || ncontvars + nimplvars > nindicatorconss + nresvars )

4129 for

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

4141

retcode =

writeOpb

(

scip

, file, name, transformed, objsense, objscale, objoffset, vars,

4142

nvars, conss, nconss, resvars, nresvars, andvars, nandvars, existandconshdlr, existands, result);

4153 for

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

4154 if

( !existands || !

SCIPsortedvecFindPtr

((

void

**)resvars, SCIPvarComp, vars[v], nresvars, &pos) )

4180 for

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

4181 if

( !existands || !

SCIPsortedvecFindPtr

((

void

**)resvars, SCIPvarComp, vars[v], nresvars, &pos) )

4209 for

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

4220

retcode =

writeOpb

(

scip

, file, name, transformed, objsense, objscale, objoffset, vars,

4221

nvars, conss, nconss, resvars, nresvars, andvars, nandvars, existandconshdlr, existands, result);

4231

assert(resvars !=

NULL

);

4232

assert(andvars !=

NULL

);

4233

assert(nandvars !=

NULL

);

4235 for

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

4237

assert(andvars[v] !=

NULL

);

4261

assert(reader !=

NULL

);

4288

nvars, nbinvars, nintvars, nimplvars, ncontvars, fixedvars, nfixedvars, conss, nconss, genericnames, result) );

4314 "reading/" READER_NAME "/dynamicconss"

,

"should model constraints be subject to aging?"

,

4317 "reading/" READER_NAME "/multisymbol"

,

"use '*' between coefficients and variables by writing to problem?"

,

Constraint handler for AND constraints, .

constraint handler for indicator constraints

Constraint handler for knapsack constraints of the form , x binary and .

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

Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...

constraint handler for pseudoboolean constraints

#define ARTIFICIALVARNAMEPREFIX

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

Constraint handler for variable bound constraints .

#define SCIPdebugGetSolVal(scip, var, val)

#define SCIPdebugAddSolVal(scip, var, val)

#define SCIP_CALL_ABORT(x)

#define SCIP_LONGINT_FORMAT

SCIP_FILE * SCIPfopen(const char *path, const char *mode)

int SCIPfeof(SCIP_FILE *stream)

int SCIPfclose(SCIP_FILE *fp)

char * SCIPfgets(char *s, int size, SCIP_FILE *stream)

int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)

int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)

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

SCIP_RETCODE SCIPcreateConsAnd(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *resvar, 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_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)

int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)

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

int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)

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

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

int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR * SCIPgetIndVarPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)

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

SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)

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

SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)

SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)

SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)

SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)

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_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)

SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)

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

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

SCIP_CONS * SCIPgetLinearConsPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)

SCIP_RETCODE SCIPcreateConsPseudoboolean(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR **linvars, int nlinvars, SCIP_Real *linvals, SCIP_VAR ***terms, int nterms, int *ntermvars, SCIP_Real *termvals, SCIP_VAR *indvar, SCIP_Real weight, SCIP_Bool issoftcons, SCIP_VAR *intvar, 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_SETPPCTYPE_PARTITIONING

@ SCIP_SETPPCTYPE_COVERING

@ SCIP_SETPPCTYPE_PACKING

SCIP_RETCODE SCIPwriteOpb(SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_VAR **vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, SCIP_VAR **fixedvars, int nfixedvars, SCIP_CONS **conss, int nconss, SCIP_Bool genericnames, SCIP_RESULT *result)

SCIP_RETCODE SCIPreadOpb(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)

SCIP_RETCODE SCIPincludeReaderOpb(SCIP *scip)

SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)

int SCIPgetNOrigConss(SCIP *scip)

int SCIPgetNVars(SCIP *scip)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

int SCIPgetNConss(SCIP *scip)

SCIP_VAR ** SCIPgetVars(SCIP *scip)

SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)

SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)

SCIP_CONS ** SCIPgetOrigConss(SCIP *scip)

SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)

SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)

SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)

void SCIPhashmapFree(SCIP_HASHMAP **hashmap)

void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)

SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)

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

void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)

SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)

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)

SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)

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

#define SCIPdebugMsgPrint

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

SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)

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)

int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)

const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)

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

SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)

SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)

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

SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)

const char * SCIPconsGetName(SCIP_CONS *cons)

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

#define SCIPfreeBlockMemoryArray(scip, ptr, num)

#define SCIPreallocMemoryArray(scip, ptr, newnum)

#define SCIPallocMemoryArray(scip, ptr, num)

int SCIPcalcMemGrowSize(SCIP *scip, int num)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPreallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

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

#define SCIPfreeMemoryArray(scip, ptr)

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

#define SCIPallocBlockMemoryArray(scip, ptr, num)

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

#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)

SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)

SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))

const char * SCIPreaderGetName(SCIP_READER *reader)

SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))

SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite)))

SCIP_RETCODE SCIPprintTransProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)

SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)

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

SCIP_Real SCIPinfinity(SCIP *scip)

SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)

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

SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPround(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_Real SCIPceil(SCIP *scip, SCIP_Real val)

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

SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)

SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)

SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)

SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)

SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)

SCIP_Real SCIPvarGetObj(SCIP_VAR *var)

SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)

int SCIPvarGetIndex(SCIP_VAR *var)

SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)

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

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

SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)

SCIP_Bool SCIPvarIsNegated(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_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)

SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)

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

SCIP_RETCODE SCIPaddVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real addobj)

SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)

void SCIPsortPtrPtrInt(void **ptrarray1, void **ptrarray2, int *intarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)

int SCIPstrcasecmp(const char *s1, const char *s2)

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

void SCIPprintSysError(const char *message)

int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)

static const SCIP_Real scalars[]

memory allocation routines

SCIP_Real SCIPconsGetLhs(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)

SCIP_Real SCIPconsGetRhs(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)

BMS_BLKMEM * SCIPblkmem(SCIP *scip)

public methods for managing constraints

wrapper functions to map file i/o to standard or zlib file i/o

struct SCIP_File SCIP_FILE

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 input file readers

public methods for problem variables

static const char delimchars[]

static SCIP_RETCODE writeOpbRelevantAnds(SCIP *const scip, FILE *const file, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, SCIP_HASHTABLE *const printedfixing, char const *const multisymbol, SCIP_Bool const transformed)

static SCIP_RETCODE printNonLinearCons(SCIP *const scip, FILE *const file, SCIP_VAR **const vars, SCIP_Real *const vals, int const nvars, SCIP_Real const lhs, SCIP_Real const rhs, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, SCIP_Longint weight, SCIP_Bool const transformed, char const *const multisymbol)

static SCIP_RETCODE setObjective(SCIP *const scip, OPBINPUT *const opbinput, const char *sense, SCIP_Real const scale, SCIP_VAR **const linvars, SCIP_Real *const coefs, int const ncoefs, SCIP_VAR ***const terms, SCIP_Real *const termcoefs, int *const ntermvars, int const ntermcoefs)

static SCIP_RETCODE printRow(SCIP *scip, FILE *file, const char *type, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real lhs, SCIP_Longint weight, SCIP_Longint *mult, const char *multisymbol)

static void clearBuffer(char *linebuffer, int *linecnt)

static SCIP_Bool isSign(OPBINPUT *opbinput, int *sign)

static SCIP_DECL_READERREAD(readerReadOpb)

static SCIP_RETCODE getBinVarsRepresentatives(SCIP *const scip, SCIP_VAR **const vars, int const nvars, SCIP_Bool const transformed)

static SCIP_Bool getNextToken(SCIP *scip, OPBINPUT *opbinput)

static SCIP_Bool isValueChar(char c, char nextc, SCIP_Bool firstchar, SCIP_Bool *hasdot, OPBEXPTYPE *exptype)

static SCIP_RETCODE getVariableOrTerm(SCIP *scip, OPBINPUT *opbinput, SCIP_VAR ***vars, int *nvars, int *varssize)

static SCIP_RETCODE writeOpbFixedVars(SCIP *const scip, FILE *const file, SCIP_VAR **vars, int nvars, SCIP_HASHTABLE *const printedfixing, char const *const multisymbol, SCIP_Bool const transformed)

static void swapTokenBuffer(OPBINPUT *opbinput)

static SCIP_RETCODE printLinearCons(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real lhs, SCIP_Real rhs, SCIP_Longint weight, SCIP_Bool transformed, const char *multisymbol)

static const char commentchars[]

static SCIP_DECL_READERWRITE(readerWriteOpb)

static SCIP_RETCODE writeOpbObjective(SCIP *const scip, FILE *const file, SCIP_VAR **const vars, int const nvars, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, SCIP_OBJSENSE const objsense, SCIP_Real const objscale, SCIP_Real const objoffset, char const *const multisymbol, SCIP_Bool const existands, SCIP_Bool const transformed)

static SCIP_RETCODE printNLRow(SCIP *const scip, FILE *const file, char const *const type, SCIP_VAR **const vars, SCIP_Real const *const vals, int const nvars, SCIP_Real lhs, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, SCIP_Longint weight, SCIP_Longint *const mult, char const *const multisymbol)

static void writeBuffer(SCIP *scip, FILE *file, char *linebuffer, int *linecnt)

static void pushToken(OPBINPUT *opbinput)

static SCIP_RETCODE computeAndConstraintInfos(SCIP *const scip, SCIP_Bool const transformed, SCIP_VAR ***resvars, int *nresvars, SCIP_VAR ****andvars, int **nandvars, SCIP_Bool *const existandconshdlr, SCIP_Bool *const existands)

static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)

static SCIP_RETCODE writeOpbConstraints(SCIP *const scip, FILE *const file, SCIP_CONS **const conss, int const nconss, SCIP_VAR **const vars, int const nvars, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, char const *const multisymbol, SCIP_Bool const existandconshdlr, SCIP_Bool const existands, SCIP_Bool const transformed)

static void determineTotalNumberLinearConss(SCIP *const scip, SCIP_CONS **const conss, int const nconss, int *nlinearconss, int *nindicatorconss)

static SCIP_Bool isStartingSoftConstraintWeight(SCIP *scip, OPBINPUT *opbinput)

#define OPB_MAX_PUSHEDTOKENS

static void appendBuffer(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension)

static SCIP_Bool getNextLine(SCIP *scip, OPBINPUT *opbinput)

static SCIP_Bool isEndLine(OPBINPUT *opbinput)

#define OPB_INIT_COEFSSIZE

static SCIP_RETCODE writeOpb(SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, SCIP_VAR **const resvars, int const nresvars, SCIP_VAR **const *const andvars, int const *const nandvars, SCIP_Bool const existandconshdlr, SCIP_Bool const existands, SCIP_RESULT *result)

static SCIP_RETCODE getMaxAndConsDim(SCIP *scip, OPBINPUT *opbinput, SCIP_Real *objscale, SCIP_Real *objoffset)

static SCIP_RETCODE createVariable(SCIP *scip, SCIP_VAR **var, char *name)

static void syntaxError(SCIP *scip, OPBINPUT *opbinput, const char *msg)

static SCIP_RETCODE readOPBFile(SCIP *scip, OPBINPUT *opbinput, const char *filename)

static SCIP_DECL_READERCOPY(readerCopyOpb)

static SCIP_RETCODE readConstraints(SCIP *scip, OPBINPUT *opbinput, SCIP_Real objscale, int *nNonlinearConss)

static SCIP_Bool isValue(SCIP *scip, OPBINPUT *opbinput, SCIP_Real *value)

static SCIP_Bool isDelimChar(char c)

static void swapPointers(char **pointer1, char **pointer2)

static SCIP_Bool hasError(OPBINPUT *opbinput)

static void pushBufferToken(OPBINPUT *opbinput)

static SCIP_Bool isSense(OPBINPUT *opbinput, OPBSENSE *sense)

enum OpbExpType OPBEXPTYPE

static SCIP_RETCODE readCoefficients(SCIP *const scip, OPBINPUT *const opbinput, char *const name, SCIP_VAR ***linvars, SCIP_Real **lincoefs, int *const nlincoefs, int *lincoefssize, SCIP_VAR ****terms, SCIP_Real **termcoefs, int **ntermvars, int *termcoefssize, int *const ntermcoefs, SCIP_Bool *const newsection, SCIP_Bool *const isNonlinear, SCIP_Bool *const issoftcons, SCIP_Real *const weight)

#define INDICATORSLACKVARNAME

static SCIP_Bool isEndingSoftConstraintWeight(SCIP *scip, OPBINPUT *opbinput)

static SCIP_Bool isTokenChar(char c)

pseudo-Boolean file reader (opb format)

public methods for constraint handler plugins and constraints

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

public methods for querying solving statistics

public methods for SCIP variables

enum SCIP_Objsense SCIP_OBJSENSE

enum SCIP_Result SCIP_RESULT

enum SCIP_Retcode SCIP_RETCODE

@ SCIP_VARSTATUS_ORIGINAL

@ SCIP_VARSTATUS_MULTAGGR

@ SCIP_VARSTATUS_AGGREGATED


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