Sorry that I misread the instruction of nlo_set_local_optimizer .  I
realized a new integer variable local_opt should be its 3rd argument.

   But I'm still feeling confused about applying AUGLAG. Specifically:
   (1) where should be place nlo_set_local_optimizer? Is it after
specifying upper/lower bounds, objective function, and constraints of the
original maximization problem, and before setting opt and local_opt 's
tolerance?

   (2)  As to the tolerance of opt and local_opt, is it the idea that
local_opt's tolerance should be larger than in opt's tolerance, due to the
fact that Lagaragian of the orginal problem is a linear combination of
objective with some tolerance, and the inequality with some tolerance?

   (3) How should we do the optimize? In the above example, shall we simply

        call nlo_optimize(ires,local_opt,x,maxf_ub)

  without nlo_optimize on opt?


Sorry for a long one... And many thanks:)

Best,
Wenya



On Tue, Sep 1, 2015 at 2:58 PM, Wenya Wang <[email protected]> wrote:

> 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
>



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

Reply via email to