Detailed DescriptionGAMS file writer. Definition in file reader_gms.c. #include <stdlib.h> #include <assert.h> #include <string.h> #include "scip/reader_gms.h" #include "scip/cons_knapsack.h" #include "scip/cons_linear.h" #include "scip/cons_logicor.h" #include "scip/cons_quadratic.h" #include "scip/cons_soc.h" #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "scip/cons_setppc.h" #include "scip/cons_varbound.h" #include "scip/cons_indicator.h" #include "scip/cons_abspower.h" #include "scip/cons_nonlinear.h" #include "scip/cons_bivariate.h" #include "scip/pub_misc.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 55 of file reader_gms.c. Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeReaderGms().
Definition at line 56 of file reader_gms.c. Referenced by SCIPincludeReaderGms().
Definition at line 57 of file reader_gms.c. Referenced by SCIPincludeReaderGms().
Definition at line 60 of file reader_gms.c. Referenced by SCIPwriteGms().
the maximum length of any line is 255 + '\0' = 256 Definition at line 61 of file reader_gms.c. Referenced by appendLine(), printActiveVariables(), printExpr(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
the maximum length for any name is 63 + '\0' = 64 Definition at line 62 of file reader_gms.c. Referenced by checkConsnames(), checkVarnames(), printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
Definition at line 63 of file reader_gms.c. Referenced by appendLine().
Definition at line 64 of file reader_gms.c. Referenced by SCIPincludeReaderGms().
Definition at line 65 of file reader_gms.c. Referenced by SCIPincludeReaderGms().
Definition at line 66 of file reader_gms.c. Referenced by SCIPincludeReaderGms(). Function Documentation
transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant
Definition at line 76 of file reader_gms.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetProbvarLinearSum(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), and TRUE. Referenced by printActiveVariables(), and printLinearCons().
clears the given line buffer
Definition at line 119 of file reader_gms.c. References NULL. Referenced by endLine(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
ends the given line with '\0' and prints it to the given file stream
Definition at line 133 of file reader_gms.c. References clearLine(), NULL, and SCIPinfoMessage(). Referenced by appendLine(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
appends extension to line and prints it to the give file stream if the line exceeded the length given in the define GMS_PRINTLEN
Definition at line 155 of file reader_gms.c. References endLine(), GMS_MAX_PRINTLEN, GMS_PRINTLEN, NULL, and SCIPdebugMessage. Referenced by appendLineWithIndent(), printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
appends extension to line and prints it to the give file stream if the line exceeded the length given in the define GMS_PRINTLEN indents the line by some spaces if it is a new line
Definition at line 189 of file reader_gms.c. References appendLine(). Referenced by printExpr(), and printNonlinearRow().
checks string for occurences of '#', '*', '+', '/', and '-' and replaces those by '_'
Definition at line 206 of file reader_gms.c. References badchars, and NULL. Referenced by printConformName().
Definition at line 230 of file reader_gms.c. References conformName(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), and SCIPsnprintf(). Referenced by printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
Definition at line 255 of file reader_gms.c. References appendLine(), getActiveVariables(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printConformName(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisEQ(), SCIPisZero(), SCIPsnprintf(), and SCIPvarGetName(). Referenced by printExpr(), printIndicatorCons(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
Definition at line 410 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printConformName(), SCIP_CALL, SCIP_OKAY, SCIPisZero(), SCIPsnprintf(), and SCIPvarGetName(). Referenced by printLinearCons().
prints given linear constraint information in GAMS format to file stream
Definition at line 494 of file reader_gms.c. References getActiveVariables(), NULL, printLinearRow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisEQ(), and SCIPisInfinity(). Referenced by SCIPwriteGms().
Definition at line 582 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, SCIPisZero(), SCIPsnprintf(), SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2. Referenced by printQuadraticCons().
prints given quadratic constraint information in GAMS format to file stream
Definition at line 701 of file reader_gms.c. References NULL, printQuadraticRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity(). Referenced by SCIPwriteGms().
check GAMS limitations on SOC constraints returns true of constraint can be written as conic equation in GAMS (using equation type =C=)
Definition at line 766 of file reader_gms.c. References FALSE, NULL, SCIPvarIsActive(), and TRUE. Referenced by printSOCCons(), and SCIPwriteGms().
Definition at line 821 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, isGAMSprintableSOC(), NULL, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, and SCIPsnprintf(). Referenced by SCIPwriteGms().
Definition at line 911 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPgetCharParam(), SCIPgetNegatedVar(), SCIPgetRealParam(), SCIPinfoMessage(), SCIPisInfinity(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarIsNegated(), SCIPwarningMessage(), and TRUE. Referenced by SCIPwriteGms().
Definition at line 1039 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPsnprintf(). Referenced by SCIPwriteGms().
Definition at line 1096 of file reader_gms.c. References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPfloor(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE. Referenced by printSignpowerCons().
Definition at line 1300 of file reader_gms.c. References NULL, printSignpowerRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity(). Referenced by SCIPwriteGms().
Definition at line 1349 of file reader_gms.c. References appendLineWithIndent(), GMS_MAX_PRINTLEN, NULL, printActiveVariables(), SCIP_Bool, SCIP_CALL, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_LOG, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PARAM, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGN, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_SIN, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_EXPR_TAN, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprGetChildren(), SCIPexprGetIntPowerExponent(), SCIPexprGetLinearCoefs(), SCIPexprGetLinearConstant(), SCIPexprGetMonomialChildIndices(), SCIPexprGetMonomialCoef(), SCIPexprGetMonomialExponents(), SCIPexprGetMonomialNFactors(), SCIPexprGetMonomials(), SCIPexprGetNChildren(), SCIPexprGetNMonomials(), SCIPexprGetNQuadElements(), SCIPexprGetOperator(), SCIPexprGetOpIndex(), SCIPexprGetOpReal(), SCIPexprGetPolynomialConstant(), SCIPexprGetQuadConstant(), SCIPexprGetQuadElements(), SCIPexprGetQuadLinearCoefs(), SCIPexprGetRealPowerExponent(), SCIPexprGetSignPowerExponent(), SCIPexpropGetName(), SCIPgetBoolParam(), SCIPround(), SCIPsnprintf(), SCIPwarningMessage(), and TRUE. Referenced by printNonlinearRow().
Definition at line 1748 of file reader_gms.c. References appendLine(), appendLineWithIndent(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), printExpr(), SCIP_CALL, SCIP_OKAY, SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPisZero(), and SCIPsnprintf(). Referenced by printNonlinearCons().
Definition at line 1828 of file reader_gms.c. References NULL, printNonlinearRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity(). Referenced by SCIPwriteGms().
method check if the variable names are not longer than GMS_MAX_NAMELEN
Definition at line 1877 of file reader_gms.c. References badchars, GMS_MAX_NAMELEN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), SCIPinfoMessage(), SCIPvarGetName(), and SCIPwarningMessage(). Referenced by SCIPwriteGms().
method check if the constraint names are not longer than GMS_MAX_NAMELEN
Definition at line 1936 of file reader_gms.c. References badchars, GMS_MAX_NAMELEN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPgetBoolParam(), SCIPgetLhsLinear(), SCIPgetLhsQuadratic(), SCIPgetRhsQuadratic(), SCIPinfoMessage(), SCIPisEQ(), and SCIPwarningMessage(). Referenced by SCIPwriteGms().
copy method for reader plugins (called when SCIP copies plugins) Definition at line 2029 of file reader_gms.c. References FALSE, NULL, READER_NAME, SCIP_CALL, SCIP_DECL_READERREAD, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIP_VERBLEVEL_FULL, SCIPdebugMessage, SCIPerrorMessage, SCIPgetVerbLevel(), SCIPincludeReaderGms(), SCIPreaderGetName(), and SCIPsnprintf().
problem writing method of reader Definition at line 2145 of file reader_gms.c. References SCIP_CALL, SCIP_DECL_READERFREE, SCIP_OKAY, and SCIPwriteGms().
includes the gms file reader in SCIP
Definition at line 2172 of file reader_gms.c. References FALSE, GMS_DEFAULT_BIGM, GMS_DEFAULT_INDICATORREFORM, GMS_DEFAULT_SIGNPOWER, NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIP_REAL_MAX, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddRealParam(), SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderFree(), SCIPsetReaderRead(), and SCIPsetReaderWrite(). Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins().
writes problem to gms file
Definition at line 2219 of file reader_gms.c. References appendLine(), checkConsnames(), checkVarnames(), clearLine(), endLine(), FALSE, GMS_MAX_LINELEN, GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, isGAMSprintableSOC(), NULL, printActiveVariables(), printConformName(), printIndicatorCons(), printLinearCons(), printNonlinearCons(), printQuadraticCons(), printSignpowerCons(), printSOCCons(), printSOSCons(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIP_SUCCESS, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_IMPLINT, SCIPallocBufferArray, SCIPceil(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPexprgraphGetTree(), SCIPexprtreeFree(), SCIPexprtreeGetMaxDegree(), SCIPfeasFloor(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetBilinTermsQuadratic(), SCIPgetBinaryVarIndicator(), SCIPgetBoolParam(), SCIPgetCapacityKnapsack(), SCIPgetCoefLinearAbspower(), SCIPgetCoefsLinearVarsQuadratic(), SCIPgetExponentAbspower(), SCIPgetExprgraphNodeNonlinear(), SCIPgetExprgraphNonlinear(), SCIPgetExprtreeBivariate(), SCIPgetExprtreeCoefsNonlinear(), SCIPgetExprtreesNonlinear(), SCIPgetLhsAbspower(), SCIPgetLhsBivariate(), SCIPgetLhsCoefsSOC(), SCIPgetLhsConstantSOC(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsOffsetsSOC(), SCIPgetLhsQuadratic(), SCIPgetLhsVarbound(), SCIPgetLhsVarsSOC(), SCIPgetLinearCoefBivariate(), SCIPgetLinearCoefsNonlinear(), SCIPgetLinearVarAbspower(), SCIPgetLinearVarBivariate(), SCIPgetLinearVarsNonlinear(), SCIPgetLinearVarsQuadratic(), SCIPgetNBilinTermsQuadratic(), SCIPgetNExprtreesNonlinear(), SCIPgetNLhsVarsSOC(), SCIPgetNLinearVarsNonlinear(), SCIPgetNLinearVarsQuadratic(), SCIPgetNonlinearVarAbspower(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetNVarsSOS1(), SCIPgetNVarsSOS2(), SCIPgetOffsetAbspower(), SCIPgetQuadVarTermsQuadratic(), SCIPgetRhsAbspower(), SCIPgetRhsBivariate(), SCIPgetRhsCoefSOC(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsOffsetSOC(), SCIPgetRhsQuadratic(), SCIPgetRhsVarbound(), SCIPgetRhsVarSOC(), SCIPgetSlackVarIndicator(), SCIPgetStage(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarsSOS1(), SCIPgetVarsSOS2(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPinfinity(), SCIPinfoMessage(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisInfinity(), SCIPisZero(), SCIPprintCons(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPvarIsActive(), SCIPwarningMessage(), and TRUE. Referenced by SCIP_DECL_READERWRITE(). Variable Documentation
Definition at line 72 of file reader_gms.c. Referenced by checkConsnames(), checkVarnames(), and conformName(). |