Scippy

SCIP

Solving Constraint Integer Programs

reader_lp.h File Reference

Detailed Description

LP file reader.

Author
Tobias Achterberg

This reader allows to parse and write CPLEX .lp files with linear and quadratic constraints and objective, special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables. For writing, linear (general and specialized), indicator, quadratic, second order cone, and special ordered set constraints are supported.

The lp format is defined within the CPLEX documentation.

Definition in file reader_lp.h.

#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeReaderLp (SCIP *scip)
 
SCIP_RETCODE SCIPreadLp (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPwriteLp (SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_VAR **vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, SCIP_CONS **conss, int nconss, SCIP_RESULT *result)
 

Function Documentation

SCIP_RETCODE SCIPincludeReaderLp ( SCIP scip)

includes the lp file reader into SCIP

Parameters
scipSCIP data structure
SCIP_RETCODE SCIPreadLp ( SCIP scip,
SCIP_READER reader,
const char *  filename,
SCIP_RESULT result 
)

reads problem from file

Parameters
scipSCIP data structure
readerthe file reader itself
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call
SCIP_RETCODE SCIPwriteLp ( SCIP scip,
FILE *  file,
const char *  name,
SCIP_Bool  transformed,
SCIP_OBJSENSE  objsense,
SCIP_Real  objscale,
SCIP_Real  objoffset,
SCIP_VAR **  vars,
int  nvars,
int  nbinvars,
int  nintvars,
int  nimplvars,
int  ncontvars,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result 
)

writes problem to file

Parameters
scipSCIP data structure
fileoutput file, or NULL if standard output should be used
nameproblem name
transformedTRUE iff problem is the transformed problem
objsenseobjective sense
objscalescalar applied to objective function; external objective value is extobj = objsense * objscale * (intobj + objoffset)
objoffsetobjective offset from bound shifting and fixing
varsarray with active variables ordered binary, integer, implicit, continuous
nvarsnumber of active variables in the problem
nbinvarsnumber of binary variables
nintvarsnumber of general integer variables
nimplvarsnumber of implicit integer variables
ncontvarsnumber of continuous variables
conssarray with constraints of the problem
nconssnumber of constraints in the problem
resultpointer to store the result of the file writing call