Memuat
Memuat
Simulated Annealing for Environmental Engineering
0 views
Optimise total travel distance with Simulated Annealing by selecting the best number of trucks and truck load capacity. simulannealbnd applies simulated annealing for global optimisation with variable bounds without needing derivatives. It suits functions with many local minima and non-smooth objectives.

Optimise total travel distance with Simulated Annealing by selecting the best number of trucks and truck load capacity.
| Role | Variable | Unit |
|---|---|---|
| Main | Total travel distance | km |
| Supporting 1 | Number of trucks | unit |
| Supporting 2 | Truck load capacity | ton |
Simulated annealing stops at Number of trucks=-1.393 and Truck load capacity=-1.461 with best Total travel distance=0.995 after 1268 iterations; the temperature cools to 0.02 so worse moves are accepted less and less often.
Computed from illustrative synthetic data, not from a real study.
simulannealbnd applies simulated annealing for global optimisation with variable bounds without needing derivatives. It suits functions with many local minima and non-smooth objectives.
Report annealing settings, the best solution, objective value, and variation across runs. Compare with ga or particleswarm as other global methods.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
total_travel_distance = @(x) (x(1)^2 + x(2)^2)/10 + 3*(2 - cos(2*x(1)) - cos(2*x(2)));
lb = [-5 -5]; ub = [5 5];
number_of_trucks = [4 4]; % starting point
opts = optimoptions('simulannealbnd', 'MaxIterations', 3000, ...
'InitialTemperature', 50, 'Display', 'off');
nrun = 5; best = zeros(nrun, 1); sols = zeros(nrun, 2);
for r = 1:nrun
rng(r);
[sols(r,:), best(r), exitflag] = simulannealbnd(total_travel_distance, number_of_trucks, lb, ub, opts);
end
fprintf('Best values: %s\n', mat2str(best', 4));
fprintf('Mean = %.4f, SD = %.4f, last exitflag = %d\n', mean(best), std(best), exitflag);
[~, ib] = min(best);
fprintf('Best solution: [%.4f %.4f]\n', sols(ib,1), sols(ib,2));
[g1, g2] = meshgrid(linspace(-5, 5, 200));
Z = (g1.^2 + g2.^2)/10 + 3*(2 - cos(2*g1) - cos(2*g2));
figure; contour(g1, g2, Z, 25); hold on;
plot(sols(:,1), sols(:,2), 'r*', 'MarkerSize', 10);
xlabel('x_1'); ylabel('x_2');Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$25
excl. 11% VAT
Duration: 5 working days
Output: MATLAB files + result figures
Deliverables
Package 2 · most chosen
US$69
excl. 11% VAT
Duration: 9 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$153
excl. 11% VAT
Duration: 14-17 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Simulated Annealing is commonly used at this level in Environmental Engineering. 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$25, Package 2 (your data analysis and interpretation) US$69 and Package 3 (full guidance) US$153, 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