Minimise() in IntervalOptimisation does not accept keyword arguments

Hello All,

I am experimenting a bit with IntervalOptimisation package, and I have run into a problem (I am a Julia noob, please excuse me if the resolution is trivial - I’ve tried to find the answer by myself but couldn’t).

When trying to pass a keyword argument (tol) to the minimise function like this:

using IntervalOptimisation
H(X) = cos(X[1]) * sin(X[2]) - X[1]/(X[2]^2 + 1)
iv = (-1…1) × (-1…1)
minimise(H, iv, tol=1e-6)

Julia says that this function does not accept keyword arguments. I have looked at the source where minimise is declared as such:

function minimise(f, X::T, tol=1e-3) where {T}

To my understanding, regular arguments are separated from keyword ones with a semicolon. I’ve tried replacing the comma after T with a semicolon and rebuilding the package, but the error message remained the same.

Any help is appreciated!

It is not a keyword, it is a positional argument with default value. When omited, it just uses 1e-3.

1 Like

As tomakluftu states, it’s a normal (positional) argument so just leave out the word tol when you call it. Do let us know how you get on with the package!

It works as you suggested, thank you!