Description of the differential rent method for solution. Additional restrictions on the transport problem

Send your good work in the knowledge base is simple. Use the form below

Good work to the site">

Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.

Posted on http:// www. allbest. ru/

MINISTRY OF EDUCATION AND SCIENCE OF THE RUSSIAN FEDERATION

FEDERAL STATE BUDGETARY EDUCATIONAL INSTITUTION OF HIGHER PROFESSIONAL EDUCATION "LIPETSK STATE PEDAGOGICAL UNIVERSITY"

FACULTY OF INFORMATION AND SOCIAL TECHNOLOGIES

Department mathematical methods in economics

Course work

in the discipline of economic and mathematical methods

on the topic: “Method differential annuities»

Completed:

Stolyarenko K.V.

Scientific adviser:

S.V. Petrenko

Lipetsk 2013

Introduction

1. Theoretical part

2. Practical part

2.1 Solving the problem using mathematics

2.2 Solving the problem using application programs

Conclusion

Literature

Application

Introduction

The topic of this course project: “Formation of the optimal staff of the company.” this work is devoted to the study of theoretical issues related to this topic, as well as the creation software product, necessary to automate the work of company employees who are involved in the selection of personnel for the enterprise.

The problem of forming the optimal staff of a company has not lost its importance today, but on the contrary, has acquired even greater significance and relevance, because every day more and more enterprises are opening, different in scale and number of jobs. And in order for them all to work more efficiently, they do not spend extra Money, but on the contrary they gave a good profit, it is necessary to take the selection of staff as seriously as possible.

The solution to this problem was formulated and solved back in 1941 by F. Hitchcock, but has not yet been automated.

The object of research is linear programming problems, and the subject is transport problems.

The goal of the project is to automate the process of solving problems of forming the optimal staff of a company. To achieve this goal, the following tasks must be completed:

– study subject area;

– analyze methods for solving problems, namely solving transport problems;

– consider the principles of use application programs to calculate the main characteristics of the model for the problem of forming the optimal staff of a company;

– analyze an application that allows you to automate the process of solving a course project problem.

1. Theoretical part

1.1 Economic tasks reduced to a transport model

A transport model is used to create the most economical plan for transporting one type of product from several points (for example, factories) to delivery points (for example, warehouses). The transport model can be used when considering a number of practical situations related to inventory management, scheduling shifts, assigning employees to jobs, turnover of available capital, regulating water flow in reservoirs and many others. In addition, the model can be modified to accommodate the transport of multiple types of products.

The transport problem is a linear programming problem, but its specific structure allows the simplex method to be modified in such a way that the computational procedures become more efficient. When developing a method for solving a transport problem, the theory of duality plays a significant role.

The classical transport problem considers the transportation (direct or with intermediate points) of one or more types of products from origin to destinations. This problem can be modified to include upper restrictions on throughput transport communications. The assignment problem and the inventory management problem can be considered as problems transport type. There are several types of economic problems that can be reduced to a transport model:

optimal distribution equipment;

– formation of the optimal staff of the company;

- task scheduling production;

optimal research market;

optimal use working agents;

– the problem of production location;

- assignment problem.

The problem of forming the optimal staff of a company is generally formulated as follows.

The company is recruiting staff. It has n groups of different positions with bj vacant units in each group, j = 1,…,n. Candidates for positions are tested, according to the results of which they are divided into m groups of ai candidates in each group, i = 1,...,m. For each candidate from the i-th group, certain training costs Cij are required to occupy the j-th position, i=1,…,m; j=1,…,n. (In particular, some Cij = 0, i.e. the candidate fully corresponds to the position, or Cij = ? (Cij = M), i.e. the candidate cannot occupy this position at all.) It is required to distribute candidates to positions, spending minimal funds for their training. Let's pretend that total number candidates corresponds to the number of vacant positions. Then this task corresponds to the transport model. Groups of candidates act as suppliers, and groups of positions act as consumers. Retraining costs are considered as transportation tariffs. The mathematical model is written as:

1.2 Method of differential rents for solving the transport problem

Several methods are used to solve transport problems. Let us consider the solution using the method of differential rents.

When finding a solution transport problem using the differential rent method first the best way part of the cargo is distributed between destinations (the so-called conditionally optimal distribution) and in subsequent iterations they gradually reduce the total amount of undistributed supplies. The initial load distribution option is determined as follows. In each of the columns of the transport task data table, the minimum tariff is found. The found numbers are enclosed in circles, and the cells containing the indicated numbers are filled in. The maximum possible numbers are written in them. As a result, a certain distribution of cargo supplies to destinations is obtained. This distribution generally does not satisfy the constraints of the original transport problem. Therefore, as a result of subsequent steps, unallocated cargo supplies should be gradually reduced so that the total cost of transportation remains minimal. To do this, first determine the redundant and insufficient rows.

Lines corresponding to suppliers whose inventory is fully allocated and whose destinations associated with these customers are not satisfied by scheduled suppliers are considered insufficient. These lines are sometimes also called negative lines. Lines that are not completely depleted are considered surplus. Sometimes they are also called positive.

After the excess and insufficient rows are determined, for each of the columns the differences are found between the number in the circle and the closest tariff written in the excess row. If the number in the circle is in the positive line, then the difference is not determined. Among the obtained numbers, find the smallest. This number is called the intermediate annuity. After determining the intermediate annuity, proceed to new table. This table is obtained from the previous table by adding intermediate rent to the corresponding tariffs in negative rows. The remaining elements remain the same. In this case, all cells of the new table are considered free. After constructing a new table, its cells begin to be filled in. Now the number of filled cells is one more than at the previous stage. This additional cell is in the column in which the intermediate annuity was recorded. All other cells are located one in each of the columns and the smallest for of this column numbers enclosed in circles. Enclosed in circles are two identical numbers in the column in which the intermediate annuity was recorded in the previous table.

Since in the new table the number of cells to be filled is greater than the number of columns, when filling out the cells you should use a special rule, which is as follows. Select a certain column (row) in which there is one cell with a circle marked in it. This cell is filled in and this column (row) is excluded from consideration. After this, take a certain row (column), in which there is one cell with a circle placed in it. This cell is filled in and excluded from consideration. this line(column). Continuing like this, after a finite number of steps, all the cells in which the circles with the numbers enclosed are placed are filled. If, in addition, it is possible to distribute all the cargo available at the points of departure between the points of destination, then an optimal plan for the transport task is obtained. If the optimal plan is not obtained, then they move on to a new table. To do this, find redundant and insufficient rows, intermediate rent, and build a new table based on this. In this case, some difficulties may arise in determining the sign of a string when its unallocated remainder is zero. In this case, the row is considered positive provided that the second filled cell, located in the column associated with this row by another filled cell, is located in the positive row.

After a finite number of iterations described above, the unallocated remainder becomes zero. As a result, an optimal plan for a given transport task is obtained.

The method of solving the transport problem described above has a simpler logical calculation scheme than the potential method. Therefore, in most cases, to find solutions to specific transport problems using a computer, the method of differential rents is used.

An example of solving a problem.

For the transport problem, the initial data of which are given in table. 1.2.1, find the optimal plan using the differential annuity method.

Table 1.2.1 Initial data of the transport task

Departure points

Destinations

Needs

Solution. Let's move on from the table. 1.2.1 to table. 1.2.2, adding one additional column to indicate excess and deficiency by row and one row to record the corresponding differences.

Table 1.2.2 Excesses and deficiencies

Departure points

Destinations

Flaw(-),

Excess(+)

Needs

Differences

In each column of the table. 1.2.2 we find the minimum tariffs and circle them. Fill in the cells containing the indicated numbers. To do this, write the maximum allowed number in each cell. For example, in the cell located at the intersection of row A1 and column B3, we write the number 120. A larger number cannot be placed in this cell, since in this case the needs of destination B3 would be exceeded.

As a result of filling in the cells noted above, a so-called conditionally optimal plan was obtained, according to which the needs of destinations B1, B2, B3 and B4 are fully satisfied and the needs of destination B5 are partially satisfied. At the same time, the reserves of the departure point A2 are completely distributed, the reserves of the departure point A1 are partially distributed, and the reserves of the departure point A3 remain completely undistributed.

After obtaining a conditionally optimal plan, we determine the redundant and insufficient lines. Here, line A2 is insufficient, since the reserves of departure point A2 are fully used, and the needs of destination B5 are partially satisfied. The amount of deficiency is 80 units.

Lines A1 and A3 are redundant because the inventory of origins A1 and A3 is not fully allocated. In this case, the excess value of line A1 is 60 units, and line A3 is 20 units. the total amount of excess 60+20=80 coincides with the total amount of deficiency equal to 80.

After determining the excess and insufficient rows for each of the columns, we find the differences between the minimum tariffs written in the excess rows and the tariffs in the filled cells. IN in this case these differences are respectively equal to 5,4,2,1 (Table 1.2.2). For column B3, the difference is not defined, since the number written in the circle in this column is in the positive row. In column B1, the number in the circle is 1, and in the redundant rows in the cells of this column, the smallest number is 6. Therefore, the difference for this column is 6-1=5. Similarly, we find the differences for other columns: for B2 12-8 = 4; for B4 7-5=2; for B5 4-3=1.

We choose the smallest of the differences found, which is the intermediate rent. In this case, the intermediate rent is equal to 1 and is in column B5. Having found the intermediate rent, we move on to table.

Table Intermediate annuity

Departure points

Destinations

Deficiency(-), Excess(+)

Needs

Differences

In this table, in lines A1 and A3 (which are redundant), we rewrite the corresponding tariffs from lines A1 and A3 of the table. 1.2.2. elements of line A2 (which was insufficient) are obtained by adding to the corresponding tariffs located in line A2 of table. intermediate annuity, i.e. 1.

In the table, the number of filled cells has increased by one. This is due to the fact that the number of minimum tariffs in each of the columns of this table has increased by one, namely in column B5 there are now two minimum elements 4. We enclose these numbers in circles; the cells in which they stand should be remembered. It is also necessary to fill in the cells containing the lowest tariffs for other columns. These are the cells of the table. 1.2.3, in which the corresponding tariffs are enclosed in circles. After the specified cells are determined, we establish the sequence of filling them. To do this, we find columns (rows) in which there is only one cell to fill. Having identified and filled in a certain cell, we exclude the corresponding column (row) from consideration and move on to filling out the next cell. In this case, we fill the cells in the following sequence. First, fill in cells A1B3, A2B1, A2B2, A2B4, since they are the only cells to fill in columns B1, B2, B3 and B4. After filling in the indicated cells, fill in cell A3B5, since it is the only one to be filled in in line A3. Having filled in this cell, we exclude line A3 from consideration. Then in column B5 there will be only one cell left to fill. This is cell A2B5, which we fill in.

After filling the cells, we set the redundant and insufficient lines. As can be seen from table. 1.2.3, there is still an undistributed balance. Therefore, a conditionally optimal plan for the problem has been obtained and we need to move on to a new table. To do this, for each of their columns we find the differences between the number written in the circle of this column and the smallest number in relation to it, located in the redundant rows. Among these differences, the smallest is 1. This is the intermediate rent. Let's move on to the next table.

In the new table, the elements of rows A2 and A3 are obtained by adding the table to the corresponding numbers of rows A2 and A3 (which are insufficient). 1.2.3 intermediate annuity, i.e. 1. As a result, in table. 1.2.4 the number of cells for filling increased by one more and became equal to 6. We determine the indicated cells and fill them. First we fill in cells A1B3, A2B1, A2B2, A2B4, and then A3B5, A2B5, A1B5.

As a result, all available supplies from suppliers are distributed according to the actual needs of destinations. The number of filled cells is 7, and they have the smallest weight Cij. Therefore, the optimal plan for the original transport problem was obtained:

With this transportation plan, the total costs are:

S=4*120+5*60+1*110+8*90+5*80+3*70+4*20=2300.

2. Practical part

The task. Let there be n candidates to perform these jobs. Assigning candidate i to job j is associated with costs Cij (i, j = 1,2,…, n). It is required to find the appointment of candidates for all jobs that provide the minimum total costs, each candidate can be assigned to only one job and each job can be occupied by only one candidate. The initial data is shown in the table:

Table Initial data

input data:

n - number of candidates and jobs, whole type data

C (n, n) - costs (rub.), real data type.

Output:

Smin - total costs (rub.), real data type;

X (n, n) - job candidate assignment, integer data type.

2.1 Solving the problem using mathematics

Let us determine the reference plan for the transportation problem using the minimum cost method, taking into account that each candidate can be assigned to only one job and each job can be occupied by only one candidate.

Table 2.1.1 Baseline plan using the minimum cost method

The minimum total costs will be:

F=0*3+1*7+0*3+1*2+1*2+0*3+1*8=19

To find the optimal plan we use the potential method.

Let's create a system of equations Ui+Vj =Cij for the filled cells of the transport table and determine the values ​​of Ui and Vj.

U1+V2=7U2=-1V2=7

14=U1+V4-C14=0+8-8=0

22=U2+V2-C22=-1+7-4=2

23=U2+V3-C23=-1+3-4=-2

24=U2+V4-C24=-1+8-5=2

31=U3+V1-C31=0+3-4=-1

32=U3+V2-C32=0+7-7=0

34=U3+V4-C34=0+8-8=0

41=U4+V1-C41=0+3-9=-6

42=U4+V2-C42=0+7-7=0

Since there are positive values, the plan is not optimal. You must choose the largest positive number and carry out a cycle shift for the selected cell.

Table 2.1.3 Reference plan using the potential method

U1+V3=3U2=-1V2=5

U2+V1=2U3=-1V3=3

Let's calculate the values?ij=Ui+Vj-Cij for free cells of the table.

12=U1+V2-C12=0+5-7=-2

14=U1+V4-C14=0+8-8=0

23=U2+V3-C23=-1+3-4=-2

24=U2+V4-C24=-1+8-5=2

31=U3+V1-C31=-1+3-4=-2

32=U3+V2-C32=-1+5-7=-3

34=U3+V4-C34=-1+8-8=-1

41=U4+V1-C41=0+3-9=-6

42=U4+V2-C42=0+5-7=-2

Since there are positive values, the plan is not optimal. It is necessary to select the largest positive number and carry out a shift along the cycle. transport differential rent applied

Table 2.1.4 Optimal plan for solving the problem

Let's check the resulting plan for optimality.

U2+V1=2U2=-1V2=5

Let's calculate the values?ij=Ui+Vj-Cij for free cells of the table.

12=U1+V2-C12=0+5-7=-2

13=U1+V3-C13=0+1-3=-2

14=U1+V4-C14=0+6-8=-2

23=U2+V3-C23=-1+1-4=-4

31=U3+V1-C31=1+3-4=0

32=U3+V2-C32=1+5-7=-1

34=U3+V4-C34=1+6-8=-1

41=U4+V1-C41=2+3-9=-4

42=U4+V2-C42=2+5-7=0

So how's everything?ij<=0, то получен оптимальный план решения задачи.

The minimum total costs when solving the problem using the potential method will be:

F=1*3+0*2+1*4+1*2+0*3+1*8=17

Answer: to obtain the minimum total costs, it is necessary to assign candidate A1 to job B1, candidate A2 to job B2, candidate A3 to job B3, candidate A4 to job B4.

2.2 Solving the problem using application programs

Technology for developing a form for entering initial data using VBA

To develop a source data entry form, you need to display the “Developer” tab on the MS Excel ribbon. To do this, select “Customize the Quick Access Toolbar” from the Excel system menu, then “General” and check the “Show Developer tab on the ribbon” checkbox. Go to this tab and select Insert, then Button. We place the button on the Excel worksheet, in the “Assign macro to object” dialog box, click on the Create button and in the window that opens, enter UserForm1.Show to go to the form. Go to the "Developer" tab and click Visual Basic. To create a form, select Insert and then UserForm. We place all the necessary components on the form.

Rice. Source data form

Next, you need to double-click on the Calculate button, select the desired event and enter the program code. The program listing is in Appendix B. We save the Excel workbook with macro support and when opening it, always click Options and select “Include this content” there.

Description of the solution process

On the Excel worksheet, in the range of cells from A1 to D4, depending on the selected number of enterprises, the initial data is placed. They will be transferred from the Source Data form. For example, in cell A1 the data is taken from the form cell TextBox1, and in cell B2 the information from the TextBox2 cell is marked up. In the cells of the range from A7 to D10 we write the zeros necessary to find the optimal solution. To solve the problem, write the formulas in the required cells:

E1 =A1*A7+B1*B7+C1*C7+D1*D7

E2 =A2*A8+B2*B8+C2*C8+D2*D8

E3 =A3*A9+B3*B9+C3*C9+D3*D9

E4 =A4*A10+B4*B10+C4*C10+D4*D10

E5= =SUM(E1:E4)

E7=SUM(A7:D7)

E8=SUM(A8:D8)

E9=SUM(A9:D9)

E10=SUM(A10:D10)

A11=SUM(A7:A10)

B11= =SUM(B7:B10)

C11= =SUM(C7:C10)

D11= =SUM(D7:D10)

E5=SUM(E1:E4)

To solve further, you need to open the Data tab and select Search for solutions. In the dialog box that opens, set the target cell to $E$5. To Change cell, select $A$7:$D$10, set the following restrictions: $A$11:$D$11=1; $A$7:$D$10 = binary; $E$7:$E$10 = 1.

Rice. Excel worksheet

Then click on Options and check the boxes for Linear model and Non-negative value. After everything click Execute. And in cell E5 the minimum total costs will appear.

Conclusion

The course project raised the problem of forming the optimal staff of a company, the basis of its relevance and significance.

In the first part, theoretical issues were considered that revealed the essence of the problem of the course project and examples of solving problems of this specificity were given.

In the second part, a mathematical model of the problem proposed for the course project was compiled, its solution was carried out using mathematical tools, and the principles of using the MS Excel 2007 application program for entering initial data and calculating the main parameters of the specified model were considered.

Literature

1. Mastyaeva, I.N. Research of operations in economics / I.N. Mastyaeva, G.Ya. Gorbovtsov, O.N. Semenikhin. - Moscow International Institute of Econometrics, Informatics, Finance and Law, 2005. - 113 p.

2. Pavlova, T.N. Solving linear programming problems using Excel: a tutorial. / T.N. Pavlova, O.A. Rakova. - Dimitrovgrad: Tetra Systems, 2009. - 321 p.

3. Pelikh, A.S. Economic and mathematical methods and models in production management / A.S. Pelikh, L.L. Terekhov, L.A. Terekhova. - Rostov n/d.: “Felix”, 2005. - 248 p.

4. Pogan, A.M. Delphi. Programmer's Guide / A.M. Possible. - M.: Eksmo, 2006. - 480 pp.: ill.

5. Fomin, G.P. Mathematical methods and models in commercial activities: textbook / G.P. Fomin. - 2nd ed., revised. and additional - M.: Finance and Statistics, 2005. - 306 p.: ill.

6. Shikin, E.V. Mathematical methods and models in management: textbook. / - 2nd ed., revised. - M.: Delo, 2002. - 440 p.

7. Shpak, Yu.A. Delphi 7 with examples / Yu. A. Shpak. - Junior Year, 2005.

Application

Excel module listing

Private Sub ComboBox1_Change()

End Sub

If (ComboBox1.Text = "2") Then

UserForm2.TextBox3.Visible = False

UserForm2.TextBox7.Visible = False

UserForm2.TextBox9.Visible = False

UserForm2.TextBox10.Visible = False

UserForm2.TextBox11.Visible = False

UserForm2.Label3.Visible = False

UserForm2.Label7.Visible = False

End If

If (ComboBox1.Text = "3") Then

UserForm2.TextBox13.Visible = False

UserForm2.TextBox14.Visible = False

UserForm2.TextBox15.Visible = False

UserForm2.TextBox16.Visible = False

UserForm2.TextBox4.Visible = False

UserForm2.TextBox8.Visible = False

UserForm2.TextBox12.Visible = False

UserForm2.TextBox16.Visible = False

UserForm2.Label4.Visible = False

UserForm2.Label8.Visible = False

End If

UserForm2.Show

End Sub

Private Sub UserForm_Click()

End Sub

Private Sub UserForm_Initialize()

ComboBox1.Text = "2"

ComboBox1.AddItem "2"

ComboBox1.AddItem "3"

ComboBox1.AddItem "4"

End Sub

Private Sub CommandButton1_Click()

If (UserForm1.ComboBox1.Text = "2") Then If (TextBox1.Text = "") Or (TextBox2.Text = "") Or (TextBox5.Text = "") Or (TextBox6.Text = "") Then MsgBox "Fill in all fields"

If (UserForm1.ComboBox1.Text = "3") Then

If (TextBox1.Text = "") Or (TextBox2.Text = "") Or (TextBox3.Text = "") Or (TextBox5.Text = "") Or (TextBox6.Text = "") Or (TextBox7.Text = "") Or (TextBox9.Text = "") Or (TextBox10.Text = "") Or (TextBox11.Text = "") Then MsgBox "Fill in all fields"

End If

If (UserForm1.ComboBox1.Text = "4") Then

If (TextBox1.Text = "") Or (TextBox2.Text = "") Or (TextBox3.Text = "") Or (TextBox4.Text = "") Or (TextBox5.Text = "") Or (TextBox6.Text = "") Or (TextBox7.Text = "") Or (TextBox8.Text = "") Or (TextBox9.Text = "") Or (TextBox10.Text = "") Or (TextBox11.Text = "") Or (TextBox12.Text = "") Or (TextBox13.Text = "") Or (TextBox14.Text = "") Or (TextBox15.Text = "") Or (TextBox16.Text = "") Then MsgBox "Fill in all fields "

End If

Worksheets("Original Data").Range("A1") = TextBox1.Text

Worksheets("Original Data").Range("B1") = TextBox2.Text

Worksheets("Original Data").Range("C1") = TextBox3.Text

Worksheets("Original Data").Range("D1") = TextBox4.Text

Worksheets("Original Data").Range("A2") = TextBox5.Text

Worksheets("Original Data").Range("B2") = TextBox6.Text

Worksheets("SourceData").Range("C2") = TextBox7.Text

Worksheets("Original Data").Range("D2") = TextBox8.Text

Worksheets("Original Data").Range("A3") = TextBox9.Text

Worksheets("Original Data").Range("B3") = TextBox10.Text

Worksheets("Original Data").Range("C3") = TextBox11.Text

Worksheets("Original Data").Range("D3") = TextBox12.Text

Worksheets("Original Data").Range("A4") = TextBox13.Text

Worksheets("Original Data").Range("B4") = TextBox14.Text

Worksheets("Original Data").Range("C4") = TextBox15.Text

Worksheets("Original Data").Range("D4") = TextBox16.Text

UserForm2.TextBox1.Text = Clear

UserForm2.TextBox2.Text = Clear

UserForm2.TextBox3.Text = Clear

UserForm2.TextBox4.Text = Clear

UserForm2.TextBox5.Text = Clear

UserForm2.TextBox6.Text = Clear

UserForm2.TextBox7.Text = Clear

UserForm2.TextBox8.Text = Clear

UserForm2.TextBox9.Text = Clear

UserForm2.TextBox10.Text = Clear

UserForm2.TextBox11.Text = Clear

UserForm2.TextBox12.Text = Clear

UserForm2.TextBox13.Text = Clear

UserForm2.TextBox14.Text = Clear

UserForm2.TextBox15.Text = Clear

UserForm2.TextBox16.Text = Clear

End Sub

Private Function ValidateNumeric(strText As String) _

As Boolean

ValidateNumeric = CBool(strText = "" _

Or strText = "-." _

Or strText = "." _

Or IsNumeric(strText))

End Function

Private Sub TextBox1_Change()

If Not ValidateNumeric(TextBox1.Text) Then

TextBox1.Text = ""

End If

End Sub

Private Sub TextBox2_Change()

If Not ValidateNumeric(TextBox2.Text) Then

TextBox2.Text = ""

End If

End Sub

Private Sub TextBox3_Change()

If Not ValidateNumeric(TextBox3.Text) Then

TextBox3.Text = ""

End If

End Sub

Private Sub TextBox4_Change()

If Not ValidateNumeric(TextBox4.Text) Then

TextBox4.Text = ""

End If

End Sub

Private Sub TextBox5_Change()

If Not ValidateNumeric(TextBox5.Text) Then

TextBox5.Text = ""

End If

End Sub

Private Sub TextBox6_Change()

If Not ValidateNumeric(TextBox6.Text) Then

TextBox6.Text = ""

End If

End Sub

Private Sub TextBox7_Change()

If Not ValidateNumeric(TextBox7.Text) Then

TextBox7.Text = ""

End If

End Sub

Private Sub TextBox8_Change()

If Not ValidateNumeric(TextBox8.Text) Then

TextBox8.Text = ""

End If

End Sub

Private Sub TextBox9_Change()

If Not ValidateNumeric(TextBox9.Text) Then

TextBox9.Text = ""

End If

End Sub

Private Sub TextBox10_Change()

If Not ValidateNumeric(TextBox10.Text) Then

TextBox10.Text = ""

End If

End Sub

Private Sub TextBox11_Change()

If Not ValidateNumeric(TextBox11.Text) Then

TextBox11.Text = ""

End If

End Sub

Private Sub TextBox12_Change()

If Not ValidateNumeric(TextBox12.Text) Then

TextBox12.Text = ""

End If

End Sub

Private Sub TextBox13_Change()

If Not ValidateNumeric(TextBox13.Text) Then

TextBox13.Text = ""

End If

End Sub

Private Sub TextBox14_Change()

If Not ValidateNumeric(TextBox14.Text) Then

TextBox14.Text = ""

End If

End Sub

Private Sub TextBox15_Change()

If Not ValidateNumeric(TextBox15.Text) Then

TextBox15.Text = ""

End If

End Sub

Private Sub TextBox16_Change()

If Not ValidateNumeric(TextBox16.Text) Then

Posted on Allbest.ru

Similar documents

    Types of rents, sources of their formation, the concept of land rent. Methods of appropriating rents in conditions of state ownership of land and the development of market relations. Principles and economic mechanism of state regulation of land relations.

    course work, added 12/24/2009

    Mathematical model of the transport problem. Necessary and sufficient condition for the solvability of the transport problem. Concept of potential and cycle. Methods for constructing an initial reference solution. Analysis of the application of transport problems to solve economic problems.

    course work, added 02/03/2016

    Statistical study and methods for calculating indicators of the volume of production of goods and services. Analysis of the dependence of the number of crimes on the number of unemployed in the central region of Russia using a package of application programs for processing spreadsheets.

    course work, added 03/19/2010

    Pre-processing of statistical data of financial and economic indicators using a two-dimensional correlation analysis model. Forecasting financial and economic indicators based on a qualitative assessment of a linear regression model.

    laboratory work, added 11/24/2010

    Study of the concept and types of rent. Price of land. Sources of rent formation. Economic mechanism for regulating land relations. Appropriation of rent in conditions of market relations. Status, problems and prospects for further development of the land market in the Russian Federation.

    course work, added 03/20/2016

    Improving the structural policy and income policy of the enterprise. Studying economic systems. Scheme of constructing an economic model. General case of an optimization problem. Converting a constrained optimization problem into an unconstrained optimization problem.

    course work, added 11/19/2012

    Stages of developing a production and economic plan for an enterprise for the year, using the expected volume of transport work, data on the type of cargo and conditions for the transportation process. Assessment of work efficiency based on calculations.

    course work, added 01/04/2012

    Theoretical aspects of land relations in Russia: traditions, problems, searches for effective forms of management. Demand and supply of land. Main types of annuities. The process of formation of differential and absolute rent. Search for effective forms of management.

    course work, added 06/09/2014

    Land as a subject of rent and sale. The essence of the concept and types of "rent". Concept, subjects and rates of land tax, features of its functioning. Land ownership in the Russian Federation and rental valuation in market conditions.

    course work, added 03/14/2015

    The experience of foreign countries on the issue of public-private partnerships in various sectors of the economy is analyzed. Models of government influence on the development of the transport industry. The forms of interaction between the state and business in the transport industry are determined.

Theoretical part

Economic tasks reduced to a transport model

A transport model is used to create the most economical plan for transporting one type of product from several points (for example, factories) to delivery points (for example, warehouses). The transport model can be used when considering a number of practical situations related to inventory management, scheduling shifts, assigning employees to jobs, turnover of available capital, regulating water flow in reservoirs and many others. In addition, the model can be modified to accommodate the transport of multiple types of products.

The transport problem is a linear programming problem, but its specific structure allows the simplex method to be modified in such a way that the computational procedures become more efficient. When developing a method for solving a transport problem, the theory of duality plays a significant role.

The classical transport problem considers the transportation (direct or with intermediate points) of one or more types of products from origin to destinations. This problem can be modified to include upper restrictions on the capacity of transport communications. The assignment problem and the inventory management problem can be considered as transport-type problems. There are several types of economic problems that can be reduced to a transport model:



– optimal distribution of equipment;

– formation of the optimal staff of the company;

– production scheduling problem;

– optimal market research;

– optimal use of working agents;

– the problem of production location;

- assignment problem.

The problem of forming the optimal staff of a company is generally formulated as follows.

The company is recruiting staff. It has n groups of different positions with bj vacant units in each group, j = 1,…,n. Candidates for positions are tested, according to the results of which they are divided into m groups of ai candidates in each group, i = 1,...,m. For each candidate from the i-th group, certain training costs Cij are required to occupy the j-th position, i=1,…,m; j=1,…,n. (In particular, some Cij = 0, i.e. the candidate fully corresponds to the position, or Cij = ∞ (Cij = M), i.e. the candidate cannot occupy this position at all.) It is required to distribute candidates to positions, spending minimal funds for their training. Let's assume that the total number of candidates matches the number of vacant positions. Then this problem corresponds to the transport model. Groups of candidates act as suppliers, and groups of positions act as consumers. Retraining costs are considered as transportation tariffs. The mathematical model is written as:


Method of differential rents for solving the transport problem

Several methods are used to solve transport problems. Let us consider the solution using the method of differential rents.

When finding a solution to a transport problem using the method of differential rents, part of the cargo is first best distributed among destinations (the so-called conditionally optimal distribution) and in subsequent iterations the total amount of undistributed deliveries is gradually reduced. The initial load distribution option is determined as follows. In each of the columns of the transport task data table, the minimum tariff is found. The found numbers are enclosed in circles, and the cells containing the indicated numbers are filled in. The maximum possible numbers are written in them. As a result, a certain distribution of cargo supplies to destinations is obtained. This distribution generally does not satisfy the constraints of the original transport problem. Therefore, as a result of subsequent steps, unallocated cargo supplies should be gradually reduced so that the total cost of transportation remains minimal. To do this, first determine the redundant and insufficient rows.

Lines corresponding to suppliers whose inventory is fully allocated and whose destinations associated with these customers are not satisfied by scheduled suppliers are considered insufficient. These lines are sometimes also called negative lines. Lines that are not completely depleted are considered surplus. Sometimes they are also called positive.

After the excess and insufficient rows are determined, for each of the columns the differences are found between the number in the circle and the closest tariff written in the excess row. If the number in the circle is in the positive line, then the difference is not determined. Among the obtained numbers, find the smallest. This number is called the intermediate annuity. After determining the intermediate annuity, they move on to a new table. This table is obtained from the previous table by adding intermediate rent to the corresponding tariffs in negative rows. The remaining elements remain the same. In this case, all cells of the new table are considered free. After constructing a new table, its cells begin to be filled in. Now the number of filled cells is one more than at the previous stage. This additional cell is in the column in which the intermediate annuity was recorded. All other cells are located one in each of the columns and they contain the smallest numbers for a given column, enclosed in circles. Enclosed in circles are two identical numbers in the column in which the intermediate annuity was recorded in the previous table.

Since in the new table the number of cells to be filled is greater than the number of columns, when filling out the cells you should use a special rule, which is as follows. Select a certain column (row) in which there is one cell with a circle marked in it. This cell is filled in and this column (row) is excluded from consideration. After this, take a certain row (column), in which there is one cell with a circle placed in it. This cell is filled in and this row (column) is excluded from consideration. Continuing like this, after a finite number of steps, all the cells in which the circles with the numbers enclosed are placed are filled. If, in addition, it is possible to distribute all the cargo available at the points of departure between the points of destination, then an optimal plan for the transport task is obtained. If the optimal plan is not obtained, then they move on to a new table. To do this, find redundant and insufficient rows, intermediate rent, and build a new table based on this. In this case, some difficulties may arise in determining the sign of a string when its unallocated remainder is zero. In this case, the row is considered positive provided that the second filled cell, located in the column associated with this row by another filled cell, is located in the positive row.

After a finite number of iterations described above, the unallocated remainder becomes equal to zero. As a result, an optimal plan for a given transport task is obtained.

The method described above for solving the transport problem has a simpler logic circuit calculations than the potential method. Therefore, in most cases, to find solutions to specific transport problems using a computer, the method of differential rents is used.

An example of solving a problem.

For the transport problem, the initial data of which are given in table. 1.2.1, find the optimal plan using the differential annuity method.

Table 1.2.1 Initial data of the transport task

Solution. Let's move on from the table. 1.2.1 to table. 1.2.2, adding one additional column to indicate excess and deficiency by row and one row to record the corresponding differences.

Table 1.2.2 Excesses and deficiencies

Departure points Destinations Reserves Deficiency(-), Excess(+)
IN 1 AT 2 AT 3 AT 4 AT 5
A1 4 +60
A2 1 8 5 3 -80
A3 +20
Needs
Differences

In each column of the table. 1.2.2 we find the minimum tariffs and circle them. Fill in the cells containing the indicated numbers. To do this, write the maximum allowed number in each cell. For example, in the cell located at the intersection of row A 1 and column B 3, we write the number 120. A larger number cannot be placed in this cell, since in this case the needs of destination B 3 would be exceeded.

As a result of filling out the cells noted above, a so-called conditionally optimal plan was obtained, according to which the needs of destinations B 1, B 2, B 3 and B 4 are fully satisfied and partially the needs of destination B 5. At the same time, the reserves of the point of departure A 2 are fully distributed, the reserves of the point of departure A 1 are partially distributed, and the reserves of the point of departure A 3 remain completely undistributed.

After obtaining a conditionally optimal plan, we determine the redundant and insufficient lines. Here, line A 2 is insufficient, since the reserves of departure point A 2 are fully used, and the needs of destination B5 are partially satisfied. The amount of deficiency is 80 units.

Lines A 1 and A 3 are redundant because the inventory of origins A 1 and A 3 is not completely allocated. In this case, the excess value of line A 1 is 60 units, and line A 3 is 20 units. the total amount of excess 60+20=80 coincides with the total amount of deficiency equal to 80.

After determining the excess and insufficient rows for each of the columns, we find the differences between the minimum tariffs written in the excess rows and the tariffs in the filled cells. In this case, these differences are respectively equal to 5,4,2,1 (Table 1.2.2). For column B 3, the difference is not defined, since the number written in the circle in this column is in the positive row. In column B 1, the number in the circle is 1, and in the redundant rows in the cells of this column, the smallest number is 6. Therefore, the difference for this column is 6-1=5. Similarly, we find the differences for other columns: for B 2 12-8 = 4; for B 4 7-5=2; for B 5 4-3=1.

We choose the smallest of the differences found, which is the intermediate rent. In this case, the intermediate rent is equal to 1 and is in column B 5. Having found the intermediate rent, we move on to table. 1.2.3

Table 1.2.3 Intermediate rent

Departure points Destinations Reserves Deficiency(-), Excess(+)
IN 1 AT 2 AT 3 AT 4 AT 5
A1 4 +60
A2 2 9 6 4 -60
A3 4 -0
Needs
Differences

In this table, in lines A 1 and A 3 (which are redundant), we rewrite the corresponding tariffs from lines A 1 and A 3 of the table. 1.2.2. elements of line A 2 (which was insufficient) are obtained by adding to the corresponding tariffs located in line A 2 of table. 1.2.2, intermediate annuity, i.e. 1.

In Table 1.2.3, the number of filled cells has increased by one. This is due to the fact that the number of minimum tariffs in each of the columns of this table has increased by one, namely in column B 5 there are now two minimum elements 4. We enclose these numbers in circles; the cells in which they stand should be remembered. It is also necessary to fill in the cells containing the lowest tariffs for other columns. These are the cells of the table. 1.2.3, in which the corresponding tariffs are enclosed in circles. After the specified cells are determined, we establish the sequence of filling them. To do this, we find columns (rows) in which there is only one cell to fill. Having identified and filled in a certain cell, we exclude the corresponding column (row) from consideration and move on to filling out the next cell. In this case, we fill the cells in the following sequence. First, fill in cells A 1 B 3, A 2 B 1, A 2 B 2, A 2 B 4, since they are the only cells to fill in columns B 1, B 2, B 3 and B 4. After filling in the indicated cells, fill in cell A 3 B 5, since it is the only one to be filled in in line A3. Having filled in this cell, we exclude line A 3 from consideration. Then in column B 5 there will be only one cell left to fill. This is cell A 2 B 5, which we fill in. After filling the cells, we set the redundant and insufficient lines. As can be seen from table. 1.2.3, there is still an undistributed balance. Therefore, a conditionally optimal plan for the problem has been obtained and we need to move on to a new table. To do this, for each of their columns we find the differences between the number written in the circle of this column and the smallest number in relation to it, located in the redundant rows. Among these differences, the smallest is 1. This is the intermediate rent. Let's move on to the next table (Table 1.2.4).

Table 1.2.4 Optimal plan for a transport task

Departure points Destinations Reserves Deficiency(-), Excess(+)
IN 1 AT 2 AT 3 AT 4 AT 5
A1 4
A2 3 10 7 5
A3
Needs

In the new table, the elements of rows A 2 and A 3 are obtained by adding to the corresponding numbers of rows A 2 and A 3 (which are insufficient) of the table. 1.2.3 intermediate annuity, i.e. 1. As a result, in table. 1.2.4 the number of cells for filling increased by one more and became equal to 6. We determine the indicated cells and fill them. First we fill the cells A 1 B 3, A 2 B 1, A 2 B 2, A 2 B 4, and then A 3 B 5, A 2 B 5, A 1 B 5. As a result, all available supplies from suppliers are distributed according to the actual needs of destinations. The number of filled cells is 7, and they have the smallest weight C ij . Therefore, the optimal plan for the original transport problem was obtained:

X=

With this transportation plan, the total costs are:

S=4*120+5*60+1*110+8*90+5*80+3*70+4*20=2300.


Practical part

The task. Let there be n candidates to perform these jobs. The appointment of candidate i to job j is associated with costs C ij (i, j = 1,2,…, n). It is required to find the assignment of candidates to all jobs that give the minimum total costs, while each candidate can be assigned to only one job and each job can be occupied by only one candidate. The initial data is shown in the table:

Table.2.4 Initial data

A i B j B1 B2 B3 B4
A1
A2
A3
A4

input data:

n – number of candidates and jobs, integer data type

C (n, n) - costs (rub.), real data type.

Output:

Smin - total costs (rub.), real data type;

X (n, n) - job candidate assignment, integer data type.

Transport task

When finding a solution to a transport problem using the differential rent method, first part of the cargo is distributed between destinations in the best possible way (the so-called conditionally optimal distribution) and in subsequent iterations the total amount of undistributed deliveries is gradually reduced. The initial load distribution option is determined as follows. In each column of the transport task data table, the lowest tariff is found. The found numbers are enclosed in circles, and the cells containing the indicated numbers are filled in. The maximum possible numbers are written in them. As a result, a certain distribution of cargo supplies to destinations is obtained. This distribution generally does not satisfy the constraints of the original transport problem. Therefore, the next steps should be to gradually reduce unallocated cargo supplies so that the total cost of transportation remains minimal. To do this, redundant and insufficient rows are determined.

Lines corresponding to suppliers whose inventory is fully allocated and whose destinations associated with these customers are not satisfied by scheduled suppliers are considered insufficient. These lines are sometimes also called negative lines. Lines that are not completely depleted are considered surplus. Sometimes they are also called positive.

After the excess and insufficient rows are determined, for each of the columns the differences are found between the number in the circle and the closest tariff written in the excess row. If the number in the circle is in the positive line, then the difference is not determined. Among the obtained numbers, find the smallest. This number is called the intermediate annuity. After determining the intermediate annuity, they move on to a new table. This table is obtained from the previous table by adding intermediate rent to the corresponding tariffs in negative rows. The remaining elements remain the same. In this case, all cells of the new table are considered free. After constructing a new table, its cells begin to be filled in. Now the number of filled cells is one more than at the previous stage. This additional cell is in the column in which the intermediate annuity was recorded. All other cells are located one in each of the columns and they contain the smallest numbers for a given column, enclosed in circles. Enclosed in circles are two identical numbers in the column in which the intermediate annuity was recorded in the previous table.

Since in the new table the number of cells to be filled is greater than the number of columns, when filling out the cells you should use a special rule, which is as follows. Select a certain column (row) in which there is one cell with a circle marked in it. This cell is filled in and this column (row) is excluded from consideration. After this, take a certain row (column), in which there is one cell with a circle placed in it. This cell is filled in and this row (column) is excluded from consideration. Continuing like this, after a finite number of steps, all the cells in which the circles with the numbers enclosed are placed are filled. If, in addition, it is possible to distribute all the cargo available at the points of departure between the points of destination, then an optimal plan for the transport task is obtained. If the optimal plan is not obtained, then they move on to a new table. To do this, find redundant and insufficient rows, intermediate rent, and build a new table based on this. In this case, some difficulties may arise in determining the sign of a string when its unallocated remainder is zero. In this case, the row is considered positive provided that the second filled cell, located in the column associated with this row by another filled cell, is located in the positive row.

If, when determining the optimal plan for a transport problem using the potential method, some of its reference plan, and then it was consistently improved, then when finding a solution to the transport problem by the method of differential rents, they first distribute part of the cargo between destinations in the best possible way (the so-called conditionally optimal distribution) and in subsequent iterations they gradually reduce the total amount of undistributed deliveries. The initial load distribution option is determined as follows. In each of the columns of the data table of the transport task, the minimum tariff is found. The found numbers are enclosed in circles, and the cells containing the indicated numbers are filled in. The maximum possible numbers are written in them. As a result, a certain distribution of cargo supplies to destinations is obtained. This distribution generally does not satisfy the constraints of the original transport problem. Therefore, the next steps should be to gradually reduce unallocated cargo supplies so that the total cost of transportation remains minimal. To do this, first determine the redundant and insufficient rows.

Lines that correspond to suppliers whose inventory is fully allocated and whose demand from the destinations associated with those customers' planned shipments are not met are considered insufficient. These lines are sometimes also called negative lines. Lines that are not completely depleted are considered surplus. Sometimes they are also called positive.

After the excess and insufficient rows are determined, for each of the columns the differences are found between the number in the circle and the closest tariff written in the excess row. If the number in the circle is in the positive line, then the difference is not determined. Among the obtained numbers, find the smallest. This number is called the intermediate annuity . After determining the intermediate annuity, they move on to a new table. This table is obtained from the previous table by adding intermediate rent to the corresponding tariffs in negative rows. The remaining elements remain the same. In this case, all cells of the new table are considered free. After constructing a new table, its cells begin to be filled in. Now the number of filled cells is one more than at the previous stage. This additional cell is in the column in which the intermediate annuity was recorded. All other cells are located one in each of the columns and they contain the smallest numbers for a given column, enclosed in circles. Enclosed in circles are two identical numbers in the column in which the intermediate annuity was recorded in the previous table.

Since in the new table the number of cells to be filled is greater than the number of columns, when filling out the cells you should use a special rule, which is as follows. Select a certain column (row) in which there is one cell with a circle placed in it. This cell is filled in and this column (row) is excluded from consideration. After this, take a certain row (column), in which there is one cell with a circle placed in it. This cell is filled in and this row (column) is excluded from consideration. Continuing like this, after a finite number of steps, all the cells in which the circles with the numbers enclosed are placed are filled. If, in addition, it is possible to distribute all the cargo available at the points of departure between the points of destination, then an optimal plan for the transport task is obtained. If the optimal plan is not obtained, then they move on to a new table. To do this, find redundant and insufficient rows, intermediate rent, and build a new table based on this. In this case, some difficulties may arise in determining the sign of a string when its unallocated remainder is zero. In this case, the row is considered positive provided that the second filled cell, located in the column associated with this row by another filled cell, is located in the positive row.

After a finite number of iterations described above, the unallocated remainder becomes zero. As a result, an optimal plan for a given transport task is obtained.

The method of solving the transport problem described above has a simpler logical calculation scheme than the potential method discussed above. Therefore, in most cases, to find solutions to specific transport problems using a computer, the method of differential rents is used.

Example (4):

For the transport problem, the initial data of which are given in Table 11, find the optimal plan using the method of differential rents.

Solution. Let's move from Table 11 to Table 12, adding one additional column to indicate excess and deficiency by row and one row to record the corresponding differences.

Table 10.

Departure points

Destinations

Needs

Table 11.

Departure points

Destinations

Flaw

excess (

Needs

Difference

In each of the columns of Table 12 we find the minimum tariffs and circle them. Fill in the cells containing the indicated numbers. To do this, write the maximum allowed number in each cell. For example, in the cell located at the intersection of the row and column, we write the number 120. A larger number cannot be placed in this cell, since in this case the needs of the destination would be exceeded.

As a result of filling in the cells noted above, a so-called conditionally optimal plan is obtained, according to which the needs of the destinations are fully satisfied and partially the needs of the destination . At the same time, the reserves of the point of departure were fully distributed, partially - the supplies of the point of departure, and the stocks of the point of departure remained completely undistributed.

After obtaining a conditionally optimal plan, we determine the redundant and insufficient lines. Here the line is insufficient , since the reserves of the point of departure are fully used, and the needs of the destination are partially satisfied. The amount of deficiency is 80 units.

Strings And are redundant because the stocks at origins And not completely distributed. In this case, the amount of line excess is equal to 60 units, and the line is equal to units. The total amount of excess coincides with the total amount of deficiency, equal to.

After determining the excess and insufficient rows for each of the columns, we find the differences between the minimum tariffs written in the excess rows and the tariffs in the filled cells. In this case, these differences are respectively equal to 5, 4, 2, 1 (Table 11). The difference is undefined for the column because the circled number in that column is in the positive row. In a column, the number in the circle is equal, and in the redundant rows in the cells of a given column, the smallest number is the number. Therefore, the difference for this column is equal to. We similarly find the differences for other columns: for; For; For. .

We choose the smallest of the differences found, which is the intermediate rent. In this case, the intermediate rent is equal to and is in the column . Having found the intermediate rent, we move on to Table 11.

In this table, in lines and (which are redundant) we rewrite the corresponding tariffs from line Table 10. The elements of the line (which was insufficient) are obtained by adding to the corresponding tariffs located in the line table. 10, intermediate annuity, i.e..

In table 11, the number of filled cells increased by one. This is due to the fact that the number of minimum tariffs in each of the columns of this table has increased by one, namely, the column now has two minimum elements. We enclose these numbers in circles; the cells in which they stand must be filled. It is also necessary to fill in the cells containing the lowest tariffs for other columns. These are the cells of the table. 11 in which the corresponding tariffs are enclosed in circles.

Table 11.

Departure points

Destinations

Flaw

excess (

Needs

Difference

After the specified cells are determined, we establish the sequence of filling them. To do this, we find columns (rows) in which there is only one cell to fill. Having identified and filled in a certain cell, we exclude the corresponding column (row) from consideration and move on to filling out the next cell. In this case, we fill the cells in the following sequence. First we fill the cells ,,,, since they are the only cells to fill in the columns. After filling the specified cells, fill the cell, since it is the only one to fill in the row . Having filled in this cell (Table 2.16), we exclude the line from consideration . Then there is only one cell left in the column to fill. This is a cage , which we fill out. After filling the cells, we set redundant and insufficient lines (Table 11). As can be seen from Table 11, there is still an undistributed balance. Consequently, a conditionally optimal plan for the problem has been obtained and we need to move to a new table. To do this, for each of the columns we find the differences between the number written in the circle of this column and the smallest number in relation to it, located in the redundant rows (Table 11). Among these differences, the smallest is . This is intermediate rent. Let's move on to a new table (Table 12).