CIP file reader.
Definition in file reader_cip.c.
#include "blockmemshell/memory.h"#include "scip/rational.h"#include "scip/cons_linear.h"#include "scip/cons_exactlinear.h"#include "scip/pub_fileio.h"#include "scip/pub_message.h"#include "scip/pub_misc.h"#include "scip/pub_reader.h"#include "scip/pub_var.h"#include "scip/reader_cip.h"#include "scip/scip_exact.h"#include "scip/scip_cons.h"#include "scip/scip_mem.h"#include "scip/scip_message.h"#include "scip/scip_numerics.h"#include "scip/scip_param.h"#include "scip/scip_prob.h"#include "scip/scip_reader.h"#include "scip/scip_var.h"Go to the source code of this file.
Macros | |
| #define | READER_NAME "cipreader" |
| #define | READER_DESC "file reader for CIP (Constraint Integer Program) format" |
| #define | READER_EXTENSION "cip" |
| #define | DEFAULT_CIP_WRITEFIXEDVARS TRUE |
Functions | |
| static SCIP_RETCODE | getInputString (SCIP *scip, CIPINPUT *cipinput) |
| static void | getStart (SCIP *scip, CIPINPUT *cipinput) |
| static SCIP_RETCODE | getStatistics (SCIP *scip, CIPINPUT *cipinput) |
| static SCIP_RETCODE | getObjective (SCIP *scip, CIPINPUT *cipinput) |
| static SCIP_RETCODE | getVariable (SCIP *scip, CIPINPUT *cipinput, SCIP_Bool initial, SCIP_Bool removable) |
| static SCIP_RETCODE | getFixedVariable (SCIP *scip, CIPINPUT *cipinput) |
| static SCIP_RETCODE | getConstraint (SCIP *scip, CIPINPUT *cipinput, SCIP_Bool initial, SCIP_Bool dynamic, SCIP_Bool removable) |
| static | SCIP_DECL_READERCOPY (readerCopyCip) |
| static | SCIP_DECL_READERFREE (readerFreeCip) |
| static | SCIP_DECL_READERREAD (readerReadCip) |
| static | SCIP_DECL_HASHGETKEY (hashGetKeyVar) |
| static | SCIP_DECL_HASHKEYEQ (hashKeyEqVar) |
| static | SCIP_DECL_HASHKEYVAL (hashKeyValVar) |
| static | SCIP_DECL_READERWRITE (readerWriteCip) |
| SCIP_RETCODE | SCIPincludeReaderCip (SCIP *scip) |
| #define READER_NAME "cipreader" |
Definition at line 57 of file reader_cip.c.
| #define READER_DESC "file reader for CIP (Constraint Integer Program) format" |
Definition at line 58 of file reader_cip.c.
| #define READER_EXTENSION "cip" |
Definition at line 59 of file reader_cip.c.
| #define DEFAULT_CIP_WRITEFIXEDVARS TRUE |
Should fixed and aggregated variables be written when writing?
Definition at line 61 of file reader_cip.c.
Referenced by SCIPincludeReaderCip().
| typedef enum CipSection CIPSECTION |
Section of the in CIP files
Definition at line 82 of file reader_cip.c.
| typedef struct CipInput CIPINPUT |
CIP reading data
Definition at line 105 of file reader_cip.c.
| enum CipSection |
Section of the in CIP files
Definition at line 72 of file reader_cip.c.
|
static |
get next input line; this are all characters until the next semicolon
| scip | SCIP data structure |
| cipinput | CIP parsing data |
Definition at line 114 of file reader_cip.c.
References assert(), BMSclearMemoryArray, CIP_CONSTRAINTS, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPerrorMessage, SCIPfgets(), SCIPreallocBufferArray, and TRUE.
Referenced by SCIP_DECL_READERREAD().
read the problem name out of the statistics
| scip | SCIP data structure |
| cipinput | CIP parsing data |
Definition at line 200 of file reader_cip.c.
References assert(), CIP_STATISTIC, NULL, SCIPerrorMessage, and TRUE.
Referenced by SCIP_DECL_READERREAD().
|
static |
read the problem name out of the statistics
| scip | SCIP data structure |
| cipinput | CIP parsing data |
Definition at line 227 of file reader_cip.c.
References CIP_OBJECTIVE, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMsg, SCIPsetProbName(), SCIPskipSpace(), and SCIPwarningMessage().
Referenced by SCIP_DECL_READERREAD().
|
static |
read objective sense, offset, and scale
| scip | SCIP data structure |
| cipinput | CIP parsing data |
Definition at line 278 of file reader_cip.c.
References CIP_CONSTRAINTS, CIP_END, CIP_FIXEDVARS, CIP_OBJECTIVE, CIP_VARS, NULL, SCIP_Bool, SCIP_CALL, SCIP_OBJSENSE_MAXIMIZE, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIPdebugMsg, SCIPparseRational(), SCIPparseReal(), SCIPrationalDebugMessage, SCIPrationalSetReal(), SCIPsetObjsense(), SCIPskipSpace(), SCIPstrncasecmp(), and SCIPwarningMessage().
Referenced by SCIP_DECL_READERREAD().
|
static |
read variable
| scip | SCIP data structure |
| cipinput | CIP parsing data |
| initial | should var's column be present in the initial root LP? |
| removable | is var's column removable from the LP (due to aging or cleanup)? |
Definition at line 428 of file reader_cip.c.
References CIP_CONSTRAINTS, CIP_END, CIP_FIXEDVARS, CIP_VARS, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVar(), SCIPbuffer(), SCIPchgVarObj(), SCIPchgVarObjExact(), SCIPdebug, SCIPdebugMsg, SCIPerrorMessage, SCIPparseVar(), SCIPprintVar(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsEQReal(), SCIPrationalMult(), SCIPreleaseVar(), SCIPvarGetObj(), SCIPvarGetObjExact(), TRUE, and var.
Referenced by SCIP_DECL_READERREAD().
|
static |
read fixed variable
| scip | SCIP data structure |
| cipinput | CIP parsing data |
Definition at line 499 of file reader_cip.c.
References assert(), CIP_CONSTRAINTS, CIP_END, CIP_FIXEDVARS, FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPbuffer(), SCIPcreateConsExactLinear(), SCIPcreateConsLinear(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfreeBufferArray, SCIPisExact(), SCIPparseRational(), SCIPparseReal(), SCIPparseVar(), SCIPparseVarName(), SCIPparseVarsLinearsum(), SCIPparseVarsLinearsumExact(), SCIPprintVar(), SCIPrationalCreateBuffer(), SCIPrationalCreateBufferArray(), SCIPrationalDebugMessage, SCIPrationalFreeBuffer(), SCIPrationalFreeBufferArray(), SCIPrationalMultReal(), SCIPrationalReallocBufferArray(), SCIPrationalSetReal(), SCIPreallocBufferArray, SCIPreleaseCons(), SCIPreleaseVar(), SCIPskipSpace(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarIsBinary(), SCIPwarningMessage(), TRUE, var, and vars.
Referenced by SCIP_DECL_READERREAD().
|
static |
read constraint
| scip | SCIP data structure |
| cipinput | CIP parsing data |
| initial | should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. |
| dynamic | Is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. |
| removable | should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. |
Definition at line 780 of file reader_cip.c.
References CIP_END, FALSE, NULL, propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPparseCons(), SCIPreleaseCons(), separate(), and TRUE.
Referenced by SCIP_DECL_READERREAD().
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 870 of file reader_cip.c.
References assert(), NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderCip(), and SCIPreaderGetName().
|
static |
destructor of reader to free user data (called when SCIP is exiting)
Definition at line 884 of file reader_cip.c.
References assert(), NULL, READER_NAME, SCIP_OKAY, SCIPfreeBlockMemory, SCIPreaderGetData(), and SCIPreaderGetName().
|
static |
problem reading method of reader
Definition at line 899 of file reader_cip.c.
References CIP_CONSTRAINTS, CIP_END, CIP_FIXEDVARS, CIP_OBJECTIVE, CIP_START, CIP_STATISTIC, CIP_VARS, FALSE, getConstraint(), getFixedVariable(), getInputString(), getObjective(), getStart(), getStatistics(), getVariable(), NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_INVALIDDATA, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPABORT, SCIPaddOrigObjoffset(), SCIPaddOrigObjoffsetExact(), SCIPallocBufferArray, SCIPbuffer(), SCIPcreateProb(), SCIPerrorMessage, SCIPfclose(), SCIPfopen(), SCIPfreeBufferArray, SCIPgetBoolParam(), SCIPisExact(), SCIPprintSysError(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsZero(), SCIPrationalMult(), SCIPrationalSetReal(), and TRUE.
|
static |
hash key retrieval function for variables
Definition at line 1037 of file reader_cip.c.
|
static |
returns TRUE iff the indices of both variables are equal
Definition at line 1044 of file reader_cip.c.
|
static |
returns the hash value of the key
Definition at line 1053 of file reader_cip.c.
References assert(), and SCIPvarGetIndex().
|
static |
problem writing method of reader
Definition at line 1061 of file reader_cip.c.
References assert(), i, NULL, nvars, objscale, READER_NAME, result, SCIP_CALL, SCIP_ERROR, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_SUCCESS, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPblkmem(), SCIPdebugMsg, SCIPerrorMessage, SCIPflattenVarAggregationGraph(), SCIPgetMessagehdlr(), SCIPhashtableCreate(), SCIPhashtableExists(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPinfoMessage(), SCIPisExact(), SCIPprintCons(), SCIPprintVar(), SCIPrationalIsEQReal(), SCIPrationalIsZero(), SCIPrationalMessage(), SCIPreaderGetData(), SCIPreaderGetName(), SCIPvarGetAggrVar(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrVars(), SCIPvarGetNegatedVar(), SCIPvarGetNegationVar(), SCIPvarGetStatus(), var, and vars.