Lower and upper bounds in optimization technique
Mostra commenti meno recenti
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 Commenti
tahseen alshmary
il 7 Ott 2021
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
il 7 Ott 2021
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
il 7 Ott 2021
I was a bit mystified.
The same general idea —
lb = [0.05*ones(1,14) 3*ones(1,14)]
.
tahseen alshmary
il 7 Ott 2021
Star Strider
il 7 Ott 2021
As always, my pleasure!
.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Surrogate Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!