Lower and upper bounds in optimization technique

26 ビュー (過去 30 日間)
tahseen alshmary
tahseen alshmary 2021 年 10 月 6 日
コメント済み: Star Strider 2021 年 10 月 7 日
Dear all
I have 28 variables, I want to put 14 variables with (lower bound (lb) and upper bound(ub)) and the 14 other without (lower bound (lb) and upper bound(ub))... How can I do that?
thank you in advance.
  8 件のコメント
tahseen alshmary
tahseen alshmary 2021 年 10 月 7 日
Thank you so much
Star Strider
Star Strider 2021 年 10 月 7 日
As always, my pleasure!
.

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2021 年 10 月 6 日
Create appropriate vectors for each bound. Specify the bounds for the parameters that have bounds, and +Inf and -Inf for those allowed to vary without bound.
.
  4 件のコメント
tahseen alshmary
tahseen alshmary 2021 年 10 月 6 日
If I want to write the bounded variable as below
lb = 0.05 * (1,14)
ub = 1 * (1,14)
so how can I write the 14 other bound
Star Strider
Star Strider 2021 年 10 月 6 日
First, it is not possible to use parentheses to create the vector. It is necessary to use square brackets to concatenate the elements of the vector into a single expression.
The correct way to write those would be something like this —
lb = 0.05 * ones(1,14)
lb = 1×14
0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500
ub = ones(1,14)
ub = 1×14
1 1 1 1 1 1 1 1 1 1 1 1 1 1
If the other 14 are not bounded:
lb = [0.05 * ones(1,14) -Inf(1,14)]
lb = 1×28
0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 0.0500 -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
ub = [ones(1,14) Inf(1,14)]
ub = 1×28
1 1 1 1 1 1 1 1 1 1 1 1 1 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
However if they have specific bounds that could not be defined by multiples of ones, additions to zeros, or something else, they would have to be entered individually, as I demonstrated earlier.
Also, optimising 28 parameters could be difficult.
.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by