reader_lp.c
Go to the documentation of this file.
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 58 #define DEFAULT_LINEARIZE_ANDS TRUE /**< Should possible \"and\"-constraints be linearized when writing the lp file? */ 59 #define DEFAULT_AGGRLINEARIZATION_ANDS TRUE /**< Should an aggregated linearization for and constraints be used? */ 85 LP_START, LP_OBJECTIVE, LP_CONSTRAINTS, LP_BOUNDS, LP_GENERALS, LP_BINARIES, LP_SEMICONTINUOUS, LP_SOS, LP_END 116 SCIP_Bool inlazyconstraints; /**< whether we are currently reading the section for lazy constraints */ 147 SCIPerrorMessage("Syntax error in line %d ('%s'): %s \n", lpinput->linenumber, lpinput->token, msg); 233 else if( (*exptype == LP_EXP_NONE) && !(*hasdot) && (c == '.') && ( isdigit((unsigned char)nextc) || isspace((unsigned char)nextc) || nextc == 'e' || nextc == 'E') ) 234 { /* note: we allow for numbers like "24311." for which the next character should be a space or exponent sign */ 273 /* if we previously detected a comment we have to parse the remaining line away if there is something left */ 314 SCIPwarningMessage(scip, "we read %d characters from the file; this might indicate a corrupted input file!", 331 lpinput->linebuf[LP_MAX_LINELEN-1] = '\0'; /* we want to use lookahead of one char -> we need two \0 at the end */ 343 *(commentstart+1) = '\0'; /* we want to use lookahead of one char -> we need two \0 at the end */ 367 /** reads the next token from the input file into the token buffer; returns whether a token was read */ 446 * if the token is an equality token '=' and the next character is a '<' or '>', replace the token by the inequality sense 453 && (lpinput->token[tokenlen-1] == '<' || lpinput->token[tokenlen-1] == '>' || lpinput->token[tokenlen-1] == '=') 458 else if( lpinput->token[tokenlen-1] == '=' && (buf[lpinput->linepos] == '<' || buf[lpinput->linepos] == '>') ) 472 /** puts the current token on the token stack, such that it is read at the next call to getNextToken() */ 485 /** puts the buffered token on the token stack, such that it is read at the next call to getNextToken() */ 509 /** checks whether the current token is a section identifier, and if yes, switches to the corresponding section */ 834 SCIP_CALL( SCIPcreateVar(scip, &newvar, name, 0.0, SCIPinfinity(scip), 0.0, SCIP_VARTYPE_CONTINUOUS, 839 /* because the variable was added to the problem, it is captured by SCIP and we can safely release it right now 879 SCIP_Bool isobjective, /**< indicates whether we are currently reading the coefficients of the objective */ 883 SCIP_Real** coefs, /**< pointer to store the array with coefficients (must be freed by caller) */ 885 SCIP_VAR*** quadvars1, /**< pointer to store the array with first variables in quadratic terms (must be freed by caller) */ 886 SCIP_VAR*** quadvars2, /**< pointer to store the array with second variables in quadratic terms (must be freed by caller) */ 887 SCIP_Real** quadcoefs, /**< pointer to store the array with coefficients in quadratic terms (must be freed by caller) */ 949 /* the second token was no colon: push the tokens back onto the token stack and parse them as coefficients */ 956 /* there was only one token left: push it back onto the token stack and parse it as coefficient */ 994 SCIPdebugMessage("(line %d) read coefficient value: %g with sign %+d\n", lpinput->linenumber, coef, coefsign); 1018 /* check if we reached a new section, that will be only allowed when having no current sign and value and if we 1025 SCIPwarningMessage(scip, "skipped single sign %c without value or variable in objective\n", coefsign == 1 ? '+' : '-'); 1089 syntaxError(scip, lpinput, "expected '/2' or '/ 2' after end of quadratic part in objective."); 1094 SCIPdebugMessage("(line %d) saw '/2' or '/ 2' after quadratic part in objective\n", lpinput->linenumber); 1101 syntaxError(scip, lpinput, "expected '/2' or '/ 2' after end of quadratic part in objective."); 1104 SCIPdebugMessage("(line %d) saw '/ 2' after quadratic part in objective\n", lpinput->linenumber); 1108 syntaxError(scip, lpinput, "expected '/2' or '/ 2' after end of quadratic part in objective."); 1170 SCIPdebugMessage("(line %d) read linear coefficient: %+g<%s>\n", lpinput->linenumber, coefsign * coef, SCIPvarGetName(var)); 1199 SCIPdebugMessage("(line %d) read quadratic coefficient: %+g<%s><%s>\n", lpinput->linenumber, (isobjective ? 0.5 : 1) * coefsign * coef, SCIPvarGetName(firstquadvar), SCIPvarGetName(var)); 1254 SCIP_CALL( readCoefficients(scip, lpinput, TRUE, name, &vars, &coefs, &ncoefs, &quadvars1, &quadvars2, &quadcoefs, &nquadcoefs, &newsection) ); 1266 * reading/{initialconss,dynamicconss,dynamicrows,dynamiccols} apply only to model constraints and variables, not 1267 * to an auxiliary objective constraint (otherwise it can happen that an auxiliary objective variable is loose 1268 * with infinite best bound, triggering the problem that an LP that is unbounded because of loose variables with 1279 SCIP_CALL( SCIPcreateVar(scip, &quadobjvar, "quadobjvar", -SCIPinfinity(scip), SCIPinfinity(scip), 1.0, 1295 SCIP_CALL( SCIPcreateConsQuadratic(scip, &quadobjcons, "quadobj", 1, &quadobjvar, &minusone, nquadcoefs, quadvars1, quadvars2, quadcoefs, lhs, rhs, 1299 SCIPdebugMessage("(line %d) added constraint <%s> to represent quadratic objective: ", lpinput->linenumber, SCIPconsGetName(quadobjcons)); 1370 /* At this point we force the variable binvar to be binary, since we need the negated variable. We have to check 1373 /* check whether bounds are correct - might already been set if variable is used in another indicator constraint */ 1379 /* don't assert feasibility here because the presolver will and should detect a infeasibility */ 1387 SCIP_CALL( readCoefficients(scip, lpinput, FALSE, name2, &linvars, &lincoefs, &nlincoefs, &quadvars1, &quadvars2, &quadcoefs, &nquadcoefs, &newsection) ); 1397 /* @todo could introduce auxiliary variable and move quadratic part into quadratic constraint? */ 1470 retcode = SCIPcreateConsIndicator(scip, &cons, name, binvar, nlincoefs, linvars, lincoefs, linrhs, 1492 retcode = SCIPcreateConsIndicator(scip, &cons, newname, binvar, nlincoefs, linvars, lincoefs, linrhs, 1566 SCIP_CALL( readCoefficients(scip, lpinput, FALSE, name, &vars, &coefs, &ncoefs, &quadvars1, &quadvars2, &quadcoefs, &nquadcoefs, &newsection) ); 1653 "SCIP does not support equivalence (<->) indicator constraints; consider using the \"->\" form."); 1737 syntaxError(scip, lpinput, "There cannot be a coefficient before the binary indicator variable."); 1920 /* change the bounds of the variable if bounds have been given (do not destroy earlier specification of bounds) */ 1926 SCIPdebugMessage("(line %d) new bounds: <%s>[%g,%g]\n", lpinput->linenumber, SCIPvarGetName(var), 1967 SCIPwarningMessage(scip, "variable <%s> declared as integer has non-integral bounds[%.14g, %.14g] -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), lb, ub); 1972 /* don't assert feasibility here because the presolver will and should detect a infeasibility */ 2013 SCIPwarningMessage(scip, "variable <%s> declared as binary has non-binary bounds[%.14g, %.14g] -> if feasible, bounds will be adjusted\n", SCIPvarGetName(var), lb, ub); 2026 /* don't assert feasibility here because the presolver will and should detect a infeasibility */ 2090 SCIPdebugMessage("ignore semi-continuity of variable <%s> with negative lower bound %g\n", SCIPvarGetName(var), SCIPvarGetLbGlobal(var)); 2110 !(lpinput->dynamiccols), TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, lpinput->dynamicconss, lpinput->dynamiccols, FALSE) ); 2113 SCIPdebugMessage("add bound disjunction constraint for semi-continuity of <%s>:\n\t", SCIPvarGetName(var)); 2182 /* the second token was no colon: push the tokens back onto the token stack and parse it next */ 2217 SCIP_CALL( SCIPcreateConsSOS1(scip, &cons, name, 0, NULL, NULL, initial, separate, enforce, check, propagate, 2223 SCIP_CALL( SCIPcreateConsSOS2(scip, &cons, name, 0, NULL, NULL, initial, separate, enforce, check, propagate, 2321 SCIPdebugMessage("(line %d) added constraint <%s>: ", lpinput->linenumber, SCIPconsGetName(cons)); 2331 * @todo check whether variables forced to be binary for the creation of indicator constraints are 2440 * 2) avoid variable name starting with an 'e' or 'E' since this notation is reserved for exponential entries 2470 /** transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant */ 2475 SCIP_Real** scalars, /**< pointer to scalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c */ 2494 SCIP_CALL( SCIPgetProbvarLinearSum(scip, *vars, *scalars, nvars, *nvars, constant, &requiredsize, TRUE) ); 2501 SCIP_CALL( SCIPgetProbvarLinearSum(scip, *vars, *scalars, nvars, requiredsize, constant, &requiredsize, TRUE) ); 2575 SCIPdebugMessage("linebuffer <%s>, length = %lu\n", linebuffer, (unsigned long)strlen(linebuffer)); 2679 (void) SCIPsnprintf(buffer, LP_MAX_PRINTLEN, " %+.15g %s^2", quadvarterms[v].sqrcoef, varname); 2693 (void) SCIPsnprintf(buffer, LP_MAX_PRINTLEN, " %+.15g %s * %s", bilinterms[v].coef, varname, varname2); 2724 SCIP_Real* linvals, /**< array of linear coefficients values (or NULL if all linear coefficient values are 1) */ 2772 SCIP_CALL( getActiveVariables(scip, &activevars, &activevals, &nactivevars, &activeconstant, transformed) ); 3112 /** check whether given variables are aggregated and put them into an array without duplication */ 3143 assert( status == SCIP_VARSTATUS_AGGREGATED || status == SCIP_VARSTATUS_MULTAGGR || status == SCIP_VARSTATUS_NEGATED ); 3203 SCIP_CALL( getActiveVariables(scip, &activevars, &activevals, &nactivevars, &activeconstant, transformed) ); 3211 printRow(scip, file, consname, "", "=", activevars, activevals, nactivevars, NULL, 0, NULL, 0, - activeconstant); 3242 SCIPwarningMessage(scip, "there is a variable name which has to be cut down to %d characters; LP might be corrupted\n", 3286 /* in case the transformed is written only constraints are posted which are enabled in the current node */ 3302 if( (SCIPisEQ(scip, lhs, rhs) && len > LP_MAX_NAMELEN) || ( !SCIPisEQ(scip, lhs, rhs) && len > LP_MAX_NAMELEN - 4) ) 3304 SCIPwarningMessage(scip, "there is a constraint name which has to be cut down to %d characters;\n", LP_MAX_NAMELEN - 1); 3310 SCIPwarningMessage(scip, "there is a constraint name which has to be cut down to %d characters;\n", LP_MAX_NAMELEN - 1); 3398 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, readerdata) ); 3424 const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */ 3443 SCIP_CALL( SCIPallocMemoryArray(scip, &(lpinput.pushedtokens[i]), LP_MAX_LINELEN) ); /*lint !e866 !e506*/ 3502 SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */ 3623 SCIPinfoMessage(scip, file, "\\ Variables : %d (%d binary, %d integer, %d implicit integer, %d continuous)\n", 3630 SCIPinfoMessage(scip, file, "%s\n", objsense == SCIP_OBJSENSE_MINIMIZE ? "Minimize" : "Maximize"); 3640 /* in case the original problem has to be written, the variables have to be either "original" or "negated" */ 3642 assert( SCIPvarGetStatus(var) == SCIP_VARSTATUS_ORIGINAL || SCIPvarGetStatus(var) == SCIP_VARSTATUS_NEGATED ); 3690 /* in case the transformed is written only constraints are posted which are enabled in the current node */ 3754 NULL, 0, NULL, 0, -SCIPinfinity(scip), (SCIP_Real) SCIPgetCapacityKnapsack(scip, cons), transformed) ); 3843 assert( nlinvars == 0 || cnt == nlinvars-1 || SCIPisFeasEQ(scip, SCIPvarGetLbGlobal(slackvar), SCIPvarGetUbGlobal(slackvar)) ); 3880 SCIPwarningMessage(scip, "change parameter \"reading/"READER_NAME"/linearize-and-constraints\" to TRUE to print and-constraints\n"); 3888 SCIPwarningMessage(scip, "constraint handler <%s> cannot print requested format\n", conshdlrname ); 3900 SCIP_CALL( SCIPhashtableCreate(&varAggregated, SCIPblkmem(scip), 10 * saggvars, hashGetKeyVar, hashKeyEqVar, hashKeyValVar, NULL) ); 3902 /* check for aggregated variables in SOS1 constraints and output aggregations as linear constraints */ 3909 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varAggregated) ); 3912 /* check for aggregated variables in SOS2 constraints and output aggregations as linear constraints */ 3919 SCIP_CALL( collectAggregatedVars(scip, consvars, nconsvars, &aggvars, &naggvars, &saggvars, varAggregated) ); 3922 /* check for aggregated variables in quadratic parts of quadratic constraints and output aggregations as linear constraints */ 3928 SCIP_CALL( collectAggregatedVars(scip, &SCIPgetQuadVarTermsQuadratic(scip, cons)[v].var, 1, &aggvars, &naggvars, &saggvars, varAggregated) ); 3932 /* check for aggregated variables in second order cone constraints and output aggregations as linear constraints */ 3937 SCIP_CALL( collectAggregatedVars(scip, SCIPgetLhsVarsSOC(scip, cons), SCIPgetNLhsVarsSOC(scip, cons), &aggvars, &naggvars, &saggvars, varAggregated) ); 3939 SCIP_CALL( collectAggregatedVars(scip, &var, 1, &aggvars, &naggvars, &saggvars, varAggregated) ); 3942 /* check for aggregated variables in indicator constraints and output aggregations as linear constraints */ 3952 SCIP_CALL( collectAggregatedVars(scip, &binvar, 1, &aggvars, &naggvars, &saggvars, varAggregated) ); 3969 /* in case the transformed is written only local bounds are posted which are valid in the current node */
static void syntaxError(SCIP *scip, LPINPUT *lpinput, const char *msg) Definition: reader_lp.c:137 Definition: cons_setppc.h:54 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 static void checkConsnames(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool transformed) Definition: reader_lp.c:3260 Definition: struct_reader.h:35 SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:19748 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 SCIP_RETCODE SCIPreadLp(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result) Definition: reader_lp.c:3421 static SCIP_RETCODE printAndCons(SCIP *scip, FILE *file, const char *consname, SCIP_CONS *cons, SCIP_Bool aggrlinearizationands, SCIP_Bool transformed) Definition: reader_lp.c:3027 Definition: type_var.h:40 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 SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons) Definition: cons_indicator.c:7538 static SCIP_RETCODE readCoefficients(SCIP *scip, LPINPUT *lpinput, SCIP_Bool isobjective, char *name, SCIP_VAR ***vars, SCIP_Real **coefs, int *ncoefs, SCIP_VAR ***quadvars1, SCIP_VAR ***quadvars2, SCIP_Real **quadcoefs, int *nquadcoefs, SCIP_Bool *newsection) Definition: reader_lp.c:876 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 SCIP_Real * SCIPgetWeightsSOS1(SCIP *scip, SCIP_CONS *cons) Definition: cons_sos1.c:10520 Definition: type_result.h:49 SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr) Definition: cons.c:4258 Definition: reader_lp.c:97 SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13238 Definition: struct_var.h:196 static SCIP_RETCODE readSemicontinuous(SCIP *scip, LPINPUT *lpinput) Definition: reader_lp.c:2034 constraint handler for indicator constraints SCIP_Real * SCIPgetWeightsSOS2(SCIP *scip, SCIP_CONS *cons) Definition: cons_sos2.c:2470 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 int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16768 Definition: type_var.h:53 SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons) Definition: cons_knapsack.c:13333 static SCIP_RETCODE collectAggregatedVars(SCIP *scip, SCIP_VAR **vars, int nvars, SCIP_VAR ***aggvars, int *naggvars, int *saggvars, SCIP_HASHTABLE *varAggregated) Definition: reader_lp.c:3114 SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj) Definition: scip.c:19590 Definition: cons_setppc.h:55 Definition: reader_lp.c:85 static SCIP_RETCODE readObjective(SCIP *scip, LPINPUT *lpinput) Definition: reader_lp.c:1236 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, . Definition: type_retcode.h:38 constraint handler for second order cone constraints SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file) Definition: scip.c:26237 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 static SCIP_RETCODE getVariable(SCIP *scip, char *name, SCIP_VAR **var, SCIP_Bool *created) Definition: reader_lp.c:810 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 Definition: reader_lp.c:85 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 static SCIP_Bool isValueChar(char c, char nextc, SCIP_Bool firstchar, SCIP_Bool *hasdot, LPEXPTYPE *exptype) Definition: reader_lp.c:220 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: reader_lp.c:97 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 static SCIP_RETCODE readGenerals(SCIP *scip, LPINPUT *lpinput) Definition: reader_lp.c:1935 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 void printSosCons(SCIP *scip, FILE *file, const char *rowname, SCIP_VAR **vars, SCIP_Real *weights, int nvars, int type) Definition: reader_lp.c:2818 Definition: struct_cons.h:116 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) Definition: reader_lp.c:3493 Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo... Definition: reader_lp.c:97 Definition: type_lp.h:47 static void appendLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension) Definition: reader_lp.c:2553 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 Definition: reader_lp.c:85 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 Definition: reader_lp.c:91 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 SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4654 Definition: reader_lp.c:85 static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed) Definition: reader_lp.c:2472 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 static SCIP_RETCODE printQuadraticCons(SCIP *scip, FILE *file, const char *rowname, SCIP_VAR **linvars, SCIP_Real *linvals, int nlinvars, SCIP_QUADVARTERM *quadvarterms, int nquadvarterms, SCIP_BILINTERM *bilinterms, int nbilinterms, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed) Definition: reader_lp.c:2719 Definition: reader_lp.c:85 static SCIP_RETCODE readConstraints(SCIP *scip, LPINPUT *lpinput) Definition: reader_lp.c:1529 SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible) Definition: scip.c:22681 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: reader_lp.c:85 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_message.h:43 Definition: type_var.h:46 static void checkVarnames(SCIP *scip, SCIP_VAR **vars, int nvars) Definition: reader_lp.c:3223 static void printRow(SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, SCIP_VAR **linvars, SCIP_Real *linvals, int nlinvars, SCIP_QUADVARTERM *quadvarterms, int nquadvarterms, SCIP_BILINTERM *bilinterms, int nbilinterms, SCIP_Real rhs) Definition: reader_lp.c:2584 Definition: reader_lp.c:91 Definition: cons_quadratic.h:92 SCIP_Real * SCIPgetCoefsLinearVarsQuadratic(SCIP *scip, SCIP_CONS *cons) Definition: cons_quadratic.c:13326 Definition: reader_lp.c:91 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 SCIP_RETCODE readBinaries(SCIP *scip, LPINPUT *lpinput) Definition: reader_lp.c:1980 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_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons) Definition: cons_varbound.c:4696 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 static SCIP_RETCODE createIndicatorConstraint(SCIP *scip, LPINPUT *lpinput, const char *name, SCIP_VAR *binvar, SCIP_Real binvalue) Definition: reader_lp.c:1319 Definition: reader_lp.c:85 Definition: struct_misc.h:80 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 LP file reader. void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...) Definition: scip.c:1281 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 static SCIP_RETCODE printAggregatedCons(SCIP *scip, FILE *file, SCIP_Bool transformed, int nvars, int nAggregatedVars, SCIP_VAR **aggregatedVars) Definition: reader_lp.c:3170 static SCIP_RETCODE readLPFile(SCIP *scip, LPINPUT *lpinput, const char *filename) Definition: reader_lp.c:2335 #define SCIPduplicateBufferArray(scip, ptr, source, num) Definition: scip.h:20593 SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image) Definition: misc.c:2137 constraint handler for SOS type 1 constraints static void endLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt) Definition: reader_lp.c:2531 static SCIP_RETCODE printSOCCons(SCIP *scip, FILE *file, const char *rowname, SCIP_CONS *cons) Definition: reader_lp.c:2877 Definition: reader_lp.c:97 SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons) Definition: cons_linear.c:16681 Definition: type_retcode.h:45 SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1692 static SCIP_Bool isValue(SCIP *scip, LPINPUT *lpinput, SCIP_Real *value) Definition: reader_lp.c:747 constraint handler for SOS type 2 constraints 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 Definition: reader_lp.c:85 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 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_lp.c:85 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 SCIP_Real * SCIPgetLhsOffsetsSOC(SCIP *scip, SCIP_CONS *cons) Definition: cons_soc.c:5279 Definition: type_var.h:56 |