Detailed Description
Class implementing .mop file reader.
Adaption of SCIP MPS reader towards MOP format with multiple objectives. The input file has to follow some simple conventions
- It has to contain a problem in MPS format
- The file extension must be
.mop
- Every row marked
N
is treated as an objective
Definition in file ReaderMOP.cpp.
#include "ReaderMOP.h"
#include <iostream>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include "objscip/objscip.h"
#include "prob_data_objectives.h"
#include "scip/cons_knapsack.h"
#include "scip/cons_indicator.h"
#include "scip/cons_linear.h"
#include "scip/cons_logicor.h"
#include "scip/cons_setppc.h"
#include "scip/cons_varbound.h"
#include "scip/cons_sos1.h"
#include "scip/cons_sos2.h"
#include "scip/cons_quadratic.h"
#include "scip/cons_soc.h"
#include "scip/cons_bounddisjunction.h"
#include "scip/pub_misc.h"
Go to the source code of this file.
Macros | |
#define | MPS_MAX_LINELEN 1024 |
global define More... | |
#define | MPS_MAX_NAMELEN 256 |
global define More... | |
#define | MPS_MAX_VALUELEN 26 |
global define More... | |
#define | MPS_MAX_FIELDLEN 20 |
global define More... | |
#define | PATCH_CHAR '_' |
global define More... | |
#define | BLANK ' ' |
global define More... | |
Typedefs | |
typedef enum MpsSection | MPSSECTION |
typedef More... | |
typedef struct MpsInput | MPSINPUT |
typedef More... | |
typedef struct SparseMatrix | SPARSEMATRIX |
typedef More... | |
Enumerations | |
enum | MpsSection { MPS_NAME, MPS_OBJSEN, MPS_OBJNAME, MPS_ROWS, MPS_USERCUTS, MPS_LAZYCONS, MPS_COLUMNS, MPS_RHS, MPS_RANGES, MPS_BOUNDS, MPS_SOS, MPS_QUADOBJ, MPS_QMATRIX, MPS_QCMATRIX, MPS_INDICATORS, MPS_ENDATA, MPS_NAME, MPS_OBJSEN, MPS_OBJNAME, MPS_ROWS, MPS_USERCUTS, MPS_LAZYCONS, MPS_COLUMNS, MPS_RHS, MPS_RANGES, MPS_BOUNDS, MPS_SOS, MPS_QUADOBJ, MPS_QMATRIX, MPS_QCMATRIX, MPS_INDICATORS, MPS_ENDATA } |
Functions | |
static SCIP_RETCODE | mpsinputCreate (SCIP *scip, MPSINPUT **mpsi, SCIP_FILE *fp) |
static void | mpsinputFree (SCIP *scip, MPSINPUT **mpsi) |
static MPSSECTION | mpsinputSection (const MPSINPUT *mpsi) |
static const char * | mpsinputField0 (const MPSINPUT *mpsi) |
static const char * | mpsinputField1 (const MPSINPUT *mpsi) |
static const char * | mpsinputField2 (const MPSINPUT *mpsi) |
static const char * | mpsinputField3 (const MPSINPUT *mpsi) |
static const char * | mpsinputField4 (const MPSINPUT *mpsi) |
static const char * | mpsinputField5 (const MPSINPUT *mpsi) |
static SCIP_OBJSENSE | mpsinputObjsense (const MPSINPUT *mpsi) |
static SCIP_Bool | mpsinputHasError (const MPSINPUT *mpsi) |
static SCIP_Bool | mpsinputIsInteger (const MPSINPUT *mpsi) |
static void | mpsinputSetSection (MPSINPUT *mpsi, MPSSECTION section) |
static void | mpsinputSetProbname (MPSINPUT *mpsi, const char *probname) |
static void | mpsinputSetObjname (MPSINPUT *mpsi, const char *objname) |
static void | mpsinputSetObjsense (MPSINPUT *mpsi, SCIP_OBJSENSE sense) |
static void | mpsinputSyntaxerror (MPSINPUT *mpsi) |
static void | mpsinputEntryIgnored (SCIP *scip, MPSINPUT *mpsi, const char *what, const char *what_name, const char *entity, const char *entity_name, SCIP_VERBLEVEL verblevel) |
static void | clearFrom (char *buf, unsigned int pos) |
static void | patchField (char *buf, int beg, int end) |
static SCIP_Bool | mpsinputReadLine (MPSINPUT *mpsi) |
static void | mpsinputInsertName (MPSINPUT *mpsi, const char *name, SCIP_Bool second) |
static SCIP_RETCODE | readName (SCIP *scip, MPSINPUT *mpsi) |
static SCIP_RETCODE | readObjsen (SCIP *scip, MPSINPUT *mpsi) |
static SCIP_RETCODE | readObjname (SCIP *scip, MPSINPUT *mpsi) |
static SCIP_RETCODE | readRhs (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readRanges (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readBounds (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readSOS (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readQMatrix (MPSINPUT *mpsi, SCIP_Bool isQuadObj, SCIP *scip) |
static SCIP_RETCODE | readQCMatrix (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readIndicators (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readRowsMop (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readColsMop (MPSINPUT *mpsi, SCIP *scip) |
static SCIP_RETCODE | readMOP (SCIP *scip, const char *filename) |
SCIP_DECL_READERFREE (ReaderMOP::scip_free) | |
SCIP_DECL_READERREAD (ReaderMOP::scip_read) | |
Macro Definition Documentation
◆ MPS_MAX_LINELEN
#define MPS_MAX_LINELEN 1024 |
◆ MPS_MAX_NAMELEN
#define MPS_MAX_NAMELEN 256 |
global define
Definition at line 52 of file ReaderMOP.cpp.
Referenced by mpsinputSetObjname(), mpsinputSetProbname(), readBounds(), readColsMop(), readIndicators(), readRanges(), readRhs(), and readSOS().
◆ MPS_MAX_VALUELEN
#define MPS_MAX_VALUELEN 26 |
global define
Definition at line 53 of file ReaderMOP.cpp.
◆ MPS_MAX_FIELDLEN
#define MPS_MAX_FIELDLEN 20 |
global define
Definition at line 54 of file ReaderMOP.cpp.
◆ PATCH_CHAR
#define PATCH_CHAR '_' |
◆ BLANK
#define BLANK ' ' |
global define
Definition at line 57 of file ReaderMOP.cpp.
Referenced by clearFrom(), mpsinputReadLine(), and patchField().
Typedef Documentation
◆ MPSSECTION
typedef enum MpsSection MPSSECTION |
typedef
Definition at line 79 of file ReaderMOP.cpp.
◆ MPSINPUT
typedef struct MpsInput MPSINPUT |
typedef
Definition at line 101 of file ReaderMOP.cpp.
◆ SPARSEMATRIX
typedef struct SparseMatrix SPARSEMATRIX |
typedef
Definition at line 112 of file ReaderMOP.cpp.
Enumeration Type Documentation
◆ MpsSection
enum MpsSection |
enum containing all mps sections
Definition at line 60 of file ReaderMOP.cpp.
Function Documentation
◆ mpsinputCreate()
|
static |
creates the mps input structure
- Parameters
-
scip SCIP data structure mpsi mps input structure fp file object for the input file
Definition at line 116 of file ReaderMOP.cpp.
References FALSE, MPS_NAME, NULL, SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by readMOP().
◆ mpsinputFree()
free the mps input structure
- Parameters
-
scip SCIP data structure mpsi mps input structure
Definition at line 149 of file ReaderMOP.cpp.
References SCIPfreeBlockMemory.
Referenced by readMOP().
◆ mpsinputSection()
|
static |
returns the current section
- Parameters
-
mpsi mps input structure
Definition at line 159 of file ReaderMOP.cpp.
References NULL.
Referenced by readMOP(), and readRowsMop().
◆ mpsinputField0()
|
static |
return the current value of field 0
- Parameters
-
mpsi mps input structure
Definition at line 170 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputField1()
|
static |
return the current value of field 1
- Parameters
-
mpsi mps input structure
Definition at line 181 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputField2()
|
static |
return the current value of field 2
- Parameters
-
mpsi mps input structure
Definition at line 192 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputField3()
|
static |
return the current value of field 3
- Parameters
-
mpsi mps input structure
Definition at line 203 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), and readSOS().
◆ mpsinputField4()
|
static |
return the current value of field 4
- Parameters
-
mpsi mps input structure
Definition at line 214 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), and readSOS().
◆ mpsinputField5()
|
static |
return the current value of field 5
- Parameters
-
mpsi mps input structure
Definition at line 225 of file ReaderMOP.cpp.
References NULL.
Referenced by readColsMop(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), and readSOS().
◆ mpsinputObjsense()
|
static |
returns the objective sense
- Parameters
-
mpsi mps input structure
Definition at line 236 of file ReaderMOP.cpp.
References NULL.
Referenced by readMOP(), and readQMatrix().
◆ mpsinputHasError()
returns if an error was detected
- Parameters
-
mpsi mps input structure
Definition at line 247 of file ReaderMOP.cpp.
References NULL.
Referenced by readMOP().
◆ mpsinputIsInteger()
returns the value of the Bool "is integer" in the mps input
- Parameters
-
mpsi mps input structure
Definition at line 258 of file ReaderMOP.cpp.
References NULL.
Referenced by readColsMop().
◆ mpsinputSetSection()
|
static |
set the section in the mps input structure to given section
- Parameters
-
mpsi mps input structure section section that is set
Definition at line 269 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readColsMop(), readIndicators(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputSetProbname()
|
static |
set the problem name in the mps input structure to given problem name
- Parameters
-
mpsi mps input structure probname name of the problem to set
Definition at line 281 of file ReaderMOP.cpp.
References MPS_MAX_NAMELEN, NULL, and SCIPmemccpy().
Referenced by readName().
◆ mpsinputSetObjname()
|
static |
set the objective name in the mps input structure to given objective name
- Parameters
-
mpsi mps input structure objname name of the objective function to set
Definition at line 295 of file ReaderMOP.cpp.
References MPS_MAX_NAMELEN, NULL, and SCIPmemccpy().
Referenced by readObjname().
◆ mpsinputSetObjsense()
|
static |
set the objective sense in the mps input structure to given objective sense
- Parameters
-
mpsi mps input structure sense sense of the objective function
Definition at line 309 of file ReaderMOP.cpp.
References NULL.
Referenced by readObjsen().
◆ mpsinputSyntaxerror()
|
static |
- Parameters
-
mpsi mps input structure
Definition at line 320 of file ReaderMOP.cpp.
References MPS_ENDATA, NULL, SCIPerrorMessage, and TRUE.
Referenced by readBounds(), readColsMop(), readIndicators(), readMOP(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputEntryIgnored()
|
static |
method post a ignore message
- Parameters
-
scip SCIP data structure mpsi mps input structure what what get ignored what_name name of that object entity entity entity_name entity name verblevel SCIP verblevel for this message
Definition at line 333 of file ReaderMOP.cpp.
References NULL, and SCIPverbMessage().
Referenced by readBounds(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), and readSOS().
◆ clearFrom()
|
static |
fill the line from pos
up to column 80 with blanks.
- Parameters
-
buf buffer to clear pos position to start the clearing process
Definition at line 355 of file ReaderMOP.cpp.
References BLANK.
Referenced by mpsinputReadLine().
◆ patchField()
|
static |
change all blanks inside a field to PATCH_CHAR.
- Parameters
-
buf buffer to patch beg position to begin end position to end
Definition at line 369 of file ReaderMOP.cpp.
References BLANK, and PATCH_CHAR.
Referenced by mpsinputReadLine().
◆ mpsinputReadLine()
read a mps format data line and parse the fields.
- Parameters
-
mpsi mps input structure
Definition at line 390 of file ReaderMOP.cpp.
References BLANK, clearFrom(), FALSE, MPS_BOUNDS, MPS_COLUMNS, MPS_MAX_LINELEN, MPS_RANGES, MPS_RHS, NULL, number, patchField(), SCIP_Bool, SCIPdebugMessage, SCIPfgets(), SCIPstrtok(), and TRUE.
Referenced by readBounds(), readColsMop(), readIndicators(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), and readSOS().
◆ mpsinputInsertName()
Insert name
as field 1 or 2 and shift all other fields up.
- Parameters
-
mpsi mps input structure name name to insert second insert as second field?
Definition at line 566 of file ReaderMOP.cpp.
References NULL.
Referenced by readBounds(), readRanges(), and readRhs().
◆ readName()
|
static |
Process NAME section.
- Parameters
-
scip SCIP data structure mpsi mps input structure
Definition at line 590 of file ReaderMOP.cpp.
References MPS_LAZYCONS, MPS_OBJNAME, MPS_OBJSEN, MPS_ROWS, MPS_USERCUTS, mpsinputField0(), mpsinputField1(), mpsinputReadLine(), mpsinputSetProbname(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by readMOP().
◆ readObjsen()
|
static |
Process OBJSEN section. This Section is a CPLEX extension.
- Parameters
-
scip SCIP data structure mpsi mps input structure
Definition at line 637 of file ReaderMOP.cpp.
References MPS_LAZYCONS, MPS_OBJNAME, MPS_ROWS, MPS_USERCUTS, mpsinputField0(), mpsinputField1(), mpsinputReadLine(), mpsinputSetObjsense(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, and SCIPdebugMessage.
Referenced by readMOP().
◆ readObjname()
|
static |
Process OBJNAME section. This Section is a CPLEX extension.
- Parameters
-
scip SCIP data structure mpsi mps input structure
Definition at line 689 of file ReaderMOP.cpp.
References MPS_LAZYCONS, MPS_ROWS, MPS_USERCUTS, mpsinputField0(), mpsinputField1(), mpsinputReadLine(), mpsinputSetObjname(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by readMOP().
◆ readRhs()
|
static |
Process RHS section.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 727 of file ReaderMOP.cpp.
References FALSE, MPS_BOUNDS, MPS_ENDATA, MPS_INDICATORS, MPS_MAX_NAMELEN, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, MPS_RANGES, MPS_SOS, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputInsertName(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_NORMAL, SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPdebugMessage, SCIPfindCons(), SCIPgetLhsLinear(), SCIPgetRhsLinear(), SCIPisInfinity(), SCIPisZero(), and SCIPmemccpy().
Referenced by readMOP().
◆ readRanges()
|
static |
Process RANGES section
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 852 of file ReaderMOP.cpp.
References FALSE, MPS_BOUNDS, MPS_ENDATA, MPS_INDICATORS, MPS_MAX_NAMELEN, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, MPS_SOS, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputInsertName(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_NORMAL, SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPdebugMessage, SCIPfindCons(), SCIPgetLhsLinear(), SCIPgetRhsLinear(), SCIPisEQ(), SCIPisInfinity(), and SCIPmemccpy().
Referenced by readMOP().
◆ readBounds()
|
static |
Process BOUNDS section.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 988 of file ReaderMOP.cpp.
References FALSE, MPS_ENDATA, MPS_INDICATORS, MPS_MAX_NAMELEN, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, MPS_SOS, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputInsertName(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIP_VERBLEVEL_NORMAL, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPchgVarLb(), SCIPchgVarType(), SCIPchgVarUb(), SCIPcreateConsBounddisjunction(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfindVar(), SCIPfreeBufferArrayNull, SCIPgetBoolParam(), SCIPinfinity(), SCIPisFeasEQ(), SCIPmemccpy(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by readMOP().
◆ readSOS()
|
static |
Process SOS section.
We read the SOS section, which is a nonstandard section introduced by CPLEX.
- Note
- Currently we do not support the standard way of specifying SOS constraints via markers.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 1263 of file ReaderMOP.cpp.
References FALSE, MPS_ENDATA, MPS_INDICATORS, MPS_MAX_NAMELEN, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_NORMAL, SCIPABORT, SCIPaddCons(), SCIPaddVarSOS1(), SCIPaddVarSOS2(), SCIPconsGetName(), SCIPcreateConsSOS1(), SCIPcreateConsSOS2(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindVar(), SCIPmemccpy(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), SCIPwarningMessage(), and TRUE.
Referenced by readMOP().
◆ readQMatrix()
|
static |
Process QMATRIX or QUADOBJ section.
- We read the QMATRIX or QUADOBJ section, which is a nonstandard section introduced by CPLEX.
- We create a quadratic constraint for this matrix and add a variable to the objective to represent the value of the QMATRIX.
- For a QMATRIX, we expect that both lower and upper diagonal elements are given and every coefficient has to be divided by 2.0.
- For a QUADOBJ, we expect that only the upper diagonal elements are given and thus only coefficients on the diagonal have to be divided by 2.0.
- Parameters
-
mpsi mps input structure isQuadObj whether we actually read a QUADOBJ section scip SCIP data structure
Definition at line 1450 of file ReaderMOP.cpp.
References FALSE, MPS_ENDATA, MPS_INDICATORS, MPS_QCMATRIX, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputObjsense(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VERBLEVEL_NORMAL, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPconsGetName(), SCIPcreateConsQuadratic(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindVar(), SCIPfreeBufferArray, SCIPinfinity(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPreleaseVar(), SCIPvarGetName(), SCIPwarningMessage(), and TRUE.
Referenced by readMOP().
◆ readQCMatrix()
|
static |
Process QCMATRIX section.
We read the QCMATRIX section, which is a nonstandard section introduced by CPLEX.
We replace the corresponding linear constraint by a quadratic constraint which contains the original linear constraint plus the quadratic part specified in the QCMATRIX.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 1629 of file ReaderMOP.cpp.
References MPS_ENDATA, MPS_INDICATORS, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, mpsinputEntryIgnored(), mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_NORMAL, SCIPaddCons(), SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPcreateConsQuadratic(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPerrorMessage, SCIPfindCons(), SCIPfindVar(), SCIPfreeBufferArray, SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPvarGetName(), and SCIPwarningMessage().
Referenced by readMOP().
◆ readIndicators()
|
static |
Process INDICATORS section.
We read the INDICATORS section, which is a nonstandard section introduced by CPLEX.
The section has to come after the QMATRIX* sections.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 1795 of file ReaderMOP.cpp.
References FALSE, MPS_ENDATA, MPS_MAX_NAMELEN, mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPcreateConsIndicator(), SCIPcreateConsIndicatorLinCons(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfindCons(), SCIPfindVar(), SCIPfreeBufferArray, SCIPgetLhsLinear(), SCIPgetNegatedVar(), SCIPgetNVarsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetType(), SCIPvarIsIntegral(), sign(), and TRUE.
Referenced by readMOP().
◆ readRowsMop()
|
static |
Process ROWS, USERCUTS, or LAZYCONS section.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 2012 of file ReaderMOP.cpp.
References ProbDataObjectives::addObjName(), FALSE, MPS_COLUMNS, MPS_LAZYCONS, MPS_ROWS, MPS_USERCUTS, mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputReadLine(), mpsinputSection(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPfindCons(), SCIPgetBoolParam(), SCIPgetObjProbData(), SCIPinfinity(), SCIPreleaseCons(), and TRUE.
Referenced by readMOP().
◆ readColsMop()
|
static |
Process COLUMNS section.
- Parameters
-
mpsi mps input structure scip SCIP data structure
Definition at line 2104 of file ReaderMOP.cpp.
References ProbDataObjectives::addObjCoeff(), MPS_MAX_NAMELEN, MPS_RHS, mpsinputField0(), mpsinputField1(), mpsinputField2(), mpsinputField3(), mpsinputField4(), mpsinputField5(), mpsinputIsInteger(), mpsinputReadLine(), mpsinputSetSection(), mpsinputSyntaxerror(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddVar(), SCIPcreateVar(), SCIPdebugMessage, SCIPfindCons(), SCIPgetBoolParam(), SCIPgetObjProbData(), SCIPinfinity(), SCIPisZero(), SCIPmemccpy(), and SCIPreleaseVar().
Referenced by readMOP().
◆ readMOP()
|
static |
- Parameters
-
scip SCIP data structure filename name of the input file
Definition at line 2210 of file ReaderMOP.cpp.
References FALSE, MPS_BOUNDS, MPS_COLUMNS, MPS_ENDATA, MPS_INDICATORS, MPS_LAZYCONS, MPS_OBJNAME, MPS_OBJSEN, MPS_QCMATRIX, MPS_QMATRIX, MPS_QUADOBJ, MPS_RANGES, MPS_RHS, MPS_ROWS, MPS_SOS, MPS_USERCUTS, mpsinputCreate(), mpsinputFree(), mpsinputHasError(), mpsinputObjsense(), mpsinputSection(), mpsinputSyntaxerror(), NULL, readBounds(), readColsMop(), readIndicators(), readName(), readObjname(), readObjsen(), readQCMatrix(), readQMatrix(), readRanges(), readRhs(), readRowsMop(), readSOS(), SCIP_Bool, SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIPcreateObjProb(), SCIPerrorMessage, SCIPfclose(), SCIPfopen(), SCIPprintSysError(), SCIPsetObjsense(), and TRUE.
Referenced by SCIP_DECL_READERREAD().
◆ SCIP_DECL_READERFREE()
SCIP_DECL_READERFREE | ( | ReaderMOP::scip_free | ) |
destructor of file reader to free user data (called when SCIP is exiting)
Definition at line 2310 of file ReaderMOP.cpp.
References SCIP_OKAY.
◆ SCIP_DECL_READERREAD()
SCIP_DECL_READERREAD | ( | ReaderMOP::scip_read | ) |
problem reading method of reader
Definition at line 2315 of file ReaderMOP.cpp.
References NULL, readMOP(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, and SCIP_SUCCESS.