reader_osil.c File Reference Detailed DescriptionOS instance language (OSiL) format file reader. Definition in file reader_osil.c. #include <assert.h> #include <string.h> #include <math.h> #include "scip/reader_osil.h" #include "scip/scip.h" #include "scip/cons_bounddisjunction.h" #include "scip/cons_linear.h" #include "scip/cons_quadratic.h" #include "scip/cons_nonlinear.h" #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "xml/xml.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 39 of file reader_osil.c. Referenced by SCIPincludeReaderOsil().
Definition at line 40 of file reader_osil.c. Referenced by SCIPincludeReaderOsil().
Definition at line 41 of file reader_osil.c. Referenced by SCIPincludeReaderOsil().
Definition at line 44 of file reader_osil.c. Referenced by readExpression().
Definition at line 48 of file reader_osil.c. Referenced by readExpression(). Enumeration Type Documentation
type of constraint
Definition at line 57 of file reader_osil.c. Function Documentation
create variables with bounds and type according to xml data
Definition at line 71 of file reader_osil.c. References FALSE, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALID, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPceil(), SCIPcreateConsBounddisjunction(), SCIPcreateVar(), SCIPerrorMessage, SCIPfloor(), SCIPinfinity(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
setup linear coefficients and constant of objective and objective sense
Definition at line 276 of file reader_osil.c. References FALSE, NULL, SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddVar(), SCIPchgVarObj(), SCIPcreateVar(), SCIPerrorMessage, SCIPreleaseVar(), SCIPsetObjsense(), SCIPvarGetName(), xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), xmlGetData(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
setup constraint sides as linear constraints constraints are not added to the problem yet
Definition at line 413 of file reader_osil.c. References FALSE, LINEAR, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateConsLinear(), SCIPerrorMessage, SCIPinfinity(), SCIPsnprintf(), TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
reads mult and incr attributes of an OSiL node if mult attribute is not present, then returns mult=1 if incr attribute is not present, then returns incrint=0 and incrreal=0
Definition at line 574 of file reader_osil.c. References FALSE, NULL, SCIPerrorMessage, SCIPisFinite, and xmlGetAttrval(). Referenced by readLinearCoefs().
parse linear coefficients of constraints
Definition at line 640 of file reader_osil.c. References FALSE, LINEAR, NULL, readMultIncr(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPallocBufferArray, SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPisFinite, TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), xmlGetData(), xmlGetName(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
read quadratic coefficients of constraints and objective
Definition at line 980 of file reader_osil.c. References FALSE, LINEAR, NULL, QUADRATIC, SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddBilinTermQuadratic(), SCIPaddVar(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPcreateConsQuadratic(), SCIPcreateVar(), SCIPerrorMessage, SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetObjsense(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinfinity(), SCIPreleaseCons(), SCIPreleaseVar(), TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), xmlGetName(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
transforms OSnL expression tree into SCIP expression
Definition at line 1194 of file reader_osil.c. References SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, log(), M_E, M_PI, NULL, SCIP_CALL, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LOG, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_MUL, SCIP_EXPR_PRODUCT, SCIP_EXPR_REALPOWER, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPerrorMessage, SCIPexprAdd(), SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreateQuadratic(), SCIPexprFreeDeep(), SCIPexprGetOperator(), SCIPexprGetOpReal(), SCIPexprMulConstant(), SCIPfreeBufferArray, SCIPisFinite, SCIPisIntegral(), SCIPreallocBufferArray, SCIPround(), xmlFirstChild(), xmlGetAttrval(), xmlGetName(), and xmlNextSibl(). Referenced by readNonlinearExprs().
read nonlinear expressions of constraints and objective
Definition at line 1838 of file reader_osil.c. References SCIP_QuadVarTerm::adjbilin, SCIP_BilinTerm::coef, SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_QuadVarTerm::lincoef, LINEAR, MAX, MIN, SCIP_QuadVarTerm::nadjbilin, NONLINEAR, NULL, QUADRATIC, readExpression(), SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_EXPR_VARIDX, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddExprtreesNonlinear(), SCIPaddVar(), SCIPallocBufferArray, SCIPblkmem(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsNonlinear(), SCIPcreateVar(), SCIPerrorMessage, SCIPexprCreate(), SCIPexprCreateQuadratic(), SCIPexprtreeCreate(), SCIPexprtreeFree(), SCIPexprtreeSetVars(), SCIPfindQuadVarTermQuadratic(), SCIPfreeBufferArray, SCIPgetBilinTermsQuadratic(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLinearCoefsNonlinear(), SCIPgetLinearVarsNonlinear(), SCIPgetNBilinTermsQuadratic(), SCIPgetNLinearVarsNonlinear(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetNVarsLinear(), SCIPgetObjsense(), SCIPgetQuadVarTermsQuadratic(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinfinity(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsortQuadVarTermsQuadratic(), SCIP_QuadVarTerm::sqrcoef, TRUE, SCIP_QuadVarTerm::var, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), xmlGetName(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
read sos1 and sos2 constraints sos constraints are expected to be given as a node of <instanceData> in the following way: Weights are determined by the order in which the variables are given
Definition at line 2167 of file reader_osil.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPaddCons(), SCIPaddVarSOS1(), SCIPaddVarSOS2(), SCIPcreateConsSOS1(), SCIPcreateConsSOS2(), SCIPerrorMessage, SCIPsnprintf(), TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlGetAttrval(), xmlGetName(), and xmlNextSibl(). Referenced by SCIP_DECL_READERREAD().
copy method for reader plugins (called when SCIP copies plugins) Definition at line 2362 of file reader_osil.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeReaderOsil().
problem reading method of reader Definition at line 2373 of file reader_osil.c. References NULL, readConstraints(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), SCIP_Bool, SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPaddCons(), SCIPcreateProb(), SCIPdebug, SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPgetBoolParam(), SCIPreleaseCons(), SCIPreleaseVar(), TRUE, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlFreeNode(), xmlGetData(), xmlProcess(), and xmlShowNode().
includes the osil file reader in SCIP
Definition at line 2550 of file reader_osil.c. References NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), and SCIPsetReaderRead(). Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins(). |