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

SCIP Doxygen Documentation: reader_fzn.c Source File

74#include "scip/cons_alldifferent.h" 77#define READER_NAME "fznreader" 78#define READER_DESC "file reader for FlatZinc format" 79#define READER_EXTENSION "fzn" 82#define FZN_BUFFERLEN 65536 83#define FZN_INIT_LINELEN 65536 84#define FZN_MAX_PUSHEDTOKENS 1 149struct

SCIP_ReaderData

168#define CREATE_CONSTRAINT(x) SCIP_RETCODE x (SCIP* scip, FZNINPUT* fzninput, const char* fname, char** ftokens, int nftokens, SCIP_Bool* created) 239

assert(var !=

NULL

);

249

assert(constant !=

NULL

);

250 return

(

void

*) constant->name;

271 for

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

302 if

( strlen(token) == 1 && *token == c )

316 if

( strlen(name) == 4 && strncmp(name,

"true"

, 4) == 0 )

321 else if

( strlen(name) == 1 && strncmp(name,

"1"

, 1) == 0 )

327 else if

( strlen(name) == 5 && strncmp(name,

"false"

, 5) == 0 )

332 else if

( strlen(name) == 1 && strncmp(name,

"0"

, 1) == 0 )

352 if

( strlen(name) == 0 || !isalpha((

unsigned char

)name[0]) )

358 if

( !isalnum((

unsigned char

)name[i]) && name[i] !=

'_'

)

376

assert(hasdot !=

NULL

);

377

assert(exptype !=

NULL

);

379 if

( isdigit((

unsigned char

)c) )

381 else if

( firstchar && (c ==

'+'

|| c ==

'-'

) )

383 else if

( (*exptype ==

FZN_EXP_NONE

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

'.'

) && (isdigit((

unsigned char

)nextc)))

388 else if

( !firstchar && (*exptype ==

FZN_EXP_NONE

) && (c ==

'e'

|| c ==

'E'

) )

390 if

( nextc ==

'+'

|| nextc ==

'-'

)

395 else if

( isdigit((

unsigned char

)nextc) )

401 else if

( (*exptype ==

FZN_EXP_SIGNED

) && (c ==

'+'

|| c ==

'-'

) )

417

assert(token1 !=

NULL

);

418

assert(token2 !=

NULL

);

420 if

( strlen(token1) != strlen(token2) )

423 return

!strncmp(token1, token2, strlen(token2) );

437

assert(fzninput !=

NULL

);

441

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

'\0'

;

443

fzninput->linepos = 0;

444

fzninput->bufpos = 0;

446 if

(

SCIPfgets

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

NULL

)

449

fzninput->linenumber++;

451 while

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

'\0'

)

458

fzninput->linebuf[newsize-2] =

'\0'

;

459 if

(

SCIPfgets

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

NULL

)

461

fzninput->linebufsize = newsize;

464

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

'\0'

;

465

fzninput->comment =

FALSE

;

472

commentstart = strchr(fzninput->linebuf,

commentchars

[i]);

473 if

( commentstart !=

NULL

)

475

*commentstart =

'\0'

;

476

*(commentstart+1) =

'\0'

;

477

fzninput->comment =

TRUE

;

498

assert(fzninput !=

NULL

);

499

assert(fzninput->bufpos < fzninput->linebufsize);

509 if

( fzninput->npushedtokens > 0 )

511 SCIPswapPointers

((

void

**)&fzninput->token, (

void

**)&fzninput->pushedtokens[fzninput->npushedtokens-1]);

512

fzninput->npushedtokens--;

513 SCIPdebugMsg

(

scip

,

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

, fzninput->linenumber, fzninput->token);

518

buf = fzninput->linebuf;

521 if

( buf[fzninput->bufpos] ==

'\0'

)

528

assert(fzninput->bufpos == 0);

530

buf = fzninput->linebuf;

538

assert(fzninput->bufpos < fzninput->linebufsize);

544 if

( buf[fzninput->bufpos] ==

'.'

&& buf[fzninput->bufpos+1] ==

'.'

)

548

fzninput->bufpos += 2;

549

fzninput->linepos += 2;

550

fzninput->token[0] =

'.'

;

551

fzninput->token[1] =

'.'

;

553 else if

(

isValueChar

(buf[fzninput->bufpos], buf[fzninput->bufpos+1],

TRUE

, &hasdot, &exptype) )

559

assert(tokenlen < fzninput->linebufsize);

561

fzninput->token[tokenlen] = buf[fzninput->bufpos];

565

assert(fzninput->bufpos < fzninput->linebufsize);

567 while

(

isValueChar

(buf[fzninput->bufpos], buf[fzninput->bufpos+1],

FALSE

, &hasdot, &exptype) );

569

fzninput->hasdot = hasdot;

577

assert(tokenlen < fzninput->linebufsize);

578

fzninput->token[tokenlen] = buf[fzninput->bufpos];

584 if

(tokenlen == 1 && fzninput->token[0] ==

':'

&& buf[fzninput->bufpos] ==

':'

)

586

fzninput->token[tokenlen] = buf[fzninput->bufpos];

593 if

( tokenlen == 1 &&

isTokenChar

(fzninput->token[0]) )

599

assert(tokenlen < fzninput->linebufsize);

600

fzninput->token[tokenlen] =

'\0'

;

602 SCIPdebugMsg

(

scip

,

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

, fzninput->linenumber, fzninput->token);

613

assert(fzninput !=

NULL

);

616 SCIPswapPointers

((

void

**)&fzninput->pushedtokens[fzninput->npushedtokens], (

void

**)&fzninput->token);

617

fzninput->npushedtokens++;

626

assert(fzninput !=

NULL

);

628 return isChar

(fzninput->token,

';'

);

641

assert(value !=

NULL

);

643

val = strtod(token, &endptr);

644 if

( endptr != token && *endptr ==

'\0'

)

665

assert(fzninput !=

NULL

);

668 SCIPerrorMessage

(

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

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

671

fzninput->haserror =

TRUE

;

680

assert(fzninput !=

NULL

);

682 return

(fzninput->haserror || !fzninput->valid);

694

(*readerdata)->vararrays =

NULL

;

695

(*readerdata)->nvararrays = 0;

696

(*readerdata)->vararrayssize = 0;

711

nvararrays = readerdata->nvararrays;

712

vararrayssize = readerdata->vararrayssize;

714 if

( vararrayssize == nvararrays )

716 if

( vararrayssize == 0 )

728

readerdata->vararrayssize = vararrayssize;

743

nvararrays = fzninput->nvararrays;

744

vararrayssize = fzninput->vararrayssize;

746 if

( vararrayssize == nvararrays )

748 if

( vararrayssize == 0 )

760

fzninput->vararrayssize = vararrayssize;

775

nconstarrays = fzninput->nconstarrays;

776

constarrayssize = fzninput->constarrayssize;

778 if

( constarrayssize == nconstarrays )

780 if

( constarrayssize == 0 )

782

constarrayssize = 100;

787

constarrayssize *= 2;

792

fzninput->constarrayssize = constarrayssize;

849 if

( source !=

NULL

)

855

(*target)->ndims = source->ndims;

856

(*target)->size = source->ndims;

887

(*vararray)->nvars = nvars;

888

(*vararray)->type = type;

934 for

( c = 0; c < fzninput->nvararrays; ++c )

936

vararray = fzninput->vararrays[c];

971

(*constarray)->nconstants = nconstants;

972

(*constarray)->type = type;

1007 for

( c = 0; c < fzninput->nconstarrays; ++c )

1009

constarray = fzninput->constarrays[c];

1032

nvararrays = readerdata->nvararrays;

1035

assert(nvararrays < readerdata->vararrayssize);

1055

vararray->info = info;

1056

vararray->nvars = 1;

1057

vararray->type = type;

1059

readerdata->vararrays[nvararrays] = vararray;

1060

readerdata->nvararrays++;

1080

nvararrays = readerdata->nvararrays;

1083

assert(nvararrays < readerdata->vararrayssize);

1088

readerdata->vararrays[nvararrays] = vararray;

1089

readerdata->nvararrays++;

1109

nvararrays = fzninput->nvararrays;

1112

assert(nvararrays < fzninput->vararrayssize);

1117

fzninput->vararrays[nvararrays] = vararray;

1118

fzninput->nvararrays++;

1137

nconstarrays = fzninput->nconstarrays;

1140

assert(nconstarrays < fzninput->constarrayssize);

1145

fzninput->constarrays[nconstarrays] = constarray;

1146

fzninput->nconstarrays++;

1173

quadvars2, quadcoefs, lhs, rhs, initialconss,

TRUE

,

TRUE

,

TRUE

,

TRUE

,

FALSE

,

FALSE

, dynamicconss,

1217 const char

* consname,

1237 if

( vars[nvars] !=

NULL

)

1242 else if

( !

isValue

(name1, &value1) )

1247

assert(constant !=

NULL

);

1249

value1 = constant->value;

1253 if

( vars[nvars] !=

NULL

)

1258 else if

( !

isValue

(name2, &value2) )

1263

assert(constant !=

NULL

);

1265

value2 = constant->value;

1269

lhs += (value2 - value1);

1272

rhs += (value2 - value1);

1274 SCIP_CALL

(

createLinearCons

(

scip

, consname, nvars, vars, vals, lhs, rhs, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

1291

assert(

isChar

(fzninput->token,

'['

) );

1307 if

( constant ==

NULL

)

1311

assert(constant->type ==

FZN_INT

);

1312

*idx = (int) constant->value;

1315 else if

(

isValue

(fzninput->token, &value) )

1317

assert( fzninput->hasdot ==

FALSE

);

1333

assert(fzninput !=

NULL

);

1352 syntaxError

(

scip

, fzninput,

"expecting at least a semicolon to close the statement"

);

1357 if

(

isChar

(fzninput->token,

'['

) )

1415

*lhs = sidevalue + 1.0;

1420

*rhs = sidevalue - 1.0;

1423 syntaxError

(

scip

, fzninput,

"unknown relation in constraint identifier name"

);

1439

assert(selements > 0);

1450 if

(selements == *nelements)

1497 if

( !

isValue

(fzninput->token, lb) )

1524 if

( fzninput->hasdot != (*type ==

FZN_FLOAT

) )

1526 SCIPwarningMessage

(

scip

,

"lower bound and upper bound mismatch in value type, assume %s variable type\n"

,

1527

fzninput->hasdot ?

"an integer"

:

"a continuous"

);

1551

(*info)->size = size;

1556 syntaxError

(

scip

, fzninput,

"expecting <(> after <output_array>"

);

1564 if

( fzninput->haserror )

1569 if

( nelements == size )

1574

(*info)->size = size;

1578

(*info)->lbs[nelements] = (int) lb;

1579

(*info)->ubs[nelements] = (int) ub;

1583

(*info)->ndims = nelements;

1602 if

( output !=

NULL

)

1627 syntaxError

(

scip

, fzninput,

"expected at least a semicolon to close statement"

);

1634 else if

(

equalTokens

(fzninput->token,

"output_array"

) && output !=

NULL

)

1637

assert(info !=

NULL

);

1644 while

( !

isChar

(fzninput->token,

'='

) );

1678 else if

(

equalTokens

(fzninput->token,

"float"

) )

1682 else if

(

equalTokens

(fzninput->token,

"set"

) ||

isChar

(fzninput->token,

'{'

) )

1685

fzninput->valid =

FALSE

;

1696 if

( fzninput->haserror )

1712 const char

* assignment

1728 if

( linkVar ==

NULL

)

1733

fixvalue = realvalue;

1734 else if

( constant !=

NULL

)

1735

fixvalue = constant->value;

1743 SCIP_CALL

(

createLinearCons

(

scip

,

"fixing"

, 1, &var, vals, fixvalue, fixvalue, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

1753 SCIP_CALL

(

createLinearCons

(

scip

,

"link"

, 2, vars, vals, 0.0, 0.0, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

1769 const char

* assignment

1780 if

( *constant !=

NULL

)

1783 if

( type != (*constant)->type )

1789

value = (*constant)->value;

1808

(*constant)->type = type;

1810

(*constant)->value = value;

1813 if

( fzninput->sconstants == fzninput->nconstants )

1815

assert(fzninput->sconstants > 0);

1816

fzninput->sconstants *= 2;

1820

assert(fzninput->sconstants > fzninput->nconstants);

1821

fzninput->constants[fzninput->nconstants] = *constant;

1822

fzninput->nconstants++;

1854

*isvararray =

TRUE

;

1859

*isvararray =

FALSE

;

1877

assert(fzninput !=

NULL

);

1878

assert(*nelements >= 0);

1879

assert(selements >= *nelements);

1914 syntaxError

(

scip

, fzninput,

"expected token <[> for array dimension"

);

1921 if

( fzninput->haserror )

1924 if

( type !=

FZN_INT

|| left != 1.0 || right <= 0.0 )

1930

*nelements = (int) right;

1934 syntaxError

(

scip

, fzninput,

"expected token <]> for array dimension"

);

1955

assert(fzninput !=

NULL

);

1975 SCIP_CALL

(

SCIPcreateVar

(

scip

, &varcopy, name, lb, ub, 0.0, vartype, !(fzninput->dynamiccols), fzninput->dynamiccols,

NULL

,

NULL

,

NULL

,

NULL

,

NULL

) );

2019 for

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

2033 if

(

isChar

(fzninput->token,

'='

) )

2045 for

( v = 0; v < nvars && !

hasError

(fzninput); ++v )

2105 for

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

2131

fzninput->comment =

TRUE

;

2154

assert(fzninput !=

NULL

);

2157

isvararray =

FALSE

;

2164

assert(

hasError

(fzninput) || nelements > 0);

2177

assert(!output || info !=

NULL

);

2182 SCIPdebugMsg

(

scip

,

"found <%s> array named <%s> of type <%s> and size <%d> with bounds [%g,%g] (output %u)\n"

,

2183

isvararray ?

"variable"

:

"constant"

, name,

2184

type ==

FZN_BOOL

?

"bool"

: type ==

FZN_INT

?

"integer"

:

"float"

, nelements, lb, ub, output);

2213

assert(fzninput !=

NULL

);

2246 if

(

isChar

(fzninput->token,

'='

) )

2273

assert(fzninput !=

NULL

);

2305 const char

* assignment

2308 if

(

isValue

(assignment, value) )

2319 if

( constant ==

NULL

)

2336

(*value) = constant->value;

2354

assert(*nvals <= sizevals);

2364 if

(

isChar

(fzninput->token,

'['

) )

2381 if

( sizevals <= *nvals + nelements )

2386 for

( c = 0; c < nelements && !

hasError

(fzninput); ++c )

2391

(*vals)[(*nvals)] = value;

2407 if

( constarray !=

NULL

)

2410 if

( sizevals <= *nvals + constarray->nconstants )

2415 for

( c = 0; c < constarray->nconstants; ++c )

2417

(*vals)[(*nvals)] = constarray->constants[c]->value;

2431 if

( vararray ==

NULL

)

2438 if

( sizevals <= *nvals + vararray->nvars )

2443 for

( c = 0; c < vararray->nvars; ++c )

2447

var = vararray->vars[c];

2448

assert(var !=

NULL

);

2457 syntaxError

(

scip

, fzninput,

"variable array contains unfixed variable"

);

2480

assert(*nvars <= sizevars);

2489 if

(

isChar

(fzninput->token,

'['

) )

2502 if

( sizevars <= *nvars + nelements )

2507 for

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

2511 if

( (*vars)[(*nvars)] ==

NULL

)

2523 if

( constant !=

NULL

)

2526

value = constant->value;

2528 else if

(!

isValue

(elements[v], &value) )

2532

tmptoken = fzninput->token;

2533

fzninput->token = elements[v];

2534 syntaxError

(

scip

, fzninput,

"expected variable name or constant"

);

2536

fzninput->token = tmptoken;

2555 if

( vararray !=

NULL

)

2557

assert(vararray !=

NULL

);

2560 if

( sizevars <= *nvars + vararray->nvars )

2565 for

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

2567

(*vars)[(*nvars)] = vararray->vars[v];

2594

assert(nelements == 3);

2608 for

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

2614 if

( vars[v] ==

NULL

)

2624 if

( vars[0] !=

NULL

&& vars[1] !=

NULL

)

2630 if

( vars[2] !=

NULL

)

2635 SCIP_CALL

(

createQuadraticCons

(

scip

, name, 1, &vars[2], &linval, 1, &vars[0], &vars[1], &quadval, rhs, rhs,

2636

fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

2641 SCIP_CALL

(

createQuadraticCons

(

scip

, name, 0,

NULL

,

NULL

, 1, &vars[0], &vars[1], &quadval, rhs, rhs,

2642

fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows));

2645 else if

( vars[0] !=

NULL

|| vars[1] !=

NULL

)

2651 if

( vars[0] ==

NULL

)

2660 if

( vars[2] !=

NULL

)

2672 SCIP_CALL

(

createLinearCons

(

scip

, name, nvars, vars, vals, rhs, rhs, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

2679

rhs = rhs - vals[0]*vals[1];

2682 if

( vars[2] !=

NULL

)

2686 SCIP_CALL

(

createLinearCons

(

scip

, name, 1, &vars[2], &val, rhs, rhs, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

2730

assert(nelements == 3 || nelements == 2);

2748 if

( vars[nvars] ==

NULL

)

2763 if

( vars[nvars] ==

NULL

)

2790 if

( vars[nvars] ==

NULL

)

2804 SCIP_CALL

(

createLinearCons

(

scip

, name, nvars, vars, vals, rhs, rhs, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

2835

assert(nnames == 2);

2859

assert(fzninput !=

NULL

);

2877

assert(fzninput !=

NULL

);

2883

fzninput->valid =

FALSE

;

2894

assert(fzninput !=

NULL

);

2900

fzninput->valid =

FALSE

;

2901 SCIPwarningMessage

(

scip

,

"Line %d: array operations are not supported yet.\n"

, fzninput->linenumber);

2911

assert(fzninput !=

NULL

);

2917 if

(

equalTokens

(ftokens[0],

"bool"

) && nftokens == 2 )

2947 for

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

2951 if

( vars[v] ==

NULL

)

2993

fzninput->valid =

FALSE

;

3010 else if

(

equalTokens

(ftokens[1],

"bool"

) && nftokens == 3 )

3022

fzninput->valid =

FALSE

;

3091

fzninput->valid =

FALSE

;

3106

assert(fzninput !=

NULL

);

3109 if

(

equalTokens

(ftokens[nftokens - 1],

"reif"

) )

3112

fzninput->valid =

FALSE

;

3131 if

( strlen(ftokens[nftokens - 1]) != 2 && nftokens != 2 )

3138

fzninput->valid =

FALSE

;

3146

fzninput->valid =

FALSE

;

3154 SCIPwarningMessage

(

scip

,

"constraints with '<' or '>' relation and continuous variables are not supported\n"

);

3155

fzninput->valid =

FALSE

;

3168

assert(nftokens == 3);

3221 SCIP_CALL

(

createLinearCons

(

scip

, fname, nvars, vars, vals, lhs, rhs, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

3230

assert(nftokens == 2);

3236

assert(nftokens == 2);

3241

assert(nftokens == 2);

3266

assert(fzninput !=

NULL

);

3283 SCIP_CALL

( SCIPcreateConsAlldifferent(

scip

, &cons, fname, nvars, vars,

3307 int

* durations =

NULL

;

3308 int

* demands =

NULL

;

3320

assert(fzninput !=

NULL

);

3351 for

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

3352

durations[i] = (

int

)vals[i];

3367 for

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

3368

demands[i] = (

int

)vals[i];

3384

capacity = (int)val;

3386

assert(nvars == ndurations);

3387

assert(nvars == ndemads);

3414

createCoercionOpCons,

3416

createLogicalOpCons,

3418

createComparisonOpCons,

3419

createAlldifferentOpCons,

3420

createCumulativeOpCons

3446

assert(fzninput !=

NULL

);

3461 SCIP_CALL

(

createLinearCons

(

scip

,

"fixing"

, 1, &var, vals, 1.0, 1.0, fzninput->initialconss, fzninput->dynamicconss, fzninput->dynamicrows) );

3468 syntaxError

(

scip

, fzninput,

"expected constraint identifier name"

);

3485 while

( token !=

NULL

)

3496

assert(token ==

NULL

|| tokens[0] !=

NULL

);

3497 for

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

3508 SCIP_CALL

( constypes[c](

scip

, fzninput, fname, tokens, ntokens, &created) );

3512 if

( !

hasError

(fzninput) && !created )

3514

fzninput->valid =

FALSE

;

3515 SCIPwarningMessage

(

scip

,

"Line %d: Constraint <%s> is not supported yet.\n"

, fzninput->linenumber, fname);

3519 for

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

3539

assert(fzninput !=

NULL

);

3558 while

( !

equalTokens

(fzninput->token,

"satisfy"

)

3560

&& !

equalTokens

(fzninput->token,

"maximize"

) );

3580

assert(

equalTokens

(fzninput->token,

"maximize"

));

3597 else if

( constant !=

NULL

)

3599 SCIPdebugMsg

(

scip

,

"optimizing a constant is equal to a satisfiability problem!\n"

);

3661

assert(nvars <= nvals);

3675

assert( nvars == nvals );

3677 for

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

3688 syntaxError

(

scip

, fzninput,

"unknown identifier expression for a objective function"

);

3701 const char

* filename

3705

assert(readerdata !=

NULL

);

3706

assert(fzninput !=

NULL

);

3709

fzninput->file =

SCIPfopen

(filename,

"r"

);

3710 if

( fzninput->file ==

NULL

)

3730 if

(

equalTokens

(fzninput->token,

"predicate"

) )

3735 else if

(

equalTokens

(fzninput->token,

"array"

) )

3740 else if

(

equalTokens

(fzninput->token,

"constraint"

) )

3750 else if

(

equalTokens

(fzninput->token,

"float"

) )

3755 else if

(

equalTokens

(fzninput->token,

"bool"

) )

3764

fzninput->valid =

FALSE

;

3767 else if

(

equalTokens

(fzninput->token,

"solve"

) )

3777 else if

(

equalTokens

(fzninput->token,

"output"

) )

3815 if

( fzninput->comment )

3877

assert(vars !=

NULL

);

3879

assert(nvars !=

NULL

);

3880

assert(*vars !=

NULL

|| *nvars == 0);

3882

assert(constant !=

NULL

);

3888 if

( requiredsize > *nvars )

3894

assert( requiredsize <= *nvars );

3906 for

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

3916

*constant += (*scalars)[v];

3917

(*scalars)[v] *= -1.0;

3934

assert( buffer !=

NULL

);

3936 if

( bufferpos > 0 )

3938

buffer[bufferpos] =

'\0'

;

3951 const char

* extension

3958

assert( buffer !=

NULL

);

3959

assert( bufferlen !=

NULL

);

3960

assert( bufferpos !=

NULL

);

3961

assert( extension !=

NULL

);

3964

extlen = (int)strlen(extension);

3965

newpos = (*bufferpos) + extlen;

3966 if

( newpos >= (*bufferlen) )

3968

*bufferlen =

MAX

( newpos, 2 * (*bufferlen) );

3974

(void)

SCIPstrncpy

((*buffer) + (*bufferpos), extension, extlen + 1);

3975

*bufferpos = newpos;

4013

assert( vars !=

NULL

|| nvars == 0 );

4014

assert( strcmp(type,

"eq"

) == 0 || strcmp(type,

"le"

) == 0 || strcmp(type,

"ge"

) == 0 );

4017 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos),

"constraint "

) );

4022 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos), buffer) );

4025 for

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

4034 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos), buffer) );

4048 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos), buffer) );

4051 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos),

"], ["

) );

4054 for

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

4057

assert( var !=

NULL

);

4063 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos), buffer) );

4069

assert(vars !=

NULL

);

4076 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos),buffer) );

4079 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos),

"], "

) );

4092 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->consbuffer), &(fznoutput->consbufferlen), &(fznoutput->consbufferpos),buffer) );

4115 int

nactivevars = 0;

4122

assert( vars !=

NULL

|| nvars == 0 );

4123

assert( fznoutput !=

NULL

);

4124

assert( lhs <= rhs );

4132

nactivevars = nvars;

4144 for

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

4145

activevals[v] = 1.0;

4154 if

( mayhavefloats )

4163 for

( v = 0; v < nactivevars && !hasfloats; v++ )

4167

assert(activevars != 0);

4168

var = activevars[v];

4177 for

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

4182

assert(activevars != 0);

4183

var = activevars[v];

4188 if

( idx < fznoutput->ndiscretevars && !fznoutput->varhasfloat[idx] )

4193 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->varbuffer), &(fznoutput->varbufferlen), &(fznoutput->varbufferpos),buffer) );

4196 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput->castbuffer), &(fznoutput->castbufferlen), &(fznoutput->castbufferpos),buffer) );

4198

fznoutput->varhasfloat[idx] =

TRUE

;

4209 SCIP_CALL

(

printRow

(

scip

, fznoutput,

"eq"

, activevars, activevals, nactivevars, rhs - activeconstant, hasfloats) );

4216 SCIP_CALL

(

printRow

(

scip

, fznoutput,

"ge"

, activevars, activevals, nactivevars, lhs - activeconstant, hasfloats) );

4222 SCIP_CALL

(

printRow

(

scip

, fznoutput,

"le"

, activevars, activevals, nactivevars, rhs - activeconstant, hasfloats) );

4259 const char

* conshdlrname;

4278 const int

ndiscretevars = nbinvars+nintvars;

4289 SCIPinfoMessage

(

scip

, file,

"%% Variables : %d (%d binary, %d integer, %d implicit integer, %d continuous)\n"

,

4290

nvars, nbinvars, nintvars, nimplvars, ncontvars);

4301 for

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

4304

assert( var !=

NULL

);

4330 if

( v < ndiscretevars )

4360

assert( v >= nbinvars );

4363 if

( v < ndiscretevars )

4371

boundedvars[nboundedvars] = v;

4377

boundedvars[nboundedvars] = v;

4385

fznoutput.ndiscretevars = ndiscretevars;

4386

fznoutput.varbufferpos = 0;

4387

fznoutput.consbufferpos = 0;

4388

fznoutput.castbufferpos = 0;

4398 for

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

4399

fznoutput.varhasfloat[v] =

FALSE

;

4400

fznoutput.varbuffer[0] =

'\0'

;

4401

fznoutput.consbuffer[0] =

'\0'

;

4402

fznoutput.castbuffer[0] =

'\0'

;

4405 for

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

4408

assert( cons !=

NULL

);

4414

assert( conshdlr !=

NULL

);

4422 if

( strcmp(conshdlrname,

"linear"

) == 0 )

4428 else if

( strcmp(conshdlrname,

"setppc"

) == 0 )

4438

consvars,

NULL

, nconsvars, 1.0, 1.0, transformed,

FALSE

) );

4450 else if

( strcmp(conshdlrname,

"logicor"

) == 0 )

4456 else if

( strcmp(conshdlrname,

"knapsack"

) == 0 )

4466 for

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

4474 else if

( strcmp(conshdlrname,

"varbound"

) == 0 )

4487

consvars, consvals, 2,

4493 else if

( strcmp(conshdlrname,

"cumulative"

) == 0 )

4500 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos),

"cumulative(["

) );

4502 for

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

4504 if

( v < nconsvars - 1)

4509 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos), varname) );

4512 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos),

"], ["

) );

4516 for

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

4518 if

( v < nconsvars - 1)

4523 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos), buffy) );

4526 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos),

"], ["

) );

4530 for

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

4532 if

( v < nconsvars - 1)

4537 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos), buffy) );

4541 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.consbuffer), &(fznoutput.consbufferlen), &(fznoutput.consbufferpos), buffy) );

4555 for

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

4567

intobjvars[nintobjvars] = v;

4568 SCIPdebugMsg

(

scip

,

"variable <%s> at pos <%d,%d> has an integral obj: %f=%f*%f\n"

,

4575 if

( v < ndiscretevars && !fznoutput.varhasfloat[v] )

4580 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.varbuffer), &(fznoutput.varbufferlen), &(fznoutput.varbufferpos),buffer) );

4583 SCIP_CALL

(

appendBuffer

(

scip

, &(fznoutput.castbuffer), &(fznoutput.castbufferlen), &(fznoutput.castbufferpos),buffer) );

4585

fznoutput.varhasfloat[v] =

TRUE

;

4588

floatobjvars[nfloatobjvars] = v;

4595 if

( fznoutput.varbufferpos > 0 )

4598 writeBuffer

(

scip

, file, fznoutput.varbuffer, fznoutput.varbufferpos );

4602 if

( fznoutput.castbufferpos > 0 )

4605 writeBuffer

(

scip

, file, fznoutput.castbuffer, fznoutput.castbufferpos );

4608 if

( nboundedvars > 0 )

4612 for

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

4614

var = vars[boundedvars[v]];

4647 if

( fznoutput.consbufferpos > 0 )

4650 writeBuffer

(

scip

, file, fznoutput.consbuffer, fznoutput.consbufferpos );

4656 if

( nintobjvars > 0 || nfloatobjvars > 0 || !

SCIPisZero

(

scip

, objoffset) )

4661 for

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

4664

var = vars[intobjvars[v]];

4675 for

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

4694 for

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

4699 for

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

4700 SCIPinfoMessage

(

scip

, file,

"%s%s%s"

,

SCIPvarGetName

(vars[floatobjvars[v]]), floatobjvars[v] < ndiscretevars ?

"_float"

:

""

, v < nfloatobjvars-1 ?

", "

:

""

);

4734

assert(reader !=

NULL

);

4752

assert(readerdata !=

NULL

);

4755 for

( v = 0; v < readerdata->nvararrays; ++v )

4777

fzninput.file =

NULL

;

4779

fzninput.linebuf[0] =

'\0'

;

4782

fzninput.token[0] =

'\0'

;

4789

fzninput.npushedtokens = 0;

4790

fzninput.linenumber = 1;

4791

fzninput.bufpos = 0;

4792

fzninput.linepos = 0;

4794

fzninput.comment =

FALSE

;

4795

fzninput.haserror =

FALSE

;

4796

fzninput.valid =

TRUE

;

4797

fzninput.vararrays =

NULL

;

4798

fzninput.nvararrays = 0;

4799

fzninput.vararrayssize = 0;

4800

fzninput.constarrays =

NULL

;

4801

fzninput.nconstarrays = 0;

4802

fzninput.constarrayssize = 0;

4810

hashGetKeyVar, SCIPhashKeyEqString, SCIPhashKeyValString,

NULL

) );

4813

hashGetKeyConstant, SCIPhashKeyEqString, SCIPhashKeyValString,

NULL

) );

4816

fzninput.nconstants = 0;

4817

fzninput.sconstants = 10;

4823 for

( i = fzninput.nconstants - 1; i >= 0; --i )

4841 for

( i = 0; i < fzninput.nvararrays; ++i )

4848 for

( i = 0; i < fzninput.nconstarrays; ++i )

4857 if

( fzninput.haserror || ! fzninput.valid )

4873

nvars, nbinvars, nintvars, nimplvars, ncontvars, conss, nconss, result) );

4883 for

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

4885 const char

* varname;

4889

length = strlen(varname);

4893 SCIPwarningMessage

(

scip

,

"The name of variable <%d>: \"%s\" is not conform to the fzn standard.\n"

, i, varname);

4898

legal = (strncmp(&varname[length-6],

"_float"

,6) != 0);

4901 SCIPwarningMessage

(

scip

,

"The name of variable <%d>: \"%s\" ends with \"_float\" which is not supported.\n"

, i, varname);

4910

nvars, nbinvars, nintvars, nimplvars, ncontvars, conss, nconss, result) );

4912 else if

( transformed )

4977

assert(reader !=

NULL

);

4980

assert(readerdata !=

NULL

);

4982

vararrays = readerdata->vararrays;

4983

nvararrays = readerdata->nvararrays;

4986 SCIPsortPtr

((

void

**)vararrays, vararraysComp, nvararrays);

4988 for

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

4990

vararray = vararrays[i];

4991

info = vararray->info;

4992

vars = vararray->vars;

4993

nvars = vararray->nvars;

4994

type = vararray->type;

4996 if

( info->ndims == 0 )

5010 for

( v = 0; v < info->ndims; ++v )

5017 for

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

Constraint handler for AND constraints, .

constraint handler for cumulative 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 nonlinear constraints specified by algebraic expressions

Constraint handler for "or" constraints, .

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

Constraint handler for variable bound constraints .

Constraint handler for XOR constraints, .

#define SCIP_HASHSIZE_NAMES

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

int * SCIPgetDurationsCumulative(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_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)

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

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

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

int * SCIPgetDemandsCumulative(SCIP *scip, SCIP_CONS *cons)

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

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

int SCIPgetCapacityCumulative(SCIP *scip, 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_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 ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsQuadraticNonlinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, 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_RETCODE SCIPcreateConsOr(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)

int SCIPgetNVarsCumulative(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPcreateConsCumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, 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 SCIPprintSolReaderFzn(SCIP *scip, SCIP_SOL *sol, FILE *file)

SCIP_RETCODE SCIPincludeReaderFzn(SCIP *scip)

SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPfreeProb(SCIP *scip)

SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)

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)

void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)

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)

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)

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

const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)

SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)

SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)

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

#define SCIPfreeBuffer(scip, ptr)

#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 SCIPduplicateBufferArray(scip, ptr, source, num)

#define SCIPallocBlockMemoryArray(scip, ptr, num)

#define SCIPallocBuffer(scip, ptr)

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

#define SCIPfreeBlockMemory(scip, ptr)

#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)

#define SCIPfreeBufferArrayNull(scip, ptr)

#define SCIPallocBlockMemory(scip, ptr)

#define SCIPduplicateBlockMemoryArray(scip, ptr, source, 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)))

SCIP_READERDATA * SCIPreaderGetData(SCIP_READER *reader)

SCIP_READER * SCIPfindReader(SCIP *scip, const char *name)

SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree)))

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_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)

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

SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)

SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)

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_VAR * SCIPvarGetNegatedVar(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 SCIPvarGetProbindex(SCIP_VAR *var)

const char * SCIPvarGetName(SCIP_VAR *var)

SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)

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

SCIP_Real SCIPvarGetLbLocal(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)

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

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

void SCIPprintSysError(const char *message)

int SCIPstrncpy(char *t, const char *s, int size)

char * SCIPstrtok(char *s, const char *delim, char **ptrptr)

static const SCIP_Real scalars[]

memory allocation routines

#define BMSclearMemoryArray(ptr, num)

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 SCIP_RETCODE parseArrayAssignment(SCIP *scip, FZNINPUT *fzninput, char ***elements, int *nelements, int selements)

static SCIP_Bool equalTokens(const char *token1, const char *token2)

static void freeVararray(SCIP *scip, VARARRAY **vararray)

static void parseRange(SCIP *scip, FZNINPUT *fzninput, FZNNUMBERTYPE *type, SCIP_Real *lb, SCIP_Real *ub)

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

static SCIP_DECL_READERWRITE(readerWriteFzn)

static SCIP_RETCODE parseConstantArray(SCIP *scip, FZNINPUT *fzninput, const char *name, int nconstants, FZNNUMBERTYPE type)

static SCIP_RETCODE parseLinking(SCIP *scip, FZNINPUT *fzninput, const char *name, const char *type, SCIP_Real sidevalue)

static void flattenAssignment(SCIP *scip, FZNINPUT *fzninput, char *assignment)

static SCIP_RETCODE parseName(SCIP *scip, FZNINPUT *fzninput, char *name, SCIP_Bool *output, DIMENSIONS **info)

static void freeConstarray(SCIP *scip, CONSTARRAY **constarray)

static SCIP_RETCODE createQuadraticCons(SCIP *scip, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initialconss, SCIP_Bool dynamicconss, SCIP_Bool dynamicrows)

static SCIP_RETCODE parseAggregation(SCIP *scip, FZNINPUT *fzninput, const char *name, const char *type)

static SCIP_RETCODE copyDimensions(SCIP *scip, DIMENSIONS **target, DIMENSIONS *source)

static SCIP_RETCODE writeFzn(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_CONS **conss, int nconss, SCIP_RESULT *result)

static void parseValue(SCIP *scip, FZNINPUT *fzninput, SCIP_Real *value, const char *assignment)

static SCIP_RETCODE parseQuadratic(SCIP *scip, FZNINPUT *fzninput, const char *name)

static void freeStringBufferArray(SCIP *scip, char **array, int nelements)

static SCIP_RETCODE parseSolveItem(SCIP *scip, FZNINPUT *fzninput)

static void computeLinearConsSides(SCIP *scip, FZNINPUT *fzninput, const char *name, SCIP_Real sidevalue, SCIP_Real *lhs, SCIP_Real *rhs)

static SCIP_RETCODE readFZNFile(SCIP *scip, SCIP_READERDATA *readerdata, FZNINPUT *fzninput, const char *filename)

static SCIP_DECL_HASHGETKEY(hashGetKeyVar)

static SCIP_DECL_READERCOPY(readerCopyFzn)

struct FznConstant FZNCONSTANT

static const char tokenchars[]

static SCIP_RETCODE parseConstantArrayAssignment(SCIP *scip, FZNINPUT *fzninput, SCIP_Real **vals, int *nvals, int sizevals)

static const int nconstypes

struct FznOutput FZNOUTPUT

static void writeBuffer(SCIP *scip, FILE *file, char *buffer, int bufferpos)

static SCIP_RETCODE createLinearCons(SCIP *scip, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initialconss, SCIP_Bool dynamicconss, SCIP_Bool dynamicrows)

static SCIP_Bool getNextLine(SCIP *scip, FZNINPUT *fzninput)

static SCIP_RETCODE fzninputAddConstarray(SCIP *scip, FZNINPUT *fzninput, const char *name, FZNCONSTANT **constants, int nconstants, FZNNUMBERTYPE type)

static const char commentchars[]

static void parseArrayType(SCIP *scip, FZNINPUT *fzninput, SCIP_Bool *isvararray, FZNNUMBERTYPE *type, SCIP_Real *lb, SCIP_Real *ub)

static SCIP_Bool isValue(const char *token, SCIP_Real *value)

static SCIP_RETCODE ensureConstarrySizeFznInput(SCIP *scip, FZNINPUT *fzninput)

static void parseArrayIndex(SCIP *scip, FZNINPUT *fzninput, int *idx)

static void flattenFloat(SCIP *scip, SCIP_Real val, char *buffer)

struct ConstArray CONSTARRAY

static SCIP_Bool isBoolExp(const char *name, SCIP_Bool *value)

enum FznNumberType FZNNUMBERTYPE

static SCIP_RETCODE parseVariableArray(SCIP *scip, SCIP_READERDATA *readerdata, FZNINPUT *fzninput, const char *name, int nvars, FZNNUMBERTYPE type, SCIP_Real lb, SCIP_Real ub, DIMENSIONS *info)

enum FznExpType FZNEXPTYPE

static SCIP_RETCODE printRow(SCIP *scip, FZNOUTPUT *fznoutput, const char *type, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real rhs, SCIP_Bool hasfloats)

static SCIP_RETCODE parseList(SCIP *scip, FZNINPUT *fzninput, char ***elements, int *nelements, int selements)

static SCIP_RETCODE ensureVararrySizeFznInput(SCIP *scip, FZNINPUT *fzninput)

static void freeDimensions(SCIP *scip, DIMENSIONS **dim)

static SCIP_RETCODE readerdataAddOutputvararray(SCIP *scip, SCIP_READERDATA *readerdata, const char *name, SCIP_VAR **vars, int nvars, FZNNUMBERTYPE type, DIMENSIONS *info)

static void parseArrayDimension(SCIP *scip, FZNINPUT *fzninput, int *nelements)

static SCIP_RETCODE createVariable(SCIP *scip, FZNINPUT *fzninput, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, FZNNUMBERTYPE type)

static SCIP_RETCODE parseConstraint(SCIP *scip, FZNINPUT *fzninput)

static SCIP_RETCODE parseConstant(SCIP *scip, FZNINPUT *fzninput, FZNNUMBERTYPE type)

static SCIP_RETCODE printLinearCons(SCIP *scip, FZNOUTPUT *fznoutput, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool mayhavefloats)

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

#define CREATE_CONSTRAINT(x)

static void pushToken(FZNINPUT *fzninput)

static SCIP_RETCODE parsePredicate(SCIP *scip, FZNINPUT *fzninput)

static SCIP_RETCODE createConstantAssignment(SCIP *scip, FZNCONSTANT **constant, FZNINPUT *fzninput, const char *name, FZNNUMBERTYPE type, const char *assignment)

static SCIP_RETCODE createLinking(SCIP *scip, FZNINPUT *fzninput, const char *consname, const char *name1, const char *name2, SCIP_Real lhs, SCIP_Real rhs)

static SCIP_Bool isEndStatement(FZNINPUT *fzninput)

static SCIP_RETCODE readerdataAddOutputvar(SCIP *scip, SCIP_READERDATA *readerdata, SCIP_VAR *var, FZNNUMBERTYPE type)

static SCIP_RETCODE appendBuffer(SCIP *scip, char **buffer, int *bufferlen, int *bufferpos, const char *extension)

static SCIP_RETCODE readerdataCreate(SCIP *scip, SCIP_READERDATA **readerdata)

static VARARRAY * findVararray(FZNINPUT *fzninput, const char *name)

static SCIP_Bool isDelimChar(char c)

static SCIP_DECL_READERFREE(readerFreeFzn)

static SCIP_DECL_SORTPTRCOMP(vararraysComp)

static SCIP_RETCODE createVararray(SCIP *scip, VARARRAY **vararray, const char *name, SCIP_VAR **vars, int nvars, FZNNUMBERTYPE type, DIMENSIONS *info)

static SCIP_Bool isChar(const char *token, char c)

struct Dimensions DIMENSIONS

static SCIP_Bool isIdentifier(const char *name)

static SCIP_RETCODE applyVariableAssignment(SCIP *scip, FZNINPUT *fzninput, SCIP_VAR *var, FZNNUMBERTYPE type, const char *assignment)

static void parseType(SCIP *scip, FZNINPUT *fzninput, FZNNUMBERTYPE *type, SCIP_Real *lb, SCIP_Real *ub)

static CONSTARRAY * findConstarray(FZNINPUT *fzninput, const char *name)

static void syntaxError(SCIP *scip, FZNINPUT *fzninput, const char *msg)

static SCIP_RETCODE ensureVararrySize(SCIP *scip, SCIP_READERDATA *readerdata)

static SCIP_DECL_READERREAD(readerReadFzn)

#define FZN_MAX_PUSHEDTOKENS

static SCIP_RETCODE parseVariableArrayAssignment(SCIP *scip, FZNINPUT *fzninput, SCIP_VAR ***vars, int *nvars, int sizevars)

static const char delimchars[]

static void printValue(SCIP *scip, FILE *file, SCIP_Real value, FZNNUMBERTYPE type)

static SCIP_RETCODE parseVariable(SCIP *scip, SCIP_READERDATA *readerdata, FZNINPUT *fzninput)

static SCIP_Bool hasError(FZNINPUT *fzninput)

static SCIP_Bool isTokenChar(char c)

static SCIP_RETCODE createConstarray(SCIP *scip, CONSTARRAY **constarray, const char *name, FZNCONSTANT **constants, int nconstants, FZNNUMBERTYPE type)

static SCIP_RETCODE fzninputAddVararray(SCIP *scip, FZNINPUT *fzninput, const char *name, SCIP_VAR **vars, int nvars, FZNNUMBERTYPE type, DIMENSIONS *info)

static SCIP_RETCODE parseOutputDimensioninfo(SCIP *scip, FZNINPUT *fzninput, DIMENSIONS **info)

static SCIP_RETCODE parseArray(SCIP *scip, SCIP_READERDATA *readerdata, FZNINPUT *fzninput)

static SCIP_Bool getNextToken(SCIP *scip, FZNINPUT *fzninput)

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 solutions

public methods for querying solving statistics

public methods for SCIP variables

enum SCIP_BoundType SCIP_BOUNDTYPE

enum SCIP_Objsense SCIP_OBJSENSE

struct SCIP_ReaderData SCIP_READERDATA

enum SCIP_Result SCIP_RESULT

enum SCIP_Retcode SCIP_RETCODE

@ SCIP_VARTYPE_CONTINUOUS

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