|
SCIP-SDP
4.0.0
|
file reader for mixed-integer semidefinite programs in SDPA format More...
Go to the source code of this file.
Macros | |
| #define | READER_NAME "sdpareader" |
| #define | READER_DESC "file reader and writer for MISDPs in sdpa format" |
| #define | READER_EXTENSION "dat-s" |
| #define | SDPA_MIN_BUFFERLEN 65536 /* minimal size of buffer */ |
Typedefs | |
| typedef struct SDPA_Data | SDPA_DATA |
Functions | |
| static SCIP_RETCODE | readLine (SCIP *scip, SCIP_FILE *file, char **buffer, int *bufferlen, SCIP_Bool *success) |
| static SCIP_RETCODE | readNextLine (SCIP *scip, SCIP_FILE *file, char **buffer, int *bufferlen, SCIP_Longint *linecount, SCIP_Bool *success) |
| static SCIP_RETCODE | readNextLineStar (SCIP *scip, SCIP_FILE *file, char **buffer, int *bufferlen, SCIP_Longint *linecount, SCIP_Bool *success) |
| static SCIP_RETCODE | readLineDoubles (SCIP *scip, SCIP_FILE *file, char **buffer, int *bufferlen, SCIP_Longint *linecount, int nvals, SCIP_Real *values, int *nread) |
| static SCIP_RETCODE | readLineInts (SCIP *scip, SCIP_FILE *file, char **buffer, int *bufferlen, SCIP_Longint *linecount, int nvals, int *values, int *nread) |
| static SCIP_RETCODE | SDPAfreeData (SCIP *scip, SCIP_FILE *file, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadNVars (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadNBlocks (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadBlockSize (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadObjVals (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadBlocks (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadInt (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static SCIP_RETCODE | SDPAreadRank1 (SCIP *scip, SCIP_FILE *file, SCIP_Longint *linecount, SDPA_DATA *data) |
| static | SCIP_DECL_READERCOPY (readerCopySdpa) |
| static | SCIP_DECL_READERREAD (readerReadSdpa) |
| static | SCIP_DECL_READERWRITE (readerWriteSdpa) |
| SCIP_RETCODE | SCIPincludeReaderSdpa (SCIP *scip) |
file reader for mixed-integer semidefinite programs in SDPA format
Definition in file reader_sdpa.c.
| #define READER_NAME "sdpareader" |
Definition at line 57 of file reader_sdpa.c.
Referenced by SCIPincludeReaderSdpa().
| #define READER_DESC "file reader and writer for MISDPs in sdpa format" |
Definition at line 58 of file reader_sdpa.c.
Referenced by SCIPincludeReaderSdpa().
| #define READER_EXTENSION "dat-s" |
Definition at line 59 of file reader_sdpa.c.
Referenced by SCIPincludeReaderSdpa().
| #define SDPA_MIN_BUFFERLEN 65536 /* minimal size of buffer */ |
Definition at line 61 of file reader_sdpa.c.
Referenced by readLine().
| typedef struct SDPA_Data SDPA_DATA |
Definition at line 97 of file reader_sdpa.c.
|
static |
reads the next line from the input file into the line buffer, possibly reallocating buffer
| scip | SCIP data structure |
| file | file |
| buffer | buffer to read into |
| bufferlen | buffer length |
| success | pointer to store whether reading was successful (no error or EOF occured) |
Definition at line 105 of file reader_sdpa.c.
References SDPA_MIN_BUFFERLEN.
Referenced by readLineDoubles(), readLineInts(), readNextLine(), and readNextLineStar().
|
static |
reads next non-commentary line in given file
| scip | SCIP data structure |
| file | file to read from |
| buffer | buffer to read into |
| bufferlen | buffer length |
| linecount | current linecount |
| success | pointer to store whether reading was successful (no error or EOF occured) |
Definition at line 169 of file reader_sdpa.c.
References readLine().
Referenced by SDPAreadBlocks(), SDPAreadNBlocks(), and SDPAreadNVars().
|
static |
reads next line in given file, each line starting with '*'
| scip | SCIP data structure |
| file | file to read from |
| buffer | buffer to read into |
| bufferlen | buffer length |
| linecount | current linecount |
| success | pointer to store whether reading was successful (no error or EOF occured) |
Definition at line 211 of file reader_sdpa.c.
References readLine().
Referenced by SDPAreadInt(), and SDPAreadRank1().
|
static |
method for reading a given list of double numbers from file
| scip | SCIP data structure |
| file | file to read from |
| buffer | pointer to buffer |
| bufferlen | pointer to bufferlne |
| linecount | current linecount |
| nvals | number of values to read |
| values | values that have been read |
| nread | pointer to store the number of read doubles |
Definition at line 246 of file reader_sdpa.c.
References readLine().
Referenced by SDPAreadObjVals().
|
static |
method for reading a list of integer numbers from a file
| scip | SCIP data structure |
| file | file to read from |
| buffer | pointer to buffer |
| bufferlen | pointer to bufferlne |
| linecount | current linecount |
| nvals | number of values to read |
| values | values that have been read |
| nread | pointer to store the number of read ints |
Definition at line 340 of file reader_sdpa.c.
References readLine().
Referenced by SDPAreadBlockSize().
|
static |
frees all data allocated for the SDPA-data-struct
| scip | SCIP data structure |
| file | file |
| data | data pointer to save the results in |
Definition at line 425 of file reader_sdpa.c.
Referenced by SCIP_DECL_READERREAD(), SDPAreadBlocks(), SDPAreadBlockSize(), SDPAreadInt(), SDPAreadNBlocks(), SDPAreadNVars(), SDPAreadObjVals(), and SDPAreadRank1().
|
static |
reads the number of variables from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 498 of file reader_sdpa.c.
References readNextLine(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads the number of constraint blocks from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 574 of file reader_sdpa.c.
References readNextLine(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads SDP-constraint sizes and number of linear constraints from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 620 of file reader_sdpa.c.
References readLineInts(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads objective values for scalar variables from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 758 of file reader_sdpa.c.
References readLineDoubles(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads the SDP-constraint blocks and the linear constraint block
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 826 of file reader_sdpa.c.
References readNextLine(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads integrality conditions from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 1461 of file reader_sdpa.c.
References readNextLineStar(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
reads rank1 conditions from given SDPA-file
| scip | SCIP data structure |
| file | file to read from |
| linecount | current linecount |
| data | data pointer to save the results in |
Definition at line 1542 of file reader_sdpa.c.
References readNextLineStar(), and SDPAfreeData().
Referenced by SCIP_DECL_READERREAD().
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 1642 of file reader_sdpa.c.
References SCIPincludeReaderSdpa().
|
static |
problem reading method of reader
Definition at line 1654 of file reader_sdpa.c.
References SCIPcreateConsSdp(), SCIPcreateConsSdpRank1(), SDPAfreeData(), SDPAreadBlocks(), SDPAreadBlockSize(), SDPAreadInt(), SDPAreadNBlocks(), SDPAreadNVars(), SDPAreadObjVals(), and SDPAreadRank1().
|
static |
problem writing method of reader
Definition at line 1812 of file reader_sdpa.c.
References SCIPconsSdpGetBlocksize(), SCIPconsSdpGetData(), SCIPconsSdpGetNNonz(), and SCIPconsSdpShouldBeRankOne().
| SCIP_RETCODE SCIPincludeReaderSdpa | ( | SCIP * | scip | ) |
includes the SDPA file reader in SCIP
| scip | SCIP data structure |
Definition at line 2272 of file reader_sdpa.c.
References READER_DESC, READER_EXTENSION, and READER_NAME.
Referenced by SCIP_DECL_READERCOPY(), and SCIPSDPincludeDefaultPlugins().
1.8.11