Advanced Analytics
Budget: $10 – $30 USD
Knapsack Problem Definition Given n different items, where each item i has an assigned value (vi) and weight (wi), select a combination of the items to maximize the total value without exceeding the weight limitations, W, of the knapsack.
IMPORTANT!: When generating random problem instance set n = 150 and use the provided seed value for the random number generator. The max weight is 2500.
Using the provided Python code as a base, implement Simulated Annealing in code. Please address the following by including the associated Python code excerpts (as appropriate) and explanation of the code in the PDF file:
? Logic to determine the initial temperature
? At least two different temperature cooling schedules (the temperature update procedure) and explore some options for the number of iterations performed at a given temperature (Mk)
? Python logic excerpt for computing the probabilities of accepting a non-improving move
? Stopping criterion
Apply the code to the random problem instance and determine the best solution and objective value using the multiple variations of your algorithm.
IMPORTANT!: When generating random problem instance set n = 150 and use the provided seed value for the random number generator. The max weight is 2500.
Using the provided Python code as a base, implement Simulated Annealing in code. Please address the following by including the associated Python code excerpts (as appropriate) and explanation of the code in the PDF file:
? Logic to determine the initial temperature
? At least two different temperature cooling schedules (the temperature update procedure) and explore some options for the number of iterations performed at a given temperature (Mk)
? Python logic excerpt for computing the probabilities of accepting a non-improving move
? Stopping criterion
Apply the code to the random problem instance and determine the best solution and objective value using the multiple variations of your algorithm.