# SCIP

Solving Constraint Integer Programs

## Detailed Description

This reader allows to read a file containing new bounds for variables of the current problem. Each line of the file should have format

<variable name> <lower bound> <upper bound>

where infinite bounds can be written as inf, +inf or -inf. Note that only a subset of the variables may appear in the file. Lines with unknown variable names are ignored. The writing functionality can be used in problem and transformed stages. Note that in transformed stage, the leading "t_" in the name of a transformed variable will not appear in the output. This way, bounds written in transformed stage can be read again in problem stage.

#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_bnd.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_reader.h"
#include "scip/scip_var.h"
#include <string.h>
#include <strings.h>

Go to the source code of this file.

## Macros

#define DEFAULT_IMPROVEONLY   FALSE

## Functions

static void printBounds (SCIP *scip, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Real lb, SCIP_Real ub)

static SCIP_RETCODE SCIPwriteBnd (SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_RESULT *result)

## Macro Definition Documentation

Definition at line 56 of file reader_bnd.c.

Definition at line 57 of file reader_bnd.c.

Definition at line 58 of file reader_bnd.c.

## ◆ DEFAULT_IMPROVEONLY

 #define DEFAULT_IMPROVEONLY   FALSE

only use improving bounds

Definition at line 60 of file reader_bnd.c.

## Function Documentation

static

reads a given bound file, problem has to be in problem stage

Parameters
 scip SCIP data structure fname name of the input file readerdata pointer to the data of the reader

Definition at line 76 of file reader_bnd.c.

static

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

Definition at line 238 of file reader_bnd.c.

static

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 257 of file reader_bnd.c.

## ◆ printBounds()

 static void printBounds ( SCIP * scip, SCIP_MESSAGEHDLR * messagehdlr, FILE * file, SCIP_Real lb, SCIP_Real ub )
static

outputs given bounds into a file stream

Parameters
 scip SCIP data structure messagehdlr message handler file file stream to print into, or NULL for stdout lb lower bound ub upper bound

Definition at line 287 of file reader_bnd.c.

References SCIP_REAL_FORMAT, SCIPisInfinity(), and SCIPmessageFPrintInfo().

Referenced by SCIPwriteBnd().

## ◆ SCIPwriteBnd()

 static SCIP_RETCODE SCIPwriteBnd ( SCIP * scip, FILE * file, SCIP_VAR ** vars, int nvars, SCIP_RESULT * result )
static

writes problem to file

Parameters
 scip SCIP data structure file file stream to print into, or NULL for stdout vars array with active variables ordered binary, integer, implicit, continuous nvars number of active variables in the problem result pointer to store the result of the file writing call

Definition at line 314 of file reader_bnd.c.

static