# Minimise() in IntervalOptimisation does not accept keyword arguments

**URL:** <https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678>\
**Category:** Optimization (Mathematical)\
**Created:** [June 26, 2019, 5:34am UTC](https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678 "2019-06-26T05:34:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bocc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bocc/32/7546_2.png) [@bocc](https://discourse.julialang.org/u/bocc)\
**Post date:** [June 26, 2019, 5:34am UTC](https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678/1 "2019-06-26T05:34:06Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)\
**Post date:** [June 26, 2019, 6:06am UTC](https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678/2 "2019-06-26T06:06:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [June 26, 2019, 6:15am UTC](https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678/3 "2019-06-26T06:15:47Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bocc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bocc/32/7546_2.png) [@bocc](https://discourse.julialang.org/u/bocc)\
**Post date:** [June 26, 2019, 6:47am UTC](https://discourse.julialang.org/t/minimise-in-intervaloptimisation-does-not-accept-keyword-arguments/25678/4 "2019-06-26T06:47:41Z")

</div>

It works as you suggested, thank you!
