Thanks for answering. I thought I'd ask as there is no Inf double in C it's 
not clear to me how it would be handled. I'm trying the Subplex algorithm 
instead. Thanks again.

On Monday, 20 October 2014 16:02:52 UTC-4, Steven G. Johnson wrote:
>
>
>
> On Monday, October 20, 2014 2:40:52 PM UTC-4, Gustavo Camilo wrote:
>>
>> I'm wondering if anyone has experience with how NLopt and Julia 
>> interface. Basically I've made my objective function return *Inf* if for 
>> the current parameter choices the value of the objective Does Not Exist or 
>> can't be computed, can Julia's NLopt implementation handle this properly? I 
>> expect this to lead the optimizer to believe that this section of the 
>> domain is not good for optimizing. I'm using the LN_COBYLA algorithm to 
>> optimize.
>>
>
> This is an NLopt question, not really a Julia question.
>
> The answer depends on which algorithm you are using.  If you use any 
> algorithm that "in its heart" computes a derivative, or even assumes 
> continuity, it will not work properly.   e.g. COBYLA works by computing 
> linear approximations of your objective, so this will probably fail 
> horribly if you ever return Inf.  Some of the genetic algorithms should be 
> okay (ISRES, CRS), but that is mostly because they are slow (they don't 
> exploit anything in the objective).
>
> The best approach is to define your optimization parameters so that the 
> domain where your function is computable can be expressed as simple bound 
> constraints (e.g. x ≥ 0), as they are always honored by NLopt.
>

Reply via email to