Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

This page contains a list of all file readers which are currently available.

List of readable file formats

The interactive shell and the callable library are capable of reading/parsing several different file formats.

BND format for variable bounds
CIP format for SCIP's constraint integer programming format
CNF format DIMACS CNF (conjunctive normal form) file format used for example for SAT problems
DIFF format for reading a new objective function for mixed-integer programs
FZN format FlatZinc is a low-level solver input language that is the target language for MiniZinc
LP format for mixed-integer (quadratically constrained quadratic) programs (CPLEX)
MPS format for mixed-integer (quadratically constrained quadratic) programs
NL format for AMPL .nl files, e.g., mixed-integer linear and nonlinear
OPB format for pseudo-Boolean optimization instances
OSiL format for mixed-integer nonlinear programs
PIP format for mixed-integer polynomial programming problems
SOL format for solutions; XML-format (read-only) or raw SCIP format
WBO format for weighted pseudo-Boolean optimization instances
ZPL format for ZIMPL models, i.e., mixed-integer linear and nonlinear programming problems [read only]

How to add a file reader

A detailed description what a file reader does and how to add a file reader to SCIP can be found here.

Modules

 Inclusion methods
 methods to include specific file readers into SCIP
 

Functions

SCIP_RETCODE SCIPwriteCcg (SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPreadCor (SCIP *scip, const char *filename, SCIP_RESULT *result)
 
SCIP_Bool SCIPcorHasRead (SCIP_READER *reader)
 
int SCIPcorGetNVarNames (SCIP_READER *reader)
 
int SCIPcorGetNConsNames (SCIP_READER *reader)
 
const char * SCIPcorGetVarName (SCIP_READER *reader, int i)
 
const char * SCIPcorGetConsName (SCIP_READER *reader, int i)
 
SCIP_RETCODE SCIPreadDiff (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwriteDiff (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 SCIPprintSolReaderFzn (SCIP *scip, SCIP_SOL *sol, FILE *file)
 
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 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 SCIPreadMps (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result, const char ***varnames, const char ***consnames, int *varnamessize, int *consnamessize, int *nvarnames, int *nconsnames)
 
SCIP_RETCODE SCIPwriteMps (SCIP *scip, SCIP_READER *reader, 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_VAR **fixedvars, int nfixedvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPreadOpb (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwriteOpb (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_VAR **fixedvars, int nfixedvars, SCIP_CONS **conss, int nconss, SCIP_Bool genericnames, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwritePbm (SCIP *scip, FILE *file, const char *name, SCIP_READERDATA *readerdata, SCIP_Bool transformed, int nvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPreadPip (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwritePip (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 SCIPwritePpm (SCIP *scip, FILE *file, const char *name, SCIP_READERDATA *readerdata, SCIP_Bool transformed, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPreadSto (SCIP *scip, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwriteSto (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)
 
int SCIPstoGetNScenarios (SCIP *scip)
 
SCIP_RETCODE SCIPreadTim (SCIP *scip, const char *filename, SCIP_RESULT *result)
 

Files

file  reader_bnd.h
 file reader for variable bounds
 
file  reader_ccg.h
 Column connectivity graph file reader (actually, only a writer)
 
file  reader_cip.h
 CIP file reader.
 
file  reader_cnf.h
 CNF file reader.
 
file  reader_cor.h
 COR file reader (MPS format of the core problem for stochastic programs)
 
file  reader_dec.h
 file reader for decompositions in the constraint based dec-file format.
 
file  reader_diff.h
 diff file reader
 
file  reader_fix.h
 file reader for variable fixings
 
file  reader_fzn.h
 FlatZinc file reader.
 
file  reader_gms.h
 GAMS file reader and writer.
 
file  reader_lp.h
 LP file reader.
 
file  reader_mps.h
 (extended) MPS file reader
 
file  reader_mst.h
 file reader for partial primal solutions
 
file  reader_nl.h
 AMPL .nl file reader.
 
file  reader_opb.h
 pseudo-Boolean file reader (opb format)
 
file  reader_osil.h
 OS instance language (OSiL) format file reader.
 
file  reader_pbm.h
 file writer for portable bitmap file format (PBM), open with common graphic viewer programs (e.g. xview)
 
file  reader_pip.h
 file reader for polynomial mixed-integer programs in PIP format
 
file  reader_ppm.h
 file writer for portable pixmap file format (PPM), open with common graphic viewer programs (e.g. xview)
 
file  reader_rlp.h
 RLP file reader (LP format with generic variables and row names)
 
file  reader_smps.h
 SMPS file reader - SMPS files lists the cor, tim and sto files for a single instance to be read.
 
file  reader_sol.h
 file reader for primal solutions
 
file  reader_sto.h
 STO file reader - the stochastic information of an instance in SMPS format.
 
file  reader_tim.h
 TIM file reader - the stage information for a stochastic programming instance in SMPS format.
 
file  reader_wbo.h
 WBO file reader (LP format with generic variables and row names)
 
file  reader_zpl.h
 ZIMPL model file reader.
 
file  reader_lop.h
 linear ordering file reader
 

Function Documentation

◆ SCIPwriteCcg()

SCIP_RETCODE SCIPwriteCcg ( SCIP scip,
FILE *  file,
const char *  name,
SCIP_Bool  transformed,
SCIP_VAR **  vars,
int  nvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 388 of file reader_ccg.c.

References a, freeGraph(), handleLinearCons(), initGraph(), NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPfreeBufferArray, SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPinfoMessage(), SCIPprintCons(), SCIPwarningMessage(), and w.

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPreadCor()

SCIP_RETCODE SCIPreadCor ( SCIP scip,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 178 of file reader_cor.c.

References NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, SCIPfindReader(), SCIPreaderGetData(), SCIPreadMps(), and TRUE.

Referenced by SCIP_DECL_READERREAD().

◆ SCIPcorHasRead()

SCIP_Bool SCIPcorHasRead ( SCIP_READER reader)

returns whether the COR file has been successfully read. This is used by the TIM and STO readers.

Parameters
readerthe file reader itself

Definition at line 208 of file reader_cor.c.

References NULL, READER_NAME, SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPcorGetNVarNames()

int SCIPcorGetNVarNames ( SCIP_READER reader)

returns the number of variable names in the COR problem

Parameters
readerthe file reader itself

Definition at line 224 of file reader_cor.c.

References NULL, READER_NAME, SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by createStages().

◆ SCIPcorGetNConsNames()

int SCIPcorGetNConsNames ( SCIP_READER reader)

returns the number of constraint names in the COR problem

Parameters
readerthe file reader itself

Definition at line 240 of file reader_cor.c.

References NULL, READER_NAME, SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by createStages().

◆ SCIPcorGetVarName()

const char* SCIPcorGetVarName ( SCIP_READER reader,
int  i 
)

returns the variable name for the given index

Parameters
readerthe file reader itself
ithe index of the variable that is requested

Definition at line 256 of file reader_cor.c.

References NULL, READER_NAME, SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by createStages().

◆ SCIPcorGetConsName()

const char* SCIPcorGetConsName ( SCIP_READER reader,
int  i 
)

returns the constraint name for the given index

Parameters
readerthe file reader itself
ithe index of the constraint that is requested

Definition at line 274 of file reader_cor.c.

References NULL, READER_NAME, SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by createStages().

◆ SCIPreadDiff()

SCIP_RETCODE SCIPreadDiff ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 1007 of file reader_diff.c.

References FALSE, LP_MAX_LINELEN, LP_MAX_PUSHEDTOKENS, LP_START, NULL, readDiffFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPallocBlockMemoryArray, and SCIPfreeBlockMemoryArray.

Referenced by SCIP_DECL_READERREAD().

◆ SCIPwriteDiff()

SCIP_RETCODE SCIPwriteDiff ( 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 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of mutable variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

◆ SCIPprintSolReaderFzn()

SCIP_RETCODE SCIPprintSolReaderFzn ( SCIP scip,
SCIP_SOL sol,
FILE *  file 
)

print given solution in Flatzinc format w.r.t. the output annotation

Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
fileoutput file (or NULL for standard output)

Definition at line 4944 of file reader_fzn.c.

References NULL, printValue(), READER_NAME, SCIP_OKAY, SCIP_Real, SCIPfindReader(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPreaderGetData(), and SCIPsortPtr().

◆ SCIPwriteGms()

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 
)

writes problem to file

writes problem to gms file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 1320 of file reader_gms.c.

References appendLine(), checkConsnames(), checkVarnames(), clearLine(), endLine(), FALSE, GMS_MAX_LINELEN, GMS_MAX_NAMELEN, GMS_MAX_PRINTLEN, NULL, printActiveVariables(), printConformName(), printIndicatorCons(), printLinearCons(), printNonlinearCons(), printSOSCons(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_IMPLINT, SCIPallocBufferArray, SCIPceil(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPfeasFloor(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetBinaryVarIndicator(), SCIPgetBoolParam(), SCIPgetCapacityKnapsack(), SCIPgetExprNonlinear(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsVarbound(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetNVarsSOS1(), SCIPgetNVarsSOS2(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsVarbound(), SCIPgetSlackVarIndicator(), 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().

◆ SCIPreadLp()

SCIP_RETCODE SCIPreadLp ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 3414 of file reader_lp.c.

References FALSE, LP_MAX_LINELEN, LP_MAX_PUSHEDTOKENS, LP_START, NULL, readLPFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPgetBoolParam(), and SCIPsetObjsense().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPwriteLp()

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 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 3491 of file reader_lp.c.

References appendLine(), checkConsnames(), checkVarnames(), clearLine(), collectAggregatedVars(), DEFAULT_AGGRLINEARIZATION_ANDS, DEFAULT_LINEARIZE_ANDS, endLine(), FALSE, LP_MAX_NAMELEN, LP_MAX_PRINTLEN, MAX, NULL, printAggregatedCons(), printAndCons(), printQuadraticCons(), printSosCons(), READER_NAME, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPcheckQuadraticNonlinear(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPfindReader(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPgetBinaryVarIndicator(), SCIPgetCapacityKnapsack(), SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetExprNonlinear(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsVarbound(), SCIPgetLinearConsIndicator(), SCIPgetNTotalVars(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetNVarsSOS1(), SCIPgetNVarsSOS2(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsVarbound(), SCIPgetSlackVarIndicator(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarsSOS1(), SCIPgetVarsSOS2(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPgetWeightsSOS1(), SCIPgetWeightsSOS2(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapSetImage(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPinfinity(), SCIPinfoMessage(), SCIPisFeasEQ(), SCIPisInfinity(), SCIPisZero(), SCIPprintCons(), SCIPreaderGetData(), SCIPreallocBufferArray, SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPvarIsNegated(), SCIPwarningMessage(), and TRUE.

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPreadMps()

SCIP_RETCODE SCIPreadMps ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result,
const char ***  varnames,
const char ***  consnames,
int *  varnamessize,
int *  consnamessize,
int *  nvarnames,
int *  nconsnames 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call
varnamesstorage for the variable names, or NULL
consnamesstorage for the constraint names, or NULL
varnamessizethe size of the variable names storage, or NULL
consnamessizethe size of the constraint names storage, or NULL
nvarnamesthe number of stored variable names, or NULL
nconsnamesthe number of stored constraint names, or NULL

Definition at line 3827 of file reader_mps.c.

References NULL, readMps(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, and SCIP_SUCCESS.

Referenced by SCIP_DECL_READERREAD(), and SCIPreadCor().

◆ SCIPwriteMps()

SCIP_RETCODE SCIPwriteMps ( SCIP scip,
SCIP_READER reader,
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_VAR **  fixedvars,
int  nfixedvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result 
)

writes problem to file

Parameters
scipSCIP data structure
readerthe file reader itself
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
fixedvarsarray with fixed and aggregated variables
nfixedvarsnumber of fixed and aggregated variables in the problem
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 3863 of file reader_mps.c.

References checkConsnames(), checkSparseMatrixCapacity(), checkVarnames(), collectAggregatedVars(), ConsNameFreq::consname, FALSE, freeMatrix(), getLinearCoeffs(), initializeMatrix(), MAX, MPS_MAX_NAMELEN, MPS_MAX_VALUELEN, NULL, printBoundSection(), printColumnSection(), printRangeSection(), printRecord(), printRhsSection(), printRowType(), printStart(), READER_NAME, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_Longint, SCIP_OBJSENSE_MAXIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_FIXED, SCIP_VARTYPE_IMPLINT, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPcheckQuadraticNonlinear(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPdebugMsg, SCIPexprGetQuadraticBilinTerm(), SCIPexprGetQuadraticData(), SCIPexprGetQuadraticQuadTerm(), SCIPfindConshdlr(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPgetBinaryVarIndicator(), SCIPgetCapacityKnapsack(), SCIPgetExprNonlinear(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsVarbound(), SCIPgetLinearConsIndicator(), SCIPgetNVarsAnd(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetNVarsSOS1(), SCIPgetNVarsSOS2(), SCIPgetResultantAnd(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsVarbound(), SCIPgetSlackVarIndicator(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarExprVar(), SCIPgetVarsAnd(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarsSOS1(), SCIPgetVarsSOS2(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPgetWeightsSOS1(), SCIPgetWeightsSOS2(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPhashtableCreate(), SCIPhashtableExists(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPinfinity(), SCIPinfoMessage(), SCIPisEQ(), SCIPisExprVar(), SCIPisInfinity(), SCIPisZero(), SCIPprintOrigProblem(), SCIPprintTransProblem(), SCIPreaderGetData(), SCIPreaderGetName(), SCIPreallocBufferArray, SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsNegated(), SCIPwarningMessage(), and TRUE.

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPreadOpb()

SCIP_RETCODE SCIPreadOpb ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 4231 of file reader_opb.c.

References FALSE, NULL, OPB_MAX_LINELEN, OPB_MAX_PUSHEDTOKENS, readOPBFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPfreeBlockMemoryArray, SCIPfreeBufferArrayNull, SCIPinfinity(), SCIPsetObjsense(), and SCIPwarningMessage().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPwriteOpb()

SCIP_RETCODE SCIPwriteOpb ( 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_VAR **  fixedvars,
int  nfixedvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool  genericnames,
SCIP_RESULT result 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
fixedvarsarray with fixed variables
nfixedvarsnumber of fixed and aggregated variables in the problem
conssarray with constraints of the problem
nconssnumber of constraints in the problem
genericnamesshould generic variable and constraint names be used
resultpointer to store the result of the file writing call

Definition at line 4309 of file reader_opb.c.

References computeAndConstraintInfos(), FALSE, INDICATORSLACKVARNAME, INDICATORVARNAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_SUCCESS, SCIP_WRITEERROR, SCIPconshdlrGetNConss(), SCIPfindConshdlr(), SCIPfreeMemoryArray, SCIPprintOrigProblem(), SCIPprintTransProblem(), SCIPprintVar(), SCIPsortedvecFindPtr(), SCIPvarGetName(), SCIPwarningMessage(), TRUE, and writeOpb().

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPwritePbm()

SCIP_RETCODE SCIPwritePbm ( SCIP scip,
FILE *  file,
const char *  name,
SCIP_READERDATA readerdata,
SCIP_Bool  transformed,
int  nvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result 
)
Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
readerdatainformation for reader
transformedTRUE iff problem is the transformed problem
nvarsnumber of active variables in the problem
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 474 of file reader_pbm.c.

References BMSclearMemoryArray, clearLine(), drawScaledImage(), getActiveVariables2(), getSubmatrixSize(), NULL, PBM_MAX_LINELEN, printLinearCons(), printRow(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPinfoMessage(), SCIPprintCons(), and SCIPwarningMessage().

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPreadPip()

SCIP_RETCODE SCIPreadPip ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 3201 of file reader_pip.c.

References FALSE, NULL, PIP_MAX_LINELEN, PIP_MAX_PUSHEDTOKENS, PIP_START, readPIPFile(), SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPgetBoolParam(), and SCIPsetObjsense().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPwritePip()

SCIP_RETCODE SCIPwritePip ( 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 
)

writes problem to file

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 2700 of file reader_pip.c.

References appendLine(), checkConsnames(), checkVarnames(), clearLine(), collectAggregatedVars(), endLine(), isExprPolynomial(), NULL, PIP_MAX_NAMELEN, PIP_MAX_PRINTLEN, printAggregatedCons(), printNonlinearCons(), printQuadraticCons(), printRowAnd(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIP_SUCCESS, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPcheckExprQuadratic(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPduplicateExpr(), SCIPexprAreQuadraticExprsVariables(), SCIPfreeBufferArray, SCIPgetCapacityKnapsack(), SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetExprNonlinear(), SCIPgetLhsLinear(), SCIPgetLhsNonlinear(), SCIPgetLhsVarbound(), SCIPgetNTotalVars(), SCIPgetNVarsAnd(), SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetResultantAnd(), SCIPgetRhsLinear(), SCIPgetRhsNonlinear(), SCIPgetRhsVarbound(), SCIPgetTypeSetppc(), SCIPgetValsLinear(), SCIPgetVarsAnd(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPinfinity(), SCIPinfoMessage(), SCIPisInfinity(), SCIPisZero(), SCIPprintCons(), SCIPreallocBufferArray, SCIPreleaseExpr(), SCIPsimplifyExpr(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), and SCIPwarningMessage().

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPwritePpm()

SCIP_RETCODE SCIPwritePpm ( SCIP scip,
FILE *  file,
const char *  name,
SCIP_READERDATA readerdata,
SCIP_Bool  transformed,
SCIP_VAR **  vars,
int  nvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
readerdatainformation for reader
transformedTRUE iff problem is the transformed problem
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

Definition at line 532 of file reader_ppm.c.

References clearLine(), FALSE, NULL, PPM_MAX_LINELEN, printLinearCons(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPdebugMsgPrint, SCIPfreeBufferArray, SCIPgetNVarsKnapsack(), SCIPgetNVarsLinear(), SCIPgetNVarsLogicor(), SCIPgetNVarsSetppc(), SCIPgetValsLinear(), SCIPgetVarsKnapsack(), SCIPgetVarsLinear(), SCIPgetVarsLogicor(), SCIPgetVarsSetppc(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPgetWeightsKnapsack(), SCIPinfoMessage(), SCIPprintCons(), SCIPwarningMessage(), and TRUE.

Referenced by SCIP_DECL_READERWRITE().

◆ SCIPreadSto()

SCIP_RETCODE SCIPreadSto ( SCIP scip,
const char *  filename,
SCIP_RESULT result 
)

reads the stochastic information for a stochastic program that is in SMPS format

Parameters
scipSCIP data structure
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 2799 of file reader_sto.c.

References NULL, READER_NAME, readSto(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPfindReader(), and SCIPreaderGetData().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPwriteSto()

SCIP_RETCODE SCIPwriteSto ( 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 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call

◆ SCIPstoGetNScenarios()

int SCIPstoGetNScenarios ( SCIP scip)

returns the total number of scenarios added to the problem

Parameters
scipSCIP data structure

Definition at line 2832 of file reader_sto.c.

References NULL, READER_NAME, SCIPfindReader(), SCIPreaderGetData(), and SCIPreaderGetName().

Referenced by SCIP_DECL_READERREAD().

◆ SCIPreadTim()

SCIP_RETCODE SCIPreadTim ( SCIP scip,
const char *  filename,
SCIP_RESULT result 
)

reads the stage information for a stochastic programming instance in SMPS format

reads problem from file

Parameters
scipSCIP data structure
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 869 of file reader_tim.c.

References createStages(), NULL, READER_NAME, readTim(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIP_SUCCESS, SCIPfindReader(), SCIPreaderGetData(), and TRUE.

Referenced by SCIP_DECL_READERREAD().