SIPAMPL: Semi-Infinite Programming With AMPL

advertisement
SIPAMPL: Semi-Infinite Programming
With AMPL
A. ISMAEL F. VAZ and EDITE M. G. P. FERNANDES
Universidade do Minho
and
M. PAULA S. F. GOMES
Imperial College of Science, Technology and Medicine
SIPAMPL is an environment for coding semi-infinite programming (SIP) problems. This environment includes a database containing a set of SIP problems that have been collected from the
literature and a set of routines. It allows users to code their own SIP problems in AMPL, to use any
problem already in the database, and to develop and test any SIP solver. The SIPAMPL routines
support the interface between a potential SIP solver and test problems coded in AMPL. SIPAMPL
also provides a tool that allows the selection of problems from the database with specified characteristics. As a concept demonstration, we show how MATLAB can use SIPAMPL to solve the
problems in the database. The Linux and Microsoft Windows versions together with the database
of coded problems are freely available via the web.
Categories and Subject Descriptors: D.2.2 [Software Engineering]: Design Tools and Techniques—Modules and interfaces; G.1.6 [Numerical Analysis]: Optimization—Constrained
optimization
General Terms: Documentation, Languages
Additional Key Words and Phrases: Evaluation tools, semi-infinite programming, test problems
1. INTRODUCTION
The existence of software that enables the coding of mathematical programming problems in a modular way is known to be appreciated by users and
developers of mathematical programming solvers. AMPL [Fourer et al. 1990]
is a good example of the finite linear/nonlinear case. It provides an easy-tolearn and powerful modeling language together with automatic differentiation
Authors’ addresses: A. Ismael F. Vaz and Edite M. G. P. Fernandes, Departamento de Produção
e Sistemas, Escola de Engenharia, Campus de Gualtar, Universidade do Minho, 4710-057 Braga,
Portugal; email: {aivaz;emgpf}@dps.uminho.pt; M. Paula S. F. Gomes, Mechanical Engineering
Department, Mechatronics in Medicine Laboratory, Imperial College of Science, Technology and
Medicine, London SW7 2BX, UK; email: p.gomes@ic.ac.uk.
Permission to make digital or hard copies of part or all of this work for personal or classroom use is
granted without fee provided that copies are not made or distributed for profit or direct commercial
advantage and that copies show this notice on the first page or initial screen of a display along
with the full citation. Copyrights for components of this work owned by others than ACM must be
honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers,
to redistribute to lists, or to use any component of this work in other works requires prior specific
permission and/or a fee. Permissions may be requested from Publications Dept., ACM, Inc., 1515
Broadway, New York, NY 10036 USA, fax: +1 (212) 869-0481, or permissions@acm.org.
C 2004 ACM 0098-3500/04/0300-0047 $5.00
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004, Pages 47–61.
48
•
A. Ismael F. Vaz et al.
of the functions involved in the problem definition. Solver developers are supported by a set of AMPL interface routines, which allow communication between the solver and AMPL. One may use those routines to obtain all required
information about the problem to be solved. As AMPL does not directly support semi-infinite programming (SIP) problems, we developed a set of routines
that allows a SIP solver to communicate with AMPL. This new environment,
which we have coined SIPAMPL, also contains a database of SIP problems
coded in AMPL, a tool to query the problems database, and another set of
routines that enables the MATLAB [MathWorks 1999] solver (fseminf function in the Optimization Toolbox [Coleman et al. 1999]) to use the SIPAMPL
routines.
The operation of SIP solvers is outside the scope of this paper.
We start in Section 2 by giving a description of a SIP problem and we present
a short SIP example coded in AMPL. A brief description of AMPL is given in
Section 3. The developed SIPAMPL routines are described in Section 4, which
has two subsections, one related to MATLAB usage and the other to any solver.
In Section 5 we describe the collection of SIP problems already available in the
database. The select tool that allows queries to the database is presented in
Section 6, and some discussion and the conclusions are presented in the last
two sections.
2. SEMI-INFINITE PROGRAMMING
A SIP problem is a mathematical program of the form
minn f (x)
x∈R
s.t. g i (x, t) ≤ 0, i = 1, . . . , m
hi (x) ≤ 0, i = 1, . . . , o
hi (x) = 0, i = o + 1, . . . , q
∀t ∈ T,
(1)
where f (x) is the objective function, g i (x, t), i = 1, . . . , m, are the infinite and
hi (x), i = 1, . . . , q, the finite constraint functions. T ⊂ R p is usually a cartesian product of intervals ([α1 , β1 ] × [α2 , β2 ] × · · · × [α p , β p ]). Since AMPL does
not directly support SIP problems, the following assumptions for coding SIP
problems in AMPL were made.
(1) Constraint functions that depend on the infinite variables (t) are coded
with names starting with t. Conversely, all constraint functions with names
starting with t are assumed to depend on the infinite variables.
(2) All infinite variable names must start with t. Conversely, all variables with
names starting with t are assumed to be infinite.
(3) The AMPL .row and .col files must be provided (option auxfiles set to rc
in AMPL). We further explain this in Section 3.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
49
As an example, consider the following problem:
min
x12 + x22
s.t.
−10 ≤
x1 t + x2 t 2 ≤ 0
x1 + x2 ≤ 10
x∈R 2
∀t ∈ [0, 1]
The corresponding AMPL code follows:
####################################################################
# Objective: Quadratic
# Classification for
# Constraints: Linear
# the "select" tool
####################################################################
# Example problem in the SIPAMPL user manual.
# This is file userman.mod in the distribution.
# Author:
aivaz@dps.uminho.pt 27/12/99
####################################################################
var x {1..2};
var t;
# Finite variables
# Infinite variable starts with t
minimize fx:
x[1]^2+x[2]^2;
# Objective function
subject to tcons:
x[1]*t+x[2]*t^2 <=
# Infinite constraint starts with t
0;
subject to lincon:
-10 <= x[1]+x[2] <=
# Finite linear constraint
10;
subject to boundt:
0 <= t <= 1;
#
#
#
#
Infinite index set
AMPL will convert this constraint
into simple bounds on the infinite
variable
#
#
#
#
#
Write .col and .row files
No starting point for this
example
Select SIP solver
Solve the problem
###############################
# End of problem description
###############################
option mysolver_auxfiles rc;
option reset_initial_guesses 1;
option solver mysolver;
solve;
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
50
•
A. Ismael F. Vaz et al.
###############################
# Display solver status
###############################
display solve_result_num, solve_result;
###############################
# Solution found
###############################
printf "Solver terminated with solution\n";
display x;
display fx;
mysolver is the name of the binary that will solve the SIP problem and can
be replaced by any other solver for SIP that is available.
To the best of our knowledge there is just one solver available for SIP problems. Our solver NSIPS [Vaz et al. 2002] is publicly available and uses the
SIPAMPL routines to obtain and solve a SIP problem coded in AMPL. Utilizing
the NSIPS solver available on the NEOS server,1 it is possible to solve problems
using SIPAMPL by submitting them via the Internet.
The MATLAB function fseminf is not a real solver for SIP, since the user
must provide a function that evaluates the infinite constraints at a set of finite
points. In providing this function, the user must write the algorithm to select
the desired points, thereby doing most of the work and defining a scheme to
solve SIP.
Lines 2 and 3 give useful information about the SIP problem type. This
information will be used by the select tool described in Section 6.
3. AMPL
AMPL is an algebraic modeling language that allows the formulation of mathematical programming problems. The flexible and natural language used by
AMPL was the main reason for choosing AMPL for our development. The proposed environment could be developed in other modeling languages, such as
CUTE (Constrained and Unconstrained Testing Environment [Bongartz et al.
1995]), but the CUTE Standard Input Format (SIF) language is not as natural
as AMPL’s. AMPL is commercial software but a student edition is available for
evaluation.
We assume that the reader is familiar with AMPL and the C programming
language. For background reading, see Kernighan and Richie [1988]; Fourer
et al. [1990] and Gay [1993].
AMPL provides a way to communicate with a wide variety of solvers. AMPL
runs a solver as a separate program and communicates with it by writing and
reading files. By default, AMPL writes a temporary file with extension .nl. This
file only contains sufficient information to describe the model. For example, the
1 http://www-neos.mcs.anl.gov/neos/solvers/SIO:NSIPS/.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
51
Fig. 1. Interaction between AMPL and solvers.
parameters declared in the model are included but the variable and constraint
names are removed. AMPL invokes the solver with the .nl file name and expects
the solver to write a file with extension .sol, containing a termination message
and the solution found. To support the solver in reading the .nl file and writing
the .sol, AMPL has a set of publicly available routines2 to provide the interface
between the solver and AMPL.
AMPL will process a SIP model (.mod file) in the same way as any model coded
in AMPL. To solve a SIP problem, a solver needs to evaluate the finite/infinite
constraints in an unspecified order. The SIP solver therefore needs to know
which variables and constraints are finite/infinite. If the solver option auxfiles
is set to the value rc, AMPL will produce the .row and .col files, which contain
the extra needed information about the coded problem. Since AMPL routines
treat all variables and constraints equally, we developed a set of routines, called
SIPAMPL routines, which identify the finite/infinite variables and constraints,
and make the interface between the SIP solver and the AMPL routines.
The main problem data in the AMPL interface is kept in a data structure
called asl (which stands for AMPL/Solver interface Library [Gay 1993]). This
data structure, defined in the asl.h include file, is loaded when the solver reads
the .nl file. Since the AMPL routines must be available to SIPAMPL, the asl
data structure is also available.
Figure 1 illustrates the interaction between the AMPL binary and solvers.
The SIP solver uses the SIPAMPL and AMPL interface routines to read the
problem from .nl, .row and .col files produced by AMPL. A finite problem
solver only uses the AMPL interface routines to read the problem from the .nl
file. Both solvers use the AMPL interface routines to produce the .sol file read
by AMPL to display the solution found.
4. USING THE SIPAMPL ROUTINES
The SIPAMPL routines are distributed as two source files: sip.c (the interface routines) and sip.h (functions prototypes, data structures and variables
declaration) together with two makefiles: makefile for the Linux operating
system (gcc compiler) that makes the library libsip.a and makefile.vc for
Microsoft Windows (Microsoft Visual C/C++ compiler) that makes the library
sipampl.lib.
2 solvers.tar
in http://netlib.bell-labs.com/netlib/ampl/.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
52
•
A. Ismael F. Vaz et al.
Some variables declarations are macros to the SIP data structure. If one
needs another SIP data structure (for example, if one needs two problems in
memory) one should create new macros or use the data structure directly.
When developing a solver and before using any SIPAMPL routine, the
user must load the problem from the .nl file, using the AMPL routines. The
SIPAMPL routine sip init must be called before any other SIPAMPL routine.
Later, sip free will release the memory allocated by sip init.
To describe the SIPAMPL routines the following definitions are made. Since
AMPL does not support SIP problems and the presolver has no special concern
with the variables declaration order, the variables whose name starts with t and
the others are mixed up. The nature of SIP requires that these components be
separated (the solver may need to change some variables while others are kept
fixed). Let the original variables array be defined by xNLP = (x1 , x2 , . . . , xnvar ).
We will call xNLP the original x array of variables, where nvar is an AMPL
variable that gives the total number of variables in the problem. The SIP x and
t components must be obtained from xNLP . Let us call the x and t components
xSIP and tSIP respectively.
A brief description of the SIPAMPL routines that support the SIP evaluation
functions follows. Note that gradients, Hessians and Jacobians are always in
dense format, defined in a FORTRAN way (AMPL dense format).
— sip extractx Extracts the xSIP component from the initial variable xNLP .
— sip extractt As in sip extractx but for the tSIP component.
— sip joinxt Joins the xSIP and tSIP components from SIP back into the xNLP
array of variables.
— sip init Initializes the variables for the problem, allocates the arrays for
the bounds and copies the bound values to the arrays. This function looks
for variable and constraint names in order to keep track of the xSIP and tSIP
positions in xNLP . (Keeping track of the x and t constraints position is also
needed in order to be able to compute the original constraint position from
an x or t constraint position.)
— sip free Frees the memory allocated during the call to sip init. Only the
memory is freed; the variables in the sip data structure are not reinitialized.
— sip objval Evaluates the objective function. The objective function depends
only on the xSIP variables. The user must also provide the objective function number (AMPL supports multi-objective functions). This function calls
AMPL objval with tSIP equal to 0.
— sip objgrd Evaluates the objective function gradient vector. As in sip objval
only xSIP is needed. sip objgrd sets the array with the derivatives with respect to xSIP alone. (The others are zero, since the objective function does not
depend on the t variables.)
— sip objhes Evaluates the objective function Hessian matrix. Again the objective function depends only on xSIP , so the considerations made in sip objval
and sip objgrd are also valid.
— sip conval Evaluates the constraints. Constraints depend on xSIP and some
on tSIP , so both must be provided. sip conval fills two arrays, one with the
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
53
values of constraints that do not depend on t and the other with the constraints that do depend on t. sip conval generates xNLP from xSIP and tSIP and
calls the AMPL conval function. It splits the conval result into two arrays.
— sip jacval Evaluates the constraint Jacobian. Needs xSIP and tSIP . Fills two
matrices (for x and t constraints).
— sip conxval Evaluates an x constraint. The constraint number must be supplied. The constraint number refers to x constraints only. Only xSIP is needed.
— sip contval Same as sip conxval but for t constraints. xSIP and tSIP are
needed.
— sip conxgrd Evaluates an x constraint gradient. Only needs xSIP and fills
an array with the derivatives with respect to xSIP components.
— sip contgrd Evaluates a t constraint gradient. Needs xSIP and tSIP . Fills two
arrays as in sip conval.
— sip conxhes Evaluates an x constraint Hessian matrix. Only xSIP is needed.
Fills one matrix.
— sip conthes Evaluates a t constraint Hessian matrix. Needs xSIP and tSIP .
Fills two matrices as in sip jacval.
sip extractx, sip extractt and sip joinxt are mostly used as support routines to the other SIPAMPL routines.
Since the asl data structure is also available, if one needs other information
about the problem the AMPL routines can be used. It is the user’s responsibility
to read the .nl file and to provide the corresponding asl data structure.
4.1 Using MATLAB with SIPAMPL
This section describes how MATLAB [MathWorks 1999] can use SIPAMPL to
obtain the problem to be solved. Our MATLAB function sipampl allows problems coded in SIPAMPL to be solved with MATLAB.
MATLAB in its Optimization Toolbox [Coleman et al. 1999] provides an Optimization Function (fseminf) for semi-infinite programming. The range of problems that can be solved by fseminf is limited to two infinite variables in each
infinite constraint. The function sipampl is therefore limited to two infinite
variables, because the problem formulation presented herein supposes that all
the infinite variables appear in all the infinite constraints.
The sipampl syntax is:
[x0,ntc,xbl,xbu]
f
[f,Grad]
[c,ceq,K1,...,Kntc,s]
=
=
=
=
sipampl(’userman’)
sipampl(x)
sipampl(x)
sipampl(x,s)
sipampl(’msg’,x)
The behaviour of function sipampl depends on the number of input and output arguments, thus:
—[x0,ntc,xbl,xbu] = sipampl(’userman’) reads the problem named userman
(userman.nl file) and returns x0 the initial guess, ntc the number of infinite
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
54
•
A. Ismael F. Vaz et al.
constraints, and xbl and xbu the lower and upper bounds on the x variables,
respectively.
—f = sipampl(x) returns the objective function value at x.
—[f,Grad] = sipampl(x) returns the objective value and the gradient vector
at x.
—[c,ceq,K1,. . . ,Kntc,s] = sipampl(x,s) evaluates the constraints at x. s is
the step size for the grid where the infinite constraints are evaluated (see
Coleman et al. [1999] for more details). c and ceq are vectors for the values of the finite constraints, c for inequality constraints and ceq for equality
constraints. K1, . . . , Kntc are ntc vectors (or matrices) with the infinite constraints evaluated on the grid.
—sipampl(’msg’,x) writes the AMPL solution x with the text message msg.
A simple example using these functions is:
>> [x0,ntc,xbl,xbu] = sipampl(’userman’);
>> options = optimset(’GradObj’, ’on’);
>> x = fseminf(’sipampl’,x0,ntc,’sipampl’,[],[],[],[],...
xbl,xbu,options);
>> sipampl(’Solution found by MATLAB’,x);
The interface developed here includes two files. sipampl.c is the main program that provides the MEX [MathWorks 1996] function sipampl. sipsolve.m
is a MATLAB file with a short example of how to use MATLAB to solve problems
coded with SIPAMPL.
These files are also available via the internet with the problem database and
SIPAMPL (see Section 5).
The intermediate files provided by AMPL are not directly available. The
AMPL write command can be used to provide the .nl, .col and .row files
needed by the sipampl function. (See Fourer et al. [1990] for details on how to
produce these files.)
4.2 Using any SIP Solver with SIPAMPL
When building a SIP solver to use SIPAMPL, the programmer should be familiar with AMPL [Gay 1993]. The SIPAMPL routines work in a similar way to
the AMPL routines.
The user must start by using the AMPL and SIPAMPL routines to load
the problem and the data structures needed for the subsequent calls to the
SIPAMPL routines. He can then call any AMPL or SIPAMPL routines as
required.
The directory s solver (see Figure 2 in Section 7) includes an example on
how to build a SIP solver. The example reads the problem and prints some
information using the AMPL and SIPAMPL routines.
5. THE TEST PROBLEM DATABASE
The problems in the database were obtained from several papers and books on
SIP and were coded in AMPL. They comprise linear and nonlinear, academic
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
55
and real-life problems. Several problems have parameters that can be changed
by the user to generate new problems. Most are of small dimension (less than
50 finite and 10 infinite variables).
Table I lists the problems in the database. In the table, “Problem” is the
problem filename (with .mod extension), “nx” is the number of x variables, “nt”
is the number of t variables, “nxc” is the number of finite constraints and “ntc”
is the number of infinite constraints.
Sixteen of the problems correspond to the Watson set [Watson 1983; Coope
and Watson 1985]. Seven other problems, quadratic and nonlinear, are described by Price [1992]. One problem described by Price has an error. In
problem S, Price considered T to be the set [0, 1] p , but the solutions presented are in the set [0, 2] p . The latter set was coded. Three C 1 problems from
Coope and Watson [1985] and later presented in Price and Coope [1996] were
coded.
Twelve Chebyshev approximation problems have been taken from Hettich
[Hettich 1979a; Hettich 1986] and Reemtsen [1991]. Two more Chebyshev problems from Hettich and Gramlich [1990] were coded. In the first one, Hettich
classifies the problem as quadratic, but no quadratic terms in the objective
function appear (problem hettich8). In problem hettich9 the objective function
depends on a set of points that are unknown to us.
Three quadratic problems were taken from Liu et al. [1999] and another
linear problem (lin1) from Lin et al. [1998, Section 5.2]. In this paper the solution to the problem is the one reported in Coope and Watson [1985], but the
problem is not the same (a coefficient in the objective function, the constraint
and the variable bounds differ from the original one). The problem was coded
as described in Lin et al. [1998].
Three linear problems from Fang and Wu [1994] and two from Ferris and
Philpott [1989] were coded.
Eighteen linear problems were taken from León et al. [2000]. Problems
leon13 and leon18 correspond to problem 1 and 2 in Panier and Tits [1989]
respectively.
Two problems from production planning were coded as described by Li and
Wang [1997] and Wang and Fang [1996].
One problem was coded from Tanaka [1999], two more from Polak et al.
[1999] and problem hettich10 was coded as described in Lawrence and Tits
[1998].
The two example problems from Teo and Goh [1987] were also coded. Problem
teo2 has appeared in a previous paper from Gonzaga et al. [1980] and also
appears in Jennings and Teo [1990] and Teo et al. [1993]. The description in
Teo and Goh [1987] is incorrect.
Three problems from Blankenship and Falk [1976] were coded. In problems
blankenship2 and blankenship3 the infinite set T is a set of type [0, +∞[.
Seven FIR filter design problems from Potchinkov [1997] were also included
in the database.
The example used by Powell to show that his Karmarkar [Adler et al. 1989]
generalized algorithm can converge to a non-optimal point was also coded as
described in Todd [1994].
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
56
•
A. Ismael F. Vaz et al.
Table I. Problems in the SIPAMPL Database
Problem
anderson1
blankenship2
coopeL
coopeN
elke2
elke4
elke6
elke8
elke10
fang2
ferris1
gockenbach1
gockenbach3
gockenbach5
gockenbach7
gockenbach9
goerner1
goerner3
goerner5
goerner7
gugat2
gugat4a
gugat4c
gugat4e
gugat5a
gugat5c
gugat5e
gugat6
hettich1
hettich3
hettich5
hettich7
hettich9
hettich10c
kortanek2
kortanek4
leon2
leon4
leon6
leon8
leon10
leon12
leon14
leon16
leon18
li1
lin1
liu2
polak1
potchinkov1
potchinkov3
potchinkov4b
nx
3
2
2
2
9
9
9
9
9
50
7
33
33
33
33
33
4
7
7
8
9
9
9
9
7
7
7
6
9
5
3
7
11
2
2
8
6
7
5
7
3
2
2
3
2
10
6
2
4
298
66
65
nt
2
4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
2
1
2
2
2
1
2
1
1
1
1
1
1
1
1
1
1
1
2
1
2
2
2
1
nxc
0
0
0
0
0
0
0
0
0
0
0
120
120
120
120
120
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
19
ntc
1
4
1
1
10
4
10
7
7
1
2
16
16
16
16
16
2
2
2
2
4
4
4
4
4
4
4
4
2
2
2
2
2
2
1
1
2
2
2
2
2
1
1
1
1
1
1
1
2
4
4
1
Problem
blankenship1
blankenship3
coopeM
elke1
elke3
elke5
elke7
elke9
fang1
fang3
ferris2
gockenbach2
gockenbach4
gockenbach6
gockenbach8
gockenbach10
goerner2
goerner4
goerner6
gugat1
gugat3
gugat4b
gugat4d
gugat4f
gugat5b
gugat5d
gugat5f
gugat7
hettich2
hettich4
hettich6
hettich8
hettich10
kortanek1
kortanek3
leon1
leon3
leon5
leon7
leon9
leon11
leon13
leon15
leon17
leon19
li2
liu1
liu3
polak2
potchinkov2
potchinkov4a
potchinkovPL
nx
2
3
2
9
9
9
9
9
50
50
7
33
33
33
33
33
5
7
16
9
7
9
9
9
7
7
7
4
3
2
7
5
2
2
7
4
6
8
5
7
3
2
2
3
5
6
2
16
4
65
67
122
nt
1
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
3
1
2
nxc
0
3
1
0
0
0
0
0
0
0
0
120
120
120
120
120
0
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
19
0
ntc
1
3
1
10
10
10
10
7
1
1
1
16
16
16
16
16
2
2
2
4
2
4
4
4
4
4
4
4
2
2
2
2
2
1
1
2
2
2
2
2
2
1
1
1
1
1
1
2
2
6
2
4
Continues
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
potchinkovPLR
priceK
priceS4
priceS6
priceU
reemtsen2
reemtsen4
still1
teo1
userman
watson2
watson4a
watson4c
watson6
watson8
watson10
watson12
watson14
122
2
4
4
4
10
37
2
3
2
2
3
8
2
6
3
3
2
2
1
4
6
6
2
2
1
1
1
1
1
1
1
2
2
2
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
4
1
1
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
powell1
priceS3
priceS5
priceT
reemtsen1
reemtsen3
reemtsen5
tanaka1
teo2
watson1
watson3
watson4b
watson5
watson7
watson9
watson11
watson13
zhou1
2
4
4
4
11
10
11
2
3
2
3
6
3
3
6
3
3
2
1
3
5
3
3
2
3
1
1
1
1
1
1
2
2
2
2
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
•
57
1
1
1
1
2
2
2
1
1
1
1
1
1
1
1
1
1
1
The problem used by Still [2001] to demonstrate the importance of including
boundary points from the infinite set T in a discretization method and one
problem from Anderson and Lewis [1989] were also coded.
In Görner [1997], the author described twenty four test problems. As seventeen of them were already in the database, the remaining seven were coded.
Ten problems from robot trajectory planning formulated as SIP in Marin
[1988] and latter described by Haaren-Retagne [1992] and ten more problems
from Gockenbach and Kearsley [1999], that refer to optimal signal sets design,
were coded.
Seventeen problems from Gugat [1994] and one from Zhou and Tits [1996]
were coded. In Zhou and Tits the authors present a corrected version of problem
hettich10 that was coded as hettich10c. Four problems from Kortanek and No
[1993] and one from León et al. [1998] were also coded.
So far the database contains a total of 139 problems (excluding the userman
example). Starting points and solutions, when available from the authors, were
also included in the database.3 Readers may propose problems for this database
by sending them to the first author (see email address on the first page).
6. THE SELECT TOOL
In linear/nonlinear semi-infinite programming, as in finite programming, the
algorithms developed are sometimes either limited or more appropriate to a
specific problem structure. As SIPAMPL is a generic database, one may want
to select some problems with specific characteristics from all the database
problems. The select tool allows this selection based on: objective function type; constraint type; number of finite/infinite variables; number of finite/infinite constraints, the type of bounds in the finite/infinite variables and
whether the problem has an initial guess. The select tool will print or write a
3 http://www.norg.uminho.pt/aivaz/.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
58
•
A. Ismael F. Vaz et al.
file with the names of the matched SIP problems. For details we refer to Vaz
et al. [2002].
A linear constraint in SIP is of the form
x T a(t) − b(t) ≤ 0,
∀t ∈ T,
where a(t) and b(t) are functions of t alone. Since a(t) and b(t) may be nonlinear
in t, AMPL will not recognize such a constraint as a linear constraint for SIP.
The inclusion of the second and third line in the AMPL code description (as
in the example of Section 2) allows the select tool to identify the problem
structure. This is the only information required from the user. The select tool
finds all the remaining characteristics from the coded problem.
The select tool executed with the -x argument will produce the .nl, .row
and .col files for the selected problems.
7. DISCUSSION
SIPAMPL routines use the AMPL routines to handle a SIP problem to be solved
by a SIP solver. AMPL has no concern about the finite or infinite constraints
and handles them as if they were all finite constraints. The order in which
constraints are declared in the model may not be the same as they appear in
the .nl file. Among other things the function sip init keeps track of the finite
and infinite constraints (variables) position in the .nl file, and whenever a
SIPAMPL routine is called to evaluate a finite or infinite constraint the original
order of the constraints (variables) is identified.
We do not advise assessing the execution time of algorithms that use
SIPAMPL against algorithms that use problems directly coded in, for example,
the C programming language. The direct programming of the objective, constraint and derivative functions would result in a much faster way to evaluate
them in spite of losing the ease of problem codification, automatic differentiation, and probably portability, provided by AMPL.
SIPAMPL was written in the C programming language with the Red Hat 5.2
Linux operating system and the GNU C compiler gcc. SIPAMPL is distributed
in source form together with several makefiles for the Linux and Windows operating systems. Portability of SIPAMPL to other operating systems should
be easy because SIPAMPL only makes standard calls to the operating system
(printf and so on). The select tool is an exception, since it works with directories, files and temporary files.
The SIPAMPL directories are organized as shown in Figure 2. The directories
have the following meaning:
—The AMPL solver directory is where the AMPL interface file solvers.tar is
uncompressed.
—The sip directory contains the SIPAMPL interface (where sip.c and sip.h
are placed).
—matlab contains the sipampl MATLAB function and an M-file that illustrates
how to use the sipampl function.
—nsips contains the B-Splines dynamic library to be used with some problems
and the NSIPS solver.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
59
Fig. 2. Organization of SIPAMPL directories.
—s solver contains an example on how to use the SIPAMPL routines (it calls
some routines and prints the returned values). The user can place his own
solver here.
—tools contains the select tool that allows the query of the SIPAMPL
database for SIP problems with specified structure.
—sipmod is where the problems database is located.
The user can change the directory structure as long as the makefiles and
files inclusion are changed accordingly.
8. CONCLUSIONS AND FUTURE WORK
SIPAMPL extends the AMPL features by allowing the treatment of SIP problems.
The SIPAMPL routines are provided so that users can easily connect their
own solver to the problems database. SIPAMPL takes advantage of the AMPL
features, namely the natural language used to model problems as well as automatic differentiation.
Some real-world problems are modeled as finite problems with the infinite
constraints discretized. With the SIPAMPL environment more problems could
be modeled as real SIP problems. The SIPAMPL routines will be more or less
static while we expect the SIPAMPL database to increase in the future.
One other gap in SIP technology is the lack of some publicly available, commercial or free, solver for SIP. We hope that the existence of a database with
several SIP problems will motivate research in the development of new solvers.
We developed a solver called NSIPS [Vaz et al. 2002] for nonlinear SIP problems
that uses SIPAMPL to obtain the problem to be solved.
The problems included in the SIPAMPL database are all of small/medium
dimension and so SIPAMPL does not provide matrices in sparse format. The
existence of large SIP problems will encourage the development of SIPAMPL
sparse routines.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
60
•
A. Ismael F. Vaz et al.
ACKNOWLEDGMENTS
The authors are grateful to Michael Saunders for his interest, useful comments
and suggestions, which greatly improved the final version of the paper.
REFERENCES
ADLER, I., RESENDE, M., VEIGA, G., AND KARMARKAR, N. 1989. An implementation of Karmarkar’s
algorithm for linear programming. Math. Prog. 44, 297–335.
ANDERSON, E. AND LEWIS, A. 1989. An extension of the simplex algorithm for semi-infinite linear
programming. Math. Prog. 44, 247–269.
BLANKENSHIP, J. AND FALK, J. 1976. Infinitely constrained optimization problems. J. Optim. Theory
Applic. 19, 2 (June), 261–281.
BONGARTZ, I., CONN, A., GOULD, N., AND TOINT, P. 1995. CUTE: Constrained and Unconstrained
Testing Environment. ACM Trans. Math. Soft. 21, 1, 123–160. ftp://130.246.9.91/pub/cute.
COLEMAN, T., BRANCH, M., AND GRACE, A. 1999. Optimization Toolbox for Use with MATLAB. The
MathWorks Inc.
COOPE, I. AND WATSON, G. 1985. A projected Lagrangian algorithm for semi-infinite programming.
Math. Prog. 32, 3, 337–356.
FANG, S.-C. AND WU, S.-Y. 1994. An inexact approach to solving linear semi-infinite programming
problems. Optimization 28, 291–299.
FERRIS, M. AND PHILPOTT, A. 1989. An interior point algorithm for semi-infinite linear programming. Math. Prog. 43, 257–276.
FOURER, R., GAY, D., AND KERNIGHAN, B. 1990. A modeling language for mathematical programming. Manage. Sci. 36, 5, 519–554. http://www.ampl.com.
GAY, D. 1993. Hooking your solver to AMPL. Numerical Analysis Manuscript 93-10, AT&T Bell
Laboratories, ftp://netlib.bell-labs.com/netlib/att/cs/doc/93/4-10.ps.Z.
GOCKENBACH, M. AND KEARSLEY, A. 1999. Optimal signal sets for non-gaussian detectors. SIAM J.
Optim. 9, 2, 316–326.
GONZAGA, C., POLAK, E., AND TRAHAN, R. 1980. An improved algorithm for optimization problems
with functional inequality constraints. IEEE Trans. Autom. Contr. AC-25, 1 (February), 49–54.
GÖRNER, S. 1997. Ein hybridverfahren zur lösung nichtlinearer semi-infiniter optimierungsprobleme. Ph.D. thesis, Fachbereich Mathematik der Technischen Universität Berlin.
GUGAT, M. 1994. Fractional semi-infinite programming. Ph.D. thesis, Trier University, Germany.
HAAREN-RETAGNE, E. 1992. A semi-infinite programming algorithm for robot trajectory planning.
Ph.D. thesis, University of Trier.
HETTICH, R. 1979. A comparison of some numerical methods for semi-infinite programming. In
Semi-Infinite Programming, R. Hettich, Ed. Springer-Verlag., 112–125.
HETTICH, R. 1986. An implementation of a discretization method for semi-infinite programming.
Math. Prog. 34, 3, 354–361.
HETTICH, R. AND GRAMLICH, G. 1990. A note on an implementation of a method for quadratic
semi-infinite programming. Math. Prog. 46, 249–254.
JENNINGS, L. AND TEO, K. 1990. A computational algorithm for functional inequality constrained
optimization problems. Automatica 26, 2, 371–375.
KERNIGHAN, B. AND RICHIE, D. 1988. The C Programming Language. Prentice Hall.
KORTANEK, K. AND NO, H. 1993. A central cutting plane algorithm for convex semi-infinite programming problems. SIAM J. Optim. 3, 4, 901–918.
LAWRENCE, C. AND TITS, A. 1998. Feasible sequential quadratic programming for finely discretized
problems from SIP. In Semi-Infinite Programming, R. Reemsten and J.-J. Rückmann, Eds.
Kluwer Academc Publisshers, 159–193.
LEÓN, T., SANMATı́AS, S., AND VERCHER, E. 1998. A multi-local optimization algorithm. Top 6, 1,
1–18.
LEÓN, T., SANMATı́AS, S., AND VERCHER, E. 2000. On the numerical treatment of linearly constrained
semi-infinite optimization problems. Europ. J. Operational Research 121, 78–91.
LI, Y. AND WANG, D. 1997. A semi-infinite programming model for Earliness/Tardiness production
planning with simulated annealing. Math. Comput. Modelling 26, 7, 35–42.
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
SIPAMPL: Semi-Infinite Programming With AMPL
•
61
LIN, C.-J., FANG, S.-C., AND WU, S.-Y. 1998. An unconstrained convex programming approach to
linear semi-infinite programming. SIAM J. Optim. 8, 2, 443–456.
LIU, Y., TEO, K., AND ITO, S. 1999. A dual parametrization approach to linear-quadratic semiinfinite programming problems. Optim. Methods Soft. 10, 471–495.
MARIN, S. 1988. Optimal parametrization of curves for robot trajectory design. IEEE Trans. Auto.
Contr. 33, 2, 209–214.
MATHWORKS. 1996. Application Program Interface Guide. The MathWorks Inc.
MATHWORKS. 1999. MATLAB. The MathWorks Inc. Version 5.4, Release 11.
PANIER, E. AND TITS, A. 1989. A globally convergent algorithm with adaptively refined discretization for semi-infinite optimization problems arising in engineering design. IEEE Trans. Auto.
Contr. 34, 8, 903–908.
POLAK, E., QI, L., AND SUN, D. 1999. First-order algorithms for generalized semi-infinite min-max
problems. Computational Optimization and Applications 13, 137–161.
POTCHINKOV, A. 1997. Design of optimal linear phase FIR filters by a semi-infinite programming
technique. Signal Processing 58, 165–180.
PRICE, C. 1992. Non-linear semi-infinite programming. Ph.D. thesis, University of Canterbury, New
Zealand.
PRICE, C. AND COOPE, I. 1996. Numerical experiments in semi-infinite programming. Computational Optimization and Applications 6, 169–189.
REEMTSEN, R. 1991. Discretization methods for the solution of semi-infinite programming problems. J. Optim. Theory Applic. 71, 1, 85–103.
STILL, G. 2001. Discretization in semi-infinite programming: The rate of convergence. Math.
Prog. 91, 53–69.
TANAKA, Y. 1999. A trust region method for semi-infinite programming problems. Int. J. Syst.
Sci. 30, 2, 199–204.
TEO, K. AND GOH, C. 1987. A simple computational procedure for optimization problems with
functional inequality constraints. IEEE Trans. Auto. Contr. AC-32, 10 (October), 940–941.
TEO, K., REHBOCK, V., AND JENNINGS, L. 1993. A new computational algorithm for functional inequality constrained optimization problems. Automatica 29, 3, 789–792.
TODD, M. 1994. Interior-point algorithms for semi-infinite programming. Math. Prog. 65, 217–
245.
VAZ, A., FERNANDES, E., AND GOMES, M. 2002. NSIPS v2.1: Nonlinear Semi-Infinite Programming Solver. Tech. Rep. ALG/EF/5-2002, Universidade do Minho, Braga, Portugal. December.
http://www.norg.uminho.pt/aivaz/.
WANG, D. AND FANG, S.-C. 1996. A semi-infinite programming model for Earliness/Tardiness production planning with a genetic algorithm. Computers and Mathematics with Applications 31, 8,
95–106.
WATSON, G. 1983. Numerical experiments with globally convergent methods for semi-infinite programming problems. In Semi-Infinite Programming and Applications, A. Fiacco and K. Kortanek,
Eds. Springer-Verlag, 193–205.
ZHOU, J. AND TITS, A. 1996. An SQP algorithm for finely discretized continuous minimax problems
and other minimax problems with many objective functions. SIAM J. Optim. 6, 2, 461–487.
Received August 2000; revised February 2002, October 2002, June 2003, September 2003; accepted October 2003
ACM Transactions on Mathematical Software, Vol. 30, No. 1, March 2004.
Download