Dear NLopt Developers,

        I'm facing an optimization problem (non differentiable on a subset
of domain) that involves nonlinear constraints. For some reason (unknow to
me), the COBYLA is running very slowly. Thus, I'm trying the AGULAG method,
while using the NELDERMEAD simplex as local optimizing algorithm. But, it
seems there are no tutorials in how to use it.

       Here's my attempt (simpliefied to illustrate the structure), which
obviously failed in Fortran with "an invalid memory reference" error.

       opt=0
       call nlo_create(opt,NLOPT_AUGLAG,3)
       call nlo_set_local_optimizer(ires,opt,NLOPT_LN_NELDERMEAD)

       lb(1)=1
       lb(2)=1
       lb(3)=1
       call nlo_set_lower_bounds(ires,opt,lb)
       ub(1)=4
       ub(2)=4
       ub(3)=4
       call nlo_set_lower_bounds(ires,opt,ub)

       call nlo_set_max_objective(ires,opt,vcont,0)
       d1=-3
       call nlo_add_inequality_constraint(ires,opt,posdividend,d1,1.0d-8)
       call nlo_add_inequality_constraint(ires,opt,nnpc,0,1.0d-8)

       call nlo_set_xtol_rel(ires,opt,1.0d-8)

        x(1)=2
        x(2)=2
        x(3)=2

        call nlo_optimize(ires,opt,x,maxf_ub)

        if (ires .lt. 0) then
            write(*,*) 'nlopt for unbounded capital failed!'
        else
            write(*,*) 'found min for unbounded at', x(1),x(2),x(3)
            write(*,*) 'Unbounded capital case: max val=', maxf_ub
        endif

        call nlo_destroy(opt)

       I noticed that reference documentation reminds us: (Don't forget to
set a stopping tolerance for this subsidiary optimizer!). Therefore, I'm
wondering if there's any thing I missed as regard to local optimizer.
Thanks a lot!

Best,
Wenya

-- 
Wenya Wang
PhD Student
Department of Economics,
University of Western Ontario,
London, Ontario, CA
N6A 3K7
_______________________________________________
NLopt-discuss mailing list
NLopt-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to