Lower and upper bounds in optimization technique
이전 댓글 표시
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
2021년 10월 7일
Almost. It is necessary to supply the function names (and spell the function names correctly), and concatenate them using square brackets [] —
lb = [0.05*ones(1,14) zeros(1,14)]
I assume that the first term is supposed to call the ones function, and I completed this by supplying the right square bracket.
.
tahseen alshmary
2021년 10월 7일
I am not certain that I understand what you want, since ‘not zeroes’ can be anything.
Perhaps substituting Inf in the upper bound or -Inf in the lower bound could do what you want. So for example if you wanted the last three elements of ‘lb’ (in this example) to be -Inf do this —
lb = [0.05*ones(1,14) zeros(1,11) -Inf(1,3)]
.
tahseen alshmary
2021년 10월 7일
I was a bit mystified.
The same general idea —
lb = [0.05*ones(1,14) 3*ones(1,14)]
.
tahseen alshmary
2021년 10월 7일
Star Strider
2021년 10월 7일
As always, my pleasure!
.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surrogate Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!