title: GenSA optimization with 2 unknowns
body: <p>I'm still relatively new to R and stuck on an optimization problem. I have a rather general question here. I am trying to minimize a function, something like</p>
  
  <blockquote>
    <p><code>function(a,b){2*a^2+b},</code></p>
  </blockquote>
  
  <p>with two unknowns using the GenSA function. Whenever I try running it, it tells me that it couldn't find b. Now I'm wondering if it is even possible to use GenSA with 2 unknowns or if a different function would be better suited? It would be great if someone had an idea!</p>
  
  <p>The code I'm using for the GenSa function Looks something like this by the way (tried it with a vector too, but didn't work either):</p>
  
  <pre><code>&gt; library(GenSA)
  &gt; 
  &gt; minim&lt;-function(a,b){2*a^2+b}
  &gt; 
  &gt; dimension &lt;- 30
  
  &gt; global.min &lt;- 0 
  &gt; tol &lt;- 1e-15
  &gt; 
  &gt; lower &lt;- rep(0, dimension)
  &gt; 
  &gt; upper &lt;- rep(30, dimension)
  &gt; 
  &gt; 
  &gt; out &lt;- GenSA(lower = lower, upper = upper, fn = minim,
  &gt; control=list(threshold.stop=global.min+tol,verbose=TRUE))
  &gt; 
  &gt; out[c("value","par","counts")]
  </code></pre>