Module Nlopt
OCaml interface to the NLopt optimization library
val direct : [ `Global ] algorithm
val direct_l : [ `Global | `Ineq ] algorithm
val direct_l_rand : [ `Global ] algorithm
val direct_noscal : [ `Global ] algorithm
val direct_l_noscal : [ `Global ] algorithm
val direct_l_rand_noscal : [ `Global ] algorithm
val orig_direct : [ `Global | `Ineq ] algorithm
val orig_direct_l : [ `Global ] algorithm
val stogo : [ `Global | `Grad ] algorithm
val stogo_rand : [ `Global | `Grad ] algorithm
val lbfgs_nocedal : [ `Local | `Grad ] algorithm
val lbfgs : [ `Local | `Grad ] algorithm
val praxis : [ `Local ] algorithm
val var1 : [ `Local | `Grad ] algorithm
val var2 : [ `Local | `Grad ] algorithm
val tnewton : [ `Local | `Grad ] algorithm
val tnewton_restart : [ `Local | `Grad ] algorithm
val tnewton_precond : [ `Local | `Grad ] algorithm
val tnewton_precond_restart : [ `Local | `Grad ] algorithm
val crs2_lm : [ `Global ] algorithm
val mma : [ `Local | `Grad | `Ineq ] algorithm
val cobyla : [ `Local | `Ineq | `Eq ] algorithm
val newuoa : [ `Local ] algorithm
val newuoa_bound : [ `Local ] algorithm
val neldermead : [ `Local ] algorithm
val sbplx : [ `Local ] algorithm
val bobyqa : [ `Local ] algorithm
val isres : [ `Global | `Ineq | `Eq ] algorithm
val auglag : [ `Subsidiary | `Ineq | `Eq ] algorithm
val auglag_eq : [ `Subsidiary | `Ineq | `Eq ] algorithm
val mlsl : [ `Subsidiary | `Global ] algorithm
val mlsl_lds : [ `Subsidiary | `Global ] algorithm
val slsqp : [ `Local | `Grad | `Ineq | `Eq ] algorithm
val create : 'a algorithm -> int -> 'a t
val set_min_objective : 'a t -> (float array -> float array option -> float) -> unit
val set_max_objective : 'a t -> (float array -> float array option -> float) -> unit
val optimize : 'a t -> float array -> [> `Success | `Stopval_reached | `Stopval_reached | `Ftol_reached | `Xtol_reached | `Maxeval_reached | `Maxtime_reached ] * float array * float
optimize opt x
performs the optimization usingx
as an initial guess (it must be of size get_dimension opt). Returns a triple(result, xopt, fopt)
wherexopt
is the optimzed value andfopt
is the function value at that optimum.- raises Invalid_argument
x
does not match the dimension ofopt
or NLopt returned NLOPT_INVALID_ARGS
- raises Out_of_memory
NLopt returned NLOPT_OUT_OF_MEMORY
- raises Failure
NLopt returned NLOPT_FAILURE
- raises Roundoff_limited
NLopt returned NLOPT_ROUNDOFF_LIMITED
val get_dimension : 'a t -> int
Bound constraints
Nonlinear constraints
Stopping criteria
val set_stopval : 'a t -> float -> unit
val get_stopval : 'a t -> float
val set_ftol_rel : 'a t -> float -> unit
val get_ftol_rel : 'a t -> float
val set_ftol_abs : 'a t -> float -> unit
val get_ftol_abs : 'a t -> float
val set_xtol_rel : 'a t -> float -> unit
val get_xtol_rel : 'a t -> float
val set_xtol_abs : 'a t -> float array -> unit
val get_xtol_abs : 'a t -> float array
val set_maxeval : 'a t -> int -> unit
val get_maxeval : 'a t -> int
val set_maxtime : 'a t -> float -> unit
val get_maxtime : 'a t -> float
Force stop
val force_stop : 'a t -> unit
Local/subsidiary optimization algorithm
Initial step size
Stochastic population
val set_population : 'a t -> int -> unit