Memuat
Memuat
Particle Swarm (particleswarm) for Aerospace and Aviation
0 views
Find the best path length with particle swarm optimisation by tuning waypoint x-coordinate and waypoint y-coordinate. particleswarm solves global optimisation with a swarm of particles without needing derivatives. It suits continuous non-smooth objectives, model parameter tuning, and design problems with variable bounds.

Find the best path length with particle swarm optimisation by tuning waypoint x-coordinate and waypoint y-coordinate.
| Role | Variable | Unit |
|---|---|---|
| Main | Path length | km |
| Supporting 1 | Waypoint x-coordinate | km |
| Supporting 2 | Waypoint y-coordinate | km |
Particle swarm converges to Waypoint x-coordinate=-1.076 and Waypoint y-coordinate=-1.138 with objective Path length=0.000 in 60 iterations (1830 evaluations); the swarm mean falls to 0.000.
Computed from illustrative synthetic data, not from a real study.
particleswarm solves global optimisation with a swarm of particles without needing derivatives. It suits continuous non-smooth objectives, model parameter tuning, and design problems with variable bounds.
Report swarm size, iterations, best solution and objective, and variation across runs. Compare with ga or fmincon where relevant.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
path_length = @(x) (x(1)^2 + x(2) - 11)^2 + (x(1) + x(2)^2 - 7)^2; % Himmelblau
lb = [-5 -5]; ub = [5 5];
opts = optimoptions('particleswarm', 'SwarmSize', 60, 'MaxIterations', 150, ...
'Display', 'off', 'FunctionTolerance', 1e-12);
nrun = 5; best = zeros(nrun, 1); sols = zeros(nrun, 2);
for r = 1:nrun
rng(r);
[sols(r,:), best(r)] = particleswarm(path_length, 2, lb, ub, opts);
end
fprintf('Best values: %s\n', mat2str(best', 3));
fprintf('Solutions:\n'); disp(sols);
waypoint_x_coordinate = sols(1, :);
[g1, g2] = meshgrid(linspace(-5, 5, 200));
Z = (g1.^2 + g2 - 11).^2 + (g1 + g2.^2 - 7).^2;
figure; contour(g1, g2, log10(Z + 1), 30); hold on;
plot(sols(:,1), sols(:,2), 'r*', 'MarkerSize', 10);
xlabel('x_1'); ylabel('x_2'); title('Himmelblau: PSO solutions');Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$34
excl. 11% VAT
Duration: 7 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$103
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$225
excl. 11% VAT
Duration: 18-21 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Particle Swarm (particleswarm) is commonly used at this level in Aerospace and Aviation. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output MATLAB gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$34, Package 2 (your data analysis and interpretation) US$103 and Package 3 (full guidance) US$225, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. MATLAB is a trademark of The MathWorks, Inc.
Back to MATLAB portfolio