SCIP-SDP
3.2.0
|
file reader for mixed-integer semidefinite programs in CBF format More...
Go to the source code of this file.
Macros | |
#define | READER_NAME "cbfreader" |
#define | READER_DESC "file reader and writer for MISDPs in cbf format" |
#define | READER_EXTENSION "cbf" |
#define | CBF_VERSION_NR 2 |
#define | CBF_CHECK_NONNEG TRUE |
#define | MACRO_STR_EXPAND(tok) #tok |
#define | MACRO_STR(tok) MACRO_STR_EXPAND(tok) |
#define | CBF_NAME_FORMAT "%" MACRO_STR(CBF_MAX_NAME) "s" |
#define | CBF_MAX_LINE 512 /* Last 3 chars reserved for '\r\n\0' */ |
#define | CBF_MAX_NAME 512 |
Typedefs | |
typedef struct CBF_Data | CBF_DATA |
Functions | |
static SCIP_RETCODE | CBFfgets (SCIP_FILE *pFile, SCIP_Longint *linecount) |
static SCIP_RETCODE | CBFreadObjsense (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount) |
static SCIP_RETCODE | CBFreadVar (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadPsdVar (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadPsdVarRank1 (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadCon (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadInt (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadPsdCon (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadPsdConRank1 (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadObjFcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadObjAcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadFcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadAcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadBcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadHcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFreadDcoord (SCIP *scip, SCIP_FILE *pfile, SCIP_Longint *linecount, CBF_DATA *data) |
static SCIP_RETCODE | CBFfreeData (SCIP *scip, CBF_DATA *data) |
static | SCIP_DECL_READERCOPY (readerCopyCbf) |
static | SCIP_DECL_READERREAD (readerReadCbf) |
static | SCIP_DECL_READERWRITE (readerWriteCbf) |
SCIP_RETCODE | SCIPincludeReaderCbf (SCIP *scip) |
Variables | |
char | CBF_LINE_BUFFER [CBF_MAX_LINE] |
char | CBF_NAME_BUFFER [CBF_MAX_NAME] |
file reader for mixed-integer semidefinite programs in CBF format
As an extension of the original CBF format it is possible to specify the constraint that a psd variable and/or a SDP-constraint has rank 1. This is done by using the two new keywords PSDCONRANK1 and PSDVARRANK1 with the following structure:
PSDCONRANK1 r m_1 ... m_r, where is the number of SDP-constraints with a rank-1 constraint, and are the indices of the SDP-constraints with a rank-1 constraints.
PSDVARRANK1 r v_1 ... v_r, where is the number of psd variables with a rank-1 constraint, and are the indices of the psd variables with a rank-1 constraints.
Definition in file reader_cbf.c.
#define READER_NAME "cbfreader" |
Definition at line 78 of file reader_cbf.c.
Referenced by SCIPincludeReaderCbf().
#define READER_DESC "file reader and writer for MISDPs in cbf format" |
Definition at line 79 of file reader_cbf.c.
Referenced by SCIPincludeReaderCbf().
#define READER_EXTENSION "cbf" |
Definition at line 80 of file reader_cbf.c.
Referenced by SCIPincludeReaderCbf().
#define CBF_VERSION_NR 2 |
version number for CBF format
Definition at line 82 of file reader_cbf.c.
#define CBF_CHECK_NONNEG TRUE |
when writing: check linear constraints and move nonnegativity(-positivity) constraints to definition of variables (which are now defined in non-negative orthant)
Definition at line 83 of file reader_cbf.c.
#define MACRO_STR_EXPAND | ( | tok | ) | #tok |
Definition at line 92 of file reader_cbf.c.
#define MACRO_STR | ( | tok | ) | MACRO_STR_EXPAND(tok) |
Definition at line 93 of file reader_cbf.c.
#define CBF_NAME_FORMAT "%" MACRO_STR(CBF_MAX_NAME) "s" |
Definition at line 94 of file reader_cbf.c.
Referenced by CBFreadCon(), CBFreadObjsense(), and CBFreadVar().
#define CBF_MAX_LINE 512 /* Last 3 chars reserved for '\r\n\0' */ |
Definition at line 95 of file reader_cbf.c.
#define CBF_MAX_NAME 512 |
Definition at line 96 of file reader_cbf.c.
typedef struct CBF_Data CBF_DATA |
Definition at line 137 of file reader_cbf.c.
|
static |
finds first non-commentary line in given file
pFile | file to read from |
linecount | current linecount |
Definition at line 146 of file reader_cbf.c.
References CBF_LINE_BUFFER, and CBFreadObjsense().
Referenced by CBFreadAcoord(), CBFreadBcoord(), CBFreadCon(), CBFreadDcoord(), CBFreadFcoord(), CBFreadHcoord(), CBFreadInt(), CBFreadObjAcoord(), CBFreadObjFcoord(), CBFreadObjsense(), CBFreadPsdCon(), CBFreadPsdConRank1(), CBFreadPsdVar(), CBFreadPsdVarRank1(), and CBFreadVar().
|
static |
reads objective sense from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
Definition at line 168 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, CBFfgets(), and CBFreadVar().
Referenced by CBFfgets().
|
static |
reads the number and type of scalar variables from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 207 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, CBFfgets(), and CBFreadPsdVar().
Referenced by CBFreadObjsense().
|
static |
reads the number and type of psd variables from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 328 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadPsdVarRank1().
Referenced by CBFreadVar().
|
static |
reads the rank-1 information of psd variables from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 446 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadCon().
Referenced by CBFreadPsdVar().
|
static |
reads the number and type of constraints from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 517 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, CBFfgets(), and CBFreadInt().
Referenced by CBFreadPsdVarRank1().
|
static |
reads integrality conditions from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 644 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadPsdCon().
Referenced by CBFreadCon().
|
static |
reads SDP-constraint sizes from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 711 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadPsdConRank1().
Referenced by CBFreadInt().
|
static |
reads rank-1 information of SDP-constraints from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 787 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadObjFcoord().
Referenced by CBFreadPsdCon().
|
static |
reads objective values for matrix variables from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 857 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadObjAcoord().
Referenced by CBFreadPsdConRank1().
|
static |
reads objective values for scalar variables from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 968 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadFcoord().
Referenced by CBFreadObjFcoord().
|
static |
reads matrix variable coefficients from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 1048 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadAcoord().
Referenced by CBFreadObjAcoord().
|
static |
reads linear coefficients from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 1173 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadBcoord().
Referenced by CBFreadFcoord().
|
static |
reads left- and right-hand sides from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 1269 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadHcoord().
Referenced by CBFreadAcoord().
|
static |
reads nonzero coefficients of SDP-constraints from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 1361 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFreadDcoord().
Referenced by CBFreadBcoord().
|
static |
reads constant entries of SDP-constraints from given CBF-file
scip | SCIP data structure |
pfile | file to read from |
linecount | current linecount |
data | data pointer to save the results in |
Definition at line 1643 of file reader_cbf.c.
References CBF_LINE_BUFFER, CBFfgets(), and CBFfreeData().
Referenced by CBFreadHcoord().
|
static |
frees all data allocated for the CBF-data-struct
scip | SCIP data structure |
data | data pointer to save the results in |
Definition at line 1780 of file reader_cbf.c.
References SCIP_DECL_READERCOPY().
Referenced by CBFreadDcoord().
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 1945 of file reader_cbf.c.
Referenced by CBFfreeData().
|
static |
problem reading method of reader
Definition at line 1956 of file reader_cbf.c.
|
static |
problem writing method of reader
Definition at line 2308 of file reader_cbf.c.
SCIP_RETCODE SCIPincludeReaderCbf | ( | SCIP * | scip | ) |
includes the CBF file reader in SCIP
scip | SCIP data structure |
Definition at line 2878 of file reader_cbf.c.
References READER_DESC, READER_EXTENSION, and READER_NAME.
Referenced by SCIPSDPincludeDefaultPlugins().
char CBF_LINE_BUFFER[CBF_MAX_LINE] |
Definition at line 98 of file reader_cbf.c.
Referenced by CBFfgets(), CBFreadAcoord(), CBFreadBcoord(), CBFreadCon(), CBFreadDcoord(), CBFreadFcoord(), CBFreadHcoord(), CBFreadInt(), CBFreadObjAcoord(), CBFreadObjFcoord(), CBFreadObjsense(), CBFreadPsdCon(), CBFreadPsdConRank1(), CBFreadPsdVar(), CBFreadPsdVarRank1(), and CBFreadVar().
char CBF_NAME_BUFFER[CBF_MAX_NAME] |
Definition at line 99 of file reader_cbf.c.
Referenced by CBFreadCon(), CBFreadObjsense(), and CBFreadVar().