csirmaz / inner

A multiobjective linear problem (MOLP) solver - Implemented threads (C)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inner - a MultiObjective Linear Program (MOLP) solver

A MOLP is a linear program with more than one objective functions. The linear constraints are arranged in a matrix form with c columns and r rows. Columns correspond to variables x1, x2, . . . , xc, which are subject to the restrictions

Li ≤ xi ≤ Ui where 1 ≤ i ≤ c

The lower bound Li can be -∞ and the upper bound can be +∞.

For each row 1 ≤ j ≤ r the j-th constraint is

bj = a1,j x1 + a2,j x2 + . . . + ac,j xc lj ≤ bj ≤ uj where 1 ≤ j ≤ r

A feasible solution is a tuple x = <x1, x2, . . . , xc> which satisfies all constraints.

There are m ≥ 1 objectives, which are given as

yk = o1,k x1 + o2,k x2 + . . . + oc,k xc where 1 ≤ k ≤ m.

The m-dimensional objective vector y = <y1, . . ., ym> is achievable if there is a feasible solution x which yields exactly these objective values.

The solution of a MOLP is the list of all extremal objective vectors. For a minimizing (maximizing) MOLP the objective vector y is extremal if there is no other achievable objective vector y' which would be coordinatewise ≤ y (or ≥ when maximizing).

The task of MOLP solver is to find the collection of all extremal objective vectors. These extremal vectors are called vertices as they form the vertices of an (unbounded) convex m-dimensional polytope.

This MOLP solver finds the extremal vectors by iteration. In each step one more extremal vector is added to the final list. The time required for an iteration varies widely from a couple of microseconds to several days. After each iteration the solver checks if the process has been interrupted by an INT signal (^C). If it has, it switches to a quick and dirty method which might find further extremal vectors (but not necessarily all of them).

RESTRICTIONS

The linear constraints must have a feasible solution. Moreover, in a minimizing MOLP all objectives must be bounded from below, and in a maximizing MOLP all objectives must be bounded from above.

USAGE

The program is invoked as

inner [options] <vlp-file>

The only obligatory argument is the file name which contains the description of the problem in vlp format. Accepted options are

Option meaning
-h display a short help and quit
--help display all options
--help=vlp describe the vlp file format
--help=out describe the output format
--version version and copyright information
--dump dump the default config file and quit
--config=<config-file> or
-c <config-file>
read configuration from the given file
use --dump to show the default config file
-o <file> save results (both vertices and facets) to <file>
-ov <file> save vertices to <file>
-of <file> save facets to <file>
--name=NAME or
-n NAME
specify the problem name
-m[0..3] set message level: 0: none, 1: errors, 2: all, 3: verbose
-q quiet, same as -m0. Implies --PrintStatistics=0
-p T progress report in every T seconds (default: T=5)
-p 0 no progress report
-y+ report extremal solutions (vertices) immediately when generated (default)
-y- do not report extremal solutions when generated
--KEYWORD=value change value of a config keyword

CONFIGURATION PARAMETERS

Fine tuning the algorithm and the underlying scalar LP solver, and specifying the amount and type of information saved is done by giving values of several keywords. Each keyword has a default value, which is overwritten by the values in the config file (if specified), and those values are overwritten by the --KEYWORD=value command line options. Change tolerances with great care.

Algorithm parameters
RandomFacet=1
 
0 = no, 1 = yes
pick a random facet which is then passed to the oracle.
ExactFacetEq=0
 
 
0 = no, 1 = yes
when a facet is created, recompute its equation immediately from the set of adjacent
vertices.
RecalculateFacets=100
 
 
non-negative integer
after this many iterations recalculate all facet equations from the set of its adjacent vertices. The number should be zero (meaning never), or at least 5.
CheckConsistency=0
 
 
non-negative integer
after this many iterations check the consistency of the data structure against numerical errors. The number should be zero (meaning never), or at least 5.
ExtractAfterBreak=1
 
 
 
0 = no, 1 = yes
when the program receives a SIGUSR1 signal, continue extracting new vertices by asking
the oracle about every facet of the actual approximating polyhedron. Second signal
aborts this post-processing.
VertexPoolSize=0
 
 
 
non-negative integer
size of the vertex pool: add the vertex to the approximation which discards the largest number
of existing facets. Should be zero (don't use it), or at least 5. Using vertex pool adds
more work, but can simplify the approximating polytope.
Oracle parameters
OracleMessage=1
 
0 = quiet, 1 = error, 2 = on, 3 = verbose
oracle (glpk) message level.
OracleMethod=0
 
0 = primal, 1 = dual
the LP method used by the oracle.
OraclePricing=1
 
0 = standard, 1 = steepest edge
the LP pricing method.
OracleRatioTest=1
 
0 = standard, 1 = Harris' two pass
the LP ratio test.
OracleTimeLimit=20
 
non-negative integer
time limit for each oracle call in seconds; 0 means unlimited.
OracleItLimit=10000
 
non-negative integer
iteration limit for each oracle call; 0 means unlimited.
OracleScale=1
 
0 = no, 1 = yes
scale the constraint matrix; helps numerical stability.
ShuffleMatrix=1
 
0 = no, 1 = yes
shuffle rows and columns of the constraint matrix randomly.
RoundVertices=1
 
 
0 = no, 1 = yes
when the oracle reports a result vertex, round its coordinates to the nearest rational
number with small denominator.
Reporting
MessageLevel=2
 
 
0 = quiet, 1 = error, 2 = on, 3 = verbose
report level; quiet means no messages at all. The command line option -m[0..3] overrides
this value.
Progressreport=5
 
 
non-negative integer
minimum time between two progress reports in seconds. Should be zero for no progress
reports, or at least 5. The command line option -p T overrides this value.
VertexReport=1
 
 
0 = no, 1 = yes
report each vertex (extremal solution) immediately when it is found. The command line
option -y- (no) or -y+ (yes) overrides the value defined here.
MemoryReport=0
 
 
0 = no, 1 = yes
report the size and location, whenever they change, of the 11 memory blocks storing
the combinatorial data structure.
VertexAsFraction=1
 
 
0 = no, 1 = yes
if possible, print (and save) vertex coordinates as fractions with small denominators
rather than floating point numerals.
PrintStistics=1
 
0 = no, 1 = yes
print resources used (number of iterations, ridge tests, etc.) when the program stops.
PrintParams=1
 
0 = no, 1 = yes
print algorithm parameters which are not equal to their default values.
PrintVertices=2
 
0 = no, 1 = on normal exit only, 2 = always
print (again) all known vertices when the program terminates.
PrintFacets=0
 
0 = no, 1 = on normal exit only, 2 = always
print all known (relevant) facets when the program terminates.
SaveVertices=2
 
 
0 = no, 1 = on normal exit only, 2 = always
when the program terminates, save known vertices to the file specified after command
line option -o. For file specified after -ov both 0 and 1 means "save on normal exit only".
SaveFacets=1
 
 
 
0 = no, 1 = on normal exit only, 2 = always
when the program terminates, save known (relevant) facets to the file specified after
the command line option -o. For the file specified after -of both 0 and 1 means "save on
normal exit only".
Tolerances
PolytopeEps=1.3e-8
 
positive real number
a facet and a vertex are considered adjacent if their distance is smaller than this value.
ScaleEps=3e-9
 
 
positive real number
coefficients in the scaled facet equation are rounded to the nearest integer if they are
closer to it than this value.
LineqEps=8e-8
 
 
positive real number
when solving a system of linear equations for a facet equation, a coefficient smaller
than this is considered to be zero.
RoundEps=1e-9
 
 
positive real number
if the oracle reports vertices with rounded coordinates (RoundVertices=1), this is the
tolerance in the rounding algorithm.
FacetRecalcEps=1e-6
 
 
positive real number
when recalculating facet equation, report numerical instability if the new and old
coordinates differ at least this much.

COMPILATION

The program uses a patched version of glpk, the GNU Linear Program Kit. First, glpk should be compiled after the patch has been applied. Unpack the glpk source. In the glpk-X.Y directory execute the command

patch -p1 < ../src/patch-X.Y.txt

assuming you have unpacked glpk in the root of this repository. Still in the glpk-X.Y directory run 'configure' and 'make' as follows:

./configure
./make CFLAGS='-O3 -DCSL'

You must define CSL as all patches to glpk are encapsulated in #ifdef CSL blocks.

Changing to the directory INNER/src, the following command compiles inner linking the patched glpk routines statically:

gcc -O3 -W -I ../glpk-X.Y/src -o inner -DPROG=inner *.c ../glpk-X.Y/src/.libs/libglpk.a -lm

EXAMPLES

The 'examples' directory contains vlp files describing different MOLPs. File names contain three numbers separated by dashes: the number of objectives, the number of rows, and the number of columns. Each file starts with some comment lines.

Solutions are in the 'solution' directory. The same file name with the extension .res contains the list of vertices and facets. .out files contain progress reports, statistics, and parameter settings.

AUTHOR

Laszlo Csirmaz, csirmaz@ceu.edu

DATE

April 10, 2016

About

A multiobjective linear problem (MOLP) solver - Implemented threads (C)

License:GNU General Public License v3.0


Languages

Language:C 99.6%Language:C++ 0.4%