laitimes

Weekly Journal: Mathematical Modeling Learning (7)

Weekly Journal: Mathematical Modeling Learning (7)

Share interests, spread happiness, increase knowledge, and leave a good stay!

Dear you, this is LearningYard.

Today, I bring it to you

【Weekly Diary: Mathematical Modeling Learning (7)】

Welcome to visit!

Share interest, spread happiness, increase knowledge, leave a beautiful!

Dear, this is LearningYard New Academy.

Today, the editor brings you

"Weekly Diary: Learning Mathematical Modeling (7)"

Welcome to your visit!

Weekly Journal: Mathematical Modeling Learning (7)

Basic Principles and Programming Practices of Nonlinear Programming

Nonlinear Programming Fundamentals and Programming Practice

One. Conception.

I. Concept

Definition: A planning problem in which the objective function or constraint contains a nonlinear function

Definition: A planning problem where the objective function or constraint conditions contain nonlinear functions.

Two. instance

II. Example

Investment Decision Questions:

Investment Decision Problem:

Best investment purpose: the minimum investment amount and the maximum total return.

Objective: To minimize the investment amount while maximizing the total return.

Weekly Journal: Mathematical Modeling Learning (7)

bi is the ith income; AI is the ith investment amount; A is the total funding.

bi represents the return of the i-th investment; ai represents the investment amount of the i-th investment; A represents the total capital.

Objective function: Maximize the ratio of total return to total investment.

Objective function: Maximize the ratio of total return to total investment.

Constraints:

Constraint conditions:

  1. The sum of the amount of each investment is less than the total funds.

A. The sum of investment amounts for each investment is less than the total capital.

  1. Restriction is used to restrict Xi to only 0 and 1.

B. A restrictive condition limits Xi to only take values of 0 and 1.

Cons: No consideration of risk

Drawback: Risk is not considered.

Three. Mathematical models of nonlinear programming

III. Mathematical Model of Nonlinear Programming

Weekly Journal: Mathematical Modeling Learning (7)
Weekly Journal: Mathematical Modeling Learning (7)

A*x≤b and Aeq*x=beq are constraints for linear programming.

Ax ≤ b and Aeqx = beq are the constraint conditions of linear programming.

c(x)≤0 is a constraint for nonlinear programming.

c(x) ≤ 0 is the constraint condition for nonlinear programming.

ceq(x)=0 is a constraint for integer programming.

ceq(x) = 0 is the constraint condition for integer programming.

lb≤x≤ub is a restriction on x.

lb ≤ x ≤ ub are the limitations on x.

Weekly Journal: Mathematical Modeling Learning (7)

Among them, it is important to note that:

Note:

fun needs to be defined as a nonlinear function in MATLAB.

fun needs to be defined as a nonlinear function in MATLAB.

nonlcon is a defined nonlinear vector function, the same as c(x)≤0, which needs to be defined with the help of function.

nonlcon is the defined nonlinear vector function, similar to c(x) ≤ 0, which requires function definition using the function keyword.

options一般不用写。

options are generally not necessary to write.

Four. Programming examples

IV. Programming Example

Topic:

Problem Statement:

Weekly Journal: Mathematical Modeling Learning (7)

Steps:

Solution Steps:

Weekly Journal: Mathematical Modeling Learning (7)

fun1(x)是目标函数f(x)

fun1(x) represents the objective function f(x)

sum(x.^2)=x1*x1+x2*x2+x3*x3

x1*x1-x2+x3*x3≥0与x1+x2*x2+x3*x3≤20均需要换成c(x)≤0的形式,为非线性约束条件。

sum(x.^2) = x1x1 + x2x2 + x3x3

x1x1 - x2 + x3x3 ≥ 0 and x1 + x2x2 + x3*x3 ≤ 20 need to be converted into the form of c(x) ≤ 0, which are the nonlinear constraint conditions.

That's all for today's sharing.

If you have a unique take on today's article,

Welcome to leave us a message,

Let's meet tomorrow,

Have a great day!

That's all for today's share.

If you have a unique view of today's article,

Please leave us a message,

Let's meet tomorrow,

Have a nice day!

This article was originally written by LearningYard, if there is any infringement, please contact to delete.

Reference: Bilibili

Translation: Wenxin Yiyan

Read on