开发者

factory floor simulation

开发者 https://www.devze.com 2022-12-18 17:47 出处:网络
I would like to create a simulation of a factory floor, and I 开发者_运维技巧am looking for ideas on how to do this. My thoughts so far are:

I would like to create a simulation of a factory floor, and I 开发者_运维技巧am looking for ideas on how to do this. My thoughts so far are:

• A factory is a made up of a bunch of processes, some of these processes are in series and some are in parallel. Each process would communicate with it's upstream and downstream and parallel neighbors to let them know of it’s through put

• Each process would it's own basic attributes like maximum throughput, cost of maintenance as a result of through put

Obviously I have not fully thought this out, but I was hoping somebody might be able to give me a few ideas or perhaps a link to an on line resource

update: This project is only for my own entertainment, and perhaps learn a little bit alnong the way. I am not employed as a programmer, programming is just a hobby for me. I have decided to write it in C#.


Simulating an entire factory accurately is a big job.

Firstly you need to figure out: why are you making the simulation? Who is it for? What value will it give them? What parts of the simulation are interesting? How accurate does it need to be? What parts of the process don't need to be simulated accurately?

To figure out the answers to these questions, you will need to talk to whoever it is that wants the simulation written.

Once you have figured out what to simulate, then you need to figure out how to simulate it. You need some models and some parameters for those models. You can maybe get some actual figures from real production and try to derive models from the figures. The models could be a simple linear relationship between an input and an output, a more complex relationship, and perhaps even a stochastic (random) effect. If you don't have access to real data, then you'll have to make guesses in your model, but this will never be as good so try to get real data wherever possible.

You might also want to consider to probabilities of components breaking down, and what affect that might have. What about the workers going on strike? Unavailability of raw materials? Wear and tear on the machinery causing progressively lower output over time? Again you might not want to consider these details, it depends on what the customer wants.

If your simulation involves random events, you might want to run it many times and get an average outcome, for example using a Monte Carlo simulation.

To give a better answer, we need to know more about what you need to simulate and what you want to achieve.


Since your customer is yourself, you'll need to decide the answer to all of the questions that Mark Byers asked. However, I'll give you some suggestions and hopefully they'll give you a start.

Let's assume your factory takes a few different parts and assembles them into just one finished product. A flowchart of the assembly process might look like this:

Factory Flowchart http://img62.imageshack.us/img62/863/factoryflowchart.jpg

For the first diamond, where widgets A and B are assembled, assume it takes on average 30 seconds to complete this step. We'll assume the actual time it takes the two widgets to be assembled is distributed normally, with mean 30 s and variance 5 s. For the second diamond, assume it also takes on average 30 seconds, but most of the time it doesn't take nearly that long, and other times it takes a lot longer. This is well approximated by an exponential distribution, with 30 s as the rate parameter, often represented in equations by a lambda.

For the first process, compute the time to assemble widgets A and B as:

timeA = randn(mean, sqrt(variance)); // Assuming C# has a function for a normally
                                     // distributed random number with mean and 
                                     // sigma as inputs

For the second process, compute the time to add widget C to the assembly as:

timeB = rand()/lambda;  // Assuming C# has a function for a uniformly distributed
                        // random number

Now your total assembly time for each iGadget will be timeA + timeB + waitingTime. At each assembly point, store a queue of widgets waiting to be assembled. If the second assembly point is a bottleneck, it's queue will fill up. You can enforce a maximum size for its queue, and hold things further up stream when that max size is reached. If an item is in a queue, it's assembly time is increased by all of the iGadgets ahead of it in the assembly line. I'll leave it up to you to figure out how to code that up, and you can run lots of trials to see what the total assembly time will be, on average. What does the resultant distribution look like?

Ways to "spice this up":

  • Require 3 B widgets for every A widget. Play around with inventory. Replenish inventory at random intervals.
  • Add a quality assurance check (exponential distribution is good to use here), and reject some of the finished iGadgets. I suggest using a low rejection rate.
  • Try using different probability distributions than those I've suggested. See how they affect your simulation. Always try to figure out how the input parameters to the probability distributions would map into real world values.

You can do a lot with this simple simulation. The next step would be to generalize your code so that you can have an arbitrary number of widgets and assembly steps. This is not quite so easy. There is an entire field of applied math called operations research that is dedicated to this type of simulation and analysis.


What you're describing is a classical problem addressed by discrete event simulation. A variety of both general purpose and special purpose simulation languages have been developed to model these kinds of problems. While I wouldn't recommend programming anything from scratch for a "real" problem, it may be a good exercise to write your own code for a small queueing problem so you can understand event scheduling, random number generation, keeping track of calendars, etc. Once you've done that, a general purpose simulation language will do all that stuff for you so you can concentrate on the big picture.

A good reference is Law & Kelton. ARENA is a standard package. It is widely used and, IMHO, is very comprehensive for these kind of simulations. The ARENA book is also a decent book on simulation and it comes with the software that can be applied to small problems. To model bigger problems, you'll need to get a license. You should be able to download a trial version of ARENA here.


It maybe more then what you are looking for but visual components is a good industrial simulation tool.

To be clear I do not work for them nor does the company I work for currently use them, but we have looked at them.


Automod is the way to go. http://www.appliedmaterials.com/products/automod_2.html

There is a lot to learn, and it won't be cheap.

ASI's Automod has been in the factory simulation business for about 30 years. It is now owned by Applied Materials. The big players who work with material handling in a warehouse use Automod because it is the proven leader.

0

精彩评论

暂无评论...
验证码 换一张
取 消