Article View: sci.math.num-analysis
Article #461Very challenging optimization problem
From: Mark Johnson
Date: Thu, 20 Aug 1992 15:01
Date: Thu, 20 Aug 1992 15:01
77 lines
2953 bytes
2953 bytes
In article <cscoging.66@unpcs1.cs.unp.ac.za> cscoging@unpcs1.cs.unp.ac.za (Chris Scogings) writes:
> I am testing various optimization methods and I need some
> problems to test them out on. These problems must not be
> too simple (I have already used Rosenbrock's function, etc.) ...
> Ideally, I need a moderately complex function of 3 to 8
> variables. It is not necessary for the function to be
> differentiable.
The objective function below appeared in the ACM Transactions
on Mathematical Software. I find it remarkably difficult;
perhaps you will have better success. The number of variables
to be optimized (the dimensionality of the domain) is
user selectable; I find it difficult for n=4 and incredibly
difficult for n=9. The function is not differentiable.
Code is in the "C" language. Good luck!
#define VECTLEN (50) /* max dimensionality of function */
/* Objective function of Corana et al ACM Trans on Mathematical */
/* Software V13 No3 p272 */
/* Like the Chebyquad function, this one lets the user select */
/* the dimensionality of the domain ("nvars"). */
/* However, it is a very difficult function even when nvars=4. */
/* Starting point is: even numbered coordinates have x[j] = 999 */
/* odd numbered coordinates have x[j] = -999 */
/* { x[2i]=999 , x[2i+1]=-999 } */
/* Minimum is at x[j] = 0.00 , for all j */
double f(x,nvars)
double x[VECTLEN] ;
int nvars ;
{
double s[VECTLEN], t[VECTLEN], d[VECTLEN] ;
double term, summ, dj, c, deviate ;
int i, j, k;
funevals++;
for(i=0; i<VECTLEN; i++) { s[i]=0.2 ; t[i]=0.05; d[i]=10.0 ; }
d[0] = 1.0 ; d[1] = 1000.0 ;
d[2] = 10.0 ; d[3] = 100.0 ;
d[4] = 1.0 ; d[5] = 10.0 ;
d[6] = 100.0 ; d[7] = 1000.0 ;
d[8] = 1.0 ; d[9] = 10.0 ;
c = 0.15 ;
summ = 0.0;
for(i=0; i<nvars; i++)
{
dj = floor( fabs(x[i] / s[i]) + 0.49999999 ) ;
if(x[i] < 0.0) dj = 0.0 - dj ;
dj *= s[i] ;
deviate = fabs(x[i] - dj) ;
if( deviate < fabs(t[i]) )
{
term = 0.0 ;
if(dj < 0.0) term = t[i] ;
if(dj > 0.0) term = (0.0 - t[i]);
term += dj ;
term = term * term * c * d[i] ;
}
else term = d[i] * (x[i] * x[i]) ;
summ += term ;
}
return(summ) ;
}
-------------------
-- Mark Johnson
Technical Details
Message-ID:
<MJOHNSON.92Aug20070137@netcom.Netcom.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!gossip.pyramid.com!decwrl!csus.edu!netcom.com!netcom!mjohnsonReferences:
<cscoging.66@unpcs1.cs.unp.ac.za>Show Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis Path: arc1-ca.pugleaf.net!sparky!uunet!gossip.pyramid.com!decwrl!csus.edu!netcom.com!netcom!mjohnson From: mjohnson@netcom.Netcom.COM (Mark Johnson) Subject: Very challenging optimization problem Message-ID: <MJOHNSON.92Aug20070137@netcom.Netcom.COM> Date: Thu, 20 Aug 92 15:01:37 GMT Organization: Netcom Online Communications Service In-Reply-To: cscoging@unpcs1.cs.unp.ac.za's message of 20 Aug 92 07:39:43 GMT References: <cscoging.66@unpcs1.cs.unp.ac.za> Lines: 77