reader_mps.c
Go to the documentation of this file.
30 * @todo Check whether constructing the names for aggregated constraint yields name clashes (aggrXXX). 33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 58 #define DEFAULT_LINEARIZE_ANDS TRUE /**< should possible \"and\" constraint be linearized when writing the mps 60 #define DEFAULT_AGGRLINEARIZATION_ANDS TRUE /**< should an aggregated linearization for and constraints be used? */ 83 { 100 }; 405 "Warning line %d: %s \"%s\" for %s \"%s\" ignored\n", mpsi->lineno, what, what_name, entity, entity_name); 669 if( !mpsinputReadLine(mpsi) || mpsinputField0(mpsi) == NULL || strcmp(mpsinputField0(mpsi), "NAME") ) 826 mpsinputEntryIgnored(scip, mpsi, "row", mpsinputField2(mpsi), "objective function", "N", SCIP_VERBLEVEL_NORMAL); 858 SCIP_CALL( SCIPcreateConsLinear(scip, &cons, mpsinputField2(mpsi), 0, NULL, NULL, 0.0, SCIPinfinity(scip), 866 SCIP_CALL( SCIPcreateConsLinear(scip, &cons, mpsinputField2(mpsi), 0, NULL, NULL, -SCIPinfinity(scip), 0.0, 915 if( mpsinputField1(mpsi) == NULL || mpsinputField2(mpsi) == NULL || mpsinputField3(mpsi) == NULL ) 933 /* for integer variables, default bounds are 0 <= x < 1(not +infinity, like it is for continuous variables), and default cost is 0 */ 940 SCIP_CALL( SCIPcreateVar(scip, &var, colname, 0.0, SCIPinfinity(scip), 0.0, SCIP_VARTYPE_CONTINUOUS, 956 mpsinputEntryIgnored(scip, mpsi, "Column", mpsinputField1(mpsi), "row", mpsinputField2(mpsi), SCIP_VERBLEVEL_FULL); 976 mpsinputEntryIgnored(scip, mpsi, "Column", mpsinputField1(mpsi), "row", mpsinputField4(mpsi), SCIP_VERBLEVEL_FULL); 1031 SCIPwarningMessage(scip, "reading rhs section, a field is missing, assuming that the vector name is the missing one(, row identfier <%s>)\n", mpsinputField2(mpsi)); 1036 if( mpsinputField1(mpsi) == NULL || mpsinputField2(mpsi) == NULL || mpsinputField3(mpsi) == NULL ) 1054 mpsinputEntryIgnored(scip, mpsi, "RHS", mpsinputField1(mpsi), "row", mpsinputField2(mpsi), SCIP_VERBLEVEL_NORMAL); 1083 SCIPdebugMessage("RHS <%s> lhs: %g rhs: %g val: <%22.12g>\n", mpsinputField2(mpsi), lhs, rhs, val); 1097 mpsinputEntryIgnored(scip, mpsi, "RHS", mpsinputField1(mpsi), "row", mpsinputField4(mpsi), SCIP_VERBLEVEL_NORMAL); 1126 SCIPdebugMessage("RHS <%s> lhs: %g rhs: %g val: <%22.12g>\n", mpsinputField4(mpsi), lhs, rhs, val); 1176 SCIPwarningMessage(scip, "reading ranged section, a field is missing, assuming that the vector name is the missing one(, row identfier <%s>)\n", mpsinputField2(mpsi)); 1181 if( mpsinputField1(mpsi) == NULL || mpsinputField2(mpsi) == NULL || mpsinputField3(mpsi) == NULL ) 1200 mpsinputEntryIgnored(scip, mpsi, "Range", mpsinputField1(mpsi), "row", mpsinputField2(mpsi), SCIP_VERBLEVEL_NORMAL); 1236 mpsinputEntryIgnored(scip, mpsi, "Range", mpsinputField1(mpsi), "row", mpsinputField4(mpsi), SCIP_VERBLEVEL_NORMAL); 1328 || !strcmp(mpsinputField1(mpsi), "LI") /* CPLEX extension: lower bound of integer variable given in field 4 */ 1329 || !strcmp(mpsinputField1(mpsi), "UI") /* CPLEX extension: upper bound of integer variable given in field 4 */ 1330 || !strcmp(mpsinputField1(mpsi), "SC") /* CPLEX extension: semi-continuous variable, upper bound given in field 4 */ 1331 || !strcmp(mpsinputField1(mpsi), "SI") )/* CPLEX extension: semi-integer variable, upper bound given in field 4 */ 1347 SCIPwarningMessage(scip, "in bound section a name for value <%s> might be missing\n", mpsinputField3(mpsi)); 1355 SCIPwarningMessage(scip, "in bound section a value for column <%s> is missing, assuming 0.0\n", mpsinputField3(mpsi)); 1381 if( mpsinputField1(mpsi) == NULL || mpsinputField2(mpsi) == NULL || mpsinputField3(mpsi) == NULL ) 1394 /* if variable did not appear in columns section before, then it may still come in later sections (QCMATRIX, QMATRIX, SOS, ...) 1395 * thus add it as continuous variables, which has default bounds 0.0 <= x, and default cost 0.0 */ 1401 SCIP_VARTYPE_CONTINUOUS, !mpsi->dynamiccols, mpsi->dynamiccols, NULL, NULL, NULL, NULL, NULL) ); 1406 /* mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField3(mpsi), "bound", bndname, SCIP_VERBLEVEL_NORMAL); */ 1418 /* if a bound of a binary variable is given, the variable is converted into an integer variable 1435 /* switch variable type to continuous before applying the bound, this is necessary for stupid non-integral 1440 assert(SCIP_VARTYPE_CONTINUOUS >= SCIP_VARTYPE_IMPLINT && SCIP_VARTYPE_IMPLINT >= SCIP_VARTYPE_INTEGER 1450 if( !SCIPisZero(scip, SCIPvarGetLbGlobal(var)) && SCIPisLT(scip, val, SCIPvarGetLbGlobal(var)) ) 1452 SCIPwarningMessage(scip, "Relaxing already defined lower bound %g of variable <%s> to %g not allowed.\n", SCIPvarGetLbGlobal(var), SCIPvarGetName(var), val); 1461 SCIPwarningMessage(scip, "variable <%s> declared as integral has a non-integral lower bound (%.14g) -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), val); 1464 /* don't assert feasibility here because the presolver will and should detect a infeasibility */ 1470 SCIPwarningMessage(scip, "variable <%s> declared as integral has a non-integral lower bound (%.14g) -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), val); 1478 SCIPwarningMessage(scip, "Relaxing already defined upper bound %g of variable <%s> to %g not allowed.\n", SCIPvarGetUbGlobal(var), SCIPvarGetName(var), val); 1486 SCIPwarningMessage(scip, "variable <%s> declared as integral has a non-integral upper bound (%.14g) -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), val); 1490 /* don't assert feasibility here because the presolver will and should detect an infeasibility */ 1496 SCIPwarningMessage(scip, "variable <%s> declared as integral has a non-integral upper bound (%.14g) -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), val); 1501 assert(mpsinputField1(mpsi)[1] == 'C' || mpsinputField1(mpsi)[1] == 'I'); /* semi-continuous or semi-integer (CPLEX extension) */ 1519 if( mpsinputField1(mpsi)[1] == 'I' ) /* variable is semi-integer, hence change its type to integer (the "semi" part will be handled below) */ 1522 /* don't assert feasibility here because the presolver will and should detect an infeasibility */ 1525 /* if both bounds are infinite anyway, we do not need to print a warning or change the bound */ 1530 SCIPwarningMessage(scip, "Relaxing already defined upper bound %g of variable <%s> to %g not allowed.\n", SCIPvarGetUbGlobal(var), SCIPvarGetName(var), val); 1558 /* don't assert feasibility here because the presolver will and should detect a infeasibility */ 1581 mpsinputEntryIgnored(scip, mpsi, "bound", mpsinputField2(mpsi), "variable", mpsinputField3(mpsi), SCIP_VERBLEVEL_NORMAL); 1604 assert(SCIPvarGetType(var) == SCIP_VARTYPE_INTEGER || SCIPvarGetType(var) == SCIP_VARTYPE_CONTINUOUS); 1628 !mpsi->dynamiccols, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, mpsi->dynamicconss, mpsi->dynamiccols, FALSE); 1635 SCIPdebugMessage("add bound disjunction constraint for semi-continuity/-integrality of <%s>:\n\t", SCIPvarGetName(var)); 1654 * @note Currently we do not support the standard way of specifying SOS constraints via markers. 1748 SCIP_CALL( SCIPcreateConsSOS1(scip, &cons, name, 0, NULL, NULL, initial, separate, enforce, check, propagate, 1754 SCIP_CALL( SCIPcreateConsSOS2(scip, &cons, name, 0, NULL, NULL, initial, separate, enforce, check, propagate, 1780 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField1(mpsi), "SOS", name, SCIP_VERBLEVEL_NORMAL); 1836 * - We read the QMATRIX or QUADOBJ section, which is a nonstandard section introduced by CPLEX. 1901 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField1(mpsi), "QMatrix", "QMATRIX", SCIP_VERBLEVEL_NORMAL); 1913 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField2(mpsi), "QMatrix", "QMATRIX", SCIP_VERBLEVEL_NORMAL); 1925 SCIPerrorMessage("coefficient of term <%s>*<%s> not specified.\n", SCIPvarGetName(var1), SCIPvarGetName(var2)); 1949 * in a QMATRIX section also off-diagonal have to be divided by 2.0, since both lower and upper diagonal elements are given 1955 SCIPdebugMessage("stored term %g*<%s>*<%s>.\n", coef, SCIPvarGetName(var1), SCIPvarGetName(var2)); 1964 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField4(mpsi), "QMatrix", "QMATRIX", SCIP_VERBLEVEL_NORMAL); 1981 /* determine settings; note that reading/{initialconss,dynamicconss,dynamicrows,dynamiccols} apply only to model 1982 * constraints and variables, not to an auxiliary objective constraint (otherwise it can happen that an auxiliary 1983 * objective variable is loose with infinite best bound, triggering the problem that an LP that is unbounded 1996 SCIP_CALL( SCIPcreateVar(scip, &qmatrixvar, "qmatrixvar", -SCIPinfinity(scip), SCIPinfinity(scip), 1.0, 2011 retcode = SCIPcreateConsQuadratic(scip, &cons, "qmatrix", 1, &qmatrixvar, &minusone, cnt, quadvars1, quadvars2, quadcoefs, lhs, rhs, 2120 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField1(mpsi), "QCMatrix", SCIPconsGetName(lincons), SCIP_VERBLEVEL_NORMAL); 2129 mpsinputEntryIgnored(scip, mpsi, "column", mpsinputField2(mpsi), "QCMatrix", SCIPconsGetName(lincons), SCIP_VERBLEVEL_NORMAL); 2138 SCIPerrorMessage("coefficient of term <%s>*<%s> not specified.\n", mpsinputField1(mpsi), mpsinputField2(mpsi)); 2160 SCIPdebugMessage("stored term %g*<%s>*<%s>.\n", coef, SCIPvarGetName(var1), SCIPvarGetName(var2)); 2166 SCIPwarningMessage(scip, "ignoring data in fields 4 and 5 <%s> <%s>.\n", mpsinputField4(mpsi), mpsinputField5(mpsi)); 2178 SCIPgetNVarsLinear(scip, lincons), SCIPgetVarsLinear(scip, lincons), SCIPgetValsLinear(scip, lincons), 2179 cnt, quadvars1, quadvars2, quadcoefs, SCIPgetLhsLinear(scip, lincons), SCIPgetRhsLinear(scip, lincons), 2180 SCIPconsIsInitial(lincons), SCIPconsIsSeparated(lincons), SCIPconsIsEnforced(lincons), SCIPconsIsChecked(lincons), 2181 SCIPconsIsPropagated(lincons), SCIPconsIsLocal(lincons), SCIPconsIsModifiable(lincons), SCIPconsIsDynamic(lincons), 2339 SCIPerrorMessage("binary variable <%s> can only take values 0/1 (%s).\n", mpsinputField3(mpsi), mpsinputField4(mpsi)); 2411 SCIP_CALL( SCIPcreateVar(scip, &slackvar, name, 0.0, SCIPinfinity(scip), 0.0, slackvartype, TRUE, FALSE, 2483 SCIP_CALL_TERMINATE( retcode, SCIPcreateProb(scip, mpsi->probname, NULL, NULL, NULL, NULL, NULL, NULL, NULL), TERMINATE ); 2794 SCIP_Real* vals, /**< array of coefficients values (or NULL if all coefficient values are 1) */ 2839 SCIP_CALL( SCIPgetProbvarLinearSum(scip, activevars, activevals, &nactivevars, nactivevars, &activeconstant, &requiredsize, TRUE) ); 2846 SCIP_CALL( SCIPgetProbvarLinearSum(scip, activevars, activevals, &nactivevars, requiredsize, &activeconstant, &requiredsize, TRUE) ); 2881 /** check whether given variables are aggregated and put them into an array without duplication */ 2912 assert( status == SCIP_VARSTATUS_AGGREGATED || status == SCIP_VARSTATUS_MULTAGGR || status == SCIP_VARSTATUS_NEGATED ); 2946 SCIP_HASHMAP** varnameHashmap /**< pointer to hash map storing variable, variable name mapping */ 2961 SCIP_CALL( SCIPhashmapCreate(varnameHashmap, SCIPblkmem(scip), SCIPcalcHashtableSize(5 * nvars)) ); 2996 SCIPwarningMessage(scip, "there are %d variable names which have to be cut down to %d characters; LP might be corrupted\n", 3035 /* in case the transformed problem is written, only constraints are posted which are enabled in the current node */ 3048 SCIPwarningMessage(scip, "At least one name of a constraint is empty, so file will be written with generic names.\n"); 3072 SCIPwarningMessage(scip, "there are %d constraint names which have to be cut down to %d characters; MPS file might be corrupted\n", 3087 SCIP_HASHTABLE* indicatorSlackHash, /**< hashtable containing slack variables from indicators (or NULL) */ 3099 SCIPsortPtrPtrReal((void**) matrix->columns, (void**) matrix->rows, matrix->values, SCIPvarComp, matrix->nentries); 3243 /* in case the transformed problems is written only constraint are posted which are enabled in the current node; 3302 SCIP_HASHTABLE* indicatorSlackHash, /**< hashtable containing slack variables from indicators (or NULL) */ 3565 { 3680 SCIP_CALL( checkConsnames(scip, conss, nconss, transformed, &maxnamelen, &consnames, &error) ); 3686 SCIPwarningMessage(scip, "write transformed problem with generic variable and constraint names\n"); 3691 SCIPwarningMessage(scip, "write original problem with generic variable and constraint names\n"); 3699 /* check if the variable names are not too long and build the "variable" -> "variable name" hash map */ 3709 /* nfixedvars counts all variables with status SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_MULTAGGR, but not SCIP_VARSTATUS_NEGATED */ 3716 SCIP_CALL( SCIPhashtableCreate(&varFixedHash, SCIPblkmem(scip), 5 * nfixedvars, hashGetKeyVar, hashKeyEqVar, hashKeyValVar, NULL) ); 3723 SCIP_CALL( SCIPhashtableCreate(&indicatorSlackHash, SCIPblkmem(scip), 5 * nvars, hashGetKeyVar, hashKeyEqVar, hashKeyValVar, NULL) ); 3744 /* need to check for and-constraints, note that in the original problem you cannot get the number of 3777 SCIPinfoMessage(scip, file, "* Variables : %d (%d binary, %d integer, %d implicit integer, %d continuous)\n", 3800 /* we also want to add integer variables to the columns section, even if the objective value is 0, because it 3801 * might happen that they only exist in non-linear constraints, which leads to no other line in the column section 3804 if( !SCIPisZero(scip, value) || SCIPvarGetType(var) < SCIP_VARTYPE_IMPLINT || ((SCIPvarGetNLocksDown(var) == 0) && (SCIPvarGetNLocksUp(var) == 0)) ) 3806 /* convert maximization problem into minimization since MPS format the objective is to minimize */ 3826 /* in case the transformed problems is written only constraint are posted which are enabled in the current node; 3845 /* there is nothing to do if the left hand side is minus infinity and the right side is infinity */ 3862 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetVarsLinear(scip, cons), SCIPgetValsLinear(scip, cons), 3885 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetVarsSetppc(scip, cons), NULL, SCIPgetNVarsSetppc(scip, cons), transformed, matrix, &rhss[c]) ); 3895 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetVarsLogicor(scip, cons), NULL, SCIPgetNVarsLogicor(scip, cons), transformed, matrix, &rhss[c]) ); 3902 printRowType(scip, file, -SCIPinfinity(scip), (SCIP_Real) SCIPgetCapacityKnapsack(scip, cons), consname); 3915 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetVarsKnapsack(scip, cons), vals, nconsvars, transformed, matrix, &rhss[c]) ); 3924 /* there is nothing to do if the left hand side is minus infinity and the right side is infinity */ 3951 SCIP_CALL( getLinearCoeffs(scip, consname, consvars, vals, 2, transformed, matrix, &rhss[c]) ); 3972 SCIP_CALL( collectAggregatedVars(scip, &slackvar, 1, &aggvars, &naggvars, &saggvars, varFixedHash) ); 3980 SCIP_CALL( collectAggregatedVars(scip, &binvar, 1, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4002 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4009 /* check for aggregated variables in SOS2 constraints for later output aggregations as linear constraints */ 4016 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4029 SCIP_CALL( SCIPallocBufferArray(scip, &quadvarlincoefs, SCIPgetNQuadVarTermsQuadratic(scip, cons)) ); 4039 /* there is nothing to do if the left hand side is minus infinity and the right side is infinity */ 4056 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetLinearVarsQuadratic(scip, cons), SCIPgetCoefsLinearVarsQuadratic(scip, cons), 4060 SCIP_CALL( getLinearCoeffs(scip, consname, quadvars, quadvarlincoefs, SCIPgetNQuadVarTermsQuadratic(scip, cons), 4064 /* check for aggregated variables in quadratic part of quadratic constraints for later output of 4069 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4076 /* SOC constraints are of the form lhsconstant + sum_i (lhscoef_i*(lhsvar_i+lhsoffset_i))^2 <= (rhscoef*(rhsvar+rhsoffset))^2 */ 4101 SCIP_CALL( getLinearCoeffs(scip, consname, SCIPgetLhsVarsSOC(scip, cons), lincoefs, nconsvars, transformed, matrix, &rhs) ); 4105 /* if there is an offsets on rhs, then we have linear a coefficient that need to be processed here */ 4128 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4130 SCIP_CALL( collectAggregatedVars(scip, &var, 1, &aggvars, &naggvars, &saggvars, varFixedHash) ); 4205 SCIP_CALL( getLinearCoeffs(scip, rowname, rowvars, rowvals, 2, transformed, matrix, &rhss[k]) ); 4252 SCIP_CALL( getLinearCoeffs(scip, rowname, rowvars, rowvals, nrowvars + 1, transformed, matrix, &rhss[k]) ); 4266 SCIP_CALL( getLinearCoeffs(scip, consname, rowvars, rowvals, nrowvars + 1, transformed, matrix, &rhss[c]) ); 4277 SCIPwarningMessage(scip, "change parameter \"reading/"READER_NAME"/linearize-and-constraints\" to TRUE to print and-constraints\n"); 4285 SCIPwarningMessage(scip, "constraint handler <%s> cannot print requested format\n", conshdlrname ); 4291 SCIPwarningMessage(scip, "there are %d and-constraint-rownames which have to be cut down to %d characters; MPS file might be corrupted\n", 4307 /* construct variables name of the needed aggregated variables and the constraint names for the aggregation constraints */ 4336 SCIP_CALL( SCIPallocBufferArray(scip, &namestr, MPS_MAX_NAMELEN) ); /* note that namestr above is freed via varnames */ 4346 SCIP_CALL( getLinearCoeffs(scip, namestr, &(aggvars[c]), NULL, 1, transformed, matrix, &rhss[nconss + naddrows + c]) ); 4358 /* @todo only collect fixed variables in the non-linear constraint types, where they (could not be)/(were not) removed */ 4416 printBoundSection(scip, file, vars, nvars, aggvars, naggvars, fixvars, nfixvars, transformed, varnames, indicatorSlackHash, maxnamelen); 4495 * in difference to a quadratic term in the objective function, the quadratic part is not divided by 2 here 4538 /* print bilinear terms; CPLEX format expects a symmetric matrix with all coefficients specified, 4617 (void) SCIPsnprintf(valuestr, MPS_MAX_VALUELEN, "%25.15g", -SCIPgetRhsCoefSOC(scip, cons)*SCIPgetRhsCoefSOC(scip, cons)); 4736 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, readerdata) );
Definition: reader_mps.c:100 static SCIP_RETCODE collectAggregatedVars(SCIP *scip, SCIP_VAR **vars, int nvars, SCIP_VAR ***aggvars, int *naggvars, int *saggvars, SCIP_HASHTABLE *varAggregated) Definition: reader_mps.c:2884 Definition: cons_setppc.h:54 static void mpsinputSetObjsense(MPSINPUT *mpsi, SCIP_OBJSENSE sense) Definition: reader_mps.c:365 SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name) Definition: scip.c:5878 SCIP_BILINTERM * SCIPgetBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13414 int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt) Definition: misc.c:8086 Definition: struct_reader.h:35 SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:19748 static void printRangeSection(SCIP *scip, FILE *file, SCIP_CONS **conss, int nconss, const char **consnames, SCIP_Bool transformed, unsigned int maxnamelen) Definition: reader_mps.c:3213 SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples) Definition: scip.c:17373 Definition: struct_scip.h:53 Constraint handler for variable bound constraints . SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant) Definition: var.c:12033 SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1567 Definition: type_prob.h:38 static SCIP_RETCODE readQMatrix(MPSINPUT *mpsi, SCIP_Bool isQuadObj, SCIP *scip) Definition: reader_mps.c:1846 SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons) Definition: cons_indicator.c:7538 SCIP_QUADVARTERM * SCIPgetQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13353 void SCIPwarningMessage(SCIP *scip, const char *formatstr,...) Definition: scip.c:1248 SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata) Definition: scip.c:15737 static void printBoundSection(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_VAR **aggvars, int naggvars, SCIP_VAR **fixvars, int nfixvars, SCIP_Bool transformed, const char **varnames, SCIP_HASHTABLE *indicatorSlackHash, unsigned int maxnamelen) Definition: reader_mps.c:3292 SCIP_Real * SCIPgetWeightsSOS1(SCIP *scip, SCIP_CONS *cons) Definition: cons_sos1.c:10520 void SCIPsortPtrPtrReal(void **ptrarray1, void **ptrarray2, SCIP_Real *realarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len) static void mpsinputSetObjname(MPSINPUT *mpsi, const char *objname) Definition: reader_mps.c:351 Definition: reader_mps.c:86 Definition: type_result.h:49 static SCIP_RETCODE checkSparseMatrixCapacity(SCIP *scip, SPARSEMATRIX *matrix, int capacity) Definition: reader_mps.c:2758 SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13238 Definition: struct_var.h:196 constraint handler for indicator constraints SCIP_Real * SCIPgetWeightsSOS2(SCIP *scip, SCIP_CONS *cons) Definition: cons_sos2.c:2470 static void printColumnSection(SCIP *scip, FILE *file, SPARSEMATRIX *matrix, SCIP_HASHMAP *varnameHashmap, SCIP_HASHTABLE *indicatorSlackHash, unsigned int maxnamelen) Definition: reader_mps.c:3083 SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons) Definition: cons_indicator.c:7447 Definition: cons_quadratic.h:75 SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize) Definition: misc.c:2057 SCIP_VAR ** SCIPgetVarsSOS1(SCIP *scip, SCIP_CONS *cons) Definition: cons_sos1.c:10495 SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4633 Definition: reader_mps.c:98 int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16768 static void mpsinputEntryIgnored(SCIP *scip, MPSINPUT *mpsi, const char *what, const char *what_name, const char *entity, const char *entity_name, SCIP_VERBLEVEL verblevel) Definition: reader_mps.c:389 Definition: type_var.h:53 SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13333 static void mpsinputInsertName(MPSINPUT *mpsi, const char *name, SCIP_Bool second) Definition: reader_mps.c:636 SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj) Definition: scip.c:19590 Definition: cons_setppc.h:55 static void mpsinputInsertField4(MPSINPUT *mpsi, const char *str) Definition: reader_mps.c:622 SCIP_RETCODE SCIPcreateConsIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_indicator.c:6948 SCIP_Real * SCIPgetLhsCoefsSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5266 Constraint handler for "and" constraints, . void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin) Definition: misc.c:2116 Definition: reader_mps.c:92 Definition: type_retcode.h:38 Definition: type_message.h:46 constraint handler for second order cone constraints Constraint handler for the set partitioning / packing / covering constraints . SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13312 SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree))) Definition: scip.c:4625 Definition: reader_mps.c:99 SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval) Definition: scip.c:10062 SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr) Definition: misc.c:1480 SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3547 SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin) Definition: misc.c:2159 SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy))) Definition: scip.c:4601 SCIP_RETCODE SCIPcreateConsQuadratic(SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable) Definition: cons_quadratic.c:12715 SCIP_Real SCIPgetRhsCoefSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5318 Definition: struct_misc.h:101 Constraint handler for knapsack constraints of the form , x binary and . SCIP_VAR ** SCIPgetLhsVarsSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5253 Definition: reader_mps.c:85 static void printEntry(SCIP *scip, FILE *file, const char *varname, const char *consname, SCIP_Real value, int *recordcnt, unsigned int maxnamelen) Definition: reader_mps.c:2663 Definition: reader_mps.c:90 static const char * mpsinputObjname(const MPSINPUT *mpsi) Definition: reader_mps.c:281 int SCIPgetNLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13298 Definition: type_retcode.h:36 Definition: struct_cons.h:36 int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons) Definition: cons_logicor.c:5228 static SCIP_Bool mpsinputIsInteger(const MPSINPUT *mpsi) Definition: reader_mps.c:314 static SCIP_OBJSENSE mpsinputObjsense(const MPSINPUT *mpsi) Definition: reader_mps.c:292 Definition: struct_cons.h:116 Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo... Definition: type_lp.h:47 SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons) Definition: cons_setppc.c:9107 SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar) Definition: scip.c:17163 SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41907 constraint handler for quadratic constraints SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16705 #define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum) Definition: scip.h:20562 Definition: type_var.h:44 SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons) Definition: cons_and.c:5100 SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata) Definition: scip.c:9019 Definition: cons_setppc.h:53 Definition: type_retcode.h:33 Definition: reader_mps.c:91 SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4654 SCIP_VAR ** SCIPgetLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13312 SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4717 SCIP_Real SCIPgetRhsOffsetSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5331 SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread))) Definition: scip.c:4649 SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_bounddisjunction.c:3036 SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible) Definition: scip.c:22681 Definition: type_message.h:44 public data structures and miscellaneous methods SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:19828 SCIP_Real SCIPgetLhsConstantSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5292 Definition: type_var.h:55 Definition: reader_mps.c:89 static void printRecord(SCIP *scip, FILE *file, const char *col1, const char *col2, unsigned int maxnamelen) Definition: reader_mps.c:2603 SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata) Definition: scip.c:4563 SCIP_RETCODE SCIPaddVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight) Definition: cons_sos2.c:2369 Definition: type_var.h:54 Definition: type_var.h:46 Definition: cons_quadratic.h:92 SCIP_Real * SCIPgetCoefsLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13326 int SCIPgetNQuadVarTermsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13339 SCIP_RETCODE SCIPcreateConsSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_sos2.c:2270 Definition: type_var.h:45 static void printRowType(SCIP *scip, FILE *file, SCIP_Real lhs, SCIP_Real rhs, const char *name) Definition: reader_mps.c:2701 SCIP_RETCODE SCIPcreateConsSOS1(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_sos1.c:10266 SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames) Definition: scip.c:39265 SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4696 Definition: reader_mps.c:88 static SCIP_RETCODE readIndicators(MPSINPUT *mpsi, SCIP *scip) Definition: reader_mps.c:2223 Constraint handler for linear constraints in their most general form, . SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons) Definition: cons_indicator.c:7359 void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...) Definition: scip.c:1298 SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) Definition: cons_linear.c:16436 static unsigned int computeFieldWidth(unsigned int width) Definition: reader_mps.c:2592 static void mpsinputSetSection(MPSINPUT *mpsi, MPSSECTION section) Definition: reader_mps.c:325 Definition: reader_mps.c:94 Definition: struct_misc.h:80 SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) Definition: cons_linear.c:16729 static void mpsinputSetProbname(MPSINPUT *mpsi, const char *probname) Definition: reader_mps.c:337 SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense) Definition: scip.c:10014 SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite))) Definition: scip.c:4673 void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...) Definition: scip.c:1281 static SCIP_RETCODE checkVarnames(SCIP *scip, SCIP_VAR **vars, int nvars, unsigned int *maxnamelen, const char ***varnames, SCIP_HASHMAP **varnameHashmap) Definition: reader_mps.c:2941 SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons) Definition: cons_logicor.c:5249 Definition: type_lp.h:48 int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13291 int SCIPgetNBilinTermsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13400 SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_linear.c:16099 #define SCIPduplicateBufferArray(scip, ptr, source, num) Definition: scip.h:20593 static SCIP_RETCODE mpsinputCreate(SCIP *scip, MPSINPUT **mpsi, SCIP_FILE *fp) Definition: reader_mps.c:143 Definition: reader_mps.c:97 SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) Definition: cons_linear.c:16750 constraint handler for SOS type 1 constraints static SCIP_RETCODE initializeMatrix(SCIP *scip, SPARSEMATRIX **matrix, int slots) Definition: reader_mps.c:2740 SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16681 Definition: type_retcode.h:45 static void printBoundSectionName(SCIP *scip, FILE *file) Definition: reader_mps.c:3281 SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1692 Definition: reader_mps.c:95 static SCIP_RETCODE checkConsnames(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool transformed, unsigned int *maxnamelen, const char ***consnames, SCIP_Bool *error) Definition: reader_mps.c:3005 constraint handler for SOS type 2 constraints Definition: reader_mps.c:93 SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons) Definition: cons_setppc.c:9128 SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16792 static void printRhsSection(SCIP *scip, FILE *file, int nconss, const char **consnames, SCIP_Real *rhss, unsigned int maxnamelen) Definition: reader_mps.c:3175 SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image) Definition: misc.c:2094 SCIP_Real SCIPgetLhsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13426 Definition: type_prob.h:39 Definition: type_retcode.h:43 constraint handler for bound disjunction constraints static void printStart(SCIP *scip, FILE *file, const char *col1, const char *col2, int maxnamelen) Definition: reader_mps.c:2629 SCIP_RETCODE SCIPaddVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight) Definition: cons_sos1.c:10403 Definition: objbranchrule.h:33 SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4675 Definition: reader_mps.c:96 Definition: reader_mps.c:87 Definition: type_var.h:43 SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value) Definition: scip.c:3740 SCIP_Real SCIPgetRhsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13438 SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16816 static SCIP_RETCODE getLinearCoeffs(SCIP *scip, const char *consname, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool transformed, SPARSEMATRIX *matrix, SCIP_Real *rhs) Definition: reader_mps.c:2791 SCIP_RETCODE SCIPprintTransProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames) Definition: scip.c:39309 SCIP_RETCODE SCIPcreateConsIndicatorLinCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *lincons, SCIP_VAR *slackvar, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode) Definition: cons_indicator.c:7171 (extended) MPS file reader SCIP_Real * SCIPgetLhsOffsetsSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5279 static SCIP_RETCODE readQCMatrix(MPSINPUT *mpsi, SCIP *scip) Definition: reader_mps.c:2048 Definition: type_var.h:56 |