source:mso/sample/miscellaneous/sample_opt.mso@1

Last change on this file since 1 was 1, checked in by Rafael de Pelegrini Soares, 16 years ago

Initial import of the library

• Property svn:eol-style set to `native`
• Property svn:keywords set to `Id`
File size: 906 bytes
Line
1
2#* Problema 71 proposto Hock e Schittkowski (1981).
3* Exemplifica o uso para solução de um problema de otimização
5*#
6Optimization hs71
7        VARIABLES
8        x1 as Real(Default=1, Lower=1, Upper=5);
9        x2 as Real(Default=5, Lower=1, Upper=5);
10        x3 as Real(Default=5, Lower=1, Upper=5);
11        x4 as Real(Default=1, Lower=1, Upper=5);
12
13        MINIMIZE
14        x1*x4*(x1+x2+x3) + x3;
15
16        EQUATIONS
17        x1*x2*x3*x4 > 25;
18
19        x1*x1 + x2*x2 + x3*x3 + x4*x4 = 40;
20
21        OPTIONS
22        NLPSolver = "opt_emso";
23        outputLevel = "all";
24        relativeAccuracy = 1e-6;
25end
26
27
28Optimization bn65
29        VARIABLES
30        x1 as Real(Default=1, Lower=-4.5, Upper=4.5);
31        x2 as Real(Default=5, Lower=-4.5, Upper=4.5);
32        x3 as Real(Default=5, Lower=-5, Upper=5);
33
34        MINIMIZE
35        (x1-x2)^2 + (1/9)*(x1+x2-10)^2 + (x3-5)^2;
36
37        EQUATIONS
38        x1^2 + x2^2 + x3^2 < 48;
39
40        OPTIONS
41        NLPSolver = "opt_emso";
42        outputLevel = "all";
43        relativeAccuracy = 1e-6;
44end
45
Note: See TracBrowser for help on using the repository browser.