OptimOptions not implemented in Octave Error

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

OptimOptions not implemented in Octave Error

Farzadtb
Hi All

I am in the process of immigrating my code from matlab to Octave. 

I get this error despite having installed and loaded the package optim.

Error: 'optimoptions' undefined near line 157 column 19

I used optimoptions in my code with many settings like MaxIter, iter.funevals ,etc

but it seems that it does not work in OCTAVE.

--
SeyedFarzad Torabi
Master of Mech. Eng.
Politecnico Di Milano

Virus-free. www.avast.com


Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

mmuetzel
Am 23. Oktober 2019 um 10:24 Uhr schrieb "Farzad Torabi":

> Hi All

> I am in the process of immigrating my code from matlab to Octave. 

> I get this error despite having installed and loaded the package optim.

> Error: 'optimoptions' undefined near line 157 column 19

> I used optimoptions in my code with many settings like MaxIter, iter.funevals ,etc

> but it seems that it does not work in OCTAVE.--

The function "optimoptions" is part of the optimization package. But according to [1] it is not implemented yet in Octave.
Maybe you can work around this by using the core function "optimset".
Or maybe you can help improve the optimization package by contributing a compatible implementation.

Markus

[1]: https://wiki.octave.org/Optimization_package



Reply | Threaded
Open this post in threaded view
|

OptimOptions not implemented in Octave Error

Farzadtb
What programming language do I need to know to contribute? 

Il mer 23 ott 2019, 13:04 "Markus Mützel" <[hidden email]> ha scritto:
Am 23. Oktober 2019 um 10:24 Uhr schrieb "Farzad Torabi":
> Hi All

> I am in the process of immigrating my code from matlab to Octave. 

> I get this error despite having installed and loaded the package optim.

> Error: 'optimoptions' undefined near line 157 column 19

> I used optimoptions in my code with many settings like MaxIter, iter.funevals ,etc

> but it seems that it does not work in OCTAVE.--

The function "optimoptions" is part of the optimization package. But according to [1] it is not implemented yet in Octave.
Maybe you can work around this by using the core function "optimset".
Or maybe you can help improve the optimization package by contributing a compatible implementation.

Markus

[1]: https://wiki.octave.org/Optimization_package



Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

mmuetzel
Am 23. Oktober 2019 um 13:35 Uhr schrieb "Farzad Torabi":
> What programming language do I need to know to contribute?  

Most functions in Octave packages are written in Octave language (which is very similar to Matlab).

Markus

> Il mer 23 ott 2019, 13:04 "Markus Mützel" <[hidden email][mailto:[hidden email]]> ha scritto:
> > Am 23. Oktober 2019 um 10:24 Uhr schrieb "Farzad Torabi":
> > > Hi All
> > > 
> > > I am in the process of immigrating my code from matlab to Octave. 
> > > 
> > > I get this error despite having installed and loaded the package optim.
> > > 
> > > Error: 'optimoptions' undefined near line 157 column 19
> > > 
> > > I used optimoptions in my code with many settings like MaxIter, iter.funevals ,etc
> > > 
> > > but it seems that it does not work in OCTAVE.--
> >
> > The function "optimoptions" is part of the optimization package. But according to [1] it is not implemented yet in Octave.
> > Maybe you can work around this by using the core function "optimset".
> > Or maybe you can help improve the optimization package by contributing a compatible implementation.
> >
> > Markus
> >
> > [1]: https://wiki.octave.org/Optimization_package[https://wiki.octave.org/Optimization_package]
 


Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

nrjank
In reply to this post by mmuetzel
> Maybe you can work around this by using the core function "optimset".

that wiki also lists optimset as not yet implemented.  is that not correct?


Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

mmuetzel
Am 23. Oktober 2019 um 15:39 Uhr schrieb "Nicholas Jankowski":
> > Maybe you can work around this by using the core function "optimset".
>
> that wiki also lists optimset as not yet implemented.  is that not correct?

There is a function "optimset" in core Octave.
Maybe the optimization package plans to overload that function? Or the wiki page is out-dated?
Probably one of the package maintainers could help clearing this up.

Markus



Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

Olaf Till-2
On Wed, Oct 23, 2019 at 04:26:11PM +0200, "Markus Mützel" wrote:
> Am 23. Oktober 2019 um 15:39 Uhr schrieb "Nicholas Jankowski":
> > > Maybe you can work around this by using the core function "optimset".
> >
> > that wiki also lists optimset as not yet implemented.  is that not correct?
>
> There is a function "optimset" in core Octave.
> Maybe the optimization package plans to overload that function? Or
> the wiki page is out-dated?

There are no plans to overload this function. The wiki page is not
maintained by the maintainer of 'optim' (which is the name of the
Octave package, not 'optimization'). Up-to-date information should be
available at:

https://octave.sourceforge.io/optim/package_doc/

Olaf

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



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

Farzadtb
Olaf

Why would you call importing all the matlab functionality overloading it? 

Shall you say why it would be unnecessary? 


Il mer 23 ott 2019, 20:27 Olaf Till <[hidden email]> ha scritto:
On Wed, Oct 23, 2019 at 04:26:11PM +0200, "Markus Mützel" wrote:
> Am 23. Oktober 2019 um 15:39 Uhr schrieb "Nicholas Jankowski":
> > > Maybe you can work around this by using the core function "optimset".
> >
> > that wiki also lists optimset as not yet implemented.  is that not correct?
>
> There is a function "optimset" in core Octave.
> Maybe the optimization package plans to overload that function? Or
> the wiki page is out-dated?

There are no plans to overload this function. The wiki page is not
maintained by the maintainer of 'optim' (which is the name of the
Octave package, not 'optimization'). Up-to-date information should be
available at:

https://octave.sourceforge.io/optim/package_doc/

Olaf

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


Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

mmuetzel
Am 23. Oktober 2019 um 21:28 Uhr schrieb "Farzad Torabi":
> Olaf

> Why would you call importing all the matlab functionality overloading it? 
>  
> Shall you say why it would be unnecessary? 

I don't think Olaf believes that adding new functions to the optim package would put a burden on the package.
We were merely talking about the concept of overloading functions, see:
https://en.wikipedia.org/wiki/Function_overloading

Markus



Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

Farzadtb
Understood.

So are developing the other functions like iter, jacobian, etc under optim set in plan? 

Il mer 23 ott 2019, 22:54 "Markus Mützel" <[hidden email]> ha scritto:
Am 23. Oktober 2019 um 21:28 Uhr schrieb "Farzad Torabi":
> Olaf

> Why would you call importing all the matlab functionality overloading it? 
>  
> Shall you say why it would be unnecessary? 

I don't think Olaf believes that adding new functions to the optim package would put a burden on the package.
We were merely talking about the concept of overloading functions, see:
https://en.wikipedia.org/wiki/Function_overloading

Markus



Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

Farzadtb
In reply to this post by mmuetzel
Let's make the question simple, are all the facilities of MATLAB , in case the Solver fails , feasible or any alternative in Octave available ?


Virus-free. www.avast.com

On Wed, Oct 23, 2019 at 10:54 PM "Markus Mützel" <[hidden email]> wrote:
Am 23. Oktober 2019 um 21:28 Uhr schrieb "Farzad Torabi":
> Olaf

> Why would you call importing all the matlab functionality overloading it? 
>  
> Shall you say why it would be unnecessary? 

I don't think Olaf believes that adding new functions to the optim package would put a burden on the package.
We were merely talking about the concept of overloading functions, see:
https://en.wikipedia.org/wiki/Function_overloading

Markus



--
SeyedFarzad Torabi
Master of Mech. Eng.
Politecnico Di Milano


Reply | Threaded
Open this post in threaded view
|

Re: OptimOptions not implemented in Octave Error

Octave - General mailing list
On 10/24/19 5:07 PM, Farzad Torabi wrote:
Let's make the question simple, are all the facilities of MATLAB , in case the Solver fails , feasible or any alternative in Octave available ?

OK, and the simple answer is that there are facilities of Matlab solvers that are not available in Octave.

I suppose this is not a very satisfying answer, though. In your original message you mentioned specific settings you use (MaxIter, iter.funevals). In the current optimset() there are the following optimization options:

AutoScaling
  ComplexEqn
  Display
  FinDiffType
  FunValCheck
  GradObj
  Jacobian
  MaxFunEvals
  MaxIter
  OutputFcn
  TolFun
  TolX
  TypicalX
  Updating

You need to look at your code and decide which ones are essential. Maybe a productive approach would be for you to define a compatiblity function optimoptions() that would drop parameters non-existent in Octave, and pass on the implemented ones like MaxIter. If your code still works and returns results, you're golden. If not, please report here and maybe someone will be able to come up with a workaround.