Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Specifying custom feasibility tolerance in MATLAB extendedFeatures

19 views
Skip to first unread message

Mark L. Stone

unread,
Dec 31, 2021, 12:42:58 PM12/31/21
to Artelys Knitro forum
I do not understand what the syntax is for use of the extendedFeature fields for AFeasTols, AeqFeasTols, cFeasTols, ceqFeasTols, and xFeasTols to specify custom feasibility tolerances in MATLAB

Let's say I want custom feasibility tolerance of 1e-5 for c (nonlinear inequality) constraints 6:10.
I would set extendedFeatures.cFeasTols = ?

Thanks.

Richard Waltz

unread,
Dec 31, 2021, 1:19:16 PM12/31/21
to kni...@googlegroups.com

Hi,


When using these custom feasibility tolerances through the MATLAB interface you have to specify the full array.  A negative values tells Knitro to use the default tolerance.  So for example, if the dimension of cFeasTols (i.e. the number of nonlinear inequalities) is "m", then you can first initialize the full array to -1 (i.e. default values), and then just set custom values for the indices 6 through 10 as follows:


extendedFeatures.cFeasTols = -1*ones(m,1);

extendedFeatures.cFeasTols(6:10,1) = 1e-5;


One more thing, when setting custom feasibility tolerances through extendedFeatures do not set user options "feastol" or "feastol_abs" through "knitro_options".  It looks like in some instances "feastol"/"feastol_abs" overwrites the custom tolerances in extendedFeatures, which should not happen.  We will investigate and fix this.


Best regards,

-Richard


Richard WALTZ
Senior Scientist
 
Artelys USA
 


From: 'Mark L. Stone' via Artelys Knitro forum <kni...@googlegroups.com>
Sent: Friday, December 31, 2021 11:14:25 AM
To: Artelys Knitro forum
Subject: [Knitro] Specifying custom feasibility tolerance in MATLAB extendedFeatures
 
--
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 on the web visit https://groups.google.com/d/msgid/knitro/a14571e5-548e-416b-a2a6-82296e753356n%40googlegroups.com.

Mark L. Stone

unread,
Dec 31, 2021, 7:54:22 PM12/31/21
to Artelys Knitro forum
Fantastic. Thanks.

Mark L. Stone

unread,
Dec 27, 2024, 4:08:59 PM12/27/24
to Artelys Knitro forum
On Dec 31, 2021 Richard Waltz write "One more thing, when setting custom feasibility tolerances through extendedFeatures do not set user options "feastol" or "feastol_abs" through "knitro_options".  It looks like in some instances "feastol"/"feastol_abs" overwrites the custom tolerances in extendedFeatures, which should not happen.  We will investigate and fix this. "

Has this been fixed? If so, as of which Knitro version? Thanks.

Richard Waltz

unread,
Dec 30, 2024, 12:25:09 PM12/30/24
to kni...@googlegroups.com
Hi Mark,

Unfortunately, it looks like there is still a bug when using the custom feasibility tolerances even in the current Knitro 14.2.  It seems these custom tolerances may not work when the Knitro presolver is enabled (which is the default setting).  This will be fixed for our Knitro 15.0 release due out in the middle of 2025.  In the meantime, the workaround for using the custom feasibility tolerances is to turn the Knitro presolver off (presolve=0).  Another possible workaround is to set "feastol" and "feastol_abs" large (so they are essentially inactive) and then define all the feasibility tolerances (for ALL constraints/variable bounds in your model) using the custom setting.  Sorry for these difficulties.

Regards,
-Richard

From: 'Mark L. Stone' via Artelys Knitro forum <kni...@googlegroups.com>
Sent: Friday, December 27, 2024 11:34 AM
To: Artelys Knitro forum <kni...@googlegroups.com>
Subject: Re: [Knitro] Specifying custom feasibility tolerance in MATLAB extendedFeatures
 
Reply all
Reply to author
Forward
0 new messages