help-octave
[Top][All Lists]

Re: fmincon and quadprog in octave

 From: Rajiv Bhutani Subject: Re: fmincon and quadprog in octave Date: Mon, 14 Sep 2015 03:35:11 -0400

Hello Olaf,

Thank you for suggesting mailing list!

and pasted it in relevant (I hope I put it in the right directory) directory on my laptop:

D:\octave-4.0.0\share\octave\packages\optim-1.4.1

I notice some discrepancies between MATLAB's quadprog and octave's qp function and octave's quadprog function.

For Example: Consider below
>> H = [6 10; 5 -6];
f = [-2; 3];
A = [];
b = [];

Warning: Your Hessian is not symmetric. Resetting H=(H+H')/2.
Warning: Trust-region-reflective algorithm does not solve this type of problem, using
active-set algorithm. For more help, see Choosing the Algorithm in the documentation.
Warning: Your current settings will run a different algorithm (interior-point-convex) in
a future release.
Exiting: the solution is unbounded and at infinity;
the constraints are not restrictive enough.

ans =

1.0e+16 *

1.2500
-1.0000

ans =

86.638
-180.261

In Octave: >> qp([],H,f)
ans =

86.638
-180.261

Hope either you or someone from the mailing list can comment on what is wrong, and if quadprog function needs to be modified further, since its not giving identical results to MATLAB at least in above example.

Best Regards,
Rajiv Bhutani

On Mon, Sep 14, 2015 at 3:01 AM, Olaf Till wrote:
On Mon, Sep 14, 2015 at 12:55:34AM -0400, Rajiv Bhutani wrote:
> Hello,
>
> I have started work on octave couple days ago and I am trying to locate
> fmincon and quadprog in octave.
>
> I see quadprog is available here and has been recently developed jointly by
> you and Asma.
>
> but it is not available in optim package that got installed on my laptop
> with octave.
>
> Is development work on quadprog still going on? Is that the reason why it
> is not available on sourceforge yet?
>
> Also, can you please tell me a good replacement for fmincon function of
> MATLAB? Is anyone developing fmincon function for octave currently?
> Thank You.
> Best Regards.
> Rajiv Bhutani

Hello Rajiv,

please use the help mailing list (is now in CC).

'quadprog' seems finished and is available in optim, but not yet in a
released version of optim. 'qp' of core Octave is an
alternative. 'fmincon' did not seem to be ready and I heard nothing
new about it from Asma. Maybe I should take a look at it to see if it
can be commited to optim. You can use 'nonlin_min' of optim instead,
which is what 'fmincon' also does, or 'sqp' of core Octave.

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net