Use SimPy to simulate job shop problem
3 job with priorities: each job goes through 2 operations (red and green); job 2 arrives later than job 1 but job 2 has a higher priority, therefore when job 0 red operation is finished, job 2 is taken

Use SimPy to simulate job shop problem

Lately, I found this great discrete-event simulation framework SimPy. It utilises the generator functionality in Python to create simulation. I feel this is a very nice and clean tool with only a bunch of open source python files. I happen to have the need to create a simulation tool to model job shop where each job goes through a sequence of operations. Each operation can only be performed by a certain type of machine. Each type has a certain capacity. So if the job is requesting a machine but all of them are busy, the job must wait for the next free machine. The framework also supports priority request, meaning not always the first request will get the next free resource, but the most important request will get the resource. One little extension I made is to allow break times for each resource. This is useful if the machine is a person or something is on and off. Break times are introduced as a high priority event for that resource. So when the resource finishes a job around the break time, it will start take the break. Preemption is also easy to implement. Overall, I think this is very cool~ The link is below

要查看或添加评论,请登录

Oddo Zhang, PhD的更多文章

  • Traffic lights modelling

    Traffic lights modelling

    When I am driving, I get mad by short right turn intervals at a traffic intersection. After 15 mins, I may be still on…

    1 条评论
  • How busy is my bus - bus modelling

    How busy is my bus - bus modelling

    I wrote a small program to model the buses running from my home to work. Buses typically run in regular periods and…

社区洞察

其他会员也浏览了