Memuat
Memuat
Simulated Annealing for Medicine and Clinical Data
0 views
Optimise total patient travel distance with simulated annealing by tuning triage room position and radiology room position. Simulated annealing explores the solution space by accepting worse moves with a probability that falls as temperature decreases. It suits global optimisation of functions with many local minima and combinatorial problems.

Optimise total patient travel distance with simulated annealing by tuning triage room position and radiology room position.
| Role | Variable | Unit |
|---|---|---|
| Main | Total patient travel distance | m |
| Supporting 1 | Triage room position | m |
| Supporting 2 | Radiology room position | m |
Simulated annealing (500 iterations) lowers Total patient travel distance to 48.84 at Triage room position = 156.51 and Radiology room position = 204.76; 55.8% of moves were accepted and the gap to the optimum is 0.03%.
Computed from illustrative synthetic data, not from a real study.
Simulated annealing explores the solution space by accepting worse moves with a probability that falls as temperature decreases. It suits global optimisation of functions with many local minima and combinatorial problems.
Report the initial temperature, cooling rate, best solution and objective value, and their variation across runs. Explain that results are heuristic with no guarantee of the global optimum.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import dual_annealing
def f(p):
return (p[0] ** 2 + p[1] ** 2) / 10 + 3 * (2 - np.cos(2 * p[0]) - np.cos(2 * p[1]))
rng = np.random.default_rng(32)
triage_room_position = rng.uniform(-5, 5, 2) # current solution
cur = f(triage_room_position)
best_x, best = triage_room_position.copy(), cur
T, cooling = 5.0, 0.995
total_patient_travel_distanc = [] # objective trajectory
for it in range(4000):
cand = np.clip(triage_room_position + rng.normal(0, 0.5, 2), -5, 5)
fc = f(cand)
if fc < cur or rng.random() < np.exp(-(fc - cur) / T):
triage_room_position, cur = cand, fc
if cur < best:
best_x, best = triage_room_position.copy(), cur
total_patient_travel_distanc.append(best)
T *= cooling
print("SA best x:", best_x.round(4), "f =", round(best, 5))
ref = dual_annealing(f, bounds=[(-5, 5), (-5, 5)], seed=32)
print("scipy dual_annealing:", ref.x.round(4), "f =", round(ref.fun, 5))
plt.plot(total_patient_travel_distanc)
plt.xlabel("Iteration"); plt.ylabel("Best objective")
plt.show()Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$28
excl. 11% VAT
Duration: 7 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$84
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$184
excl. 11% VAT
Duration: 18-21 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 Medicine and Clinical Data. 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 Python 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$28, Package 2 (your data analysis and interpretation) US$84 and Package 3 (full guidance) US$184, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. Python is a trademark of the Python Software Foundation.
Back to Python portfolio