1. Linear Programming in Mathematical Modeling

1. Definition
2. Examples
3. Using software and solving problems

1. Definition

1. Linear Programming (LP) is a mathematical optimization technology. As an important branch of operations research, linear programming specializes in how to find an optimal decision under a given set of linear constraints to achieve the goal. The function obtains the maximum or minimum value. Linear programming belongs to the subject field of Operations Research. Operations research is a multidisciplinary science that is dedicated to solving decision-making and optimization problems in practical problems through methods such as mathematics, statistics, and computer science. Linear programming is widely used in decision-making problems in the fields of economics, engineering, production, logistics, etc., such as resource allocation, production planning, investment portfolio, etc.

2. Formal description of linear programming problems

(1) Decision Variables : These are variables that need to be determined in the problem and can be any quantity that can be adjusted to achieve the optimal solution. For example, the quantity of a certain product produced, the amount of investment in a certain asset, etc.
(2) Objective Function : This is a linear function that needs to be maximized or minimized. It represents the goal you want to optimize, which can be cost, profit, output, etc.
(3) Constraints : These are constraints on decision variables, which may involve resource limitations, technical constraints, etc. A constraint is usually a set of linear equations or inequalities.
(4) Non- negativity Constraints : Decision variables usually cannot be negative because they represent quantities or amounts.

3. Mathematical representation

Maximize (or minimize): c₁x₁ + c₂x₂ + … + cₙxₙ

Constraints:
A₁₁x₁ + A₁₂x₂ + … + A₁ₙxₙ ≤ b₁
A₂₁x₁ + A₂₂x₂ + … + A₂ₙxₙ ≤ b₂

Aₘ₁x₁ + Aₘ₂x₂ + … + Aₘ ₙxₙ ≤ bₘ

x₁, x₂, …, xₙ ≥ 0
where, c₁, c₂, …, cₙ are the coefficients of the objective function, x₁, x₂, …, xₙ are the decision variables, Aᵢⱼ is the coefficient in the constraint matrix, and bᵢ is the right-hand value of the constraint .

4. The goal of solving linear programming problems
  is to find the decision variable values ​​that satisfy the constraints so that the objective function obtains the maximum (or minimum) value. Commonly used linear programming solving algorithms include simplex method, interior point method, quadratic cutting plane method, etc.
insert image description here

2. Example questions

Example 1 : A machine tool factory produces two types of machine tools, A and B. The profit after the sale of each machine is 4,000 yuan and 3,000 yuan respectively. The production of machine tool A requires the use of machines A and B, and the processing time is 2 hours and 1 hour for each machine respectively; the production of machine tool B requires the use of machines A, B, and C, and the processing time is one hour for each machine. If the number of machine hours available for processing per day are 10 hours for machine A, 8 hours for machine B, and 7 hours for machine C, how many machine tools A and B should the factory produce in order to maximize the total profit?

insert image description here

3. Using software and solving problems

Example 1 formula is converted into matlab form for solution

insert image description here
insert image description here

(2) The Matlab program for solving is as follows


f=[-2; -3; 5];
a=[-2,5,-1;1,3,1]; b=[-10;12];
aeq=[1,1,1];
beq=7;
[x,y]=linprog(f,a,b,aeq,beq,zeros(3,1));
x, y=-y

Guess you like

Origin blog.csdn.net/qq_55433305/article/details/132347383