source: trunk/sample/miscellaneous/sample_PSO.mso @ 982

Last change on this file since 982 was 982, checked in by Argimiro Resende Secchi, 6 years ago
File size: 837 bytes
Line 
1FlowSheet test_pso
2        EQUATIONS
3        f = (1 - x)^2 + 100 * (y - x^2)^2;
4       
5        VARIABLES
6        x as Real (Lower = -10, Upper = 10);
7        y as Real (Lower = -10, Upper = 10);
8        f as Real;
9        k as Integer;
10       
11        SPECIFY
12        x = 1;
13        y = 1;
14        k = 1;
15       
16        OPTIONS
17        Dynamic = false;
18
19end
20
21Optimization test_opt as test_pso
22        MINIMIZE
23        f;
24       
25        FREE
26        x;
27        y;
28       
29        OPTIONS
30        Dynamic = false;
31        FeasiblePath = true;
32        NLPSolver (
33                File = "PSO",
34                verbosity = 2,
35                maxiterations = 100,
36                number_of_particles = 50
37        );
38end
39
40Optimization unificado
41        MINIMIZE
42        (1 - x)^2 + 100 * (y - x^2)^2;
43       
44        VARIABLES
45        x as Real (Lower = -10, Upper = 10);
46        y as Real (Lower = -10, Upper = 10);
47       
48        OPTIONS
49        Dynamic = false;
50#       FeasiblePath = true;
51        NLPSolver (
52                File = "PSO",
53                verbosity = 2,
54                maxiterations = 100,
55                number_of_particles = 50
56        );
57end
Note: See TracBrowser for help on using the repository browser.