|
LP file reader.
- Author
- Tobias Achterberg
This reader allows to parse and write CPLEX .lp files with linear and quadratic constraints and objective, special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables. For writing, linear (general and specialized), indicator, quadratic, second order cone, and special ordered set constraints are supported.
The lp format is defined within the CPLEX documentation.
Definition in file reader_lp.h.
Go to the source code of this file.
|
SCIP_RETCODE | SCIPincludeReaderLp (SCIP *scip) |
|
SCIP_RETCODE | SCIPreadLp (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result) |
|
SCIP_RETCODE | SCIPwriteLp (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 lp file reader into SCIP
includes the lp file reader in SCIP
- Parameters
-
Definition at line 3332 of file reader_lp.c.
References DEFAULT_AGGRLINEARIZATION_ANDS, DEFAULT_LINEARIZE_ANDS, NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPallocMemory, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderFree(), SCIPsetReaderRead(), SCIPsetReaderWrite(), and TRUE.
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 3366 of file reader_lp.c.
References FALSE, LP_MAX_LINELEN, LP_MAX_PUSHEDTOKENS, LP_START, NULL, readLPFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPgetBoolParam(), and SCIPsetObjsense().
Referenced by SCIP_DECL_READERREAD().
SCIP_RETCODE SCIPwriteLp |
( |
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
- 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 3435 of file reader_lp.c.
References appendLine(), checkConsnames(), checkVarnames(), clearLine(), collectAggregatedVars(), DEFAULT_AGGRLINEARIZATION_ANDS, DEFAULT_LINEARIZE_ANDS, endLine(), LP_MAX_NAMELEN, LP_MAX_PRINTLEN, MAX, NULL, printAggregatedCons(), printAndCons(), printQuadraticCons(), printSOCCons(), printSosCons(), READER_NAME, SCIP_Bool, SCIP_CALL, 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, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPfindConshdlr(), SCIPfindReader(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPgetBilinTermsQuadratic(), SCIPgetBinaryVarIndicator(), SCIPgetCapacityKnapsack(), SCIPgetCoefsLinearVarsQuadratic(), SCIPgetLhsLinear(), SCIPgetLhsQuadratic(), SCIPgetLhsVarbound(), SCIPgetLhsVarsSOC(), SCIPgetLinearConsIndicator(), SCIPgetLinearVarsQuadratic(), SCIPgetNBilinTermsQuadratic(), SCIPgetNLhsVarsSOC(), SCIPgetNLinearVarsQuadratic(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetNVarsSOS1(), SCIPgetNVarsSOS2(), SCIPgetQuadVarTermsQuadratic(), SCIPgetRhsLinear(), SCIPgetRhsQuadratic(), SCIPgetRhsVarbound(), SCIPgetRhsVarSOC(), SCIPgetSlackVarIndicator(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarsSOS1(), SCIPgetVarsSOS2(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPgetWeightsSOS1(), SCIPgetWeightsSOS2(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapSetImage(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPinfinity(), SCIPinfoMessage(), SCIPisFeasEQ(), SCIPisInfinity(), SCIPisZero(), SCIPprintCons(), SCIPreaderGetData(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPvarIsNegated(), SCIPwarningMessage(), and TRUE.
Referenced by SCIP_DECL_READERWRITE().
|