All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
reader_fzn.c File Reference Detailed DescriptionFlatZinc file reader. FlatZinc is a low-level solver input language that is the target language for MiniZinc. It is designed to be easy to translate into the form required by a solver. For more details see http://www.g12.cs.mu.oz.au/minizinc/ . Definition in file reader_fzn.c. #include <stdlib.h> #include <assert.h> #include <string.h> #include <ctype.h> #include "scip/cons_and.h" #include "scip/cons_cumulative.h" #include "scip/cons_knapsack.h" #include "scip/cons_linear.h" #include "scip/cons_logicor.h" #include "scip/cons_or.h" #include "scip/cons_quadratic.h" #include "scip/cons_setppc.h" #include "scip/cons_varbound.h" #include "scip/cons_xor.h" #include "scip/pub_misc.h" #include "scip/reader_fzn.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 50 of file reader_fzn.c. Referenced by SCIP_DECL_READERCOPY(), SCIPincludeReaderFzn(), and SCIPprintSolReaderFzn().
Definition at line 51 of file reader_fzn.c. Referenced by SCIPincludeReaderFzn().
Definition at line 52 of file reader_fzn.c. Referenced by SCIPincludeReaderFzn().
size of the line buffer for reading or writing Definition at line 55 of file reader_fzn.c. Referenced by CREATE_CONSTRAINT(), flattenAssignment(), flattenFloat(), getNextLine(), getNextToken(), parseArray(), parseConstant(), parseConstantArray(), parseConstraint(), parseList(), parseName(), parseSolveItem(), parseVariable(), parseVariableArray(), printLinearCons(), printRow(), SCIP_DECL_READERREAD(), and writeFzn().
Definition at line 56 of file reader_fzn.c. Referenced by pushToken(), and SCIP_DECL_READERREAD().
tries to creates and adds a constraint; sets parameter created to TRUE if method was successful input:
output
Definition at line 139 of file reader_fzn.c. Typedef Documentation
Definition at line 69 of file reader_fzn.c.
Definition at line 78 of file reader_fzn.c.
Definition at line 87 of file reader_fzn.c.
Definition at line 96 of file reader_fzn.c.
Definition at line 106 of file reader_fzn.c.
Definition at line 117 of file reader_fzn.c.
Definition at line 177 of file reader_fzn.c.
Definition at line 194 of file reader_fzn.c. Enumeration Type Documentation
Expression type in FlatZinc File Definition at line 72 of file reader_fzn.c. Function Documentation
gets the key (i.e. the name) of the given variable Definition at line 206 of file reader_fzn.c. References NULL, and SCIPvarGetName().
gets the key (i.e. the name) of the flatzinc constant Definition at line 216 of file reader_fzn.c. References NULL.
comparison method for sorting variable arrays w.r.t. to their name Definition at line 226 of file reader_fzn.c.
frees a given buffer char* array
Definition at line 234 of file reader_fzn.c. References SCIPfreeBufferArray. Referenced by CREATE_CONSTRAINT(), parseAggregation(), parseConstantArray(), parseConstantArrayAssignment(), parseLinking(), parseQuadratic(), parseVariableArray(), and parseVariableArrayAssignment().
returns whether the given character is a token delimiter
Definition at line 252 of file reader_fzn.c. References delimchars, and NULL. Referenced by getNextToken().
returns whether the given character is a single token
Definition at line 261 of file reader_fzn.c. References NULL, and tokenchars. Referenced by getNextToken().
check if the current token is equal to give char
Definition at line 270 of file reader_fzn.c. Referenced by CREATE_CONSTRAINT(), flattenAssignment(), isEndStatement(), parseArrayAssignment(), parseArrayDimension(), parseArrayIndex(), parseConstant(), parseConstantArray(), parseConstantArrayAssignment(), parseConstraint(), parseList(), parseName(), parseOutputDimensioninfo(), parseSolveItem(), parseType(), parseVariable(), parseVariableArray(), and parseVariableArrayAssignment(). check if the current token is Bool expression, this means false or true
Definition at line 283 of file reader_fzn.c. Referenced by applyVariableAssignment(), and createConstantAssignment().
check if the current token is an identifier, this means [A-Za-z][A-Za-z0-9_]*
Definition at line 318 of file reader_fzn.c. Referenced by flattenAssignment(), parseArrayIndex(), parseConstraint(), parseName(), parseValue(), and SCIP_DECL_READERWRITE().
returns whether the current character is member of a value string
Definition at line 341 of file reader_fzn.c. References FALSE, FZN_EXP_NONE, FZN_EXP_SIGNED, FZN_EXP_UNSIGNED, NULL, and TRUE. Referenced by getNextToken(). compares two token if they are equal
Definition at line 385 of file reader_fzn.c. Referenced by computeLinearConsSides(), CREATE_CONSTRAINT(), findConstarray(), findVararray(), parseAggregation(), parseArrayType(), parseName(), parseRange(), parseSolveItem(), parseType(), and readFZNFile(). reads the next line from the input file into the line buffer; skips comments; returns whether a line could be read
Definition at line 404 of file reader_fzn.c. References BMSclearMemoryArray, commentchars, FALSE, FZN_BUFFERLEN, NULL, SCIPdebugMessage, SCIPfgets(), SCIPfseek(), SCIPwarningMessage(), and TRUE. Referenced by getNextToken(). reads the next token from the input file into the token buffer; returns whether a token was read
Definition at line 499 of file reader_fzn.c. References FALSE, FZN_BUFFERLEN, FZN_EXP_NONE, getNextLine(), isDelimChar(), isTokenChar(), isValueChar(), NULL, SCIP_Bool, SCIPdebugMessage, SCIPswapPointers(), and TRUE. Referenced by CREATE_CONSTRAINT(), flattenAssignment(), parseArrayAssignment(), parseArrayDimension(), parseArrayIndex(), parseArrayType(), parseConstant(), parseConstantArray(), parseConstantArrayAssignment(), parseConstraint(), parseList(), parseName(), parseOutputDimensioninfo(), parseRange(), parseSolveItem(), parseType(), parseVariable(), parseVariableArray(), parseVariableArrayAssignment(), and readFZNFile().
puts the current token on the token stack, such that it is read at the next call to getNextToken()
Definition at line 618 of file reader_fzn.c. References FZN_MAX_PUSHEDTOKENS, NULL, and SCIPswapPointers(). Referenced by flattenAssignment(), parseArrayType(), parseConstantArrayAssignment(), parseList(), parseName(), parseType(), parseVariable(), parseVariableArray(), parseVariableArrayAssignment(), and readFZNFile(). checks whether the current token is a semicolon which closes a statement
Definition at line 631 of file reader_fzn.c. References isChar(), and NULL. Referenced by flattenAssignment(), parseArrayIndex(), parseName(), parseType(), parseVariableArray(), and readFZNFile(). returns whether the current token is a value
Definition at line 642 of file reader_fzn.c. References FALSE, NULL, and TRUE. Referenced by applyVariableAssignment(), createConstantAssignment(), createLinking(), parseArrayIndex(), parseRange(), parseValue(), and parseVariableArrayAssignment(). issues an error message and marks the FlatZinc data to have errors
Definition at line 668 of file reader_fzn.c. References NULL, SCIPerrorMessage, and TRUE. Referenced by applyVariableAssignment(), computeLinearConsSides(), CREATE_CONSTRAINT(), createConstantAssignment(), createVariable(), flattenAssignment(), parseArrayAssignment(), parseArrayDimension(), parseArrayIndex(), parseArrayType(), parseConstant(), parseConstantArray(), parseConstantArrayAssignment(), parseConstraint(), parseName(), parseOutputDimensioninfo(), parseRange(), parseSolveItem(), parseType(), parseValue(), parseVariable(), parseVariableArray(), parseVariableArrayAssignment(), and readFZNFile(). returns whether a syntax error was detected
Definition at line 684 of file reader_fzn.c. References NULL. Referenced by CREATE_CONSTRAINT(), parseAggregation(), parseArray(), parseArrayAssignment(), parseConstant(), parseConstantArray(), parseConstantArrayAssignment(), parseConstraint(), parseLinking(), parseList(), parseQuadratic(), parseSolveItem(), parseVariable(), parseVariableArray(), and readFZNFile().
create reader data
Definition at line 695 of file reader_fzn.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocMemory. Referenced by SCIPincludeReaderFzn().
ensure the size if the variable array
Definition at line 711 of file reader_fzn.c. References SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, and SCIPreallocMemoryArray. Referenced by readerdataAddOutputvar(), and readerdataAddOutputvararray().
ensure the size if the variable array
Definition at line 743 of file reader_fzn.c. References SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, and SCIPreallocMemoryArray. Referenced by fzninputAddVararray().
ensure the size if the variable array
Definition at line 775 of file reader_fzn.c. References SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, and SCIPreallocMemoryArray. Referenced by fzninputAddConstarray().
print given value in FlatZinc format to given stream
Definition at line 807 of file reader_fzn.c. References FZN_BOOL, FZN_FLOAT, FZN_INT, SCIP_Longint, SCIPinfoMessage(), and SCIPisIntegral(). Referenced by SCIPprintSolReaderFzn().
free dimension structure
Definition at line 851 of file reader_fzn.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, and SCIPduplicateMemoryArray. Referenced by createVararray().
create variable array data structure
Definition at line 873 of file reader_fzn.c. References copyDimensions(), SCIP_CALL, SCIP_OKAY, SCIPallocMemory, and SCIPduplicateMemoryArray. Referenced by fzninputAddVararray(), and readerdataAddOutputvararray().
free dimension structure
Definition at line 902 of file reader_fzn.c. References NULL, SCIPfreeMemory, and SCIPfreeMemoryArrayNull. Referenced by freeVararray(), and parseArray(). free variable array data structure
Definition at line 917 of file reader_fzn.c. References freeDimensions(), SCIPfreeMemory, and SCIPfreeMemoryArray. Referenced by SCIP_DECL_READERFREE(), and SCIP_DECL_READERREAD(). searches the variable array data base if a constant array exists with the given name; if it exists it is returned
Definition at line 932 of file reader_fzn.c. References equalTokens(), and NULL. Referenced by parseConstantArrayAssignment(), and parseVariableArrayAssignment().
create constant array data structure
Definition at line 959 of file reader_fzn.c. References SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPdebugMessage, and SCIPduplicateMemoryArray. Referenced by fzninputAddConstarray().
free constant array data structure
Definition at line 987 of file reader_fzn.c. References SCIPdebugMessage, SCIPfreeMemory, and SCIPfreeMemoryArray. Referenced by SCIP_DECL_READERREAD().
searches the constant array data base if a constant array exists with the given name; if it exists it is returned
Definition at line 1006 of file reader_fzn.c. References equalTokens(), and NULL. Referenced by parseConstantArrayAssignment().
add variable to the reader data
Definition at line 1029 of file reader_fzn.c. References ensureVararrySize(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPduplicateMemoryArray, and SCIPvarGetName(). Referenced by parseVariable().
add variable to the reader data
Definition at line 1075 of file reader_fzn.c. References createVararray(), ensureVararrySize(), SCIP_CALL, and SCIP_OKAY. Referenced by parseVariableArray().
add variable to the input data
Definition at line 1104 of file reader_fzn.c. References createVararray(), ensureVararrySizeFznInput(), SCIP_CALL, and SCIP_OKAY. Referenced by parseVariableArray().
add variable to the reader data
Definition at line 1133 of file reader_fzn.c. References createConstarray(), ensureConstarrySizeFznInput(), SCIP_CALL, and SCIP_OKAY. Referenced by parseConstantArray().
creates, adds, and releases a linear constraint
Definition at line 1161 of file reader_fzn.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPcreateConsQuadratic(), SCIPdebugPrintCons, SCIPreleaseCons(), and TRUE. Referenced by parseQuadratic().
creates, adds, and releases a linear constraint
Definition at line 1193 of file reader_fzn.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPcreateConsLinear(), SCIPdebugPrintCons, SCIPreleaseCons(), and TRUE. Referenced by applyVariableAssignment(), CREATE_CONSTRAINT(), createLinking(), parseAggregation(), parseConstraint(), and parseQuadratic().
create a linking between the two given identifiers
Definition at line 1221 of file reader_fzn.c. References createLinearCons(), isValue(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPhashtableRetrieve(), and SCIPisInfinity(). Referenced by parseLinking(). parse array index expression
Definition at line 1290 of file reader_fzn.c. References FALSE, FZN_INT, getNextToken(), isChar(), isEndStatement(), isIdentifier(), isValue(), NULL, SCIP_Real, SCIPhashtableRetrieve(), and syntaxError(). Referenced by flattenAssignment(). unroll assignment if it is an array access one
Definition at line 1333 of file reader_fzn.c. References FZN_BUFFERLEN, getNextToken(), isChar(), isEndStatement(), isIdentifier(), NULL, parseArrayIndex(), pushToken(), SCIPdebugMessage, SCIPsnprintf(), and syntaxError(). Referenced by CREATE_CONSTRAINT(), parseConstant(), parseConstraint(), parseList(), parseSolveItem(), and parseVariable().
computes w.r.t. to the given side value and relation the left and right side for a SCIP linear constraint
Definition at line 1394 of file reader_fzn.c. References equalTokens(), SCIPdebugMessage, and syntaxError(). Referenced by CREATE_CONSTRAINT(), and parseLinking().
parse a list of elements which is separates by a comma
Definition at line 1437 of file reader_fzn.c. References flattenAssignment(), FZN_BUFFERLEN, getNextToken(), hasError(), isChar(), pushToken(), SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPduplicateBufferArray, and SCIPreallocBufferArray. Referenced by CREATE_CONSTRAINT(), parseAggregation(), parseArrayAssignment(), parseLinking(), and parseQuadratic().
parse range expression
Definition at line 1490 of file reader_fzn.c. References equalTokens(), FZN_FLOAT, FZN_INT, getNextToken(), isValue(), SCIPisIntegral(), SCIPwarningMessage(), and syntaxError(). Referenced by parseArrayDimension(), parseOutputDimensioninfo(), parseType(), and readFZNFile().
parse dimension information
Definition at line 1538 of file reader_fzn.c. References FZN_INT, getNextToken(), isChar(), parseRange(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocMemory, SCIPallocMemoryArray, SCIPreallocMemoryArray, and syntaxError(). Referenced by parseName().
parse identifier name without annotations
Definition at line 1593 of file reader_fzn.c. References equalTokens(), FALSE, FZN_BUFFERLEN, getNextToken(), isChar(), isEndStatement(), isIdentifier(), NULL, parseOutputDimensioninfo(), pushToken(), SCIP_CALL, SCIP_OKAY, SCIPsnprintf(), syntaxError(), and TRUE. Referenced by parseArray(), parseConstant(), and parseVariable().
parse variable/constant (array) type (integer, float, bool, or set)
Definition at line 1654 of file reader_fzn.c. References equalTokens(), FALSE, FZN_BOOL, FZN_FLOAT, FZN_INT, getNextToken(), isChar(), isEndStatement(), parseRange(), pushToken(), SCIPdebugMessage, SCIPinfinity(), SCIPwarningMessage(), and syntaxError(). Referenced by parseArrayType(), and parseVariable().
applies assignment
Definition at line 1704 of file reader_fzn.c. References createLinearCons(), FZN_BOOL, isBoolExp(), isValue(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPhashtableRetrieve(), and syntaxError(). Referenced by parseVariable(), and parseVariableArray().
applies constant assignment expression
Definition at line 1759 of file reader_fzn.c. References FZN_BOOL, isBoolExp(), isValue(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBuffer, SCIPduplicateBufferArray, SCIPhashtableInsert(), SCIPhashtableRetrieve(), SCIPreallocBufferArray, and syntaxError(). Referenced by parseConstant(), and parseConstantArray().
parse array type ( (i) variable or constant; (ii) integer, float, bool, or set)
Definition at line 1825 of file reader_fzn.c. References equalTokens(), FALSE, getNextToken(), parseType(), pushToken(), syntaxError(), and TRUE. Referenced by parseArray().
parse an array assignment
Definition at line 1862 of file reader_fzn.c. References getNextToken(), hasError(), isChar(), NULL, parseList(), SCIP_CALL, SCIP_OKAY, and syntaxError(). Referenced by parseConstantArray(), parseConstantArrayAssignment(), parseVariableArray(), and parseVariableArrayAssignment(). parse array dimension
Definition at line 1896 of file reader_fzn.c. References FZN_INT, getNextToken(), isChar(), parseRange(), SCIP_Real, and syntaxError(). Referenced by parseArray().
creates and adds a variable to SCIP and stores it for latter use in fzninput structure
Definition at line 1935 of file reader_fzn.c. References FZN_BOOL, FZN_FLOAT, FZN_INT, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPaddVar(), SCIPcreateVar(), SCIPdebug, SCIPdebugMessage, SCIPhashtableInsert(), SCIPhashtableRetrieve(), SCIPprintVar(), SCIPreleaseVar(), and syntaxError(). Referenced by parseVariable(), parseVariableArray(), parseVariableArrayAssignment(), and readFZNFile().
parse variable array assignment and create the variables
Definition at line 1994 of file reader_fzn.c. References applyVariableAssignment(), createVariable(), freeStringBufferArray(), FZN_BUFFERLEN, fzninputAddVararray(), getNextToken(), hasError(), isChar(), isEndStatement(), NULL, parseArrayAssignment(), pushToken(), readerdataAddOutputvararray(), SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsnprintf(), and syntaxError(). Referenced by parseArray().
parse constant array assignment and create the constants
Definition at line 2071 of file reader_fzn.c. References createConstantAssignment(), freeStringBufferArray(), FZN_BUFFERLEN, fzninputAddConstarray(), getNextToken(), hasError(), isChar(), parseArrayAssignment(), SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsnprintf(), and syntaxError(). Referenced by parseArray().
parse predicate expression
Definition at line 2117 of file reader_fzn.c. References SCIP_OKAY, and TRUE. Referenced by readFZNFile().
parse array expression
Definition at line 2130 of file reader_fzn.c. References FALSE, freeDimensions(), FZN_BOOL, FZN_BUFFERLEN, FZN_INT, hasError(), NULL, parseArrayDimension(), parseArrayType(), parseConstantArray(), parseName(), parseVariableArray(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPdebugMessage. Referenced by readFZNFile().
parse variable expression
Definition at line 2190 of file reader_fzn.c. References applyVariableAssignment(), createVariable(), flattenAssignment(), FZN_BOOL, FZN_BUFFERLEN, FZN_FLOAT, FZN_INT, getNextToken(), hasError(), isChar(), NULL, parseName(), parseType(), pushToken(), readerdataAddOutputvar(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and syntaxError(). Referenced by readFZNFile().
parse constant expression
Definition at line 2254 of file reader_fzn.c. References createConstantAssignment(), flattenAssignment(), FZN_BOOL, FZN_BUFFERLEN, FZN_FLOAT, FZN_INT, getNextToken(), hasError(), isChar(), NULL, parseName(), SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and syntaxError(). Referenced by readFZNFile().
evaluates current token as constant
Definition at line 2293 of file reader_fzn.c. References isIdentifier(), isValue(), NULL, SCIPhashtableRetrieve(), SCIPisEQ(), SCIPvarGetLbOriginal(), SCIPvarGetUbOriginal(), and syntaxError(). Referenced by CREATE_CONSTRAINT(), parseAggregation(), parseConstantArrayAssignment(), and parseQuadratic().
parse array expression containing constants
Definition at line 2336 of file reader_fzn.c. References findConstarray(), findVararray(), freeStringBufferArray(), getNextToken(), hasError(), isChar(), NULL, parseArrayAssignment(), parseValue(), pushToken(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPisEQ(), SCIPreallocBufferArray, SCIPvarGetLbOriginal(), SCIPvarGetUbOriginal(), and syntaxError(). Referenced by CREATE_CONSTRAINT(), and parseSolveItem().
parse array expression containing variables
Definition at line 2462 of file reader_fzn.c. References createVariable(), findVararray(), freeStringBufferArray(), FZN_FLOAT, getNextToken(), isChar(), isValue(), NULL, parseArrayAssignment(), pushToken(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPhashtableRetrieve(), SCIPreallocBufferArray, and syntaxError(). Referenced by CREATE_CONSTRAINT(), and parseSolveItem().
parse linking statement
Definition at line 2572 of file reader_fzn.c. References createLinearCons(), createQuadraticCons(), freeStringBufferArray(), hasError(), NULL, parseList(), parseValue(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPhashtableRetrieve(), and SCIPswapPointers(). Referenced by CREATE_CONSTRAINT().
parse aggregation statement (plus, minus, negate)
Definition at line 2701 of file reader_fzn.c. References createLinearCons(), equalTokens(), freeStringBufferArray(), hasError(), NULL, parseList(), parseValue(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPhashtableRetrieve(). Referenced by CREATE_CONSTRAINT().
parse linking statement
Definition at line 2810 of file reader_fzn.c. References computeLinearConsSides(), createLinking(), freeStringBufferArray(), hasError(), parseList(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, and SCIPallocBufferArray. Referenced by CREATE_CONSTRAINT().
creates a linear constraint for an array operation Definition at line 2848 of file reader_fzn.c. References equalTokens(), NULL, parseLinking(), SCIP_CALL, SCIP_OKAY, and TRUE.
creates a linear constraint for an array operation Definition at line 2866 of file reader_fzn.c. References equalTokens(), FALSE, NULL, SCIP_OKAY, and SCIPwarningMessage().
creates linear constraint for an array operation Definition at line 2883 of file reader_fzn.c. References equalTokens(), FALSE, NULL, SCIP_OKAY, and SCIPwarningMessage().
creates a linear constraint for a logical operation Definition at line 2900 of file reader_fzn.c. References equalTokens(), FALSE, freeStringBufferArray(), getNextToken(), hasError(), isChar(), NULL, parseList(), parseVariableArrayAssignment(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsAnd(), SCIPcreateConsLinear(), SCIPcreateConsOr(), SCIPcreateConsXor(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPhashtableRetrieve(), SCIPreleaseCons(), SCIPswapPointers(), SCIPwarningMessage(), syntaxError(), and TRUE.
creates a linear constraint for a comparison operation Definition at line 3095 of file reader_fzn.c. References computeLinearConsSides(), createLinearCons(), equalTokens(), FALSE, flattenAssignment(), FZN_BUFFERLEN, getNextToken(), hasError(), isChar(), NULL, parseAggregation(), parseConstantArrayAssignment(), parseLinking(), parseQuadratic(), parseValue(), parseVariableArrayAssignment(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPwarningMessage(), syntaxError(), and TRUE.
creates an alldifferent constraint Definition at line 3250 of file reader_fzn.c. References equalTokens(), FALSE, NULL, parseVariableArrayAssignment(), SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPreleaseCons(), and TRUE.
creates an alldifferent constraint Definition at line 3296 of file reader_fzn.c. References equalTokens(), FALSE, flattenAssignment(), FZN_BUFFERLEN, getNextToken(), hasError(), isChar(), NULL, parseConstantArrayAssignment(), parseValue(), parseVariableArrayAssignment(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsCumulative(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPreleaseCons(), syntaxError(), and TRUE.
parse constraint expression
Definition at line 3424 of file reader_fzn.c. References createLinearCons(), FALSE, flattenAssignment(), FZN_BUFFERLEN, getNextToken(), hasError(), isChar(), isIdentifier(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPdebugPrintf, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPhashtableRetrieve(), SCIPsnprintf(), SCIPstrtok(), SCIPwarningMessage(), and syntaxError(). Referenced by readFZNFile().
parse solve item expression
Definition at line 3528 of file reader_fzn.c. References equalTokens(), flattenAssignment(), FZN_BUFFERLEN, getNextToken(), hasError(), isChar(), MAX, NULL, parseConstantArrayAssignment(), parseVariableArrayAssignment(), SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPchgVarObj(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPhashtableRetrieve(), and syntaxError(). Referenced by readFZNFile().
reads a FlatZinc model
Definition at line 3692 of file reader_fzn.c. References createVariable(), equalTokens(), FALSE, FZN_BOOL, FZN_FLOAT, FZN_INT, getNextToken(), hasError(), isEndStatement(), NULL, parseArray(), parseConstant(), parseConstraint(), parsePredicate(), parseRange(), parseSolveItem(), parseVariable(), pushToken(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPcreateProb(), SCIPdebugMessage, SCIPerrorMessage, SCIPfclose(), SCIPfeof(), SCIPfopen(), SCIPfreeProb(), SCIPprintSysError(), SCIPsetObjsense(), SCIPwarningMessage(), and syntaxError(). Referenced by SCIP_DECL_READERREAD().
transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant
Definition at line 3857 of file reader_fzn.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetProbvarLinearSum(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), and TRUE. Referenced by printLinearCons().
ends the given line with '\0' and prints it to the given file stream
Definition at line 3901 of file reader_fzn.c. References NULL, and SCIPinfoMessage(). Referenced by writeFzn().
appends extension to line and prints it to the give file stream if the line buffer get full
Definition at line 3921 of file reader_fzn.c. References MAX, NULL, SCIP_CALL, SCIP_OKAY, and SCIPreallocBufferArray. Referenced by printLinearCons(), printRow(), and writeFzn().
Definition at line 3955 of file reader_fzn.c. References FZN_BUFFERLEN, SCIPisIntegral(), SCIPround(), and SCIPsnprintf(). Referenced by printRow(), and writeFzn().
Definition at line 3970 of file reader_fzn.c. References appendBuffer(), flattenFloat(), FZN_BUFFERLEN, NULL, SCIP_CALL, SCIP_OKAY, SCIPisZero(), SCIPsnprintf(), SCIPvarGetName(), and SCIPvarGetProbindex(). Referenced by printLinearCons().
prints given linear constraint information in FZN format to file stream
Definition at line 4071 of file reader_fzn.c. References appendBuffer(), FALSE, FZN_BUFFERLEN, getActiveVariables(), NULL, printRow(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetType(), and TRUE. Referenced by writeFzn().
Definition at line 4209 of file reader_fzn.c. References appendBuffer(), FALSE, flattenFloat(), FZN_BUFFERLEN, NULL, printLinearCons(), SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetCapacityCumulative(), SCIPgetCapacityKnapsack(), SCIPgetDemandsCumulative(), SCIPgetDurationsCumulative(), SCIPgetLhsLinear(), SCIPgetLhsVarbound(), SCIPgetNVarsCumulative(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetRhsLinear(), SCIPgetRhsVarbound(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsCumulative(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPinfinity(), SCIPinfoMessage(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisInfinity(), SCIPisIntegral(), SCIPisZero(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPwarningMessage(), TRUE, and writeBuffer(). Referenced by SCIP_DECL_READERWRITE().
copy method for reader plugins (called when SCIP copies plugins) Definition at line 4705 of file reader_fzn.c. References NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderFzn(), and SCIPreaderGetName().
destructor of reader to free user data (called when SCIP is exiting) Definition at line 4720 of file reader_fzn.c. References freeVararray(), NULL, SCIP_OKAY, SCIPfreeMemory, SCIPfreeMemoryArrayNull, and SCIPreaderGetData().
problem reading method of reader Definition at line 4745 of file reader_fzn.c. References FALSE, freeConstarray(), freeVararray(), FZN_BUFFERLEN, FZN_MAX_PUSHEDTOKENS, NULL, readFZNFile(), SCIP_CALL, SCIP_HASHSIZE_NAMES, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPallocBufferArray, SCIPblkmem(), SCIPfreeBuffer, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPfreeMemoryArrayNull, SCIPgetBoolParam(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPreaderGetData(), and TRUE.
problem writing method of reader Definition at line 4838 of file reader_fzn.c. References isIdentifier(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, SCIPprintOrigProblem(), SCIPprintTransProblem(), SCIPvarGetName(), SCIPwarningMessage(), TRUE, and writeFzn().
includes the fzn file reader in SCIP
Definition at line 4904 of file reader_fzn.c. References READER_DESC, READER_EXTENSION, READER_NAME, readerdataCreate(), SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderFree(), SCIPsetReaderRead(), and SCIPsetReaderWrite(). Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins().
print given solution in Flatzinc format w.r.t. the output annotation
Definition at line 4927 of file reader_fzn.c. References NULL, printValue(), READER_NAME, SCIP_OKAY, SCIP_Real, SCIPfindReader(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPreaderGetData(), and SCIPsortPtr(). Variable Documentation
Definition at line 196 of file reader_fzn.c. Referenced by getMaxAndConsDim(), and isDelimChar().
Definition at line 197 of file reader_fzn.c. Referenced by isTokenChar().
Definition at line 198 of file reader_fzn.c. Referenced by getNextLine().
size of the function pointer array Definition at line 3419 of file reader_fzn.c. |