FlowSheet test_pso
EQUATIONS
f = (1 - x)^2 + 100 * (y - x^2)^2;
VARIABLES
x as Real (Lower = -10, Upper = 10);
y as Real (Lower = -10, Upper = 10);
f as Real;
k as Integer;
SPECIFY
x = 1;
y = 1;
k = 1;
OPTIONS
Dynamic = false;
end
Optimization test_opt as test_pso
MINIMIZE
f;
FREE
x;
y;
OPTIONS
Dynamic = false;
FeasiblePath = true;
NLPSolver (
File = "PSO",
verbosity = 2,
maxiterations = 100,
number_of_particles = 50
);
end
Optimization unificado
MINIMIZE
(1 - x)^2 + 100 * (y - x^2)^2;
VARIABLES
x as Real (Lower = -10, Upper = 10);
y as Real (Lower = -10, Upper = 10);
OPTIONS
Dynamic = false;
# FeasiblePath = true;
NLPSolver (
File = "PSO",
verbosity = 2,
maxiterations = 100,
number_of_particles = 50
);
end