octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #32008] sqp: Don't set upper/lower bound unles


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #32008] sqp: Don't set upper/lower bound unless specified
Date: Wed, 23 Dec 2020 23:08:59 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Follow-up Comment #14, bug #32008 (project octave):

Attached is an updated version of Julien's patch for the last remaining sqp
item 2. (minor tweak to apply clean. it really only needed some line shifts). 


Looking at what the patch does: it replaces the previous upper and lower bound
definitions of +/-realmax/min with +/-Inf in the main function, and cleans up
the error check for any(lb>ub).

the subfun cf_ub_lb previously eval'd the constraint function and upper and
lower bound for a give x. it had diff codepaths based on whether cifcn was
empty or not. (the previous +/-realmax setting meant ub and lb were never
empty.) Now that either of them could be empty (since Infs produce an empty
globals.ub/lb), it breaks out the evaluation into three separate ifs, and
returns empty when appropriate.

added a couple comments. couldn't find any examples that break it and still
passes input validation and all tests. 

(file #50559, file #50560)
    _______________________________________________________

Additional Item Attachment:

File name: sqp_ublb_update.patch          Size:3 KB
    <https://file.savannah.gnu.org/file/sqp_ublb_update.patch?file_id=50559>

File name: sqp.m                          Size:20 KB
    <https://file.savannah.gnu.org/file/sqp.m?file_id=50560>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?32008>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]