#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * More test problems *-------------------------------------------------------------------- * Author: Argimiro R Secchi * $Id$ *--------------------------------------------------------------------*# Optimization test27 # solution: x1=0.7411, x2=0.7411, obj=-17.96 PARAMETERS pi as Real; VARIABLES x1 as Real(Default=0,Lower=-1,Upper=1); x2 as Real(Default=0,Lower=-1,Upper=1); SET pi = 4*atan(1)/'rad'; MINIMIZE -(abs(20*x1)+abs(20*x2)+2*(x1+x2)) * sin(20*'rad'*x1/pi)^2 * sin(20*'rad'*x2/pi)^2 + 40*(x1^2+x2^2)/3; OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-4,MaxEvals=5000 ); Dynamic = false; end # Alpina function Optimization test28 # solution: x1=7.917, x2=7.917, obj=-7.8856 VARIABLES x1 as Real(Default=3,Lower=0,Upper=10); x2 as Real(Default=1,Lower=0,Upper=10); MINIMIZE -sqrt(x1*x2)*sin(x1*'rad')*sin(x2*'rad'); OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-4,MaxEvals=5000 ); Dynamic = false; end # Griewank function Optimization test29 # solution: x1=0, x2=0, obj=0 VARIABLES # x1 as Real(Default=0,Lower=-100,Upper=100); # x2 as Real(Default=9,Lower=-100,Upper=100); x1 as Real(Default=0,Lower=-100,Upper=90); x2 as Real(Default=9,Lower=-100,Upper=90); MINIMIZE 1+(x1^2+x2^2)/4000-cos(x1*'rad')*cos(x2*'rad'/sqrt(2)); OPTIONS NLPSolver(MaxIterations=4000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" #File = "direct", MinimumRectangle=1e-4,MaxEvals=5000 File = "direct", MinimumRectangle=1e-10,Epsilon=1e-2,MaxEvals=10000 ); Dynamic = false; end Optimization test31 # solution: x=8.817, obj=-8.13 VARIABLES x as Real(Default=-10,Lower=-10,Upper=10); MINIMIZE (x+10)*(x+6)*(x+5)*(x+1)*(x-7)*(x-10)*1e-4; OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-4,MaxEvals=5000 ); Dynamic = false; end # Levy 5 function Optimization test32 # solution: x1=-1.3068, x2=-1.4248, obj=-176.1376 PARAMETERS i(5) as Integer; VARIABLES x1 as Real(Default=0,Lower=-10,Upper=10); x2 as Real(Default=0,Lower=-10,Upper=10); SET i = [1:5]; MINIMIZE sum(i*cos(((i-1)*x1+i)*'rad'))*sum(i*cos(((i+1)*x2+i)*'rad'))+(x1+1.42513)^2+(x2+0.80032)^2; OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-5,Epsilon=1e-1,MaxEvals=10000 ); Dynamic = false; end # H1 function Optimization test33 # solution: x1=8.6998, x2=6.7665, obj=-2 VARIABLES x1 as Real(Default=0,Lower=-100,Upper=100); x2 as Real(Default=0,Lower=-100,Upper=100); MINIMIZE -(sin((x1-x2/8)*'rad')^2+sin((x2+x1/8)*'rad')^2)/(1+sqrt((x1-8.6998)^2+(x2-6.7665)^2)); OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-4,Epsilon=1e-1,MaxEvals=10000 ); Dynamic = false; end # Ackley function Optimization test34 # solution: x=0, obj=0 PARAMETERS n as Integer(Default=3); pi as Real; VARIABLES x(n) as Real(Default=10,Lower=-32.68,Upper=32.68/2); # x(n) as Real(Default=10,Lower=-32.68,Upper=32.68); SET pi = 4*atan(1)/'rad'; MINIMIZE -20*exp(-0.2*sqrt(sum(x^2)/n))-exp(sum(cos(2*pi*x*'rad'))/n)+20+exp(1); OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-8,Epsilon=1e-1,MaxEvals=20000 ); Dynamic = false; end # Schwefel function Optimization test35 # solution: x=420.9687, obj=-n (approx.) PARAMETERS n as Integer(Default=4); VARIABLES x(n) as Real(Default=0,Lower=-500,Upper=500); MINIMIZE 418*n-sum(x*sin(sqrt(abs(x))*'rad')); OPTIONS NLPSolver(MaxIterations=2000, AbsoluteAccuracy=1e-6, RelativeAccuracy=1e-4, #File = "ipopt_emso", hessian_approximation = "exact" #File = "complex" #File = "optpp_emso" #File = "arshj" #File = "PSO" File = "direct", MinimumRectangle=1e-8,Epsilon=1e-3,MaxEvals=30000 ); Dynamic = false; end