Setting Honor Bounds in the extendedFeatures field in Matlab

9 views
Skip to first unread message

Gaston Illanes

unread,
Dec 9, 2024, 5:36:36 PM12/9/24
to Artelys Knitro forum
Hi,

I have a problem with bound constraints where some bounds must always be honored, while other bounds may be violated. I am trying to pass this information along by writing:

extendedFeatures.HonorBnds = zeros(size(parameters.initial, 1), 1);
extendedFeatures.HonorBnds(end-2:end-1) = 1;

Where the two variables with a 1 would be the variables that have bounds that cannot be violated. Is this the correct syntax?

Thanks!

Richard Waltz

unread,
Dec 10, 2024, 9:32:46 AM12/10/24
to kni...@googlegroups.com
Hi,

Yes, that looks correct.  You can also just force all variables to satisfy their bounds throughout the optimization by setting the option:

   options = knitro_options('honorbnds',1);

and then passing the options structure to your Knitro/MATLAB function.

Regards,
-Richard Waltz


--
You received this message because you are subscribed to the Artelys "Knitro Nonlinear Optimization Solver" google group.
To post to this group, send email to kni...@googlegroups.com
To unsubscribe from this group, send email to knitro-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/knitro?hl=en
Thank You,
Artelys
http://www.artelys.com/en/optimization-tools/knitro
---
You received this message because you are subscribed to the Google Groups "Artelys Knitro forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knitro+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/knitro/c4b88217-9a30-41fb-a574-df1f0512aaa3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages