# Genetic algorithm for solving scheduling problem
An implementation of genetic algorithm for solving the scheduling problem in flexible job shop
This code solves the scheduling problem using a genetic algorithm. Implementation taken from pyeasyga
As input this code receives:
1. T = number of jobs [integer]
2. ni = number of operations of the job i [list of T elements]
3. m = number of machines [integer]
3. Mj´ = feasible machines for the operaion j of the job i [matrix of sum(ni) row, each row with n' feasible machines]
4. pj'k = processing time of the operation j' in the machine k [matrix of sum(ni) row, each row with n' feasible machines]
An example of the input is shown below:
T = 4 # number of jobs
ni =[2,3,4,2] # number of operations of the job i
ma = 6 # number of machines
Mij = [[1,2,3,4,5],[1,3,4,6],[1,3,2],[1,2,5],[1,2,3,4],[1,2,5],[1,2,3,6],[1,3,5],[1,5,6],
[1,6],[2,3,4]]
pjk = [[3,4,3,4,4,1000],[5,1000,5,4,1000,4],[3,4,6,1000,1000,1000],[2,4,1000,1000,4,1000],
[1,3,3,2,1000,1000],[1,3,1000,1000,2,1000],[2,2,2,1000,1000,2],[1,1000,1,1000,2,1000],
[4,1000,1000,1000,3,3],[3,1000,1000,1000,1000,4],[1000,5,3,4,1000,1000]]
The individual is a list with T*ni*2 digits. For each operation in each job it has the variable S and the variable X
The S for start time to process and the X for the machine where this operation will be done. E.g:
individual = [S11,X11,S12,X12..........Sini,Xini]
To get more information you can read the guide in the repository. However it's only available in spanish. The traslation into english is on going.
## Use of the algorithm
To use the algorithm you only have to download the file and import it:
import scheduling_ga_JSHC.py
And then in your code call the function:
genetic_algorithm_scheduling(data,counter,pop_size=100,num_generations=500)
it receives the data in the format mentioned before, an integer variable (counter), the population size (pop_size) and the number of generations (num_generations)
This functions increases the number the generations when a feasible solution is not found with the current number of generations (this depends on the complexity of the problem)
## License
MIT
没有合适的资源?快使用搜索试试~ 我知道了~
求解柔性作业车间调度问题 的遗传 算法实现_python_代码_下载
共4个文件
py:1个
pdf:1个
md:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 15 下载量 131 浏览量
2022-06-19
18:08:18
上传
评论 7
收藏 144KB ZIP 举报
温馨提示
求解调度问题的遗传算法 求解柔性作业车间调度问题的遗传算法实现 此代码使用遗传算法解决调度问题
资源推荐
资源详情
资源评论
收起资源包目录
genetic_algorithm_for_scheduling_problem-master.zip (4个子文件)
genetic_algorithm_for_scheduling_problem-master
README.md 2KB
LICENSE 1KB
ga_scheduling_guide_JSHC.pdf 149KB
scheduling_ga_JSHC.py 10KB
共 4 条
- 1
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页