71#if !defined(_WIN32) && !defined(_WIN64)
76#define READER_NAME "lpreader"
77#define READER_DESC "file reader for MIPs in IBM CPLEX's LP file format"
78#define READER_EXTENSION "lp"
80#define DEFAULT_LINEARIZE_ANDS TRUE
81#define DEFAULT_AGGRLINEARIZATION_ANDS TRUE
87#define LP_MAX_LINELEN 65536
88#define LP_MAX_PUSHEDTOKENS 2
89#define LP_INIT_COEFSSIZE 8192
90#define LP_INIT_QUADCOEFSSIZE 16
91#define LP_MAX_PRINTLEN 561
92#define LP_MAX_NAMELEN 256
93#define LP_PRINTLEN 100
99 SCIP_Bool linearizeands;
100 SCIP_Bool aggrlinearizationands;
139 SCIP_Bool inlazyconstraints;
140 SCIP_Bool inusercuts;
141 SCIP_Bool initialconss;
142 SCIP_Bool dynamicconss;
143 SCIP_Bool dynamiccols;
144 SCIP_Bool dynamicrows;
371 if(
lpinput->npushedtokens > 0 )
384 if( buf[
lpinput->linepos] ==
'\0' )
444 && buf[
lpinput->linepos] ==
'=' )
533 if( len > 1 && (len < 9 || len == 15) )
546 if( (len == 3 &&
strcmp(token,
"MIN") == 0)
547 || (len == 7 &&
strcmp(token,
"MINIMUM") == 0)
548 || (len == 8 &&
strcmp(token,
"MINIMIZE") == 0) )
556 if( (len == 3 &&
strcmp(token,
"MAX") == 0)
557 || (len == 7 &&
strcmp(token,
"MAXIMUM") == 0)
558 || (len == 8 &&
strcmp(token,
"MAXIMIZE") == 0) )
566 if( len == 7 &&
strcmp(token,
"SUBJECT") == 0 )
586 if( len == 4 &&
strcmp(token,
"SUCH") == 0 )
606 if( (len == 2 &&
strcmp(token,
"ST") == 0)
607 || (len == 3 &&
strcmp(token,
"ST.") == 0)
608 || (len == 4 &&
strcmp(token,
"S.T.") == 0) )
617 if( len == 4 &&
strcmp(token,
"LAZY") == 0 )
637 if( len == 4 &&
strcmp(token,
"USER") == 0 )
657 if( (len == 5 &&
strcmp(token,
"BOUND") == 0)
658 || (len == 6 &&
strcmp(token,
"BOUNDS") == 0) )
665 if( (len == 3 && (
strcmp(token,
"GEN") == 0 ||
strcmp(token,
"INT") == 0))
666 || (len == 7 && (
strcmp(token,
"GENERAL") == 0 ||
strcmp(token,
"INTEGER") == 0))
667 || (len == 8 && (
strcmp(token,
"GENERALS") == 0 ||
strcmp(token,
"INTEGERS") == 0)) )
674 if( (len == 3 &&
strcmp(token,
"BIN") == 0)
675 || (len == 6 &&
strcmp(token,
"BINARY") == 0)
676 || (len == 8 &&
strcmp(token,
"BINARIES") == 0) )
683 if( (len == 4 &&
strcmp(token,
"SEMI") == 0)
684 || (len == 5 &&
strcmp(token,
"SEMIS") == 0)
685 || (len == 15 &&
strcmp(token,
"SEMI-CONTINUOUS") == 0) )
692 if( len == 3 &&
strcmp(token,
"SOS") == 0 )
699 if( len == 3 &&
strcmp(token,
"END") == 0 )
721 if(
lpinput->token[1] ==
'\0' )
725 else if( *
lpinput->token ==
'-' )
814 SCIP_Bool dynamiccols;
819 initial = !dynamiccols;
820 removable = dynamiccols;
834 if( created !=
NULL )
837 else if( created !=
NULL )
881 SCIP_Real* objoffset,
1142 else if( *
lpinput->token ==
'/' )
1221 if( *ncoefs >= *coefssize )
1226 *coefssize =
MAX(*coefssize, (*ncoefs)+1);
1230 assert(*ncoefs < *coefssize);
1233 (*vars)[*ncoefs] =
var;
1234 (*coefs)[*ncoefs] =
coefsign * coef;
1299 SCIP_Real objoffset;
1321 for(
i = 0;
i < ncoefs; ++
i )
1358 SCIP_CALL(
SCIPcreateConsQuadraticNonlinear(
scip, &
quadobjcons,
"quadobj", 1, &
quadobjvar, &
minusone,
nquadcoefs,
quadvars1,
quadvars2,
quadcoefs, lhs, rhs,
1392 SCIP_Real* lincoefs;
1410 SCIP_Bool removable;
1433 SCIP_Bool infeasible;
1468 if(
name2[0] !=
'\0' )
1536 enforce = !
lpinput->inusercuts;
1540 dynamic =
lpinput->dynamicconss;
1544 initial, separate, enforce, check,
propagate, local, dynamic, removable,
FALSE);
1551 lpinput->inlazyconstraints ?
" (lazy)" : (
lpinput->inusercuts ?
" (user cut)" :
""));
1566 initial, separate, enforce, check,
propagate, local, dynamic, removable,
FALSE);
1573 lpinput->inlazyconstraints ?
" (lazy)" : (
lpinput->inusercuts ?
" (user cut)" :
""));
1626 SCIP_Bool modifiable;
1628 SCIP_Bool removable;
1717 int linepos =
lpinput->linepos-1;
1734 "SCIP does not support equivalence (<->) indicator constraints; consider using the \"->\" form.");
1776 enforce = !
lpinput->inusercuts;
1781 dynamic =
lpinput->dynamicconss;
1786 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable,
FALSE);
1792 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable);
1800 lpinput->inlazyconstraints ?
" (lazy)" : (
lpinput->inusercuts ?
" (user cut)" :
""));
2026 SCIP_Bool infeasible;
2071 SCIP_Bool infeasible;
2125 SCIP_Real bounds[2];
2215 SCIP_Bool initial, separate, enforce, check,
propagate;
2216 SCIP_Bool local, dynamic, removable;
2223 initial =
lpinput->initialconss;
2229 dynamic =
lpinput->dynamicconss;
2230 removable =
lpinput->dynamicrows;
2294 SCIP_CALL(
SCIPcreateConsSOS1(
scip, &cons, name, 0,
NULL,
NULL, initial, separate, enforce, check,
propagate,
2295 local, dynamic, removable,
FALSE) );
2300 SCIP_CALL(
SCIPcreateConsSOS2(
scip, &cons, name, 0,
NULL,
NULL, initial, separate, enforce, check,
propagate,
2301 local, dynamic, removable,
FALSE) );
2308 assert( type == 1 || type == 2 );
2423 const char* filename
2527 SCIP_Real* constant,
2528 SCIP_Bool transformed
2564 for( v = 0; v < *
nvars; ++v )
2574 *constant += (*scalars)[v];
2575 (*scalars)[v] *= -1.0;
2626 const char* extension
2641 (*linecnt) += (int)
strlen(extension);
2663 SCIP_Bool transformed
2692 for( v = 0; v < nlinvars; ++v )
2718 SCIP_Real* lincoefs;
2721 int nbilinexprterms;
2735 for( v = 0; v < nlinexprs; ++v )
2778 for( v = 0; v < nquadexprs; ++v )
2792 if( lincoef == 0.0 )
2809 for( v = 0; v < nquadexprs; ++v )
2823 if( sqrcoef == 0.0 )
2837 for( v = 0; v < nbilinexprterms; ++v )
2900 SCIP_Bool transformed
2997 assert( type == 1 || type == 2 );
3015 for( v = 0; v <
nvars; ++v )
3019 if( weights !=
NULL )
3040 const char* consname,
3042 SCIP_Bool aggrlinearizationands,
3043 SCIP_Bool transformed
3067 if( !aggrlinearizationands )
3074 for( v = 0; v <
nvars; ++v )
3086 for( v =
nvars - 1; v >= 0; --v )
3095 if( aggrlinearizationands )
3142 for( v = 0; v <
nvars; ++v )
3183 SCIP_Bool transformed,
3221 SCIP_CALL(
printRow(
scip, file, consname,
"",
"=",
activevars,
activevals,
nactivevars,
NULL, -
activeconstant,
3249 for( v = 0; v <
nvars; ++v )
3253 SCIPwarningMessage(
scip,
"there is a variable name which has to be cut down to %d characters; LP might be corrupted\n",
3262 "it is not possible to read the generated LP file with SCIP; " \
3263 "use write/genproblem or write/gentransproblem for generic variable names\n");
3275 SCIP_Bool transformed
3287 for(
c = 0;
c < nconss; ++
c )
3327 "it is not possible to read the generated LP file with SCIP; " \
3328 "use write/genproblem or write/gentransproblem for generic variable names\n");
3417 "reading/" READER_NAME "/linearize-and-constraints",
3418 "should possible \"and\" constraint be linearized when writing the lp file?",
3422 "should an aggregated linearization for and constraints be used?",
3433 const char* filename,
3511 SCIP_Bool transformed,
3515 SCIP_Real objoffset,
3529 SCIP_Bool linearizeands;
3530 SCIP_Bool aggrlinearizationands;
3607 for(
c = 0;
c < nconss; ++
c )
3639 SCIPinfoMessage(
scip, file,
"\\ Variables : %d (%d binary, %d integer, %d implicit integer, %d continuous)\n",
3650 for( v = 0; v <
nvars; ++v )
3704 linearizeands = readerdata->linearizeands;
3705 aggrlinearizationands = readerdata->aggrlinearizationands;
3722 for(
c = 0;
c < nconss; ++
c )
3759 consvars,
NULL, nconsvars,
NULL, 1.0, 1.0, transformed) );
3779 SCIP_Longint* weights;
3787 for( v = 0; v < nconsvars; ++v )
3788 consvals[v] = (SCIP_Real)weights[v];
3861 if(
strlen(consname) > 0 )
3870 for( v = 0; v < nlinvars; ++v )
3873 if(
var != slackvar )
3875 consvars[cnt] =
var;
4004 for( v = 0; v <
nvars; ++v )
4070 for( v = 0; v <
nvars; ++v )
4106 for( v = 0; v <
nvars; ++v )
Constraint handler for AND constraints, .
constraint handler for bound disjunction constraints
constraint handler for indicator constraints
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for linear constraints in their most general form, .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for the set partitioning / packing / covering constraints .
constraint handler for SOS type 1 constraints
constraint handler for SOS type 2 constraints
Constraint handler for variable bound constraints .
#define SCIP_CALL_ABORT(x)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_RETCODE SCIPcheckQuadraticNonlinear(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *isquadratic)
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetWeightsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarSOS1(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
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)
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)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
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)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetWeightsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_EXPR * SCIPgetExprNonlinear(SCIP_CONS *cons)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetSlackVarIndicator(SCIP_CONS *cons)
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_CONS * SCIPgetLinearConsIndicator(SCIP_CONS *cons)
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)
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)
SCIP_VAR ** SCIPgetVarsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsQuadraticNonlinear(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)
int SCIPgetNVarsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
@ SCIP_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
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)
SCIP_RETCODE SCIPincludeReaderLp(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPaddOrigObjoffset(SCIP *scip, SCIP_Real addval)
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)
int SCIPgetNTotalVars(SCIP *scip)
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
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)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
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)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
void SCIPexprGetQuadraticBilinTerm(SCIP_EXPR *expr, int termidx, SCIP_EXPR **expr1, SCIP_EXPR **expr2, SCIP_Real *coef, int *pos2, SCIP_EXPR **prodexpr)
void SCIPexprGetQuadraticData(SCIP_EXPR *expr, SCIP_Real *constant, int *nlinexprs, SCIP_EXPR ***linexprs, SCIP_Real **lincoefs, int *nquadexprs, int *nbilinexprs, SCIP_Real **eigenvalues, SCIP_Real **eigenvectors)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
void SCIPexprGetQuadraticQuadTerm(SCIP_EXPR *quadexpr, int termidx, SCIP_EXPR **expr, SCIP_Real *lincoef, SCIP_Real *sqrcoef, int *nadjbilin, int **adjbilin, SCIP_EXPR **sqrexpr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader,)
SCIP_READER * SCIPfindReader(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader,)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
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)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
static const SCIP_Real scalars[]
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing constraints
wrapper functions to map file i/o to standard or zlib file i/o
struct SCIP_File SCIP_FILE
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
public methods for input file readers
public methods for problem variables
static SCIP_RETCODE printAndCons(SCIP *scip, FILE *file, const char *consname, SCIP_CONS *cons, SCIP_Bool aggrlinearizationands, SCIP_Bool transformed)
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
#define LP_INIT_COEFSSIZE
static SCIP_Bool isSign(LPINPUT *lpinput, int *sign)
static SCIP_Bool isNewSection(SCIP *scip, LPINPUT *lpinput)
#define LP_INIT_QUADCOEFSSIZE
static void clearLine(char *linebuffer, int *linecnt)
static SCIP_Bool hasError(LPINPUT *lpinput)
static void pushToken(LPINPUT *lpinput)
static SCIP_Bool getNextLine(SCIP *scip, LPINPUT *lpinput)
static void swapTokenBuffer(LPINPUT *lpinput)
static SCIP_RETCODE readConstraints(SCIP *scip, LPINPUT *lpinput)
static SCIP_RETCODE readBinaries(SCIP *scip, LPINPUT *lpinput)
static SCIP_RETCODE readSemicontinuous(SCIP *scip, LPINPUT *lpinput)
static SCIP_Bool getNextToken(SCIP *scip, LPINPUT *lpinput)
static void printSosCons(SCIP *scip, FILE *file, const char *rowname, SCIP_VAR **vars, SCIP_Real *weights, int nvars, int type)
static const char commentchars[]
static void checkVarnames(SCIP *scip, SCIP_VAR **vars, int nvars)
static SCIP_Bool isValueChar(char c, char nextc, SCIP_Bool firstchar, SCIP_Bool *hasdot, LPEXPTYPE *exptype)
static SCIP_RETCODE printAggregatedCons(SCIP *scip, FILE *file, SCIP_Bool transformed, int nvars, int nAggregatedVars, SCIP_VAR **aggregatedVars)
static SCIP_RETCODE readGenerals(SCIP *scip, LPINPUT *lpinput)
#define LP_MAX_PUSHEDTOKENS
static SCIP_RETCODE printQuadraticCons(SCIP *scip, FILE *file, const char *rowname, SCIP_VAR **linvars, SCIP_Real *linvals, int nlinvars, SCIP_EXPR *quadexpr, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed)
static SCIP_RETCODE readObjective(SCIP *scip, LPINPUT *lpinput)
static SCIP_Bool isValue(SCIP *scip, LPINPUT *lpinput, SCIP_Real *value)
static SCIP_RETCODE readSos(SCIP *scip, LPINPUT *lpinput)
static SCIP_RETCODE createIndicatorConstraint(SCIP *scip, LPINPUT *lpinput, const char *name, SCIP_VAR *binvar, SCIP_Real binvalue)
static void syntaxError(SCIP *scip, LPINPUT *lpinput, const char *msg)
static void pushBufferToken(LPINPUT *lpinput)
static void endLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt)
static SCIP_RETCODE readCoefficients(SCIP *scip, LPINPUT *lpinput, SCIP_Bool isobjective, char *name, int *coefssize, SCIP_VAR ***vars, SCIP_Real **coefs, int *ncoefs, int *quadcoefssize, SCIP_VAR ***quadvars1, SCIP_VAR ***quadvars2, SCIP_Real **quadcoefs, int *nquadcoefs, SCIP_Real *objoffset, SCIP_Bool *newsection)
static SCIP_Bool isSense(LPINPUT *lpinput, LPSENSE *sense)
static SCIP_Bool isDelimChar(char c)
static void swapPointers(char **pointer1, char **pointer2)
static SCIP_RETCODE readBounds(SCIP *scip, LPINPUT *lpinput)
#define DEFAULT_AGGRLINEARIZATION_ANDS
static SCIP_RETCODE printRow(SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, SCIP_VAR **linvars, SCIP_Real *linvals, int nlinvars, SCIP_EXPR *quadexpr, SCIP_Real rhs, SCIP_Bool transformed)
static SCIP_RETCODE readStart(SCIP *scip, LPINPUT *lpinput)
static SCIP_RETCODE collectAggregatedVars(SCIP *scip, SCIP_VAR **vars, int nvars, SCIP_VAR ***aggvars, int *naggvars, int *saggvars, SCIP_HASHTABLE *varAggregated)
static SCIP_RETCODE readLPFile(SCIP *scip, LPINPUT *lpinput, const char *filename)
static void checkConsnames(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool transformed)
static void appendLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension)
static SCIP_RETCODE getVariable(SCIP *scip, char *name, SCIP_VAR **var, SCIP_Bool *created)
#define DEFAULT_LINEARIZE_ANDS
static SCIP_Bool isTokenChar(char c)
public methods for constraint handler plugins and constraints
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for reader plugins
public methods for SCIP variables
enum SCIP_BoundType SCIP_BOUNDTYPE
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Objsense SCIP_OBJSENSE
#define SCIP_DECL_READERWRITE(x)
struct SCIP_ReaderData SCIP_READERDATA
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
#define SCIP_DECL_READERFREE(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_ORIGINAL
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_Varstatus SCIP_VARSTATUS