objective: max sum(solution(i,9))
---------------------------------------------
while T>Tmin
for iteration=100
for i=1:61
function(generate_possible_solutions)
random_value = generate random value
solution(i) = generate_possible_solution(random_value, :)
feasible = sum(solution(i, 9))
next
SA:
check feasible
if feasible > previous_feasible
update best
else
check acceptance function
end
if iteration == limit
update (T)
end
end For
end While
代码在上面。
我的工作安排有问题。我的启发式算法使用 possible_solution 矩阵将每个作业分配到一行。例如,第 6 个工作有 140 个不同的选项,第 7 个工作在 possible_solution 矩阵中有 30 个不同的选项。
在模拟退火中,在每次迭代中,我随机使用其中一条解线进入 possible_solution 矩阵。但是,与 GAMS/Cplex 求解器相比,该解最多达到 50%。
我可以使用解决方案矩阵中的随机选择来使用模拟退火吗?我错过了什么?