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

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

[Octave-bug-tracker] [bug #59051] [octave forge] (optim) "quadprog" fail


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59051] [octave forge] (optim) "quadprog" fails due to changed signature of "__qp__"
Date: Tue, 1 Sep 2020 11:30:59 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.41

URL:
  <https://savannah.gnu.org/bugs/?59051>

                 Summary: [octave forge] (optim) "quadprog" fails due to
changed signature of "__qp__"
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Tue 01 Sep 2020 05:30:57 PM CEST
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.0.90
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

Call "quadprog" fails because the function signature of the internal function
"__qp__" has changed in Octave 6. The new signature also expects a 9th
argument "rtol".

I'm not sure how to ask for the function signature of a built-in function.
´nargin("quadprog")´ won't work.
The following change works for me. But maybe there is a better solution:

--- "a/quadprog.m"      
+++ "b/quadprog.m"      
@@ -349,8 +349,13 @@ function varargout = quadprog (H, f, varargin)
   if (exitflag == 0)
     ## The initial (or computed) guess is feasible.
     ## We call the solver.
-    [x, qp_lambda, exitflag, iter] = ...
-    __qp__ (x0, H, f, Aeq, beq, Ain, bin, maxit);
+    try
+      [x, qp_lambda, exitflag, iter] = ...
+        __qp__ (x0, H, f, Aeq, beq, Ain, bin, maxit, rtol);
+    catch
+      [x, qp_lambda, exitflag, iter] = ...
+        __qp__ (x0, H, f, Aeq, beq, Ain, bin, maxit);
+    end_try_catch
 
   else
     iter = 0;






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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