source: branches/gui/sample/optimization/sample_optimize.mso @ 554

Last change on this file since 554 was 553, checked in by Argimiro Resende Secchi, 15 years ago
File size: 2.9 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* Some Hock and Schittkowski test problems
17*--------------------------------------------------------------------
18* Author: Edson Cordeiro do Valle, Rafael de Pelegrini Soares             
19* $Id$
20*--------------------------------------------------------------------*#
21        Optimization hs71
22        VARIABLES
23        x1 as Real(Default=2, Lower=1, Upper=5);
24        x2 as Real(Default=5, Lower=1, Upper=5);
25        x3 as Real(Default=5, Lower=1, Upper=5);
26        x4 as Real(Default=1, Lower=1, Upper=5);
27
28        MINIMIZE
29        x1*x4*(x1+x2+x3) + x3;
30       
31        EQUATIONS
32        x1*x2*x3*x4 > 25;
33       
34        x1*x1 + x2*x2 + x3*x3 + x4*x4 = 40;
35       
36        OPTIONS
37        NLPSolver(File = "ipopt_emso"
38                          #File = "complex"
39                  #File = "optpp_emso"
40                          );
41        Dynamic = false;
42end
43
44Optimization hs75
45        VARIABLES
46        x1 as Real(Default=1.0e-6, Lower=0, Upper=1200);
47        x2 as Real(Default=1.0e-6, Lower=0, Upper=1200);
48        x3 as Real(Default=1.0e-6, Lower=-0.48, Upper=0.48);
49        x4 as Real(Default=1.0e-6, Lower=-0.48, Upper=0.48);
50
51        MINIMIZE
52        3*x1+1.0e-6*x1^3+2*x2+(2/3)*1.0e-6*x2^3;
53       
54        EQUATIONS
55        x4 - x3 + 0.48 > 0;
56        x3 - x4 + 0.48 > 0;
57
58    1000*sin((-x3-0.25)*'rad')+1000*sin((-x4-0.25)*'rad')+894.8-x1 = 0;
59       
60        1000*sin((x3-0.25)*'rad')+1000*sin((x3-x4-0.25)*'rad')+894.8-x2 = 0;
61       
62        1000*sin((x4-0.25)*'rad')+1000*sin((x4-x3-0.25)*'rad')+1294.8 = 0;
63       
64       
65        OPTIONS
66        Dynamic = false;
67        NLPSolveNLA = false;
68#*
69        NLPSolver(      File = "optpp_emso",
70                                MeritFun = "VanShanno",
71                                SecondOrderDerivative= "BFGS",
72                                SecondOrderDerivative= "finitediferences",
73                                SearchStrategy = "TrustRegion",
74                                TRSize = 0.3636,
75                                Objtol = 1e-8,
76                                constrtol = 1e-4,
77                                Minstep = 1e-10,
78                                Maxstep= 1e10,
79                                Gradtol = 1e-4);       
80*#
81
82NLPSolver(File = "ipopt_emso",
83                          RelativeAccuracy = 1e-6,
84                  hessian_approximation = "exact",
85                          finite_difference_perturbation = 1.0e-10,
86                          Derivative_Test="second-order");
87
88end
89
90Optimization bn65
91        VARIABLES
92        x1 as Real(Default=1, Lower=-4.5, Upper=4.5);
93        x2 as Real(Default=5, Lower=-4.5, Upper=4.5);
94        x3 as Real(Default=5, Lower=-5, Upper=5);
95
96        MINIMIZE
97        (x1-x2)^2 + (1/9)*(x1+x2-10)^2 + (x3-5)^2;
98       
99        EQUATIONS
100        x1^2 + x2^2 + x3^2 < 48;
101       
102        OPTIONS
103        Dynamic = false;
104        NLPSolveNLA = false;
105        NLPSolver(File = "ipopt_emso",
106                          Objtol = 1e-6);
107       
108#       NLPSolver(File = "optpp_emso",
109#                         RelativeAccuracy = 1e-6,
110#                       SecondOrderDerivative= "BFGS");
111
112end
Note: See TracBrowser for help on using the repository browser.