tp121.apm

```Model tp121
! Source version 2

! Stephan K.H. Seidl
! Describes the artificial test problem `3 Balls in a Spheric Cage'.
! Created in 1988, this problem has been used over the years
! to study the behavior of NLO algorithms.

! Traditional initialization, not feasible, rcage = 1/10.

Parameters
mypi = 4*atan(1)
c2 = 2
c3 = 3
c10 = 10
c20 = 20
c1000 = 1000
c100000 = 100000
g = 980665/c100000
masstot = 50/c1000
rrough = (masstot/((2700 + 19300 + 7860)*(4/c3)*mypi))^(1/c3)
rcage = 1/c10
End Parameters

Variables
! Benevolent initialization, feasible.
! x[ 1] = rrough
! x[ 2] = rrough
! x[ 3] = rrough
! x[ 4] = (-1)/c20
! x[ 5] = 1/c20
! x[ 6] = (-1)/c20
! x[ 7] = (-1)/c20
! x[ 8] = (-1)*rrough/c10
! x[ 9] = 1/c20
! x[10] = 1/c10
! x[11] = 1/c10
! x[12] = 1/c10
x[ 1] = 1.020462601383630
x[ 2] = 1.067249920905851
x[ 3] = -10
x[ 4] = 1.056302685455057
x[ 5] = 0.9888734173342870
x[ 6] = 1.030255683555398
x[ 7] = 1.002173322039949
x[ 8] = 0.9898553374984422
x[ 9] = 1.074494882526627
x[10] = 1.095044196509762
x[11] = -1000
x[12] = 1.089828605856584
obj
End Variables

Intermediates
massa =  2700*(4/c3)*mypi*x[1]^3
massg = 19300*(4/c3)*mypi*x[2]^3
massi =  7860*(4/c3)*mypi*x[3]^3
distac = sqrt(x[4]^2 + x[7]^2 + (x[10] - rcage)^2)
distgc = sqrt(x[5]^2 + x[8]^2 + (x[11] - rcage)^2)
distic = sqrt(x[6]^2 + x[9]^2 + (x[12] - rcage)^2)
distag = sqrt((x[4] - x[5])^2 + (x[7] - x[8])^2 + (x[10] - x[11])^2)
distgi = sqrt((x[5] - x[6])^2 + (x[8] - x[9])^2 + (x[11] - x[12])^2)
distia = sqrt((x[6] - x[4])^2 + (x[9] - x[7])^2 + (x[12] - x[10])^2)
rsumag = x[1] + x[2]
rsumgi = x[2] + x[3]
rsumia = x[3] + x[1]
mf = g*(massa*x[10] + massg*x[11] + massi*x[12])
c[ 1] = x[8] + x[2]/c10
c[ 2] = massa + massg + massi - masstot
c[ 3] = (rcage - x[1]) - distac
c[ 4] = (rcage - x[2]) - distgc
c[ 5] = (rcage - x[3]) - distic
c[ 6] = distag - rsumag
c[ 7] = distgi - rsumgi
c[ 8] = distia - rsumia
c[ 9] = (-1)*(x[4] + x[1]/c10)
c[10] = x[5] - x[2]/c10
c[11] = (-1)*(x[6] + x[3]/c10)
c[12] = (-1)*(x[7] + x[1]/c10)
c[13] = x[9] - x[3]/c10
c[14] = x[1] - x[2]/c2
c[15] = x[1] - x[3]/c2
c[16] = x[2] - x[1]/c2
c[17] = x[2] - x[3]/c2
c[18] = x[3] - x[1]/c2
c[19] = x[3] - x[2]/c2
End Intermediates

Equations
c[1:2] = 0
c[3:19] >= 0

obj = mf

! best known objective = 0.003748448926892757
! begin of best known solution
! x[ 1] =  0.006880225167214264
! x[ 2] =  0.007557877754559033
! x[ 3] =  0.007025116248247118
! x[ 4] = -0.008109269192985781
! x[ 5] =  0.003933807693760132
! x[ 6] = -0.009411021460678573
! x[ 7] = -0.008719650850600085
! x[ 8] = -0.0007557877754559033
! x[ 9] =  0.005124624533619279
! x[10] =  0.007644708288544523
! x[11] =  0.007644708288544523
! x[12] =  0.007644708288544523
! end of best known solution
End Equations
End Model
```

Stephan K.H. Seidl