1. system simulation and its classification
System simulation is a comprehensive experimental subject based on control theory, similarity theory, information processing technology and computer basic theory. With special physical effect equipment such as computers as tools, the real or hypothetical system is tested with system model, and the experimental results are analyzed and studied with the help of experts' empirical knowledge, statistical data and information materials, and then decisions are made. Broadly speaking, the method of system simulation is suitable for any field, whether it is engineering system (machinery, chemical industry, electric power, electronics, etc.). ) or non-engineering systems (transportation, management, economy, politics, etc.). ).
According to different models, system simulation can be divided into physical simulation, mathematical simulation and physical-mathematical simulation (semi-physical simulation); According to the type of computer, it can be divided into analog simulation, digital simulation and hybrid simulation; According to the characteristics of the system; It can be divided into continuous system simulation, discrete time system (sampling system) simulation and discrete event system simulation. According to the relationship between analog clock and actual clock, it can be divided into real-time simulation, under-real-time simulation and ultra-real-time simulation.
2. General steps of system simulation
For each successful simulation research project, its application includes specific steps, as shown in Figure 9-2. No matter how different the types of simulation projects and research purposes are, the basic process of simulation remains unchanged, and the following nine steps should be carried out:
Problem definition
target setting
Describe the system and list all assumptions.
List all possible options.
Collect data and information
Establish a computer model
Checksum and confirmation model
operation mode
Analysis output
The following briefly defines and explains the nine steps. It is not to lead to a detailed discussion, but to play a role in attracting jade. Note that simulation research cannot simply follow the nine-step sequence, and some projects may return to the previous steps after obtaining the internal details of the system. At the same time, verification and confirmation need to run through every step of simulation engineering.
Definition of (1) problem
It is impossible for a model to present all aspects of the simulated real system, sometimes because it is too expensive. In addition, if a model shows all the details of a real system, it is often a very poor model, because it will be too complicated to understand. Therefore, it is wise to define the problem first, then set the goal, and then establish a model that can completely solve the problem. In the problem definition stage, we should pay attention to assumptions and don't make wrong assumptions. For example, it is better to assume that the waiting time of forklift trucks is long than that there are not enough receiving docks. As a simulation program, the more general the statement defining the problem, the better, and consider the possible causes of the problem in detail.
(2) Set goals and define system efficiency measures.
It is useless to simulate research without goals. The goal is to guide all the steps of the simulation project. The definition of a system is also based on the system objectives. The goal determines what assumptions should be made and what information and data should be collected; The establishment and confirmation of the model consider whether the research goal can be achieved. Goals need to be clear, definite and realistic. The goal is usually described as something like "Can you make more profits by adding more machines or extending working hours?" Wait a minute. When defining a goal, it is necessary to specify a performance measure to determine whether the goal is achieved. Hourly output rate, worker utilization rate, average queuing time and maximum queuing length are the most common system performance indicators.
Finally, the preconditions of the simulation results are listed. For example, the existing equipment must be used to achieve the goal, or the maximum investment should be within the limit, or the lead time of product ordering cannot be extended.
(3) Describe the system and list the assumptions.
Simply put, the simulation model reduces the time to complete the work. The time in the system is divided into processing time, transportation time and queuing time. Whether the model is a logistics system, a manufacturing plant or a service organization, the following modeling elements need to be clearly defined: resources, moving items (products, customers or information), routes, project transportation, process control, processing time and resource failure time.
Simulation divides real system resources into four categories: processors, queues, transmissions and * * * shared resources such as operators. You must define the necessary conditions for the arrival and preloading of mobile projects, such as arrival time, arrival method and project type. When defining the process path, merger and transfer need to be described in detail. Project transformation includes attribute change, assembly operation (project combination) and disassembly operation (project separation). In a system, it is often necessary to control the flow of the project. For example, an article can only move when a certain condition or a certain moment comes, and some specific rules. All processing time should be defined, and it should be clearly pointed out that those operations are automatically completed by machines, which operations are independently completed by people, and which operations require man-machine cooperation. Resources may have planned downtime and unplanned downtime. Planned downtime usually refers to lunch time, intermittent and preventive maintenance. Unexpected failure time is the time required for random failure, including mean time between failure and mean maintenance interval.
After these tasks are completed, it is necessary to describe the real system as a model, which is far more difficult than transforming the model description into a computer model. The transformation from reality to model means that you have a very thorough understanding of reality and can describe it perfectly. At this stage, it is necessary to explain in detail all the assumptions made in this transformation process. In fact, it is a good idea to keep all the hypothesis lists available during the whole simulation research, because this hypothesis list will gradually increase with the progress of simulation. If this step of describing the system is done very well, it will be very simple to build a computer model.
Note that for specific simulation purposes, it is necessary to obtain enough materials that can reflect the essence of the system, but it is not necessary to obtain the corresponding model descriptions of the real system one by one. As Einstein said, "It couldn't be simpler."
(4) List possible alternatives.
In the simulation research, it is very important to determine the alternative scheme for the early operation of the model. Will affect the establishment of the model. Considering alternatives in the initial stage, the model can be designed to be easily converted into alternative systems.
(5) Collecting data and information
Collecting data and information can not only input data for model parameters, but also provide actual data for comparison with performance measurement data of the model in the stage of verifying the model. Data can be obtained through history, experience and calculation. These rough data will provide a basis for the model input parameters, and will help to collect some data that need more accurate input parameters.
Some data may not have ready-made records, and it may take time and money to collect data through measurement. Except in model analysis, model parameters need extremely accurate input data. Compared with the collection methods of parameter data in investigation and measurement systems, it is more efficient to use estimation method to generate input data. The estimated value can be obtained by some quick measurements or consulting system experts who are familiar with the system. Even for rough data, it is much better to define a triangular distribution according to the minimum value, maximum value and most likely value than to simulate only the average value. Sometimes, the purpose of simulation research can be achieved well by using the estimated value. For example, simulation may only be used to guide people to understand the specific causal relationship in the system. In this case, the estimated value can meet the requirements.
When reliable data are needed, it is very necessary to spend more time collecting and counting a large number of data to define a probability distribution function that can accurately reflect reality. The amount of data needed depends on the degree of variation of variables, but there are also general rules. Thumb method points out that at least 30 or even hundreds of data are needed. If we want to get the input parameters of random downtime, we must capture enough data in a long time.
(6) establishing a computer model
In the process of establishing a computer model, a small test model is first established to prove that the modeling of complex components is appropriate. The general modeling process is staged. Before the next stage of modeling, verify that the model in this stage works normally, and run and debug the models in each stage during the modeling process. Instead of directly modeling the whole system, click the "Run" button to simulate the system. Abstract model helps to define important parts of the system and can guide data collection activities for detailed follow-up models. We may want to build multiple computer models for the same real system, and each model has different degrees of abstraction.
(7) Verify and confirm the model.
Verification is to confirm whether the function of the model is consistent with that of the envisaged system. Whether the model is consistent with the model we want to establish, whether the processing time and flow direction of the product are correct, etc. The scope of confirmation is wider. Includes confirming whether the model can correctly reflect the real system and evaluating the credibility of the simulation results of the model.
(8) verification
Now there are many technologies that can be used to verify the model. The most important thing is to see whether the animation and the simulation clock run synchronously when the simulation is running at low speed. It can find the difference between material flow and its processing time.
Another verification technique is to display dynamic charts through the interactive command window to query the attributes and status of resources and mobile projects during the running of the model.
Running the model step by step and dynamically viewing the trajectory file can help people debug the model. When running the simulation, it is also a good method to input multiple sets of simulation input parameter values to verify whether the simulation results are reasonable. In some cases, some simple measurements of system performance can be obtained manually or by using comparison. It is usually very easy to calculate the utilization rate and output rate of specific regional elements in the model.
When debugging the model, it is suggested to use the same random number flow, which can ensure that the change of simulation results is caused by the modification of the model, and the random number flow does not change, which is sometimes very helpful for the model to run under some simplified assumptions, which are to calculate or predict the system performance more easily.
(9) Confirm
Model validation establishes the credibility of the model. But at present, there is no confirmation technology that can make 100% determination of the model results. We can never prove that the behavior of the model is real. If this can be done, the first step (problem definition) of simulation research may not be needed. The best thing we can do is to ensure that the behavior of the model does not conflict with reality.
Through confirmation, try to judge the validity of the model. A model is good if its output meets our goal after obtaining the relevant correct data provided by us. As long as the model is effective within the necessary scope, it is not necessarily as effective as possible. There is always a trade-off between the correctness of model results and the cost of obtaining these results.
To judge the validity of the model, we need to start from the following aspects:
① Does the model performance metric match the real system performance metric?
② If there is no real system to compare, the simulation results can be compared with the related operation results of the simulation model similar to the real system.
(3) Using the experience and intuition of system experts to assume the running state of specific parts in the complex system model.
For each major task, it is necessary to randomly test all parts of the model before confirming that the inputs and assumptions of the model are correct and the performance metrics of the model can be measured.
④ Is the behavior of the model consistent with the theory? Determine the theoretical maximum and minimum values of the results, and then verify whether the model results fall between these two values.
In order to understand the change direction of the output performance measure of the model after changing the input value, the consistency of the model can be verified by gradually increasing or decreasing its input parameters.
⑤ Can the model accurately predict the results? This technology is used to continuously verify the effectiveness of the operation model.
⑥ Are there any other simulators to simulate this model? If there is, that would be great. The simulation results of the existing model can be compared with the running results of the currently designed model.
(10) Run an alternative experiment.
When the system is random, it needs to run the experiment many times. Because random input leads to random output. If possible, the confidence interval of each defined performance metric should be calculated in the second step. The alternative environment can be built independently, and the simulation optimization can be automatically set up and run by using the "optimizer" module in WITNESS software.
In order to perform the optimization operation, the "optimizer" module of WITNESS software defines many decision variables that need to be tested, conditional variables that need to be realized, constraints that need to be met, and so on. By selecting the maximization or minimization of the objective function, then the optimization module is responsible for searching the alternative number of variables to run the model. Finally, the optimal solution of the decision variable set and the maximized or minimized model objective function are obtained. The "optimizer" module sets up a set of optimization methods, including genetic algorithm, simulation processing, tabu search, decentralized search and other mixed methods, in order to obtain the optimal configuration scheme of the model.
When selecting the simulation running length, it is very important to consider the start-up time, the possible interval of resource failure, the time or seasonal difference of processing time or arrival time, or other system characteristic variables that need the system to run for a long time to produce effects.
(1 1) output analysis
Reports, charts and tables are usually used to analyze the output results. At the same time, statistical techniques are needed to analyze the simulation results of different schemes this year. Once the results are analyzed and a conclusion is drawn, it is necessary to be able to explain these results according to the simulation objectives and put forward the implementation or optimization scheme. It is also helpful to compare and analyze the results with the matrix diagram of the scheme