Modeling Algorithm (i)--linear programming

Source: Internet
Author: User

First, solve the problem

Mainly arranges the existing resources (certain), obtains the best benefit the problem solves, moreover the restriction condition is linear.

Second, the mathematical model

1. General mathematical model

2. Matlab mathematical model

Where c,x are column vectors, A,aeq is a suitable matrix, and b,beq is the appropriate column vector. Then lb and UB are lower and on-line (But note = =,lb is the name of a variable)

Three, the solution of correlation equation

1, graphic method, draw a feasible domain, this can be programmed to achieve,

2, directly using the relevant methods of MATLAB to solve problems,

[X,fval]=linprog (C,a,b,aeq,beq,lb,ub,xo,options)

Where FVal returns the value of the target function, then x is the corresponding value of x when it returns to FVal, then the LB and UB are the upper and lower bounds of the corresponding x (which can be omitted), x0 is the initial value of x (can be ignored temporarily)

Options are control parameters.

Iv. some other issues are converted into linear programming

1, the absolute sum of the smallest

Here we can make, to be satisfied, and this problem becomes

2, two number of the absolute value of the difference, when Xi fixed, get Max, and then to set Yi

If we take it, we can change the problem.

Some practical problems that can be solved by some linear programming

1, the productivity is limited, the request obtains the maximum benefit

2. Transportation problems (sales and marketing issues)

Minimum shipping cost required

Here we need to remember that there is a very important equation, that is, all the origin sent out is equal to all the sales received

3. Assignment issues

Requires the shortest working hours

(2) The Hungarian algorithm for solving assignment problems,

First, we need to know that with the coefficient matrix C by such a property, at the same time each row (column) plus or minus the same number, the resulting new matrix and the original matrix assignment problem has the same optimal assignment.

The general steps are:

A, each row of each column to eliminate the smallest number, so that the emergence of n (the same size as the matrix) in different rows of different columns of 0 elements, selected is the optimal solution.

b, if the previous step is not able to directly complete, then,

4. Duality theory (compared with inverse function)

The most important thing is to master its nature, which can be used to test whether the optimal solution,

5. Return and risk of investment (how the main multi-objective function functions as an objective function)

The next step is to set up the variables (this is a key point in the mathematical modeling, you choose the good indicator, the equation is good solution, otherwise ...) )

Then there is the inclusion of the qualification, some idealized assumptions

Then write the equation.

The first objective function is the profit, the second is the risk.

The next step is to simplify the objective function

(1) Fixed risk level, optimize income

(2) Fixed profit level, minimizing risk

(3) Consider at the same time two, such words need to add a weight s.

Modeling Algorithm (i)--linear programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.