GAMS 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.
Macros | |
#define | READER_NAME "gmsreader" |
#define | READER_DESC "file reader and writer for MI(NL)(SOC)Ps in GAMS file format" |
#define | READER_EXTENSION "gms" |
#define | GMS_MAX_LINELEN 256 |
#define | GMS_MAX_PRINTLEN 256 |
#define | GMS_MAX_NAMELEN 64 |
#define | GMS_PRINTLEN 100 |
#define | GMS_DEFAULT_BIGM 1e+6 |
#define | GMS_DEFAULT_INDICATORREFORM 's' |
#define | GMS_DEFAULT_SIGNPOWER FALSE |
Functions | |
static SCIP_RETCODE | getActiveVariables (SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed) |
static void | clearLine (char *linebuffer, int *linecnt) |
static void | endLine (SCIP *scip, FILE *file, char *linebuffer, int *linecnt) |
static void | appendLine (SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension) |
static void | appendLineWithIndent (SCIP *scip, FILE *file, char *linebuffer, int *linecnt, const char *extension) |
static void | conformName (char *name) |
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 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 | 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 | printQuadraticRow (SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoeffs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real rhs, SCIP_Bool transformed) |
static SCIP_RETCODE | printQuadraticCons (SCIP *scip, FILE *file, const char *rowname, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoeffs, int nquadvarterms, SCIP_QUADVARTERM *quadvarterms, int nbilinterms, SCIP_BILINTERM *bilinterms, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed) |
static SCIP_Bool | isGAMSprintableSOC (int nlhsvars, SCIP_VAR **lhsvars, SCIP_Real *lhscoeffs, SCIP_Real *lhsoffsets, SCIP_Real lhsconstant, SCIP_VAR *rhsvar, SCIP_Real rhscoef, SCIP_Real rhsoffset) |
static SCIP_RETCODE | printSOCCons (SCIP *scip, FILE *file, const char *rowname, int nlhsvars, SCIP_VAR **lhsvars, SCIP_Real *lhscoeffs, SCIP_Real *lhsoffsets, SCIP_Real lhsconstant, SCIP_VAR *rhsvar, SCIP_Real rhscoef, SCIP_Real rhsoffset, SCIP_Bool transformed) |
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 | printSOSCons (SCIP *scip, FILE *file, const char *rowname, int nvars, SCIP_VAR **vars, int sostype, SCIP_Bool transformed) |
static SCIP_RETCODE | printSignpowerRow (SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, SCIP_VAR *nonlinvar, SCIP_VAR *linvar, SCIP_Real exponent, SCIP_Real offset, SCIP_Real coeflinear, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool signpowerallowed, SCIP_Bool *nsmooth) |
static SCIP_RETCODE | printSignpowerCons (SCIP *scip, FILE *file, const char *rowname, SCIP_VAR *nonlinvar, SCIP_VAR *linvar, SCIP_Real exponent, SCIP_Real offset, SCIP_Real coeflinear, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool signpowerallowed, SCIP_Bool *nsmooth) |
static SCIP_RETCODE | printExpr (SCIP *scip, FILE *file, char *linebuffer, int *linecnt, SCIP_Bool *nsmooth, SCIP_Bool transformed, SCIP_EXPR *expr, SCIP_VAR **exprvars) |
static SCIP_RETCODE | printNonlinearRow (SCIP *scip, FILE *file, const char *rowname, const char *rownameextension, const char *type, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoeffs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool *nsmooth) |
static SCIP_RETCODE | printNonlinearCons (SCIP *scip, FILE *file, const char *rowname, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoeffs, int nexprtrees, SCIP_EXPRTREE **exprtrees, SCIP_Real *exprtreecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool transformed, SCIP_Bool *nsmooth) |
static SCIP_RETCODE | checkVarnames (SCIP *scip, SCIP_VAR **vars, int nvars) |
static SCIP_RETCODE | checkConsnames (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool transformed) |
static | SCIP_DECL_READERCOPY (readerCopyGms) |
static | SCIP_DECL_READERWRITE (readerWriteGms) |
SCIP_RETCODE | SCIPincludeReaderGms (SCIP *scip) |
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) |
Variables | |
static const char | badchars [] = "#*+/-@$[](){}" |
#define READER_NAME "gmsreader" |
Definition at line 55 of file reader_gms.c.
Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeReaderGms().
#define READER_DESC "file reader and writer for MI(NL)(SOC)Ps in GAMS file format" |
Definition at line 59 of file reader_gms.c.
Referenced by SCIPincludeReaderGms().
#define READER_EXTENSION "gms" |
Definition at line 61 of file reader_gms.c.
Referenced by SCIPincludeReaderGms().
#define GMS_MAX_LINELEN 256 |
Definition at line 64 of file reader_gms.c.
Referenced by SCIPwriteGms().
#define GMS_MAX_PRINTLEN 256 |
the maximum length of any line is 255 + '\0' = 256
Definition at line 65 of file reader_gms.c.
Referenced by appendLine(), printActiveVariables(), printExpr(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
#define GMS_MAX_NAMELEN 64 |
the maximum length for any name is 63 + '\0' = 64
Definition at line 66 of file reader_gms.c.
Referenced by checkConsnames(), checkVarnames(), printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
#define GMS_PRINTLEN 100 |
Definition at line 67 of file reader_gms.c.
Referenced by appendLine().
#define GMS_DEFAULT_BIGM 1e+6 |
Definition at line 68 of file reader_gms.c.
Referenced by SCIPincludeReaderGms().
#define GMS_DEFAULT_INDICATORREFORM 's' |
Definition at line 69 of file reader_gms.c.
Referenced by SCIPincludeReaderGms().
#define GMS_DEFAULT_SIGNPOWER FALSE |
Definition at line 70 of file reader_gms.c.
Referenced by SCIPincludeReaderGms().
|
static |
transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant
scip | SCIP data structure |
vars | vars array to get active variables for |
scalars | scalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c |
nvars | pointer to number of variables and values in vars and vals array |
constant | pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c |
transformed | transformed constraint? |
Definition at line 80 of file reader_gms.c.
References SCIP_CALL, SCIP_OKAY, SCIPgetProbvarLinearSum(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), and TRUE.
Referenced by printActiveVariables(), and printLinearCons().
|
static |
clears the given line buffer
linebuffer | line |
linecnt | number of characters in line |
Definition at line 123 of file reader_gms.c.
Referenced by endLine(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
|
static |
ends the given line with '\0' and prints it to the given file stream
scip | SCIP data structure |
file | output file (or NULL for standard output) |
linebuffer | line |
linecnt | number of characters in line |
Definition at line 137 of file reader_gms.c.
References clearLine(), and SCIPinfoMessage().
Referenced by appendLine(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
|
static |
appends extension to line and prints it to the give file stream if the line exceeded the length given in the define GMS_PRINTLEN
scip | SCIP data structure |
file | output file (or NULL for standard output) |
linebuffer | line |
linecnt | number of characters in line |
extension | string to extend the line |
Definition at line 159 of file reader_gms.c.
References endLine(), GMS_MAX_PRINTLEN, GMS_PRINTLEN, and SCIPdebugMsg.
Referenced by appendLineWithIndent(), printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
|
static |
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
scip | SCIP data structure |
file | output file (or NULL for standard output) |
linebuffer | line |
linecnt | number of characters in line |
extension | string to extend the line |
Definition at line 193 of file reader_gms.c.
References appendLine().
Referenced by printExpr(), and printNonlinearRow().
|
static |
checks string for occurences of bad symbols and replace those by '_'
name | string to adjust |
Definition at line 210 of file reader_gms.c.
References badchars.
Referenced by printConformName().
|
static |
scip | SCIP data structure |
t | target string |
len | length of t |
name | source string or format string |
Definition at line 234 of file reader_gms.c.
References conformName(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), and SCIPsnprintf().
Referenced by printActiveVariables(), printIndicatorCons(), printLinearRow(), printNonlinearRow(), printQuadraticRow(), printSignpowerRow(), printSOCCons(), printSOSCons(), and SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
linebuffer | line |
linecnt | number of characters in line |
prefix | prefix (maybe NULL) |
suffix | suffix (maybe NULL) |
nvars | number of variables |
vars | array of variables |
vals | array of values (or NULL if all ones) |
transformed | transformed constraint? |
Definition at line 259 of file reader_gms.c.
References appendLine(), getActiveVariables(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, 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().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
rownameextension | row name extension |
type | row type ("=e=", "=l=", or "=g=") |
nvars | number of variables |
vars | array of variables |
vals | array of values |
rhs | right hand side |
Definition at line 414 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, printConformName(), SCIP_CALL, SCIP_OKAY, SCIPisZero(), SCIPsnprintf(), and SCIPvarGetName().
Referenced by printLinearCons().
|
static |
prints given linear constraint information in GAMS format to file stream
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | name of the row |
nvars | number of variables |
vars | array of variables |
vals | array of coefficients values (or NULL if all coefficient values are 1) |
lhs | left hand side |
rhs | right hand side |
transformed | transformed constraint? |
Definition at line 498 of file reader_gms.c.
References getActiveVariables(), printLinearRow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
rownameextension | row name extension |
type | row type ("=e=", "=l=", or "=g=") |
nlinvars | number of linear terms |
linvars | variables in linear part |
lincoeffs | coefficients of variables in linear part |
nquadvarterms | number of quadratic variable terms |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms |
bilinterms | bilinear terms |
rhs | right hand side |
transformed | transformed constraint? |
Definition at line 586 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, SCIPisZero(), SCIPsnprintf(), SCIP_QuadVarTerm::var, SCIP_BilinTerm::var1, and SCIP_BilinTerm::var2.
Referenced by printQuadraticCons().
|
static |
prints given quadratic constraint information in GAMS format to file stream
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | name of the row |
nlinvars | number of linear terms |
linvars | variables in linear part |
lincoeffs | coefficients of variables in linear part |
nquadvarterms | number of quadratic variable terms |
quadvarterms | quadratic variable terms |
nbilinterms | number of bilinear terms |
bilinterms | bilinear terms |
lhs | left hand side |
rhs | right hand side |
transformed | transformed constraint? |
Definition at line 705 of file reader_gms.c.
References printQuadraticRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIPwriteGms().
|
static |
check GAMS limitations on SOC constraints returns true of constraint can be written as conic equation in GAMS (using equation type =C=)
nlhsvars | number of variables on left hand side |
lhsvars | variables on left hand side |
lhscoeffs | coefficients of variables on left hand side, or NULL if == 1.0 |
lhsoffsets | offsets of variables on left hand side, or NULL if == 0.0 |
lhsconstant | constant on left hand side |
rhsvar | variable on right hand side |
rhscoef | coefficient of variable on right hand side |
rhsoffset | offset of variable on right hand side |
Definition at line 770 of file reader_gms.c.
References FALSE, SCIPvarIsActive(), and TRUE.
Referenced by printSOCCons(), and SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
nlhsvars | number of variables on left hand side |
lhsvars | variables on left hand side |
lhscoeffs | coefficients of variables on left hand side, or NULL if == 1.0 |
lhsoffsets | offsets of variables on left hand side, or NULL if == 0.0 |
lhsconstant | constant on left hand side |
rhsvar | variable on right hand side |
rhscoef | coefficient of variable on right hand side |
rhsoffset | offset of variable on right hand side |
transformed | transformed constraint? |
Definition at line 825 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, isGAMSprintableSOC(), printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, and SCIPsnprintf().
Referenced by SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
z | indicating variable (binary) |
s | slack variable |
sossetdeclr | buffer to store whether we declared the SOS set for indicator reform |
transformed | transformed constraint? |
Definition at line 915 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, 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().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
nvars | number of variables in SOS |
vars | variables in SOS |
sostype | type of SOS: 1 or 2 |
transformed | transformed constraint? |
Definition at line 1043 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, printActiveVariables(), printConformName(), SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPsnprintf().
Referenced by SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
rownameextension | row name extension |
type | row type ("=e=", "=l=", or "=g=") |
nonlinvar | nonlinear variable |
linvar | linear variable, may be NULL |
exponent | exponent of nonlinear variable |
offset | offset of nonlinear variable |
coeflinear | coefficient of linear variable |
rhs | right hand side |
transformed | transformed constraint? |
signpowerallowed | allowed to use signpower operator in GAMS? |
nsmooth | buffer to store whether we printed a nonsmooth function |
Definition at line 1100 of file reader_gms.c.
References appendLine(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, printActiveVariables(), printConformName(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPfloor(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by printSignpowerCons().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
nonlinvar | nonlinear variable |
linvar | linear variable, may be NULL |
exponent | exponent of nonlinear variable |
offset | offset of nonlinear variable |
coeflinear | coefficient of linear variable |
lhs | left hand side |
rhs | right hand side |
transformed | transformed constraint? |
signpowerallowed | allowed to use signpower operator in GAMS? |
nsmooth | buffer to store whether we printed a nonsmooth function |
Definition at line 1304 of file reader_gms.c.
References printSignpowerRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIPwriteGms().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
linebuffer | line buffer of length GMS_MAX_PRINTLEN |
linecnt | number of characters in line so far |
nsmooth | buffer to store whether we printed a nonsmooth function |
transformed | expression belongs to transformed constraint? |
expr | expression to print |
exprvars | variables of expression |
Definition at line 1353 of file reader_gms.c.
References appendLineWithIndent(), GMS_MAX_PRINTLEN, 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().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
rownameextension | row name extension |
type | row type ("=e=", "=l=", or "=g=") |
nlinvars | number of linear terms |
linvars | variables in linear part |
lincoeffs | coefficients of variables in linear part |
nexprtrees | number of expression trees |
exprtrees | expression trees |
exprtreecoefs | expression tree coefficients |
rhs | right hand side |
transformed | transformed constraint? |
nsmooth | buffer to store whether we printed a nonsmooth function |
Definition at line 1753 of file reader_gms.c.
References appendLine(), appendLineWithIndent(), clearLine(), endLine(), GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, printActiveVariables(), printConformName(), printExpr(), SCIP_CALL, SCIP_OKAY, SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPisZero(), and SCIPsnprintf().
Referenced by printNonlinearCons().
|
static |
scip | SCIP data structure |
file | output file (or NULL for standard output) |
rowname | row name |
nlinvars | number of linear terms |
linvars | variables in linear part |
lincoeffs | coefficients of variables in linear part |
nexprtrees | number of expression trees |
exprtrees | expression trees |
exprtreecoefs | expression tree coefficients |
lhs | left hand side |
rhs | right hand side |
transformed | transformed constraint? |
nsmooth | buffer to store whether we printed a nonsmooth function |
Definition at line 1833 of file reader_gms.c.
References printNonlinearRow(), SCIP_CALL, SCIP_OKAY, SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIPwriteGms().
|
static |
method check if the variable names are not longer than GMS_MAX_NAMELEN
scip | SCIP data structure |
vars | array of variables |
nvars | number of variables |
Definition at line 1882 of file reader_gms.c.
References badchars, GMS_MAX_NAMELEN, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), SCIPinfoMessage(), SCIPvarGetName(), and SCIPwarningMessage().
Referenced by SCIPwriteGms().
|
static |
method check if the constraint names are not longer than GMS_MAX_NAMELEN
scip | SCIP data structure |
conss | array of constraints |
nconss | number of constraints |
transformed | TRUE iff problem is the transformed problem |
Definition at line 1941 of file reader_gms.c.
References badchars, GMS_MAX_NAMELEN, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPgetBoolParam(), SCIPgetLhsLinear(), SCIPgetLhsQuadratic(), SCIPgetRhsQuadratic(), SCIPinfoMessage(), SCIPisEQ(), and SCIPwarningMessage().
Referenced by SCIPwriteGms().
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 2034 of file reader_gms.c.
References FALSE, READER_NAME, SCIP_CALL, SCIP_DECL_READERREAD(), SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIP_VERBLEVEL_FULL, SCIPdebugMsg, SCIPerrorMessage, SCIPgetVerbLevel(), SCIPincludeReaderGms(), SCIPreaderGetName(), and SCIPsnprintf().
|
static |
problem writing method of reader
Definition at line 2150 of file reader_gms.c.
References SCIP_CALL, SCIP_DECL_READERFREE(), SCIP_OKAY, and SCIPwriteGms().
|
static |
Definition at line 76 of file reader_gms.c.
Referenced by checkConsnames(), checkVarnames(), and conformName().