Modeling in computer science - what is it? Types and stages of modeling. The concepts of “model”, “simulation”, various approaches to classifying models

Sometimes models are written in programming languages, but this is a long and expensive process. Mathematical packages can be used for modeling, but experience shows that they usually lack many engineering tools. It is optimal to use a simulation environment.

In our course, we chose . The labs and demos you will encounter in the course should be run as projects in the Stratum-2000 environment.

The model, made taking into account the possibility of its modernization, of course, has disadvantages, for example, low speed of code execution. But there are also undeniable advantages. The model structure, connections, elements, subsystems are visible and saved. You can always go back and redo something. A trace in the history of model design is preserved (but when the model is debugged, it makes sense to remove service information from the project). In the end, the model that is handed over to the customer can be designed in the form of a specialized automated workstation (AWS), written in a programming language, in which attention is mainly paid to the interface, speed parameters and other consumer properties that are important for customer. The workstation is, of course, an expensive thing, so it is released only when the customer has fully tested the project in the modeling environment, made all the comments and undertakes not to change his requirements anymore.

Modeling is an engineering science, a problem-solving technology. This remark is very important. Since technology is a way to achieve a result with a quality known in advance and guaranteed costs and deadlines, then modeling as a discipline:

  • studies ways to solve problems, that is, it is an engineering science;
  • is a universal tool that guarantees the solution of any problems, regardless of the subject area.

Subjects related to modeling are: programming, mathematics, operations research.

Programming because the model is often implemented on an artificial medium (plasticine, water, bricks, mathematical expressions), and the computer is one of the most universal media of information and, moreover, active (simulates plasticine, water, bricks, calculates mathematical expressions, etc.). Programming is a way of expressing an algorithm in a language form. Algorithm is one of the ways of representing (reflecting) a thought, process, phenomenon in an artificial computing environment, which is a computer (von Neumann architecture). The specificity of the algorithm is to reflect the sequence of actions. Modeling can use programming if the object being modeled is easy to describe in terms of its behavior. If it is easier to describe the properties of an object, then it is difficult to use programming. If the simulation environment is not built on the basis of von Neumann architecture, programming is practically useless.

What is the difference between an algorithm and a model?

An algorithm is a process of solving a problem by implementing a sequence of steps, while a model is a set of potential properties of an object. If you pose a question to the model and add additional conditions in the form of initial data (connection with other objects, initial conditions, restrictions), then it can be resolved by the researcher regarding unknowns. The process of solving a problem can be represented by an algorithm (but other solution methods are also known). In general, examples of algorithms in nature are unknown; they are the product of the human brain, the mind, capable of establishing a plan. Actually, the algorithm is a plan, developed into a sequence of actions. It is necessary to distinguish between the behavior of objects associated with natural causes and the providence of the mind, controlling the course of movement, predicting the result on the basis of knowledge and choosing the appropriate behavior.

model + question + additional conditions = task.

Mathematics is a science that provides the possibility of calculating models that can be reduced to a standard (canonical) form. The science of finding solutions to analytical models (analysis) using formal transformations.

Operations research a discipline that implements methods for studying models from the point of view of finding the best control actions on models (synthesis). Mostly deals with analytical models. Helps make decisions using built models.

Design the process of creating an object and its model; modeling a way to evaluate the design result; There is no modeling without design.

Related disciplines for modeling include electrical engineering, economics, biology, geography, and others in the sense that they use modeling methods to study their own applied object (for example, a landscape model, an electrical circuit model, a cash flow model, etc.).

As an example, let's look at how a pattern can be detected and then described.

Let’s say that we need to solve the “Cutting Problem”, that is, we need to predict how many cuts in the form of straight lines will be required to divide the figure (Fig. 1.16) into a given number of pieces (for example, it is enough that the figure is convex).

Let's try to solve this problem manually.

From Fig. 1.16 it is clear that with 0 cuts 1 piece is formed, with 1 cut 2 pieces are formed, with two 4, with three 7, with four 11. Can you now tell in advance how many cuts will be required to form, for example, 821 pieces ? In my opinion, no! Why are you having trouble? You do not know the pattern K = f(P) , Where K number of pieces, P number of cuts. How to spot a pattern?

Let's make a table connecting the known numbers of pieces and cuts.

The pattern is not yet clear. Therefore, let's look at the differences between individual experiments, let's see how the result of one experiment differs from another. Having understood the difference, we will find a way to move from one result to another, that is, a law connecting K And P .

A certain pattern has already emerged, hasn’t it?

Let's calculate the second differences.

Now everything is simple. Function f called generating function. If it is linear, then the first differences are equal. If it is quadratic, then the second differences are equal to each other. And so on.

Function f There is a special case of Newton's formula:

Odds a , b , c , d , e for our quadratic functions f are in the first cells of the rows of experimental table 1.5.

So, there is a pattern, and it is this:

K = a + b · p + c · p · ( p 1)/2 = 1 + p + p · ( p 1)/2 = 0.5 · p 2 + 0.5 p + 1 .

Now that the pattern has been determined, we can solve the inverse problem and answer the question posed: how many cuts must be made to get 821 pieces? K = 821 , K= 0.5 · p 2 + 0.5 p + 1 , p = ?

Solving a quadratic equation 821 = 0.5 · p 2 + 0.5 p + 1 , we find the roots: p = 40 .

Let's summarize (pay attention to this!).

We couldn't guess the solution right away. Conducting the experiment turned out to be difficult. I had to build a model, that is, find a pattern between the variables. The model was obtained in the form of an equation. By adding a question to the equation and an equation reflecting a known condition, a problem was formed. Since the problem turned out to be of a typical type (canonical), it was solved using one of the well-known methods. Therefore, the problem was solved.

And it is also very important to note that the model reflects cause-and-effect relationships. There is indeed a strong connection between the variables of the constructed model. A change in one variable entails a change in another. We said earlier that “the model plays a system-forming and meaning-forming role in scientific knowledge, it allows us to understand the phenomenon, the structure of the object under study, and establish the connection between cause and effect.” This means that the model allows us to determine the causes of phenomena and the nature of the interaction of its components. The model relates causes and effects through laws, that is, variables are related to each other through equations or expressions.

But!!! Mathematics itself does not make it possible to derive any laws or models from the results of experiments, as it may seem after the example just considered. Mathematics is only a way of studying an object, a phenomenon, and, moreover, one of several possible ways of thinking. There is also, for example, a religious method or a method that artists use, an emotional-intuitive one, with the help of these methods they also learn about the world, nature, people, themselves.

So, the hypothesis about the connection between variables A and B must be introduced by the researcher himself, from the outside, in addition. How does a person do this? It’s easy to advise introducing a hypothesis, but how to teach this, explain this action, and therefore, again, how to formalize it? We will show this in detail in the future course “Modeling Artificial Intelligence Systems”.

But why this must be done from the outside, separately, additionally and in addition, we will explain now. This reasoning bears the name of Gödel, who proved the incompleteness theorem: it is impossible to prove the correctness of a certain theory (model) within the framework of the same theory (model). Look again at Fig. 1.12. The higher level model transforms equivalent lower level model from one species to another. Or it generates a lower-level model based on its equivalent description. But she cannot transform herself. The model builds the model. And this pyramid of models (theories) is endless.

In the meantime, in order to “not get blown up by nonsense,” you need to be on your guard and check everything with common sense. Let's give an example, an old well-known joke from the folklore of physicists.

Mathematical modeling can be divided into analytical, numerical and simulation.

Historically, analytical modeling methods were the first to be developed, and an analytical approach to the study of systems emerged.

Analytical modeling methods (AM). With AM, an analytical model of an object is created in the form of algebraic, differential, and finite-difference equations. The analytical model is studied either by analytical methods or by numerical methods. Analytical methods make it possible to obtain the characteristics of a system as some functions of its operating parameters. The use of analytical methods gives a fairly accurate estimate, which often corresponds well to reality. Changes in the states of a real system occur under the influence of many external and internal factors, the vast majority of which are stochastic in nature. Because of this, and the great complexity of many real-life systems, the main disadvantage of analytical methods is that certain assumptions must be made when deriving the formulas on which they are based and which are used to calculate the parameters of interest. However, it often turns out that these assumptions are quite justified.

Numerical modeling methods. Transformation of the model to equations, the solution of which is possible using the methods of computational mathematics. The class of problems is much wider, however, numerical methods do not provide exact solutions, but they allow you to specify the accuracy of the solution.

Simulation methods of modeling (IM). With the development of computer technology, simulation modeling methods have become widely used for the analysis of systems in which stochastic influences are predominant.

The essence of IM is to simulate the process of system functioning over time, observing the same ratios of operation durations as in the original system. At the same time, the elementary phenomena that make up the process are simulated: their logical structure and sequence of events in time are preserved. The result of MI is obtaining estimates of system characteristics.

The famous American scientist Robert Shannon gives the following definition: “Simulation modeling is the process of constructing a model of a real system and conducting experiments on this model in order to either understand the behavior of the system or evaluate (within the limitations imposed by some criterion or set of criteria) various strategies that ensure the functioning of this system." All simulation models use the black box principle. This means that they produce an output signal from the system when some input signal enters it. Therefore, in contrast to analytical models, in order to obtain the necessary information or results, it is necessary to “run” simulation models, i.e., submit a certain sequence of signals, objects or data to the input of the model and record the output information, and not “solve” them. There is a kind of “sampling” of states of the modeling object (states are properties of the system at specific points in time) from the space (set) of states (the set of all possible values ​​of states). To the extent that this sample is representative, the modeling results will correspond to reality. This finding shows the importance of statistical methods for evaluating simulation results. Thus, simulation models do not form their own solution in the same way as in analytical models, but can only serve as a means for analyzing the behavior of the system under conditions that are determined by the experimenter.

The use of simulation modeling is advisable under certain conditions. These conditions are defined by R. Shannon:

    There is no complete mathematical formulation of this problem, or analytical methods for solving the formulated mathematical model have not yet been developed. Many queuing models that involve queuing fall into this category.

    Analytical methods are available, but the mathematical procedures are so complex and time-consuming that simulation provides a simpler way to solve the problem.

    In addition to assessing certain parameters, it is advisable to monitor the progress of the process on a simulation model over the required time period.

An additional advantage of simulation modeling is the wide range of possibilities for its application in the field of education and professional training. The development and use of a simulation model allows the experimenter to see and “play out” real processes and situations on the model.

It is necessary to identify a number of problems that arise in the process of modeling systems. The researcher must focus attention on them and try to resolve them in order to avoid obtaining unreliable information about the system being studied.

The first problem, which also applies to analytical modeling methods, is to find the “golden mean” between simplification and complexity of the system. According to Shannon, the art of modeling mainly consists of the ability to find and discard factors that do not affect or have a slight effect on the characteristics of the system under study. Finding this “compromise” largely depends on the experience, qualifications and intuition of the researcher. If the model is too simplified and some essential factors are not taken into account, then there is a high probability of obtaining erroneous data from this model; on the other hand, if the model is complex and it includes factors that have a minor impact on the system being studied, then the costs of creating such a model increase sharply model and the risk of errors in the logical structure of the model increases. Therefore, before creating a model, it is necessary to do a large amount of work to analyze the structure of the system and the relationships between its elements, study the totality of input influences, and carefully process the available statistical data about the system under study.

The second problem is the artificial reproduction of random environmental influences. This question is very important, since most dynamic production systems are stochastic, and when modeling them, high-quality unbiased reproduction of randomness is necessary, otherwise, the results obtained from the model may be biased and not correspond to reality.

There are two main directions for solving this problem: hardware and software (pseudorandom) generation of random sequences. At hardware method generation random numbers are generated by a special device. The physical effect underlying such number generators is most often noise in electronic and semiconductor devices, decay phenomena of radioactive elements, etc. The disadvantages of the hardware method of obtaining random numbers is the inability to verify (and therefore guarantee) the quality of the sequence in simulation time, as well as the impossibility of obtaining identical sequences of random numbers. Software method is based on the generation of random numbers using special algorithms. This method is the most common, since it does not require special devices and makes it possible to repeatedly reproduce the same sequences. Its disadvantages are the error in modeling the distributions of random numbers, introduced due to the fact that the computer operates with n-bit numbers (i.e., discrete), and the periodicity of sequences arising due to their algorithmic production. Thus, it is necessary to develop methods for improving and criteria for checking the quality of pseudorandom sequence generators.

The third, most difficult problem is assessing the quality of the model and the results obtained with its help (this problem is also relevant for analytical methods). The adequacy of models can be assessed by the method of expert assessments, comparison with other models (which have already confirmed their reliability) based on the results obtained. In turn, to verify the results obtained, some of them are compared with existing data.

Simulation method the most promising research method requires a certain level of mathematical training from the psychologist. Here, mental phenomena are studied on the basis of an approximate image of reality - its model. The model makes it possible to focus the psychologist’s attention only on the main, most significant features of the psyche. A model is an authorized representative of the object being studied (mental phenomenon, thinking process, etc.). Of course, it is better to immediately get a holistic understanding of the phenomenon being studied. But this is usually impossible due to the complexity of psychological objects.

The model is related to its original by a similarity relationship.

Cognition of the original from the standpoint of psychology occurs through complex processes of mental reflection. The original and its psychic reflection are related like an object and its shadow. Complete cognition of an object is carried out sequentially, asymptotically, through a long chain of cognition of approximate images. These approximate images are models of the cognizable original.

The need for modeling arises in psychology when:
- the systemic complexity of an object is an insurmountable obstacle to creating its holistic image at all levels of detail;
- rapid study of a psychological object is required to the detriment of the detail of the original;
- mental processes with a high level of uncertainty are subject to study and the patterns to which they obey are unknown;
- optimization of the object under study is required by varying input factors.

Modeling tasks:

- description and analysis of mental phenomena at various levels of their structural organization;
- forecasting the development of mental phenomena;
- identification of mental phenomena, i.e. establishing their similarities and differences;
- optimization of conditions for the occurrence of mental processes.

Briefly about the classification of models in psychology. There are object and symbolic models. Subject ones have a physical nature and, in turn, are divided into natural and artificial. Natural models are based on representatives of living nature: people, animals, insects. Let us remember man's faithful friend, the dog, which served as a model for studying the functioning of human physiological mechanisms. Artificial models are based on elements of “second nature” created by human labor. As an example, we can cite F. Gorbov’s homeostat and N. Obozov’s cybernometer, which are used to study group activity.

Sign models are created on the basis of a system of signs of very different nature. This:
- alphanumeric models, where letters and numbers act as signs (such, for example, is the model for regulating joint activities of N. N. Obozov);
- models of special symbols (for example, algorithmic models of the activities of A. I. Gubinsky and G. V. Sukhodolsky in engineering psychology or musical notation for an orchestral piece of music, which contains all the necessary elements that synchronize the complex joint work of performers);
- graphic models that describe an object in the form of circles and lines of communication between them (the former can express, for example, the states of a psychological object, the latter - possible transitions from one state to another);
- mathematical models that use a diverse language of mathematical symbols and have their own classification scheme;
- cybernetic models are built on the basis of the theory of automatic control and simulation systems, information theory, etc.

Modeling is the replacement of one object (original) with another (model) and fixation or study of the properties of the original by studying the properties of the model.

Model is a representation of an object, system or concept (idea) in some form that is different from the form of its real existence.

The benefits of modeling can only be achieved if the following fairly obvious conditions are met:

The model adequately reflects the properties of the original that are significant from the point of view of the purpose of the study;

The model allows you to eliminate the problems inherent in taking measurements on real objects.

Approaches (methods) to modeling.

1) Classic (inductive) examines the system by moving from the particular to the general, i.e. The system model is built from the bottom up and synthesized by merging the element models of the component systems, developed separately.

2) System. Transition from general to specific. The model is based on the purpose of the study. It is from this that they start when creating a model. The goal is what we want to know about the object.

Let's consider the basic principles of modeling.

1) The principle of information sufficiency. It is necessary to collect information that will provide a sufficient level of information.

2) The principle of feasibility. The model must ensure achievement of the goal within a realistically specified time.

3) Aggregation principle. A complex system consists of subsystems (units), for which You can build independent models and combine them into a common model. The model turns out to be flexible. When changing the goal, a number of component modules can be used. The model is feasible if

And
.

Classification of modeling methods.

1) By the nature of the processes being studied

Deterministic - during the functioning of the modeled object, random factors are not taken into account (everything is predetermined).

Stochastic – the impact of various factors on existing real systems is taken into account

2) Based on development over time

Static – the behavior of an object is described at a certain time

Dynamic – for a certain period of time

3) According to the presentation of information in the model

Discrete - if events leading to changes in states occur at a certain point in time.

Continuous, discrete-continuous.

4) According to the form of presentation of the modeling object

Mental- if the modeling object does not exist, or exists outside the conditions for its physical creation.

A) Symbolic. Creating a logical object that replaces the real one.

B) Mathematical

Analytical. An object is described using functional relationships, followed by an attempt to obtain an explicit solution.

Imitation. The algorithm that describes the functioning of the system reproduces the process of the object’s operation over time. This method is also called statistical, because statistics of simulated phenomena are collected. (based on the Monte Carlo method - static test method)

B) Visual

Real- there is an object.

A) Natural. The experiment is carried out on the modeling object itself. The most common form is testing.

B) Physical. Research is carried out on a special basis. Installations, processes in the cat. They have a physical similarity with processes in real objects.

The analytical model can be studied using the following methods:

A) analytical: an attempt to obtain solutions explicitly (general);

b) numerical: obtain a numerical solution under given initial conditions (partial nature of the solutions);

V) quality: Without having an explicit solution, you can find the properties of the solution in explicit form.

In simulation modeling, the algorithm that describes the functioning of the system reproduces the process of the object’s operation over time. This method is also called statistical, because statistics of simulated phenomena are collected. (based on the Monte Carlo method)

CATEGORIES

POPULAR ARTICLES

2023 “kingad.ru” - ultrasound examination of human organs