Lower and upper bounds in optimization technique
Afficher commentaires plus anciens
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 commentaires
tahseen alshmary
le 7 Oct 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
le 7 Oct 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
le 7 Oct 2021
I was a bit mystified.
The same general idea —
lb = [0.05*ones(1,14) 3*ones(1,14)]
.
tahseen alshmary
le 7 Oct 2021
Star Strider
le 7 Oct 2021
As always, my pleasure!
.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surrogate Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!