Hardware and software setup

2 modeling of the research process, its algorithmization. Formalization and algorithmization of systems functioning processes - document

Modeling, algorithmization and programming

At present, the share of mental labor in the activities of each person is increasing, it is required to solve practical problems related to the processing, storage, and transmission of information. At the same time, the number of people professionally engaged in information work is growing. To automate it, a computer is used as a universal means of working with information.

Solving a problem using a computer involves the following stages:

Let's take a closer look at each of these steps.

1. Statement of the problem. Building an information model

As a rule, practical tasks are formulated quite clearly from the user's point of view, but such a formulation does not have sufficient clarity and rigor.

In order for such a problem to be solved using a computer, it is necessary to complete the problem statement:

For this, it is important to define essential properties of objects and phenomena, which are discussed in the problem, and neglect the insignificant ones.

Sometimes they forget about it. For example, if in a task it is required to determine the area of ​​\u200b\u200bthe upper surface of a table (tabletop), they say without hesitation that it is necessary to measure the length and width. However, the essential property of the table may be that it is round, then it is difficult to talk about length and width. In addition, even if it is determined that the tabletop has a rectangular shape, it should be agreed that small irregularities do not have a significant effect on the size of the area.

In the rectangular table example, length and width cannot be negative numbers, nor can they be unrealistically large or small.

All this information forms task information model .

The main property of the model is to simplify the phenomenon under study, while maintaining its essential properties. An information model of a task can be called information about the objects and phenomena that appear in the task, significant from the point of view of the task and recorded in textual, numerical or other signal form.

Steps for building an information model:

Let us give a definition of the concept of "model" and possible classifications.

A model is a formalized description of an object, a system of objects, a process or phenomenon, expressed by mathematical relationships, a set of numbers and (or) texts, graphs, tables, verbal formulas, etc.

The process of creating (and sometimes researching) a model is called modeling.

The method of cognition, which consists in the study of an object by its properties, is called modeling.

Model classification

By area of ​​use

Time classification

By way of presentation

According to the form of presentation the following types can be distinguished information models:

2. Formalization of the problem

At this stage, there is fixing the information model, is chosen the form representation data that form an information model that is most convenient for computer processing. Often the first two stages do not have a clear boundary and can be considered as a whole.

After completing the problem statement, a formalized model is created, i.e. a descriptive information model is written using some formal language, such as mathematical.

3. Construction of the algorithm

The concept of an algorithm is one of the fundamental concepts of computer science. Algorithmization along with modeling acts as a general method of informatics.

Algorithms are the object of a systematic study of a scientific discipline bordering between mathematics and computer science, adjacent to mathematical logic - theory of algorithms.

The word "algorithm" itself comes from algorithmi - the Latin form of writing the name of the great mathematician of the 9th century al-Khwarizmi, who formulated the rules for performing arithmetic operations. Initially, algorithms and understood only the rules for performing four arithmetic operations on multi-valued numbers.

An algorithm is a clear and precise instruction to the performer to perform a sequence of actions aimed at achieving a set goal or solving a set task.

According to this definition, recipes for making any medicine or cookie are algorithms. And the rule of safe pedestrian crossing of the carriageway of the street is also an algorithm. According to their purpose, algorithms can be both "household" and computational.

Executor is someone or something that can perform some very specific set of actions. It has the following properties:

The entire set of commands that a given executor can execute is called the executor's command system (SCI).

Formal performance algorithms underlies the control of automatic devices. Indeed, the simplest operations, into which the process of solving a problem is divided when creating an algorithm, can also be implemented by a machine specially created to execute individual commands of the algorithm and execute them in the sequence specified in the algorithm.

However, a person can also be a formal performer. If he does not know the purpose of the work he is doing, he will have to strictly follow the instructions.

The computer is the formal executor of algorithms. In order for him to solve the problem in strict accordance with the instructions, he must receive a solution algorithm. Thus, the algorithm is control information.

Properties of algorithms

Algorithm discreteness

The execution of the algorithm is divided into a sequence of individual steps. Execute each step instructs team. Thus, the algorithm is a sequence of commands that determine the actions of the performer. The algorithm has a discontinuous (discrete) structure: only after executing one command, the executor can start executing the next one. This property is called discreteness.

Clarity of the algorithm

A correctly composed algorithm contains only those commands that are included in the command system of the executor for which it was written. This property is called comprehensibility. .

Understandable for the performer are those commands that he can execute.

For example, a person who does not know how to add single-digit numbers (who does not know the addition table) will not be able to use the order of adding multi-digit numbers described by al-Khwarizmi.

Algorithm Accuracy

An important property of the algorithm is accuracy (certainty, unambiguity).Each command of the algorithm must be unambiguously perceived by the executor and assume its specific action. Having completed the step of the algorithm, the performer must know exactly which step to perform next. An example of an inaccurate algorithm is the phrase from the recipe “pour 2-4 tablespoons of sugar” or the classic saying “execution cannot be pardoned.”

Performance and Finiteness of the Algorithm

The execution of the algorithm should lead to a result (property performance) in a finite number of steps (finite property).

Mass character of the algorithm

It is desirable that the algorithm satisfies the mass property , those. could be used to solve not only one specific problem, but also a certain class of problems of the same type.

for example, the rule for adding multi-digit numbers does not depend on the number of digits in the terms or their digital composition. It works even if the number is represented not in decimal notation, but in positional notation with any integer base.

Ways to write algorithms

In practice, the following forms of fixing algorithms are most common:

verbal way

For a person, the verbal method is the main one.

For example. Write down an algorithm for finding the greatest common divisor (GCD) of two natural numbers.

The algorithm may be as follows:

set two numbers;

if the numbers are equal, then take any of them as an answer and stop, otherwise continue the algorithm;

determine the largest of the numbers;

replace the larger of the numbers with the difference between the larger and smaller of the numbers;

repeat the algorithm from step 2.

The described algorithm is applicable to any natural numbers and should lead to the solution of the problem. See for yourself by using this algorithm to determine the greatest common divisor of 125 and 75.

The verbal method is not widely used for the following reasons:

Pseudocode

Pseudocode is a system of notation and rules for uniform and precise writing of algorithms.

Pseudocode is human-oriented, but facilitates translation into a programming language because it requires certain notation rules to be followed. An example of pseudocode is a school algorithmic language.

Note that there is a difference between the concepts of "algorithmic language" and "programming languages"; First of all, an executor in an algorithmic language can mean not only a computer, but also a device for working “in the environment”. A program written in an algorithmic language is not necessarily intended for a computer. The practical implementation of an algorithmic language is a separate issue in each specific case.

Like every language, an algorithmic language has its own vocabulary. The basis of this dictionary is the words used to record the commands included in the command system of the executor of a particular algorithm. Such commands are called simple commands. In an algorithmic language, words are used whose meaning and method of use are set once and for all. These words are called service words. The use of service words makes the recording of the algorithm more visual, and the form of presentation of various algorithms is uniform.

An algorithm written in an algorithmic language must have a name. It is desirable to choose the name so that it is clear which solution the given algorithm describes. To highlight the name of the algorithm, the service word ALG (ALGORITHM) is written in front of it. Behind the name of the algorithm (usually on a new line) write down its commands. To indicate the beginning and end of the algorithm, its commands are enclosed in a pair of service words BEGIN (START) and KON (END). Commands are written sequentially.

The sequence of writing the algorithm:

ALG algorithm name

a series of algorithm instructions

Graphical representation of algorithms

An algorithm compiled for a certain performer can be represented in various ways: using a graphic or verbal description, in the form of a table, a sequence of formulas written in an algorithmic language (programming language). Let us dwell on the graphical description of the algorithm called a block diagram . This method has a number of advantages due to its visibility, which ensures, in particular, the high "readability" of the algorithm and the explicit display of control in it.

First of all, we define the concept of a block diagram.

A flowchart is a directed graph that indicates the order in which the commands of an algorithm are executed.

A flowchart is a graphical representation of an algorithm.

In the flowchart, each type of action (input of initial data, calculation of expression values, verification of conditions, control of repetition of actions, completion of processing, etc.) corresponds to geometric figure , represented as a block character. Block symbols connect transition lines that determine the order in which actions are performed.

In the block diagram, the actions of the algorithm (blocks) are depicted by the following geometric shapes:

To organize actions in an algorithm, various forms are used, called algorithmic constructions. There are three main algorithmic constructions: following, branching, loop. In mathematics, a theorem has been proven that any algorithm can be compiled using only these three algorithmic constructions, although there are other constructions that shorten the notation of the algorithm, simplify working with it, and make it easier to understand.

Follow construction (linear algorithm)

Follow construction - this is a form of organization of actions when actions are performed sequentially, one after another.

Here, as a series of commands can be:

In fact, each algorithm can be divided into fairly large blocks, which will include all the objects listed above in a different order, and a linear algorithm can be made from such blocks.

Example

Task: Calculate the area of ​​a circle if the radius is known.

Given: R is the radius of the circle.

To find: S is the area of ​​the circle.

Decision: S=3.14 R2

Let's choose the Russian language for writing the algorithm in this form and write down a sequence of commands, the execution of which, with a given radius value, will allow us to find the area:

Read R value.

Multiply the R value by 3.14.

Multiply the result of the second action by the R value.

Record the result as an S value.

In the language of flowcharts

This form of notation is based on the replacement of typical algorithmic commands with certain geometric shapes. The algorithm for solving this problem is as follows (see Fig.).

Branch design

Branch design - this is a form of organization of actions, in which, depending on the fulfillment (non-fulfillment) of a certain condition, one of two series of commands is executed.

If a< condition >

then< command series 1 >

otherwise< command series 2 >

branch end

Example

Task: compute

Given: x is the value of the argument.

To find: y – function value.

Decision:

X if x<0

The appearance of the resulting graphical scheme (see Fig.) explains why the algorithm corresponding to it was called branching.

Let's do verbal presentation of this algorithm.

Start

If x>0 then

y := x

otherwise

Start

Y:= -x

End of branch

Write value at

End

Allocate full and incomplete conditional construction.

Let's introduce the notation:

Q – condition;

P 1 , P 2 , … P N - actions that are performed if the condition is true;

T 1 , T 2 , … T N - actions that are performed if the condition is false.

The block diagram and algorithm look like this (see table):

Conditional constructs

Complete

incomplete

R 1

R 2

P N

otherwise

T 1

T 2

T N

End of branch

R 1

R 2

P N

End of branch.

Loop design

Loop design is a form of organization of actions in which the execution of the same sequence of actions is repeated several times.

Actions that must be repeated several times are called loop body . The loop body is a series of commands. An algorithm must always contain a pointer that separates the loop body from the main part of the algorithm.

There are two main types of loops: a loop with a parameter and a loop with a condition.

Loop with parameter

It is used when the number of repetitions is known in advance.

Wherein parameter (loop variable) changes from its initial value to its final value with a given step and determines the number of repetitions.

Recording a cycle with a parameter in an algorithmic language looks like this:

initial final step

for <имя параметра> from < значение > before < значение > step <изменения>

parameter parameter parameter

<тело цикла>

Conditional Loop

It is used when the number of repetitions is not known in advance and depends on the fulfillment of some condition.

Distinguish cycles with precondition and with postcondition .

Loop with precondition(bye loop)

The condition is checked before the next execution of the loop body.

Recording in algorithmic language and in the form of a flowchart:


Bye<условие>

< тело цикла >

As long as the condition is met (the corresponding logical expression evaluates to "true"), loop body is repeated . As soon as the condition is no longer fulfilled, the execution of the loop stops (exit by falsehood).

If the condition is not initially met, loop body may never be executed.

Loop with postcondition(cycle "before")

The condition is checked after the next execution of the loop body, i.e. The loop body must be executed at least once.


repeat

< тело цикла >

before< условие >



The loop body is executed if the condition is not met.(the corresponding logical expression evaluates to "false"). As soon as the condition is met, the execution of the loop body stops (true exit).



4. Programming

For an algorithm to be executed by a computer, it must be written in a language it understands. However, the computer perceives and can process only binary codes (sequences of zeros and ones). Therefore, the initial data and commands of the algorithm must be presented in binary codes. However, this is very inconvenient for a person, so languages ​​were developed for writing algorithms that, on the one hand, are close to natural languages, and, on the other hand, are built according to sufficiently strict rules so that the algorithms written on them can be automatically translated according to formal rules. into binary codes. Such languages ​​are called programming languages, and an algorithm written in such a language (just like an algorithm written in binary codes) is called program.

With the advent of personal computers, the stage of compiling an algorithm is in many ways connected with the programming stage in the same way as with the next stage.

Programming technologies

Algorithmic (modular) programming

The main idea of ​​algorithmic programming is the division of the program into sequence of modules, each of which performs one or more actions. The only requirement for the module is that its execution always starts with the first command and always ends with the very last one (that is, that it is impossible to get to the module commands from the outside and transfer control from the module to other commands bypassing the final one).

The algorithm in the chosen programming language is written with using data description commands, value calculations and program sequence control.

The program text is a linear sequence of assignment statements, a loop, and conditional statements. In this way, you can solve not very complex problems and write programs containing several hundred lines of code.

This programming uses the following elements:

Structured programming

When creating medium-sized applications (several thousand lines of source code), we use structured programming, whose idea is that the structure of the program should reflect the structure of the problem being solved so that the solution algorithm is clearly visible from the source text. To do this, it is necessary to have the means to create a program not only with the help of three simple operators, but also with the help of tools that more accurately reflect the specific structure of the algorithm. For this purpose, the concept of routines - a set of operators that perform the desired action and do not depend on other parts of the source code. The program is divided into many small subroutines (taking up to 50 statements - a critical threshold for quickly understanding the purpose of the subroutine), each of which performs one of the actions provided by the original task. By combining these subroutines, it is possible to form the final algorithm not from simple operators, but from complete blocks of code that have a certain semantic load, and you can refer to such blocks by name. It turns out that subroutines are new operators or language operations defined by the programmer.

The ability to use subroutines refers a programming language to a class procedural languages.

The presence of subroutines allows you to design and develop an application top down - this approach is called top-down design . First, several subroutines are selected that solve the most global tasks (for example, data initialization, the main part and completion), then each of these modules is detailed at a lower level, breaking down in turn into a small number of other subroutines, and so on until the whole task will not be completed.

This approach is convenient because it allows a person to constantly think at the subject level, without descending to specific operators and variables. In addition, it becomes possible not to implement some subroutines immediately, but to temporarily postpone until other parts are completed. For example, if there is a need to calculate a complex mathematical function, then a separate subroutine of such a calculation, but it is implemented temporarily by a single statement that simply assigns a pre-selected value. When the entire application is written and debugged, then we can start implementing this feature.

It is important that small subroutines are much easier to debug, which significantly increases the overall reliability of the entire program.

A very important characteristic of subroutines is their ability to reuse . Integrated programming systems come with large libraries of standard routines that allow you to greatly increase productivity by leveraging someone else's work to create commonly used routines.

Event Driven Programming

With the active distribution of the system Windows and the emergence of visual RAD - environments, the event approach to creating programs has gained wide popularity - event-driven programming.

Ideology of the system Windows based on events. A person clicked on a button, selected a menu item, pressed a key or mouse button - in Windows a suitable message is generated , which is sent to the corresponding program window. The structure of a program created using event programming is as follows. The main part is one infinite loop, which asks Windows , watching for a new message. When it is detected, the subroutine responsible for processing is called. of the corresponding event (not all events are processed, there are hundreds of them, but only the necessary ones), and a similar polling cycle continues until the message “Shut down” is received.

Events can be custom , resulting from user actions, systemic , originating in the operating system (for example, messages from a timer), and programmatic , generated by the program itself (for example, an error has been detected and needs to be processed).

Event programming is a development of top-down design ideas, when the program's reactions to various events are gradually defined and detailed.

The development of the ideas of structured and event programming has significantly increased the productivity of programmers and made it possible to create applications of hundreds of thousands of lines in a reasonable time (several months). However, this volume has already approached the limit of human capabilities, and new technologies for developing programs were required.

Object Oriented Programming based on concepts object , class and on three key concepts - encapsulation , inheritance and polymorphism .

In programming languages, the concept is implemented object as a set of properties (data structures specific to this object), and methods their processing (subroutines for changing properties) and events, to which the given object can respond and which lead, as a rule, to a change in the properties of the object.

Objects can have identical structure and differ only in property values. In such cases, the program creates a new type based on a single object structure (similar to how new types are created for data structures). It is called class, and each specific object that has the structure of this class is called an instance of the class .

Data aggregation c methods in one type (class) is called encapsulation. In addition to combining, encapsulation allows you to restrict access to object data and implementations of class methods. As a result, programmers have the opportunity to use ready-made classes in their applications based only on the description of these classes.

The most important characteristic of a class is the ability to create new classes on its basis with inheritance all its properties and methods and adding your own. A class that has no predecessor is called a base class. .

for example , the "student" class has the properties "full name", "year of admission", the methods "attend classes" and "take exams". The “part-time student” class created on its basis inherits all these properties and methods, to which the “place of work” property and the “come to the session” method are additionally added. Inheritance allows you to create new classes by reusing existing source code without wasting time rewriting it.

In most cases, the methods of the base class in the descendant classes have to be redefined - the object of the "part-time student" class performs the "attend classes" method in a completely different way from the object of the "full-time student" class. All overridden methods by spelling (name) will match the methods of the base object, however, the compiler will recognize by the type of object (its class) which particular method should be used, and will not call the “attend classes” method of the class “attend classes” for the “correspondence student” class object. student". This property of objects to override methods of an inherited class and use them correctly is called polymorphism.

  1. Encapsulation- the union in the object of its properties and possible operations (methods) on it. The combination of data with valid actions on these data leads to the "birth" of a new element in the design of programs - an object, and the object acts as it contains, and only over what is described in it. Accessing the data of an object other than through its actions is unacceptable. Objects that encapsulate the same list of properties and operations are combined into classes . Each individual object is class instance . Instances of a class can have different property values.

For example, a computer's file system may contain hundreds or thousands of files. All files have the same set of properties (name, location in the file system) and operations (rename, move or copy) and form the FILES object class. Each individual file is an instance of this class and has specific property values ​​(name, location, etc.).

  1. Inheritance– defines the relationship between classes: objects child class have all the properties of objects parent class . That is, each subsequent derived object inherits the properties and actions of its predecessors. The inheritance mechanism allows you to redefine or add new data and processing methods, create a class hierarchy.

For example. In vector graphics editors, an image is built from graphic primitives - a point, a line, a circle, etc.

One of the graphical primitives is the POINT object class. In this class, each object has certain properties (Coordinates, Color), on which the corresponding operations are possible (Move, Change color). The POINT feature class can be defined by a table

Properties

Coordinates (x,y)

moving

Color change

From the POINT feature class, you can get a new CIRCLE class by adding a new Radius property and the Modify Radius operation. The CIRCLE feature class can be defined by a table.

Properties

Coordinates (x,y)

moving

Color change

Radius (R)

Radius change

All objects of the CIRCLE class inherit the properties and operations of the POINT class. The POINT class is called the parent class, the CIRCLE class is the child class. Graphically it looks like this:


inheritance

  1. Polymorphism– the ability to perform the same operations on objects belonging to different classes, while maintaining individual methods for their implementation for each class. That is, the same operation on objects of different classes can be performed by different methods.

For example. Most object classes in the WINDOWS/OFFICE environment are characterized by a set of the same operations - renaming, moving, copying, deleting, etc. The mechanisms for implementing these actions are not the same for different classes. So, to copy a folder, you need to perform a sequence of actions to change the file system, and to copy a symbol, make changes to the document. These operations will be performed by various programs.

visual programming

Technologies of object, event and structured programming today are combined intoRAD systems, which contain many ready-made classes, represented as visual components , which are added to the program with one click. The programmer only needs to design the appearance of the windows of his application and determine the handling of the main events - what statements will be executed when buttons are pressed, when menu items are selected, or when the mouse is clicked. The environment will generate all the auxiliary source code itself, allowing the programmer to fully concentrate only on the implementation of the algorithm.

The development of this technology is associated with the appearance of a graphical interface. This is a technology for developing applications in the form of graphic objects, with their subsequent translation into program code. In the 90s, RAD technology appeared - Rapid Application Development - rapid application development. All the necessary design and control elements are created and maintained not by manual programming, but with the help of ready-made visual components that are dragged with the mouse into the projected window. The properties and behavior of components are configured using simple editors that visually show the characteristics of the respective elements. In this case, the source code of the program is generated automatically by the RAD environment.

RAD environments are designed to develop, with the active participation of users, information systems for business applications. RAD is designed to provide a high speed of system development while improving the quality of the software product and reducing its cost.

Of the universal programming languages, the following are the most popular today:

BASIC (Basic) - for development requires initial training (comprehensive school);

Pascal (Pascal) - requires special training (schools with advanced
the study of the subject and general technical universities);

C++ (C++), Java (Java), C Sharp (C#) - require professional training (specialized secondary and higher educational institutions).

For each of these programming languages, today there are many programming systems produced by various companies and focused on various PC models and operating systems. The most popular visual RAPs for Windows are:

Basic: Microsoft Visual Basic;

Pascal: Borland Delphi

C++: Microsoft Visual C++;

Java: BorlandJBuilder

C#: Microsoft Visual Studio .NET, Borland С#Builder.

To develop server and distributed applications, you can use the Microsoft Visual C ++ programming system, Borland products, and almost any java programming tools.

5. Entering the program into the computer's memory. Trial run

At large computing centers, when solving sufficiently large and complex problems, people of a special profession, computer operators, are engaged in entering programs. In addition to entering programs, operators perform data preparation - entering data into memory, recording them on external media. The programmer working on the PC enters the program and data himself.

After the program is entered, its trial run follows. In cases that should be considered exceptional, the program is executed immediately and produces some result. Much more often, you have to find the reasons why the program does not work or does not work as it should, and correct them - debug the program.

6. Debugging and testing the program

The process of finding and correcting errors in a program is called debugging. Errors can occur when typing, as a result of violation of the rules for writing programs in a programming language - the so-called syntactic mistakes. Special tool programs (syntactic control programs) that are part of the programming system help to detect and correct them. The system analyzes the program and issues a message about the location and nature of the error. Often errors are due to the fact that some syntactically correct construction cannot be performed (for example, division by zero or an attempt to assign a real value to an integer type value). In this case, a message also appears stating the reason for the failure and indicating which particular command could not be executed.

Much harder to find mistakes made when compiling the algorithm, which ultimately lead to incorrect program operation: no result, looping, incorrect result. In this case, step-by-step control of program execution can be useful.

An important step in the debugging process is testing programs, i.e. testing it by introducing a test - a specific set of initial data, for which the result of the work of individual blocks or the program as a whole is known in advance.

Often, as part of the development of an information model, restrictions are imposed on the source data. In this case, the program should respond to the input of incorrect values: stop the work or request re-entry. As a rule, the program provides protection against entering incorrect data or other unforeseen user actions. Then, during the testing process, the quality of such protection is checked.

The ability to successfully choose such a test in which an error (if any) is most likely, and to provide for various options for the course of the computational process, as well as user actions (sometimes very unpredictable), and, therefore, to protect the program from any surprises is a great art of a programmer.

The simplest example of a test: if the program contains branches, i.e. it is required to choose a method of action depending on the fulfillment of the condition, it is necessary to check its operation with those initial data under which the condition is satisfied, and with those under which it is not satisfied.

Until recently, stages 4, 5, and 6 were necessary stages in solving a problem with the help of a computer. At the same time, programming languages ​​and systems were the software tools with which new programs were created to solve user problems. However, with the expansion of the range of tasks for which a computer is used, the number of people who, not being professional programmers, use a computer in their work, is growing.

In this regard, various software tools have been created, which are the basis information technologies used to solve a variety of practical problems, such as word processing and spreadsheets, creating graphic images, accessing information stored in a database, solving a mathematical problem, calculating a technical design, and much more. To solve them, a computer user has extensive software at his disposal.

In the process of building an information model of the task, the user determines what actions he will need to perform to achieve the result, and in accordance with this decides which software tool to use. If at his disposal there is a program suitable for solving this problem, then the user selects it as a tool (DBMS, spreadsheet, mathematical package, etc.). If you cannot use a ready-made application software, you will have to use programming technology.

7. Obtaining and analyzing results

Whatever technology for solving problems on a computer is used, the necessary step will be to obtain and analyze the result: the compliance of the results obtained with the expected one within the framework of the constructed information model of the problem is checked, and the extent to which the result is correlated with real practice is also assessed.

At this stage, it is revealed how the constructed information model corresponds to reality. The fact is that the more properties of objects and phenomena are recognized as essential and taken into account, the more the model reflects reality. However, taking into account a large number of characteristics leads to a complication of the model, difficulties in the mathematical expression of the relationships between the characteristics. Usually they try to find a balance between the completeness of the correspondence of the information model to the real state of affairs and its complexity in the process of refining the model (gradually increasing the number of essential properties taken into account).

Questions to prepare for the test on the topic "Modeling, algorithmization, programming"

Sub-stages of the first stage of modeling. Algorithmization of system models and their machine implementation

Computer science, cybernetics and programming

Forms of representation of modeling algorithms Sub-stages of the first stage of modeling Let us consider in more detail the main sub-stages of constructing a conceptual model of the MC system and its formalization, see the formulation of the goal and the formulation of the problem of computer simulation of the system. A clear formulation of the task of the goal and the formulation of the study of a specific system S are given, and the main attention is paid to such issues as: recognition of the existence of the goal and the need for computer simulation; b choice of methods for solving the problem, taking into account available resources; to the definition...

Lecture 12. Sub-stages of the first stage of modeling. Algorithmization of system models and their machine implementation. Principles of construction of modeling algorithms. Forms of representation of modeling algorithms

Sub-stages of the first stage of modeling

Let us consider in more detail the main sub-stages of building a conceptual model M K system and its formalization (see Fig. 3.1)

1.1. formulation of the goal and formulation of the problem of machine modeling of the system.A clear formulation of the task of the goal and the formulation of the study of a specific system are given. S and the focus is on issues such as: a) recognition of the existence of purpose and the need for machine simulation; b) the choice of methods for solving the problem, taking into account the available resources; c) determining the scope of the task and the possibility of dividing it into subtasks. In the process of modeling, it is possible to revise the initial statement of the problem, depending on the purpose of modeling and the purpose of the system functioning.

1.2. Analysis of the problem of system modeling.The analysis includes the following questions: a) selection of criteria for evaluating the effectiveness of the system functioning process S ; b) definition of endogenous and exogenous model variables M ; c) choice of possible identification methods;
d) performing a preliminary analysis of the content of the second stage of algorithmization of the system model and its machine implementation; e) performing a preliminary analysis of the content of the third stage of obtaining and interpreting the results of system modeling.

1.3. Determination of requirements for initial information about the modeling object and organization of its collection.After setting the problem of modeling the system S the requirements for information are determined, from which the qualitative and quantitative initial data necessary to solve this problem are obtained. This sub-stage is carried out:
a) selection of the necessary information about the system
S and environment E ;
b) preparation of a priori data; c) analysis of available experimental data; d) the choice of methods and means of preliminary processing of information about the system.

1.4. Making hypotheses and accepting assumptions.Hypotheses when building a system model S serve to fill "gaps" in the understanding of the problem by the researcher. Hypotheses are also put forward regarding the possible results of modeling the system S, the validity of which is checked during a machine experiment. Assumptions assume that some data is unknown or cannot be obtained. Assumptions can be put forward regarding known data that do not meet the requirements for solving the problem. Assumptions make it possible to carry out model simplifications in accordance with the chosen level of modeling. When putting forward hypotheses and making assumptions, the following factors are taken into account: a) the amount of information available for solving problems; b) subtasks for which information is insufficient; c) restrictions on time resources for solving problems; d) expected simulation results.

1.5. Definition of model parameters and variables.Before proceeding to the description of the mathematical model, it is necessary to determine the parameters of the system, input and output variables, the impact of the external environment and assess the degree of their influence on the process of functioning of the system as a whole. Description of each parameter and variable should be given in the following form: a) definition and brief description; b) designation symbol and unit of measurement; c) range of changes; d) place of application in the model.

1.6. Establishing the main content of the model.At this sub-stage, the main content of the model is determined and a method for constructing a system model is selected, which are developed on the basis of accepted hypotheses and assumptions. This takes into account the following features:
a) formulation of the goal and statement of the problem of modeling the system;
b) system structure
S and algorithms of its behavior, the impact of the external environment E; c) possible methods and means of solving the modeling problem.

1.7. Justification of the criteria for evaluating the effectiveness of the system.To assess the quality of the process of functioning of the simulated system, it is necessary to determine the set of criteria for evaluating the effectiveness as a function of the parameters and variables of the system. This function is a response surface in the investigated area of ​​changes in parameters and variables and allows you to determine the response of the system.

1.8. Definition of approximation procedures.To approximate the real processes occurring in the system S, Three types of procedures are commonly used: a) deterministic; b) probabilistic; c) determination of average values.

With a deterministic procedure, the simulation results are uniquely determined by a given set of input actions, parameters and variables of the system S. In this case, there are no random elements that affect the simulation results. The probabilistic (randomized) procedure is applied when random elements, including the effects of the external environment E, affect the characteristics of the system functioning process S and when it is necessary to obtain information about the laws of distribution of output variables. The procedure for determining average values ​​is used when, when modeling a system, the average values ​​of output variables are of interest in the presence of random elements.

1.9. Description of the conceptual model of the system.At this sub-stage of building a system model: a) a conceptual model is described M K in abstract terms and concepts; b) the target function is set; c) a description of the model is given using typical mathematical schemes;
d) hypotheses and assumptions are finally accepted; e) the choice of a procedure for approximating real processes when building a model is substantiated.

1.10. Validation of the conceptual model.After the conceptual model M K described, it is necessary to check the validity of some of the concepts of the model before proceeding to the next stage of system modeling S. One of the model validation methods M K : the use of reverse transition operations, which allow us to analyze the model, return to the accepted approximations, and finally, consider again the real processes occurring in the simulated system. Conceptual Model Validation M K should include: a) verification of model intent; b) assessment of the reliability of the initial information; c) consideration of the formulation of the modeling problem; d) analysis of the accepted approximations; e) research of hypotheses and assumptions.

1.11. Preparation of technical documentation for the first stage.At the end of the conceptual model building phase M K and its formalization, a technical report is drawn up for the stage, which includes:
a) a detailed statement of the problem of system modeling
S; b) analysis of the system modeling problem; c) criteria for evaluating the effectiveness of the system;
d) parameters and variables of the system model; e) hypotheses and assumptions adopted in the construction of the model; f) description of the model in abstract terms and concepts; g) description of the expected results of the system simulation
S.

3.3. Algorithmization of system models and their machine implementation

At the second stage of modeling - the stage of algorithmization of the model and its machine implementation - the mathematical model formed at the first stage is embodied in a specific machine model.

Principles for constructing modeling algorithms

System operation process S can be considered as a successive change of its states in -dimensional space. Obviously, the task of modeling the process of functioning of the system under study S is the construction of functions z , on the basis of which it is possible to calculate the characteristics of interest for the process of system operation. To do this, there must be relations connecting the functions z with variables, parameters and time, as well as initial conditions at the moment of time.

For a deterministic system, in which there are no random factors, the state of the process at the moment of time can be uniquely determined from the relations of the mathematical model using known initial conditions. If the step is small enough, then in this way it is possible to obtain approximate values z .

For a stochastic system, those. system, which is influenced by random factors, a function of the states of the process z at the moment of time and the relations of the model, determine only the probability distribution for at the moment of time. In the general case, the initial conditions can also be random, given by the corresponding probability distribution. In this case, the structure of the modeling algorithm for stochastic systems corresponds to a deterministic system. Only instead of a state, it is necessary to calculate the probability distribution for possible states.

This principle of constructing modeling algorithms is called principle. This is the most universal principle that allows you to determine the successive states of the system functioning process. S at specified time intervals. But from the point of view of machine time costs, it sometimes turns out to be uneconomical.

When considering the processes of functioning of some systems, it can be found that they are characterized by two types of states: 1) special, inherent in the process of functioning of the system only at certain points in time (the moments of receipt of input or control actions, environmental disturbances, etc.); 2) not special, in which the process is all the rest of the time. Special states are also characterized by the fact that the state functions at these instants of time change abruptly, and between special states the change in coordinates occurs smoothly and continuously or does not occur at all. Thus, following the system simulation S only behind its special states at those moments of time when these states take place, it is possible to obtain the information necessary to construct the function. Obviously, for the described type of systems, modeling algorithms can be constructed according to the "principle of special states". Denote the jump (relay) change of state z as , and the "principle of special states" as principle .

"Principle" makes it possible for a number of systems to significantly reduce the cost of computer time for the implementation of modeling algorithms in comparison with the "principle". The logic of constructing a modeling algorithm that implements the “principle” differs from that considered for the “principle” only in that it includes the procedure for determining the moment of time corresponding to the next special state of the system S. To study the process of functioning of large systems, it is rational to use the combined principle of constructing modeling algorithms that combine the advantages of each of the considered principles.

Forms of representation of modeling algorithms

A convenient form of representation of the logical structure of models is a diagram. At various stages of modeling, generalized and detailed logical schemes of modeling algorithms, as well as program schemes, are compiled.

Generalized (enlarged) modeling algorithm schemespecifies the general procedure for modeling systems without any clarifying details. The generalized scheme shows what needs to be done at the next modeling step.

Detailed scheme of the modeling algorithmcontains refinements that are not in the generalized scheme. A detailed diagram shows not only what should be done at the next step of system modeling, but also how to do it.

Logic diagram of the modeling algorithmrepresents the logical structure of the process model of the system functioning S. The logical scheme indicates a time-ordered sequence of logical operations associated with the solution of the modeling problem.

Program scheme displays the order of software implementation of the modeling algorithm using specific software and algorithmic language.

The logical scheme of the algorithm and the scheme of the program can be made both in an enlarged and in a detailed form. The symbols most commonly used in the practice of computer modeling are shown in fig. 3.3, which shows the main, specific and special symbols of the process. These include: main symbol: a - process; process specific symbols: b - solution; c - preparation; g - predefined process; e - manual operation; Special symbols: e - connector; g - terminator.

An example of an image of a diagram of a modeling algorithm is shown in fig. 3.3, h .

Typically, a scheme is the most convenient form of representing the structure of modeling algorithms, for example, in the form graph diagrams (Fig. 3.3, i). Here - the beginning, - the end, - the calculation, - the formation, - condition check,- counter, - issuing a result, where g is total number of modeling algorithm statements. As an explanation to the graph diagram of the algorithm, the content of the operators is disclosed in the text, which makes it possible to simplify the presentation of the algorithm, but complicates the work with it.

a b h i

in g

j w

Rice. 3.3. Symbols and schemes of modeling algorithms

REFERENCES

1. Soviets B.Ya. Modeling systems: textbook. for universities / B.Ya. Sovetov, S.A. Yakovlev. M. : Vyssh. school, 2001. 343 p.

2. Soviets B.Ya. Modeling systems: textbook. for universities / B.Ya. Sovetov, S.A. Yakovlev. 2nd ed. M.: Higher school, 1998. 319 p.

3. Tarasik V.P. Mathematical modeling of technical systems: textbook. for universities / V.P. Tarasik. M.: Nauka, 1997. 600 p.

4. Introduction to mathematical modeling: textbook. allowance for universities / ed. P.V. Tarasova. Moscow: Intermet Engineering, 2000. 200 p.

5. Ivchenko G.I. Mathematical statistics: textbook for higher education institutions / G.I. Ivchenko, Yu.I. Medvedev. M.: Higher. school, 1984. 248 p.

6. Alyanakh I.N. Modeling of computing systems / I.N. Alliance. L.: Mashinostroenie, 1988. 233 p.

7. Shannon R. Simulation of systems - art and science / R. Shannon. M.: Mir, 1978. 308 p.

P 3

P 4

F 5

R 6

K 7


As well as other works that may interest you

15330. Creating a pool interior in 3Ds Max 1.96MB
Topic 6: Creating the interior of the pool As a result of this work, you should get the rendered scene shown in the figure. 1. Two-dimensional forms. Modifiers of two-dimensional forms Purpose: to master the technology of creating d
15332. Basics of working with still images in the 3D graphics program 3ds max 4.96MB
Topic 5: Basics of working with static images in the 3D graphics program 3ds max. Stages of creating three-dimensional scenes Project Let's create a corner of the part of the room where the table is located. There is a glass of ice on the table. For specified...
15333. The processes of switching on and off a circuit with a capacitor 1.71MB
Calculate pre-switching t = 0 initial t = 0 and steady-state t → ∞ values ​​of currents and voltages on the capacitor in the circuit. 1. in two cases: 1. the key opens; 2. the key is closed. R1= 330 Ohm; R2=220 Ohm; U= 15 V; C= 10 uF Fig...
15334. The processes of switching on and off a circuit with an inductor 75KB
General information A circuit with one inductor as well as a circuit with one capacitor is described by a first order differential equation. Therefore, all currents and voltages in the transient mode change exponentially with the same constant time
15335. Study of transient processes in linear electrical circuits 94KB
Preparing for work In a closed circuit in Fig. 1, after disconnecting it from a source of direct or alternating voltage, damped sinusoidal oscillations may occur due to the initial energy reserve in the electric field of the capacitor and in the magnetic
15336. Studying Dijkstra's algorithm and implementing it for a given graph in the C++ programming language 344.5KB
Laboratory work No. 1 in the discipline Structures and data processing algorithms The purpose of the work: The study of Dijkstra's algorithm and its implementation for a given graph in the programming language C. Dijkstra's algorithm English. Dijkstras algorithm algorithm on graphs invented by N
15337. Learning the heapsort algorithm and implementing it in the C++ programming language 49KB
Laboratory work No. 2 in the discipline Structures and data processing algorithms Purpose of work: Studying the heap sort algorithm and implementing it in the C programming language. Job assignment Write a program that generates a numerical array of pa
15338. Studying the depth-first search algorithm and implementing it in the C++ programming language 150KB
Laboratory work №3 on discipline Structures and data processing algorithms Purpose of the work: Studying the depth-first search algorithm and its implementation in the C programming language. Job task Implement the depth-first search algorithm. Estimate the time...

A model is an image (copy) of a real object, process or phenomenon that reflects its essential properties, reproduced in some way.

Modeling is the construction of models for the study and study of objects, processes or phenomena of the real world.

The following classification of models is possible.

imaginary(mental) models are mental representations of an object that are formed in the human brain.

Informational models reflect the processes of emergence, transmission and use of information in systems of various nature.

Information models represent objects in the form of verbal descriptions, texts, figures, tables, diagrams, drawings, formulas, etc. They can be expressed in a description language ( iconic models) or presentation language ( visual models).

Examples of visual (expressed with the help of images) models are paintings, films, photographs, drawings, graphics. Sign models can be built using natural language tools (they are called verbal) or using formal language. Examples of verbal models are literary works, rules of the road.

The process of building information models using formal languages ​​is called formalization. The most important classes of sign information models are mathematical and computer models.

Mathematical model - a way of representing an information model using mathematical formulas and terms.

Computer a model is an image of a real object created by computer software.

There is a relationship between different types of information models. When studying a real object, a verbal model in natural language is usually built first, then it is formalized (expressed using formal languages), then the modeling can be continued using a computer - a computer model of the object is created.

The basic concepts in information modeling are entity (object), connection (dependence), attribute.

Essence is some object that exists in the subject area. This object must have different instances.

Connection represents a connection between two or more entities. Depending on the number of connected objects, the connection is called binary (two objects), ternary (three), etc.

Attribute is a property or characteristic of an entity.

Thus, an entity can be treated as an ordered set of attributes that has relationships with other entities.

There are different types of connections:

"1:1" - "one to one", "1:N" - "one to many", "M:N" - "many to many".

The main types of information models include tabular (relational), hierarchical (tree) and network (graph) models.

tables is a form of information presentation in the form of rows and columns. You can build tables of the form "object - object" (one attribute characterizing several objects is selected), "object - attribute" (several attributes of objects of one set are selected), "object - attribute - object" (combined table type).

Hierarchical structure An information model is a way of organizing data in which model elements are distributed over levels and linked by subordination relationships. This structure is also called tree-like, since it resembles a tree in a graphic image. Wherein root of the tree is called the vertex corresponding to the main or generic element of the object, leaves are vertices that have no children. A classic example of a tree-like structure of an information model is a genealogical tree.

Graph is a collection of nodes (vertices) and lines connecting them (edges), expressing the connections between them. Vertices can be represented by different graphical elements: dots, rectangles, circles, etc. In a network model, elements can enter into unidirectional and bidirectional links.

network models are the basis for solving many problems of information modeling, since they allow in a visual form to display the relationships between objects.

What will we do with the received material:

If this material turned out to be useful for you, you can save it to your page on social networks:

All topics in this section:

Informatics
EDUCATIONAL AND METHODOLOGICAL COMPLEX for secondary vocational education Specialty 030912 - “Law and Organization

The volume of discipline and types of educational work
Type of study work (according to the curriculum) Number of hours (full-time education) 1 course 2 course Total labor intensity

For full-time students
No. Items (topics) of the discipline Number of credit units and hours by type of training sessions (according to the curriculum) GZ (L) PZ


Object, subject, goal, tasks, relevance, structure of the academic discipline and reporting. Basic normative legal acts, guiding documents and educational and methodical literature. Main


The concept, purpose and main functions of the operating system. The concept of file structure. Auxiliary programs (utilities). Text processing systems. Entering, editing and formatting

Software
Computer graphics systems. Types of computer graphics: raster and vector graphics. Relationship between vector and raster graphics. RGB color model. CMYK color model. m conversion

Fundamentals of information security
Information security, protection against unauthorized access to information. The concept of information security. Methods of protection against computer viruses. Information protection on the Internet.

Thematic lesson plan
No. Topics (topics) of the academic discipline, topics of classes and educational issues Number of hours 1 ku

General provisions
Practical classes in informatics - a type of class that provides a connection between theory and practice, contributing to the development of the ability to apply knowledge gained in group classes and in the course of self-study

For settlements
When preparing for the lesson, it is necessary to indicate the literature needed for the lesson, as well as indicate the methods (algorithms) of calculations that students are required to study. This lesson is necessary

Features of practical training on technology
In preparation for the lesson, the teacher should give the task to students to repeat the materials of group lessons on this topic, as well as study the methodological recommendations for conducting classes.

Theoretical foundations of computer science
The fundamental concept of computer science - the term "information" comes from the Latin Informatio - clarification, presentation, awareness. At present, science is trying to find common properties and laws

Modern information technologies
All student actions in the study of modern information technologies consist in the development of software tools provided for by the thematic plan and are as follows. Preliminary

Computer networks and telecommunications
The Internet (Internet) is a global telematic (information and computer telecommunications) network (“internet”, metanetwork, “World Information Highway”) that provides the exchange

Software
Effective professional activity of a wide range of specialists in the field of law and organization of social security is impossible without the use of specialized software. In on

Fundamentals of information security
There are a huge number of ways to lose important data. These are software failures that can disable the software, hardware failures that can make the hard drive inoperable.

Normative legal acts
1. Federal Law of July 27, 2006 No. 149-FZ “On Information, Information Technologies and Information Protection” // Rossiyskaya Gazeta. - 2006. - 29 Jul. 2. Federal Law of February 9

Additional
2. Afonin P.N. Introduction to the design of legal and economic databases: Proc. allowance / P.N. Afonin, V.A. Fetisov. - St. Petersburg: Publishing House of Ros. customs Acad. named after Bobkov, 2001. 3. Bogatov D.V. os

One of the urgent tasks of training specialists is to master the theory and methods of mathematical modeling, taking into account the requirements of consistency, which allow not only to build models of the objects under study, analyze their dynamics and the ability to control a machine experiment with a model, but also to judge, to a certain extent, the adequacy of the created models to the systems under study, about the limits of applicability and correctly organize the modeling of systems on modern computer technology.

If necessary, the machine model makes it possible, as it were, to “stretch” or “compress” real time, since machine modeling is associated with the concept of system time, which is different from real time.

The essence of computer simulation of a system is to conduct an experiment on a computer with a model, which is a certain software package that formally and (or) algorithmically describes the behavior of the elements of the system during its operation, i.e., in their interaction with each other and the external environment . Machine modeling is successfully used in cases where it is difficult to clearly formulate a criterion for assessing the quality of the functioning of the system and its goal cannot be fully formalized, since it allows you to combine the software and hardware capabilities of a computer with the ability of a person to think in informal categories.

User requirements for the model. Let us formulate the main requirements for the model of the system functioning process .

1. The completeness of the model should provide the user with the opportunity to obtain the necessary set of estimates of the system characteristics with the required accuracy and reliability.

2. The flexibility of the model should make it possible to reproduce various situations when varying the structure, algorithms, and parameters of the system.

3. The duration of the development and implementation of a model of a large system should be as short as possible, taking into account the limitations on available resources.

4. The structure of the model must be block, i.e., allow the possibility of replacing, adding and excluding some parts without reworking the entire model.

5. Information support should enable the model to work effectively with a database of systems of a certain class.

6. Software and hardware should provide efficient (in terms of speed and memory) machine implementation of the model and convenient communication with the user.

7. Purposeful (planned) computer experiments with the system model should be implemented using the analytical-simulation approach in the presence of limited computing resources.

Computer modeling of systems can be used in the following cases: a) to study the system before it is designed, in order to determine the sensitivity of the characteristic to changes in the structure, algorithms and parameters of the modeling object and the environment; b) at the stage of system design for the analysis and synthesis of various options for the system and the choice among competing ones of such an option that would satisfy a given criterion for evaluating the effectiveness of the system under the accepted restrictions; c) after completion of the design and implementation of the system, i.e. during its operation, to obtain information that supplements the results of full-scale tests (operation) of a real system, and to obtain forecasts of the evolution (development) of the system in time.

Stages of system modeling. Consider the main stages of system modeling , which include: building a conceptual model of the system and its formalization; algorithmization of the system model and its machine implementation; obtaining and interpreting the results of system modeling.

The relationship between the listed stages of system modeling and their components (substages) can be represented in the form of a network diagram shown in fig. one.

Rice. 1. Relationship between the stages of system modeling

Here are the sub-steps:

1.1- statement of the problem of machine modeling of the system; 1.2 - analysis of the problem of system modeling; 1.3-determining the requirements for the initial information about the modeling object and organizing its collection; 1.4 - putting forward hypotheses and accepting assumptions; 1.5 - definition of parameters and variables of the model; 1.6 - establishing the main content of the model; 1.7 - substantiation of criteria for evaluating the effectiveness of the system; 1.8 - definition of approximation procedures; 1.9 - description of the conceptual model of the system; 1.10 - validation of the conceptual model; 1.11 - preparation of technical documentation for the first stage; 2.1 - building a logical scheme of the model; 2.2 - obtaining mathematical ratios; 2.3 - checking the reliability of the system model; 2.4 - choice of tools for modeling; 2.5 - drawing up a plan for the implementation of programming work; 2.6 - specification and construction of the program scheme; 2.7 - verification and validation of the program scheme; 2.8 - programming the model; 2.9 - verification of the reliability of the program; 2.10 - preparation of technical documentation for the second stage; 3.1 - planning a machine experiment with a system model; 3.2 - determination of requirements for computing facilities; 3.3 - carrying out working calculations; 3.4 - analysis of the results of system modeling; 3.5 - presentation of simulation results; 3.6 - interpretation of simulation results; 3.7 - summing up the simulation results and issuing recommendations; 3.8 - drawing up technical documentation for the third stage.

At the stage of constructing a conceptual model and its formalization, a study of the modeled object is carried out from the point of view of highlighting the main components of the process of its functioning, the necessary approximations are determined and a generalized scheme of the systems model is obtained. , which is converted into a machine model at the second stage of modeling by sequential algorithmization and programming of the model. The last third stage of system modeling is reduced to carrying out, according to the received plan, working calculations on a computer using selected software and hardware, obtaining and interpreting the results of system modeling, taking into account the impact of the external environment .

    formalization and algorithmization of systems functioning processes.

Methodology for the development and machine implementation of system models. Construction of conceptual models of systems and their formalization. Algorithmization of system models and their machine implementation. Obtaining and interpreting the results of system modeling.

Methodology for the development and machine implementation of system models.

Modeling using computer technology (computer, AVM, GVK) allows you to explore the mechanism of phenomena occurring in a real object at high or low speeds, when in full-scale experiments with an object it is difficult to

(or impossible) to follow the changes that occur

within a short time, or when obtaining reliable results involves a long experiment.

The essence of computer simulation of a system is to conduct an experiment on a computer with a model, which is a certain software package that formally and (or) algorithmically describes the behavior of the elements of the system. S in the process of its functioning, i.e. in their interaction with each other and the external environment E.

User requirements for the model. Let us formulate the basic requirements for the model M S.

1. The completeness of the model should provide the user with the opportunity

obtaining the required set of performance estimates

systems with the required accuracy and reliability.

2. The flexibility of the model should enable reproduction

different situations when varying the structure, algorithms

and system settings.

3. Duration of development and implementation of a model of a large system

should be as small as possible, taking into account the restrictions

on available resources.

4. The structure of the model must be block, i.e., allow

the possibility of replacing, adding and deleting some parts

without modifying the entire model.

5. Information support should provide an opportunity

effective operation of the model with a database of systems of a certain

6. Software and hardware should provide efficient (in terms of speed and memory) machine implementation

models and convenient communication with the user.

7. Targeted

(planned) machine experiments with the system model using

analytical and simulation approach in the presence of limited computing resources.

In machine simulation of the system

S characteristics of the process of its functioning are determined

model based M, built on the basis of the existing initial

information about the simulation object. Upon receipt of new information

about the object, its model is reviewed and refined

with new information.

Computer modeling of systems can be used

in the following cases: a) to study the system S before it is designed, in order to determine the sensitivity of the characteristic to changes in the structure, algorithms and parameters of the modeling object and the external environment; b) at the stage of system design S for the analysis and synthesis of various options for the system and the choice among competing ones of such an option that would satisfy a given criterion for evaluating the effectiveness of the system under the accepted restrictions; c) after completion of the design and implementation of the system, i.e. during its operation, to obtain information that supplements the results of full-scale tests (operation) of a real system, and to obtain forecasts of the evolution (development) of the system in time.

Stages of system modeling:

    building a conceptual model of the system and its formalization;

    algorithmization of the system model and its machine implementation;

    obtaining and interpreting the results of system modeling.

Here are the sub-steps:

1.1-statement of the problem of machine modeling of the system (goals, tasks for the system being created, a) recognition of the existence of the problem and the need for machine modeling;

b) the choice of methods for solving the problem, taking into account the available resources; c) determining the scope of the task and the possibility of dividing it into subtasks.);

1.2 - analysis of the problem of modeling the system (selection of evaluation criteria, choice of endogenous and exogenous variables, choice of methods, implementation of preliminary analyzes of the 2nd and 3rd stages);

1.3-determination of requirements for initial information about the modeling object

and organization of its collection (carried out: a) selection of the necessary information about the system S and environment E; b) preparation of a priori data; c) analysis of available experimental data; d) the choice of methods and means of preliminary processing of information about the system);

1.4 - putting forward hypotheses and making assumptions (about the functioning of the system, about the processes under study);

1.5 - definition of the parameters and variables of the model (input variables, output variables, model parameters, etc.);

1.6 - establishing the main content of the model (structure, algorithms of its behavior);

1.7 - substantiation of criteria for evaluating the effectiveness of the system;

1.8 - definition of approximation procedures;

1.9 - description of the conceptual model of the system (a) describes the conceptual model in abstract terms and concepts; b) a description of the model is given using typical mathematical schemes; c) hypotheses and assumptions are finally accepted; d) the choice of a procedure for approximating real processes in constructing

1.10 - validation of the conceptual model;

1.11 - preparation of technical documentation for the first stage (a) a detailed statement of the problem of system modeling S; b) analysis of the system modeling problem; c) criteria for evaluating the effectiveness of the system; d) parameters and variables of the system model; e) hypotheses and assumptions adopted in the construction of the model; f) description of the model in abstract terms and concepts; g) description of the expected results of the system simulation S.);

2.1 - building a logical diagram of the model (building a system diagram, for example, according to the block principle with all functional blocks);

2.2 - obtaining mathematical relationships (setting all functions that describe the system);

2.3 - checking the reliability of the system model; (checked: a) possibility

problem solving; b) the accuracy of the reflection of the idea in the logical

scheme; c) the completeness of the logical scheme of the model; d) correctness

mathematical relationships used)

2.4 - choice of modeling tools (final choice of a computer, computer or computer for the modeling process, given that they will be available and quickly produce results);

2.5 - drawing up a plan for the execution of programming work (defining tasks and deadlines for their implementation, also take into account a) the choice of a programming language (system) for the model; b) an indication of the type of computer and the devices necessary for modeling; c) an estimate of the approximate amount of required RAM and external memory; d) approximate costs of computer time for modeling; e) the estimated time spent on programming and debugging a program on a computer.);

2.6 - specification and construction of the program scheme (drawing up a logical block diagram),

2.7 - verification and validation of the program scheme (Verification of the program - proof that the behavior of the program corresponds to the specification for the program);

2.8 - programming the model;

2.9 - verification of the reliability of the program (it is necessary to carry out: a) the reverse translation of the program into the original scheme; b) checking individual parts of the program when solving various test problems; c) combining all parts of the program and checking it as a whole on a control example of modeling a system variant S) ;

2.10 - preparation of technical documentation for the second stage (a) the logical scheme of the model and its description; b) an adequate scheme of the program and accepted designations; c) the full text of the program; d) list of input and output values ​​with explanations; e) instructions for working with the program; e) evaluation of the cost of computer time for modeling with an indication of the required computer resources);

3.1 - planning a computer experiment with a system model (an experiment plan is drawn up with initial parameters and all conditions, the simulation time is determined);

3.2 - determination of requirements for computing facilities (what computers are needed and how long they will work);

3.3 - carrying out working calculations (usually include: a) preparation of sets of initial data for input into a computer; b) verification of the initial data prepared for input; c) carrying out calculations on a computer; d) obtaining output data, i.e. simulation results.);

3.4 - analysis of the results of system modeling (analysis of the output data of the system and their further processing);

3.5 - presentation of simulation results (various visual representations in the form of graphs, tables, diagrams);

3.6 - interpretation of simulation results (transition from information obtained as a result of a computer experiment with a model to a real system);

3.7 - summing up the simulation results and issuing recommendations (the main results are determined, the hypotheses put forward are tested);

3.8 - drawing up technical documentation for the third stage (a) a plan for conducting a machine experiment; b) sets of initial data for modeling; c) system simulation results; d) analysis and evaluation of simulation results; e) conclusions on the obtained simulation results; indication of ways for further improvement of the machine model and possible areas of its application).

Thus, the system modeling process S is reduced to the implementation of the listed sub-stages, grouped into three stages.

At the stage of building a conceptual model Mx and its formalization, a study of the modeled object is carried out from the point of view of highlighting the main components of the process of its functioning, the necessary approximations are determined and a generalized scheme of the system model is obtained S, which is converted into a machine model Mm at the second stage of modeling by sequential algorithmization and programming of the model.

The last third stage of system modeling is reduced to carrying out, according to the received plan, working calculations on a computer using the selected software and hardware, obtaining and interpreting the results of modeling the system S, taking into account the impact of the external environment E.

Construction of conceptual models of systems and their formalization.

At the first stage of machine modeling - building conceptual model Mx of the system S and its formalizations - is formulated model and its formal scheme is built, i.e. the main the purpose of this stage is the transition from a meaningful description

object to its mathematical model, in other words, the process of formalization.

It is most rational to build a model of the system functioning according to the block principle.

In this case, three autonomous groups of blocks of such a model can be distinguished. Blocks of the first group are a simulator of environmental influences E on system 5; blocks of the second group are actually a model of the process of functioning of the system under study S; blocks of the third group - auxiliary

and serve for the machine implementation of the blocks of the first two groups, as well as for fixing and processing the simulation results.

Conceptual model - the subprocesses of the system are displayed, processes that can be ignored are removed from the block system (they do not affect the operation of the model).

More about drawing. The transition from the description of the system to its model in this interpretation is reduced to the exclusion from consideration of some secondary elements of the description (elements

j_ 8,39 - 41,43 - 47). It is assumed that they do not have a significant effect on the course of the processes studied using

models. Part of the elements (14,15, 28, 29, 42) replaced by passive links h, reflecting the internal properties of the system (Fig. 3.2, b). Some of the elements (1 - 4. 10. 11, 24L 25) - is replaced by input factors X and environmental influences v - Combined substitutions are also possible: elements 9, 18, 19, 32, 33 replaced by passive connection A2 and the influence of the external environment E.

Elements 22,23.36.37 reflect the impact of the system on the external environment y.

Mathematical models of processes. After going from description

simulated system S to her model MV built on block

principle, it is necessary to build mathematical models of processes,

taking place in different blocks. Mathematical model

is a set of relationships (for example, equations,

logical conditions, operators) that define the characteristics

system operation process S depending on the

system structure, behavior algorithms, system parameters,

environmental influences E, initial conditions and time.

Algorithmization of system models and their machine implementation.

At the second stage of modeling - the stage of model algorithmization

and its machine implementation - a mathematical model formed

at the first stage, is embodied in a specific machine

model. Practical implementation of the system.

Construction of modeling algorithms.

System operation process S can be viewed as a successive change of its states z=z(z1(t), z2(t),..., zk(t)) in k-dimensional space. Obviously, the task of modeling the process of functioning of the system under study S is the construction of functions z, on the basis of which it is possible to calculate the

characteristics of the system functioning process.

To do this, relations connecting the functions z (states) with variables, parameters and time, as well as initial conditions.

The considered principle of constructing modeling algorithms is called principle At. This is the most universal principle that allows you to determine the successive states of the system functioning process. S at specified time intervals

At. But from the point of view of machine time costs, it sometimes turns out to be uneconomical.

When considering the functioning processes of some systems, it can be found that they are characterized by two types of states:

1) special, inherent in the process of functioning of the system only

at some instants of time (the instants of arrival of the input

or control actions, environmental disturbances, etc.);

2) non-singular, in which the process is the rest of the time.

Special states are also characterized by the circumstance that the state functions zi(t) and instants of time change abruptly, and between special states the change in coordinates zi(t) occurs smoothly and continuously or does not occur at all. So

way, following when modeling the system S only behind its special states at those moments of time when these states take place, it is possible to obtain the information necessary to construct functions z(t). Obviously, for the described type of systems, modeling algorithms can be built according to the “principle of special states”. Denote the jump (relay) change of state z as bz, and the "principle of special states" - as bz principle.

For example, for a queuing system (Q-schemes) as special states, the states at the moments of receipt of requests for service in the device P and at the moments of completion of servicing requests by channels can be selected TO, when the state of the system,

estimated by the number of applications in it, changes abruptly.

A convenient form of representation of the logical structure of models of the processes of functioning of systems and computer programs is a diagram. At various stages of modeling, generalized and detailed logical schemes of modeling algorithms, as well as program schemes, are compiled.

Generalized (enlarged) scheme of the modeling algorithm specifies the general procedure for modeling the system without any clarifying details. The generalized scheme shows what needs to be done at the next step of the simulation, for example, turn to the random number generator.

Detailed scheme of the modeling algorithm contains refinements that are not in the generalized scheme. A detailed diagram shows not only what should be done at the next step of system modeling, but also how to do it.

Logic diagram of the modeling algorithm represents the logical structure of the process model of the system functioning S. The logical scheme indicates a time-ordered sequence of logical operations associated with the solution of the modeling problem.

Program scheme displays the order of software implementation of the modeling algorithm using specific software. The program scheme is an interpretation of the logical scheme of the modeling algorithm by the program developer based on a specific algorithmic language.

Obtaining and interpreting the results of system modeling.

At the third stage of modeling - the stage of obtaining and interpreting the results of modeling - a computer is used to carry out working calculations according to a compiled and debugged program.

The results of these calculations allow us to analyze and formulate conclusions about the characteristics of the process of functioning of the simulated system. S.

In the course of a machine experiment, the behavior of the model under study is studied M system operation process S at a given time interval.

Often simpler evaluation criteria are used, such as the probability of a certain state of the system at a given point in time. t*, the absence of failures and failures in the system on the interval, etc. When interpreting the simulation results, various statistical characteristics are calculated that need to be calculated.

Sovetov B.Ya., Yakovlev S.A.

Systems Modeling. 4th ed. - M.: Higher School, 2005. - S. 84-106.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!