【杂记】LS(最优化——局部搜索)

2021/8/14 23:09:09

本文主要是介绍【杂记】LS(最优化——局部搜索),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

最优化问题

  • 学习内容:局部搜索算法(启发式)
    • 1、 基本背景
    • 2、 核心问题
    • 3、 LS优劣
      • 优势:
      • 劣势:
    • 4、工具
    • 5、算例——流水作业调度
      • 基本框架
      • 邻域动作
      • 启发式
      • 动态选择策略
    • 6、疑问
    • 案例链接

学习内容:局部搜索算法(启发式)

1、 基本背景

局部搜索算法是从爬山法改进而来的。简单来说,局部搜索算法是一种简单的贪心搜索算法,该算法每次从当前解的邻域解空间中选择一个最好邻居作为下次迭代的当前解,直到达到一个局部最优解(local optimal solution)。局部搜索从一个初始解出发,然后搜索解的邻域,如有更优的解则移动至该解并继续执行搜索,否则就停止算法获得局部最优解。

2、 核心问题

①初始解
②邻域动作(求邻域解)
③邻域选择策略
④综合:动态策略选择
At the heart of the local search for a good permutation is the use of a particular heuristic and neighbourhood function to jump from one solution to another.

3、 LS优劣

优势:

没有较多局部最优解时,效果好

劣势:

①对初始值十分敏感
②迭代次数不可控
③复杂度呈指数级

4、工具

heuristical 启发式的
makespan 完工时
Flow Shop Scheduling 流水作业调度
permutation 排列组合
strat (strategy)
parse 解析
instance 实例
convert 转换
invert the rows and columns 转置
compile 编译
idle time 闲置时间(这里指车辆闲置时间)
Intuitively 直观地说
hillclimbing 爬山法

5、算例——流水作业调度

基本框架

①machine、job
②所有排列均为可行解,所以一定存在最优解,且不需检验是否可行
③随机排列 random.shuffle()
④为排列添加时间戳
⑤策略选择量化(improvement、time、times)
⑥数据处理(/分隔、读取)
⑦排列编译为准确时间
⑧输出结果

邻域动作

①简单随机策略(生成随机排列):作用不大
②交换策略(swap any two jobs):和最初解很相似
③闲置时间调节(“size” idle time):调节(存在最大闲置时间的车辆)的排列
④LNS策略(large neighbourhood serch):遍历子集中最佳的车辆排列,子集数量选择3或4,受限

启发式

①随机备选项策略
②最好完工时备选项策略
③综合一二备选项策略(兼顾①②,选择概率为0.5的最优、0.25的次优……)

动态选择策略

A strategy is a particular configuration of heuristic and neighbourhood functions (including their parameter values.)
通过乘积算符来组合启发式和邻域动作
策略权重则与轮盘赌类似,以固定时间间隔方式实现增长。权重通过标准化improvement和time,以最优k、k-1、……递减
输出策略排名

6、疑问

We then add all the tasks for the remaining jobs. The first task in a job will always start as soon as the first task in the previous job completes. For the remaining tasks, we schedule the job as early as possible: the maximum out of the completion time of the previous task in the same job and the completion time of the previous task on the same machine.
为何只需考虑同一辆车上一工序时间和同一机器上一工序时间两者最大时间?这种思路又从何而来?

案例链接

【500 Lines or Less】
http://aosabook.org/en/500L/a-flow-shop-scheduler.html




这篇关于【杂记】LS(最优化——局部搜索)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程