Memuat
Memuat
Simulated Annealing for Marketing and Consumer Behaviour
0 views
Apply Simulated Annealing to synthetic data to find the best solution for the promotion budget mix across digital and outdoor media and compare outcomes. 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.

Apply Simulated Annealing to synthetic data to find the best solution for the promotion budget mix across digital and outdoor media and compare outcomes.
| Role | Variable | Unit |
|---|---|---|
| Main | Consumer reach | ribu orang |
| Supporting 1 | Digital media budget | juta Rp |
| Supporting 2 | Outdoor media budget | juta Rp |
Simulated annealing (500 iterations) lowers Consumer reach to 16.35 at Digital media budget = 119.76 and Outdoor media budget = 68.95; 58.6% of moves were accepted and the gap to the optimum is 0.06%.
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)
digital_media_budget = rng.uniform(-5, 5, 2) # current solution
cur = f(digital_media_budget)
best_x, best = digital_media_budget.copy(), cur
T, cooling = 5.0, 0.995
consumer_reach = [] # objective trajectory
for it in range(4000):
cand = np.clip(digital_media_budget + rng.normal(0, 0.5, 2), -5, 5)
fc = f(cand)
if fc < cur or rng.random() < np.exp(-(fc - cur) / T):
digital_media_budget, cur = cand, fc
if cur < best:
best_x, best = digital_media_budget.copy(), cur
consumer_reach.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(consumer_reach)
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$34
excl. 11% VAT
Duration: 7 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$94
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$206
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 Marketing and Consumer Behaviour. 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$34, Package 2 (your data analysis and interpretation) US$94 and Package 3 (full guidance) US$206, 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