Scippy

SCIP

Solving Constraint Integer Programs

reader_sol.c File Reference

Detailed Description

file reader for primal solutions

Author
Tobias Achterberg
Timo Berthold
Marc Pfetsch

Definition in file reader_sol.c.

#include <ctype.h>
#include "scip/pub_fileio.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_reader.h"
#include "scip/pub_sol.h"
#include "scip/reader_sol.h"
#include "scip/scip_general.h"
#include "scip/scip_message.h"
#include "scip/scip_param.h"
#include "scip/scip_reader.h"
#include "scip/scip_sol.h"
#include <string.h>

Go to the source code of this file.

Macros

#define READER_NAME   "solreader"
 
#define READER_DESC   "file reader for primal solutions"
 
#define READER_EXTENSION   "sol"
 

Functions

static SCIP_RETCODE readSol (SCIP *scip, const char *fname, SCIP_Bool xml)
 
static SCIP_DECL_READERCOPY (readerCopySol)
 
static SCIP_DECL_READERREAD (readerReadSol)
 
SCIP_RETCODE SCIPincludeReaderSol (SCIP *scip)
 

Macro Definition Documentation

◆ READER_NAME

#define READER_NAME   "solreader"

Definition at line 40 of file reader_sol.c.

Referenced by SCIP_DECL_READERCOPY(), SCIP_DECL_READERREAD(), and SCIPincludeReaderSol().

◆ READER_DESC

#define READER_DESC   "file reader for primal solutions"

Definition at line 41 of file reader_sol.c.

Referenced by SCIPincludeReaderSol().

◆ READER_EXTENSION

#define READER_EXTENSION   "sol"

Definition at line 42 of file reader_sol.c.

Referenced by SCIPincludeReaderSol().

Function Documentation

◆ readSol()

static SCIP_RETCODE readSol ( SCIP scip,
const char *  fname,
SCIP_Bool  xml 
)
static

reads a given SCIP solution file, problem has to be transformed in advance

Parameters
scipSCIP data structure
fnamename of the input file
xmltrue, iff the given file is XML

Definition at line 51 of file reader_sol.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_READERROR, SCIP_VERBLEVEL_NORMAL, SCIPaddSolFree(), SCIPcreateSol(), SCIPerrorMessage, SCIPfreeSol(), SCIPgetBoolParam(), SCIPisTransformed(), SCIPreadSolFile(), SCIPsolIsPartial(), SCIPtrySolFree(), SCIPverbMessage(), and TRUE.

Referenced by SCIP_DECL_READERREAD().

◆ SCIP_DECL_READERCOPY()

static SCIP_DECL_READERCOPY ( readerCopySol  )
static

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

Definition at line 125 of file reader_sol.c.

References NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderSol(), and SCIPreaderGetName().

◆ SCIP_DECL_READERREAD()

static SCIP_DECL_READERREAD ( readerReadSol  )
static

problem reading method of reader

In order to determine the type of the file, we have to open it. Thus, it has to be opened twice. This might be removed, but is likely to not hurt the performance too much.

Definition at line 144 of file reader_sol.c.

References FALSE, NULL, READER_NAME, readSol(), SCIP_CALL, SCIP_DIDNOTRUN, SCIP_MAXSTRLEN, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_SUCCESS, SCIP_VERBLEVEL_NORMAL, SCIPerrorMessage, SCIPfclose(), SCIPfgets(), SCIPfopen(), SCIPgetStage(), SCIPprintSysError(), SCIPreaderGetName(), SCIPverbMessage(), and TRUE.