Scippy

SCIP

Solving Constraint Integer Programs

reader_pip.h File Reference

Detailed Description

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.

#include "scip/scip.h"

Go to the source code of this file.

Functions

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)
 

Function Documentation

SCIP_RETCODE SCIPincludeReaderPip ( SCIP scip)

includes the pip file reader into SCIP

includes the pip file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 3734 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().

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

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 3757 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_PLUGINNOTFOUND, 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
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 2942 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().