Curvi Challenge Problem


The challenge problem has 3 variables {x1, x2, x3} and no bounds. It is an exponential curve fitting problem and is featured in the article, A curvilinear search using tridiagonal secant updates for unconstrained optimization, by J. E. Dennis, N. Echebest, M. T. Guardarucci, J. M. Martinez, H. D. Scolnik and C. Vacchino., in SIAM J. on Optimization, Vol.1, Number 3, August 1991, page 351. The problem is to determine the function g of the form:

    g(t) := g(t; x) := 3 t^x1 + 3.1 t^x2 + .7 t^x3 

which best fits the data,

    (j, g(j; {1.5, 2.5, -.8})) for j = 1 to 7.

The specific objective function F is defined below. We have used the criteria of least squares to determine the best function g (i.e., the best choice of x).

Minimize:

    F(x) = Sum {j=1, numpts}  
               {(y(j) - 3.d0* j**x(1)+3.1d0* j**x(2)+0.7d0* j**x(3))^2}

    where  y(j) = 3.d0* j**1.5d0 + 3.1d0* j**2.5d0 + 0.7d0* j**(-0.8d0), and
    numpts = 7

The challenge problem is solved starting from x = {3*1.5, 3*2.5, 1.7*(-.8)}. For more difficult problems, numpts can be increased. Below is a graph of the initial function with x = {3*1.5, 3*2.5, 1.7*(-.8)}, the final function with x = {1.5, 2.5, -.8} and the 7 data points.

 

Plot of initial and final exponential curves

Compare the performance of your optimizer on this problem with that of Curvif. Notice that the global minimum is zero, however you should be satisfied with your optimizer if it reaches any local minimum. Curvif produces the following solution:

x1 = 1.5000002 
x2 = 2.5000000 
x3 = -.80000749 
- - - - - - - - - Final results - - - - - - - - - 
Number of variables : 3 
Final function value : .9187D-11 
Norm of the gradient : .9042D-06 
Number of iterations : 50 
Number of function evaluations : 472 
ier : 0


Fortran Program for Curvif Example Problem

The Fortran subroutine that evaluates the above objective function appears below. Subroutine fcn returns the value of the objective function at x in f. The integer argument n , the number of variables, is not explicitly used in this example.

subroutine fcn (n, x, f)
implicit none	
integer          j, n, numpts	
double precision x(*), y(15), z, f, b
logical          first
save first
data first/.true./

numpts = 7
if (first) then	
    do j=1, numpts
       b=dfloat(j)
       y(j)=3.d0*b**1.5d0 + 3.1d0*b**2.5d0 + 0.7d0*b**(-0.8d0)
    end do
    first = .false.
end if

f = 0.d0
do j=1, numpts
   b = dfloat(j)
   z = 3.d0*b**x(1) + 3.1d0*b**x(2) + 0.7d0*b**x(3)
   f = f + (z-y(j))**2
end do

return
end