|
file reader for polynomial mixed-integer programs in PIP format
- Author
- Stefan Vigerske
This reader allows to parse and write PIP files with linear and polynomial constraints and objective. For writing, linear (general and specialized), quadratic, and "and" constraints are supported. Also abspower, bivariate, and nonlinear constraints may be written, if they are representable as polynomials.
The PIP format is similar to the LP format and defined at http://polip.zib.de/pipformat.php .
Definition in file reader_pip.h.
Go to the source code of this file.
|
SCIP_RETCODE | SCIPincludeReaderPip (SCIP *scip) |
|
SCIP_RETCODE | SCIPreadPip (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result) |
|
SCIP_RETCODE | SCIPwritePip (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) |
|
includes the pip file reader into SCIP
includes the pip file reader in SCIP
- Parameters
-
Definition at line 3725 of file reader_pip.c.
References NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderRead(), and SCIPsetReaderWrite().
Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins().
reads problem from file
- Parameters
-
scip | SCIP data structure |
reader | the file reader itself |
filename | full path and name of file to read, or NULL if stdin should be used |
result | pointer to store the result of the file reading call |
Definition at line 3748 of file reader_pip.c.
References FALSE, NULL, PIP_MAX_LINELEN, PIP_MAX_PUSHEDTOKENS, PIP_START, readPIPFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPgetBoolParam(), and SCIPsetObjsense().
Referenced by SCIP_DECL_READERREAD().
SCIP_RETCODE SCIPwritePip |
( |
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 |
|
) |
| |
writes problem to file
writes problem to file
- Parameters
-
scip | SCIP data structure |
file | output file, or NULL if standard output should be used |
name | problem name |
transformed | TRUE iff problem is the transformed problem |
objsense | objective sense |
objscale | scalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset) |
objoffset | objective offset from bound shifting and fixing |
vars | array with active variables ordered binary, integer, implicit, continuous |
nvars | number of active variables in the problem |
nbinvars | number of binary variables |
nintvars | number of general integer variables |
nimplvars | number of implicit integer variables |
ncontvars | number of continuous variables |
conss | array with constraints of the problem |
nconss | number of constraints in the problem |
result | pointer to store the result of the file writing call |
Definition at line 2933 of file reader_pip.c.
References appendLine(), checkConsnames(), checkVarnames(), clearLine(), collectAggregatedVars(), endLine(), FALSE, NULL, PIP_MAX_NAMELEN, PIP_MAX_PRINTLEN, printAggregatedCons(), printNonlinearCons(), printQuadraticCons(), SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_EXPR_VARIDX, SCIP_Longint, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPblkmem(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPexprCreate(), SCIPexprGetChildren(), SCIPexprGetIntPowerExponent(), SCIPexprGetMonomialExponents(), SCIPexprGetMonomialNFactors(), SCIPexprGetMonomials(), SCIPexprGetNChildren(), SCIPexprGetNMonomials(), SCIPexprGetOperator(), SCIPexprGetRealPowerExponent(), SCIPexpropGetName(), SCIPexprtreeCreate(), SCIPexprtreeFree(), SCIPexprtreeGetNVars(), SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPexprtreeSetVars(), SCIPfreeBufferArray, SCIPgetBilinTermsQuadratic(), SCIPgetCapacityKnapsack(), SCIPgetCoefLinearAbspower(), SCIPgetCoefsLinearVarsQuadratic(), SCIPgetExponentAbspower(), SCIPgetExprtreeBivariate(), SCIPgetExprtreeCoefsNonlinear(), SCIPgetExprtreesNonlinear(), SCIPgetLhsAbspower(), SCIPgetLhsBivariate(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsQuadratic(), SCIPgetLhsVarbound(), SCIPgetLinearCoefBivariate(), SCIPgetLinearCoefsNonlinear(), SCIPgetLinearVarAbspower(), SCIPgetLinearVarBivariate(), SCIPgetLinearVarsNonlinear(), SCIPgetLinearVarsQuadratic(), SCIPgetNBilinTermsQuadratic(), SCIPgetNExprtreesNonlinear(), SCIPgetNLinearVarsNonlinear(), SCIPgetNLinearVarsQuadratic(), SCIPgetNonlinearVarAbspower(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetNVarsAnd(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetOffsetAbspower(), SCIPgetQuadVarTermsQuadratic(), SCIPgetResultantAnd(), SCIPgetRhsAbspower(), SCIPgetRhsBivariate(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsQuadratic(), SCIPgetRhsVarbound(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsAnd(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPinfinity(), SCIPinfoMessage(), SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPprintCons(), SCIPround(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPwarningMessage(), and TRUE.
Referenced by SCIP_DECL_READERWRITE().
|