64#define READER_NAME "gmsreader"
65#define READER_DESC "file writer for (MI)(N)LPs in GAMS file format"
66#define READER_EXTENSION "gms"
69#define GMS_MAX_LINELEN 256
70#define GMS_MAX_PRINTLEN 256
71#define GMS_MAX_NAMELEN 64
72#define GMS_PRINTLEN 100
73#define GMS_DEFAULT_BIGM 1e+6
74#define GMS_DEFAULT_INDICATORREFORM 's'
111 if( requiredsize > *varssize )
118 assert(requiredsize <= *varssize);
124 for( v = 0; v < *
nvars; ++v )
144 linebuffer[0] =
'\0';
163 linebuffer[(*linecnt)] =
'\0';
185 linebuffer[(*linecnt)] =
'\0';
199 const char* extension
213 len = strlen(linebuffer);
216 (*linecnt) += (int) strlen(extension);
218 SCIPdebugMsg(
scip,
"linebuffer <%s>, length = %lu\n", linebuffer, (
unsigned long)len);
234 for( badchar =
badchars; *badchar; ++badchar )
236 char*
c = strchr(name, *badchar);
243 c = strchr(
c, *badchar);
266 if( replaceforbiddenchars )
329 for( v = 0; v < nactivevars; ++v )
332 activevarssize = nactivevars;
337 assert( nactivevars == 0 || activevals !=
NULL );
355 closingbracket = nactivevars;
360 while(
SCIPisZero(
scip, activevals[closingbracket]) && closingbracket > 0 );
364 for( v = 0; v < nactivevars; ++v )
379 varname, (v == closingbracket) ?
")" :
"", (v == closingbracket && suffix) ? suffix :
"");
382 varname, (v == closingbracket) ?
")" :
"", (v == closingbracket && suffix) ? suffix :
"");
383 else if( strchr(ext,
'(') !=
NULL )
385 activevals[v], varname, (v == closingbracket) ?
")" :
"", (v == closingbracket && suffix) ? suffix :
"");
388 activevals[v], varname, (v == closingbracket) ?
")" :
"", (v == closingbracket && suffix) ? suffix :
"");
408 else if( strchr(ext,
'(') !=
NULL )
435 const char* rownameextension,
453 assert( strcmp(type,
"=e=") == 0 || strcmp(type,
"=l=") == 0 || strcmp(type,
"=g=") == 0);
462 if( strlen(rowname) > 0 || strlen(rownameextension) > 0 )
481 for( v = 0; v <
nvars; ++v )
561 for( v = 0; v < nactivevars; ++v )
564 activevarssize = nactivevars;
577 nactivevars, activevars, activevals, rhs - activeconstant) );
585 nactivevars, activevars, activevals, lhs - activeconstant) );
591 nactivevars, activevars, activevals, rhs - activeconstant) );
632 assert( strlen(rowname) > 0 );
645 switch( indicatorform )
664 SCIPwarningMessage(
scip,
"do not have upper bound on slack variable <%s> in indicator constraint <%s>, will use M = %g.\n",
706 SCIP_CALL(
printActiveVariables(
scip, file, linebuffer, &linecnt,
NULL,
"$sameas(sosset,'slack')", 1, &s, &coef, transformed) );
710 SCIP_CALL(
printActiveVariables(
scip, file, linebuffer, &linecnt,
" + (1-(",
"))$sameas(sosset,'bin');", 1, &z, &coef, transformed) );
714 SCIP_CALL(
printActiveVariables(
scip, file, linebuffer, &linecnt,
" + ",
"$sameas(sosset,'bin');", 1, &z, &coef, transformed) );
722 SCIPerrorMessage(
"wrong value '%c' for parameter reading/gmsreader/indicatorreform\n", indicatorform);
760 assert( strlen(rowname) > 0 );
762 assert( sostype == 1 || sostype == 2 );
776 (void)
SCIPsnprintf(buffer,
GMS_MAX_PRINTLEN,
" SOS%d Variable %s_sosvar(%s_sosset); %s_sosvar.lo(%s_sosset) = -inf;", sostype, consname, consname, consname, consname);
785 for( v = 0; v <
nvars; ++v )
821 assert( strlen(rowname) > 0 );
840 for( v = 0; v <
nvars; ++v )
846 activevars[0] =
vars[v];
847 activecoefs[0] = 1.0;
852 if( nactivevars == 1 && activecoefs[0] == 1.0 && activeconstant == 0.0 )
863 if( activeconstant != 0.0 )
870 for(
i = 0;
i < nactivevars; ++
i )
872 if(
REALABS(activecoefs[
i]) != 1.0 )
877 else if( activecoefs[
i] == 1.0 && needsign )
881 else if( activecoefs[
i] == -1.0 )
906 activevars[0] = resultant;
907 activecoefs[0] = 1.0;
913 if( activeconstant != 0.0 )
920 for(
i = 0;
i < nactivevars; ++
i )
922 if(
REALABS(activecoefs[
i]) != 1.0 )
927 else if( activecoefs[
i] == 1.0 && needsign )
931 else if( activecoefs[
i] == -1.0 )
967 unsigned int parentprecedence;
975 unsigned int sumprecedence;
990 fpos = ftell(file) - *linecnt;
1017 parentprecedence = 0;
1024 fpos = ftell(file) - 5;
1036 activecoefs[0] = 1.0;
1041 if( nactivevars == 1 && activecoefs[0] == 1.0 && activeconstant == 0.0 )
1052 if( sumprecedence <= parentprecedence )
1055 if( activeconstant != 0.0 )
1060 for(
i = 0;
i < nactivevars; ++
i )
1062 if(
REALABS(activecoefs[
i]) != 1.0 )
1066 else if( activecoefs[
i] == 1.0 && needsign )
1070 else if( activecoefs[
i] == -1.0 )
1084 fpos = ftell(file) - 5;
1088 if( sumprecedence <= parentprecedence )
1098 if( exponent == 2.0 )
1116 else if( exponent == 0.5 )
1138 SCIP_CALL( SCIPcallExprPrint(
scip, expr, stage, currentchild, parentprecedence, file) );
1173 const char* rowname,
1174 const char* rownameextension,
1189 assert( strlen(rowname) > 0 || strlen(rownameextension) > 0 );
1190 assert( strcmp(type,
"=e=") == 0 || strcmp(type,
"=l=") == 0 || strcmp(type,
"=g=") == 0 );
1218 const char* rowname,
1228 assert( strlen(rowname) > 0 );
1243 SCIP_CALL(
printNonlinearRow(
scip, file, rowname,
SCIPisInfinity(
scip, rhs) ?
"" :
"_lhs",
"=g=", expr, lhs, transformed, nsmooth, nqcons) );
1248 SCIP_CALL(
printNonlinearRow(
scip, file, rowname,
SCIPisInfinity(
scip, -lhs) ?
"" :
"_rhs",
"=l=", expr, rhs, transformed, nsmooth, nqcons) );
1274 const char* badchar;
1282 for( badchar =
badchars; *badchar; ++badchar )
1284 for( v = 0; v <
nvars; ++v )
1291 if( replaceforbiddenchars )
1293 SCIPinfoMessage(
scip,
NULL,
"there is a variable name with symbol '%c', not allowed in GAMS format; all '%c' replaced by '_' (consider using 'write genproblem'/'write gentransproblem').\n", *badchar, *badchar);
1297 SCIPwarningMessage(
scip,
"there is a variable name with symbol '%c', not allowed in GAMS format; use 'write genproblem'/'write gentransproblem', or set 'reading/gmsreader/replaceforbiddenchars' to TRUE and risk duplicate variable names.\n", *badchar);
1306 for( v = 0; v <
nvars; ++v )
1313 SCIPwarningMessage(
scip,
"there is a variable name which has to be cut down to %d characters; GAMS model might be corrupted.\n",
1334 const char* conshdlrname;
1336 const char* badchar;
1344 for( badchar =
badchars; *badchar; ++badchar )
1346 for(
c = 0;
c < nconss; ++
c )
1353 if( replaceforbiddenchars )
1355 SCIPinfoMessage(
scip,
NULL,
"there is a constraint name with symbol '%c', not allowed in GAMS format; all '%c' replaced by '_' (consider using 'write genproblem'/'write gentransproblem').\n", *badchar, *badchar);
1359 SCIPwarningMessage(
scip,
"there is a constraint name with symbol '%c', not allowed in GAMS format; use 'write genproblem'/'write gentransproblem', or set 'reading/gmsreader/replaceforbiddenchars' to TRUE and risk duplicate variable names.\n", *badchar);
1368 for(
c = 0;
c < nconss; ++
c )
1382 if( strcmp(conshdlrname,
"linear") == 0 || strcmp(conshdlrname,
"nonlinear") == 0 )
1435 nvars, nbinvars, nintvars, nimplvars, ncontvars, conss, nconss,
result) );
1460 "reading/gmsreader/replaceforbiddenchars",
"shall characters '#', '*', '+', '/', and '-' in variable and constraint names be replaced by '_'?",
1464 "reading/gmsreader/bigmdefault",
"default M value for big-M reformulation of indicator constraints in case no bound on slack variable is given",
1468 "reading/gmsreader/indicatorreform",
"which reformulation to use for indicator constraints: 'b'ig-M, 's'os1",
1507 const char* conshdlrname;
1531 int nintegers =
nvars - ncontvars;
1543 if(
objscale == 1.0 && objoffset == 0.0 )
1545 for( v = 0; v <
nvars; ++v )
1552 if( objvar ==
NULL )
1573 assert(implintlevel >= -2);
1574 assert(implintlevel <= 2);
1580 SCIPinfoMessage(
scip, file,
"* Variables : %d (%d binary, %d integer, %d implicit integer, %d continuous)\n",
1581 nvars, nbinvars, nintvars, nimplvars, ncontvars);
1592 if( objvar ==
NULL )
1599 for( v = 0; v <
nvars; ++v )
1607 if( (linecnt > 0 && (v == nbinvars - 1 || v == nbinvars + nintvars - 1 ||
1608 v == nbinvars + nintvars + nimplvars - 1)) || v ==
nvars - 1 )
1620 for( v = 0; v < nintegers; ++v )
1649 for( v = nbinvars; v < nintegers; ++v )
1689 nondefbounds =
FALSE;
1691 for( v = 0; v <
nvars; ++v )
1730 nondefbounds =
TRUE;
1746 nondefbounds =
TRUE;
1753 nondefbounds =
TRUE;
1763 nondefbounds =
TRUE;
1772 nondefbounds =
TRUE;
1780 nondefbounds =
TRUE;
1785 SCIPinfoMessage(
scip, file,
"* (All other bounds at default value: binary [0,1], integer [0,+inf], continuous [-inf,+inf].)\n");
1789 if( nconss > 0 || objvar ==
NULL )
1796 if( objvar ==
NULL )
1803 for(
c = 0;
c < nconss; ++
c )
1815 rangedrow = strcmp(conshdlrname,
"linear") == 0
1818 rangedrow = rangedrow || (strcmp(conshdlrname,
"nonlinear") == 0
1821 rangedrow = rangedrow || (strcmp(conshdlrname,
"varbound") == 0
1826 if( strcmp(conshdlrname,
"knapsack") != 0 && strcmp(conshdlrname,
"logicor") != 0 && strcmp(conshdlrname,
"setppc") != 0
1827 && strcmp(conshdlrname,
"linear") != 0 && strcmp(conshdlrname,
"SOS1") != 0 && strcmp(conshdlrname,
"SOS2") != 0
1828 && strcmp(conshdlrname,
"nonlinear") != 0 && strcmp(conshdlrname,
"and") != 0
1829 && strcmp(conshdlrname,
"varbound") != 0
1830 && strcmp(conshdlrname,
"indicator") != 0 )
1853 if( nconss > 0 || objvar ==
NULL )
1862 if( objvar ==
NULL )
1866 if( objoffset != 0.0 )
1874 for( v = 0; v <
nvars; ++v )
1892 indicatorsosdef =
FALSE;
1893 for(
c = 0;
c < nconss; ++
c )
1908 if( strcmp(conshdlrname,
"knapsack") == 0 )
1918 for( v = 0; v < nconsvars; ++v )
1926 else if( strcmp(conshdlrname,
"linear") == 0 )
1932 else if( strcmp(conshdlrname,
"logicor") == 0 )
1938 else if( strcmp(conshdlrname,
"nonlinear") == 0 )
1944 else if( strcmp(conshdlrname,
"setppc") == 0 )
1953 nconsvars, consvars,
NULL, 1.0, 1.0, transformed) );
1965 else if( strcmp(conshdlrname,
"varbound") == 0 )
1977 2, consvars, consvals,
1983 else if( strcmp(conshdlrname,
"indicator") == 0 )
1989 else if( strcmp(conshdlrname,
"SOS1") == 0 )
1996 else if( strcmp(conshdlrname,
"SOS2") == 0 )
2003 else if( strcmp(conshdlrname,
"and") == 0 )
2024 assert(nlcons || !nsmooth);
2037 discrete ?
"MI" :
"", nlcons ? (nqcons ?
"QCP" : ((nsmooth && !discrete) ?
"DNLP" :
"NLP")) : (discrete ?
"P" :
"LP"));
2039 if( objvar !=
NULL )
Constraint handler for AND 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 .
absolute expression handler
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_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)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsSOS2(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_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)
int SCIPgetNVarsSOS1(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
@ SCIP_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
SCIP_Bool SCIPisExprAbs(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPwriteGms(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 SCIPincludeReaderGms(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, 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 SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *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)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPgetCharParam(SCIP *scip, const char *name, char *value)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
unsigned int SCIPexprhdlrGetPrecedence(SCIP_EXPRHDLR *exprhdlr)
SCIP_EXPRHDLR * SCIPgetExprhdlrSum(SCIP *scip)
SCIP_Real SCIPgetExponentExprPow(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprProduct(SCIP *scip, SCIP_EXPR *expr)
SCIP_Bool SCIPexpriterIsEnd(SCIP_EXPRITER *iterator)
SCIP_Bool SCIPisExprSum(SCIP *scip, SCIP_EXPR *expr)
SCIP_Bool SCIPexprAreQuadraticExprsVariables(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
void SCIPexpriterSetStagesDFS(SCIP_EXPRITER *iterator, SCIP_EXPRITER_STAGE stopstages)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateExpriter(SCIP *scip, SCIP_EXPRITER **iterator)
SCIP_EXPR * SCIPexpriterGetParentDFS(SCIP_EXPRITER *iterator)
SCIP_Bool SCIPisExprPower(SCIP *scip, SCIP_EXPR *expr)
SCIP_EXPR * SCIPexpriterGetNext(SCIP_EXPRITER *iterator)
SCIP_RETCODE SCIPcheckExprQuadratic(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *isquadratic)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
int SCIPexpriterGetChildIdxDFS(SCIP_EXPRITER *iterator)
void SCIPfreeExpriter(SCIP_EXPRITER **iterator)
SCIP_EXPRITER_STAGE SCIPexpriterGetStageDFS(SCIP_EXPRITER *iterator)
SCIP_RETCODE SCIPexpriterInit(SCIP_EXPRITER *iterator, SCIP_EXPR *expr, SCIP_EXPRITER_TYPE type, SCIP_Bool allowrevisit)
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
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)
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_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(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 SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_IMPLINTTYPE SCIPvarGetImplType(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
static const SCIP_Real scalars[]
memory allocation routines
public methods for managing constraints
public methods for message output
public data structures and miscellaneous methods
public methods for input file readers
public methods for problem variables
static void clearLine(char *linebuffer, int *linecnt)
static SCIP_RETCODE printAndCons(SCIP *scip, FILE *file, const char *rowname, int nvars, SCIP_VAR **vars, SCIP_VAR *resultant, SCIP_Bool transformed)
static SCIP_RETCODE printNonlinearCons(SCIP *scip, FILE *file, const char *rowname, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool *nsmooth, SCIP_Bool *nqcons)
static SCIP_RETCODE printSOSCons(SCIP *scip, FILE *file, const char *rowname, int nvars, SCIP_VAR **vars, int sostype, SCIP_Bool transformed)
static void endLineNoNewline(SCIP *scip, FILE *file, char *linebuffer, int *linecnt)
#define GMS_DEFAULT_INDICATORREFORM
static SCIP_RETCODE checkVarnames(SCIP *scip, SCIP_VAR **vars, int nvars)
static SCIP_RETCODE printLinearRow(SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs)
static SCIP_RETCODE checkConsnames(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool transformed)
static SCIP_RETCODE printNonlinearRow(SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, SCIP_EXPR *expr, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool *nsmooth, SCIP_Bool *nqcons)
static SCIP_RETCODE printLinearCons(SCIP *scip, FILE *file, const char *rowname, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed)
static SCIP_RETCODE printConformName(SCIP *scip, char *t, int len, const char *name)
static SCIP_RETCODE printActiveVariables(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *prefix, const char *suffix, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Bool transformed)
static void conformName(char *name)
static void endLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt)
static SCIP_RETCODE printIndicatorCons(SCIP *scip, FILE *file, const char *rowname, SCIP_VAR *z, SCIP_VAR *s, SCIP_Bool *sossetdeclr, SCIP_Bool transformed)
static SCIP_RETCODE printExpr(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, SCIP_Bool *nsmooth, SCIP_Bool *nqcons, SCIP_Bool transformed, SCIP_EXPR *expr)
static const char badchars[]
static void appendLine(SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension)
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, int *varssize, SCIP_Real *constant, SCIP_Bool transformed)
GAMS file reader and writer.
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 reader plugins
public methods for SCIP variables
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Expr SCIP_EXPR
struct SCIP_ExprIter SCIP_EXPRITER
#define SCIP_EXPRITER_VISITINGCHILD
#define SCIP_EXPRITER_VISITEDCHILD
#define SCIP_EXPRITER_LEAVEEXPR
#define SCIP_EXPRITER_ALLSTAGES
#define SCIP_EXPRITER_ENTEREXPR
unsigned int SCIP_EXPRITER_STAGE
enum SCIP_Objsense SCIP_OBJSENSE
#define SCIP_DECL_READERWRITE(x)
struct SCIP_Reader SCIP_READER
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_ORIGINAL
enum SCIP_Vartype SCIP_VARTYPE