SCIP-SDP  3.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Typedefs | Functions | Variables
reader_cbf.c File Reference

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   1
 
#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, long long int *linecount)
 
static SCIP_RETCODE CBFreadObjsense (SCIP *scip, SCIP_FILE *pfile, long long int *linecount)
 
static SCIP_RETCODE CBFreadVar (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadCon (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadInt (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadPsdcon (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadObjacoord (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadAcoord (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadBcoord (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadHcoord (SCIP *scip, SCIP_FILE *pfile, long long int *linecount, CBF_DATA *data)
 
static SCIP_RETCODE CBFreadDcoord (SCIP *scip, SCIP_FILE *pfile, long long int *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]
 

Detailed Description

file reader for mixed-integer semidefinite programs in CBF format

Author
Tristan Gally
Henrik A. Friberg

Definition in file reader_cbf.c.

Macro Definition Documentation

#define READER_NAME   "cbfreader"

Definition at line 53 of file reader_cbf.c.

Referenced by SCIPincludeReaderCbf().

#define READER_DESC   "file reader and writer for MISDPs in cbf format"

Definition at line 54 of file reader_cbf.c.

Referenced by SCIPincludeReaderCbf().

#define READER_EXTENSION   "cbf"

Definition at line 55 of file reader_cbf.c.

Referenced by SCIPincludeReaderCbf().

#define CBF_VERSION_NR   1

version number for CBF format

Definition at line 57 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 58 of file reader_cbf.c.

#define MACRO_STR_EXPAND (   tok)    #tok

Definition at line 67 of file reader_cbf.c.

#define MACRO_STR (   tok)    MACRO_STR_EXPAND(tok)

Definition at line 68 of file reader_cbf.c.

#define CBF_NAME_FORMAT   "%" MACRO_STR(CBF_MAX_NAME) "s"

Definition at line 69 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 70 of file reader_cbf.c.

#define CBF_MAX_NAME   512

Definition at line 71 of file reader_cbf.c.

Typedef Documentation

typedef struct CBF_Data CBF_DATA

Definition at line 111 of file reader_cbf.c.

Function Documentation

static SCIP_RETCODE CBFfgets ( SCIP_FILE *  pFile,
long long int *  linecount 
)
static

finds first non-commentary line in given file

Definition at line 120 of file reader_cbf.c.

References CBF_LINE_BUFFER.

Referenced by CBFreadAcoord(), CBFreadBcoord(), CBFreadCon(), CBFreadDcoord(), CBFreadHcoord(), CBFreadInt(), CBFreadObjacoord(), CBFreadObjsense(), CBFreadPsdcon(), and CBFreadVar().

static SCIP_RETCODE CBFreadObjsense ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount 
)
static

reads objective sense from given CBF-file

Definition at line 142 of file reader_cbf.c.

References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, and CBFfgets().

static SCIP_RETCODE CBFreadVar ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads the number and type of variables from given CBF-file

Definition at line 180 of file reader_cbf.c.

References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, and CBFfgets().

static SCIP_RETCODE CBFreadCon ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads the number and type of constraints from given CBF-file

Definition at line 309 of file reader_cbf.c.

References CBF_LINE_BUFFER, CBF_NAME_BUFFER, CBF_NAME_FORMAT, and CBFfgets().

static SCIP_RETCODE CBFreadInt ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads integrality conditions from given CBF-file

Definition at line 440 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadPsdcon ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads SDP-constraint sizes from given CBF-file

Definition at line 497 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadObjacoord ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads objective values from given CBF-file

Definition at line 548 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadAcoord ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads linear coefficients from given CBF-file

Definition at line 610 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadBcoord ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads left- and right-hand sides from given CBF-file

Definition at line 677 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadHcoord ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads nonzero coefficients of SDP-constraints from given CBF-file

Definition at line 753 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFreadDcoord ( SCIP *  scip,
SCIP_FILE *  pfile,
long long int *  linecount,
CBF_DATA data 
)
static

reads constant entries of SDP-constraints from given CBF-file

Definition at line 915 of file reader_cbf.c.

References CBF_LINE_BUFFER, and CBFfgets().

static SCIP_RETCODE CBFfreeData ( SCIP *  scip,
CBF_DATA data 
)
static

frees all data allocated for the CBF-data-struct

Definition at line 1018 of file reader_cbf.c.

static SCIP_DECL_READERCOPY ( readerCopyCbf  )
static

copy method for reader plugins (called when SCIP copies plugins)

Definition at line 1071 of file reader_cbf.c.

static SCIP_DECL_READERREAD ( readerReadCbf  )
static

problem reading method of reader

Definition at line 1082 of file reader_cbf.c.

static SCIP_DECL_READERWRITE ( readerWriteCbf  )
static

problem writing method of reader

Definition at line 1288 of file reader_cbf.c.

SCIP_RETCODE SCIPincludeReaderCbf ( SCIP *  scip)

includes the CBF file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 1912 of file reader_cbf.c.

References READER_DESC, READER_EXTENSION, and READER_NAME.

Referenced by runSCIP().

Variable Documentation

char CBF_LINE_BUFFER[CBF_MAX_LINE]
char CBF_NAME_BUFFER[CBF_MAX_NAME]

Definition at line 74 of file reader_cbf.c.

Referenced by CBFreadCon(), CBFreadObjsense(), and CBFreadVar().