Lower and upper bounds in optimization technique
조회 수: 7 (최근 30일)
이전 댓글 표시
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
채택된 답변
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
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)
ub = ones(1,14)
If the other 14 are not bounded:
lb = [0.05 * ones(1,14) -Inf(1,14)]
ub = [ones(1,14) Inf(1,14)]
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 Exchange에서 Linear Programming and Mixed-Integer Linear Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!