Rglpk_read_file {Rglpk}R Documentation

Interface to GLPK's file reader

Description

High level R interface to the MPS and CPLEX\_LP reader of the GNU Linear Programming Kit (GLPK).

Usage

## MPS file reader
Rglpk_read_file(file, type = c("MPS_fixed", "MPS_free", "CPLEX_LP", "MathProg"),
ignore_first_row = FALSE, verbose = FALSE) 

## print method
## S3 method for class 'MP_data_from_file'
print(x, ...)

Arguments

file

a character specifying the relative or absolute path to the model file.

type

a character specifying the file format. This can be either "MPS_fixed", "MPS_free", "CPLEX_LP", and GNU "MathProg".

ignore_first_row

a logical indicating whether the first row of the model file should be ignored or not. Default: FALSE.

verbose

a logical for turning on/off additional solver output. Default: FALSE.

x

an object of class "MP_data_from_file".

...

further arguments passed on to the print method.

Details

Rglpk_read_file() takes the path to a file as an argument and calls GLPK's file reader. The description of the linear or mixed integer linear program is returned as an object of class "MP_data_from_file".

Value

Rglpk_read_file() returns the specification of a mixed integer linear program defined in file as an object of class "MP_data_from_file".

Author(s)

Stefan Theussl

Examples

## not run:
## x <- Rglpk_read_file(some_file.MPS)
## x
## Rglpk_solve_LP(x$objective, x$constraints[[1]], x$constraints[[2]],
##                x$constraints[[3]], x$types, x$maximum, x$bounds)

[Package Rglpk version 0.3-8 Index]