天天看點

周周記:數學模組化學習(7)

作者:LearningYard學苑
周周記:數學模組化學習(7)

分享興趣,傳播快樂,增長見聞,留下美好!

親愛的您,這裡是LearningYard新學苑。

今天小編給您帶來

【周周記:數學模組化學習(7)】

歡迎您的通路!

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!

周周記:數學模組化學習(7)

非線性規劃基本原理與程式設計實踐

Nonlinear Programming Fundamentals and Programming Practice

一.概念.

I. Concept

定義:目标函數或限制條件中包含非線性函數的規劃問題

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

二.執行個體

II. Example

投資決策問題:

Investment Decision Problem:

最佳投資目的:投資額最小而總收益最大。

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

周周記:數學模組化學習(7)

bi為第i筆的收益;ai為第i筆的投資額;A為總資金。

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.

限制條件:

Constraint conditions:

  1. 每筆投資金額之和小于總資金。

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

  1. 限制條件用于限制Xi隻能取0與1 。

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

缺點:未考慮風險

Drawback: Risk is not considered.

三.非線性規劃的數學模型

III. Mathematical Model of Nonlinear Programming

周周記:數學模組化學習(7)
周周記:數學模組化學習(7)

A*x≤b和Aeq*x=beq是線性規劃的限制條件。

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

c(x)≤0是非線性規劃的限制條件。

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

ceq(x)=0是整數規劃的限制條件。

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

lb≤x≤ub是對x的限制條件。

lb ≤ x ≤ ub are the limitations on x.

周周記:數學模組化學習(7)

其中需要注意的是:

Note:

fun在MATLAB中需要進行非線性函數的定義。

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

nonlcon是定義的非線性向量函數,同c(x)≤0,需要進行函數定義,借助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.

四.程式設計執行個體

IV. Programming Example

題目:

Problem Statement:

周周記:數學模組化學習(7)

解題步驟:

Solution Steps:

周周記:數學模組化學習(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 share.

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

Please leave us a message,

Let's meet tomorrow,

Have a nice day!

本文由LearningYard新學苑原創,如有侵權,請聯系删除。

參考資料:哔哩哔哩

翻譯:文心一言

繼續閱讀