- addEqualityConstraint
void addEqualityConstraint(T fc, U fc_data, double tol)
void addEqualityConstraint(T fc)
- addEqualityMConstraint
void addEqualityMConstraint(uint m, T fc, U fc_data, V tol)
void addEqualityMConstraint(uint m, T fc, U fc_data)
void addEqualityMConstraint(uint m, T fc)
Add multiple equality constraints
- addInequalityConstraint
void addInequalityConstraint(T fc, U fc_data, double tol)
Add inequality constraint
- addInequalityConstraint
void addInequalityConstraint(T fc)
Undocumented in source. Be warned that the author may not have intended to support it.
- addInequalityMConstraint
void addInequalityMConstraint(uint m, T fc, U fc_data, V tol)
void addInequalityMConstraint(uint m, T fc, U fc_data)
void addInequalityMConstraint(uint m, T fc)
Add multiple inequality constraints
- addPrecondEqualityConstraint
void addPrecondEqualityConstraint(T fc, U pre, V fc_data, double tol)
Add pre-conditioned equality constraint
- addPrecondEqualityConstraint
void addPrecondEqualityConstraint(T fc, U pre)
Undocumented in source. Be warned that the author may not have intended to support it.
- addPrecondInequalityConstraint
void addPrecondInequalityConstraint(T fc, U pre, V fc_data, double tol)
Add pre-conditioned inequality constraint.
- addPrecondInequalityConstraint
void addPrecondInequalityConstraint(T fc, U pre)
Undocumented in source. Be warned that the author may not have intended to support it.
- copy
auto copy()
Copies an instance of Opt to new instance.
- create
void create(Algorithm algorithm, uint n)
Calls nlopt_create and sets its result to _opt.
- forceStop
void forceStop()
- getAlgorithm
auto getAlgorithm()
- getAlgorithmRaw
auto getAlgorithmRaw()
- getDimension
auto getDimension()
- getFTolAbs
auto getFTolAbs()
Gets the absolute tolerance for objective function f(x).
- getFTolRel
auto getFTolRel()
Gets the relative tolerance for objective function f(x).
- getForceStop
auto getForceStop()
- getInitialStep
void getInitialStep(T x, U dx)
void getInitialStep(double x, double dx)
Gets initial step for derivative-free local optimization algorithms.
- getLowerBounds
void getLowerBounds(T lb)
void getLowerBounds(double lb)
- getMaxeval
auto getMaxeval()
Gets the maximum number of evaluations.
- getMaxtime
auto getMaxtime()
Gets the maximum amount of time spent on optimization.
- getOptRaw
nlopt_opt getOptRaw()
- getPopulation
auto getPopulation()
Get population in stochastic search algorithms.
- getResult
auto getResult()
- getResultRaw
auto getResultRaw()
Gets the raw result value.
- getStopval
auto getStopval()
- getUpperBounds
void getUpperBounds(T ub)
void getUpperBounds(double ub)
- getVectorStorage
auto getVectorStorage()
- getXTolAbs
void getXTolAbs(T tol)
Gets the absolute tolerance for x.
- getXTolRel
auto getXTolRel()
Gets the relative tolerance for x.
- optimize
void optimize(T x, double minf)
- processResult
void processResult(nlopt_result result)
Processes a member of nlopt_result.
- removeEqualityConstraints
void removeEqualityConstraints()
Remove equality constraints
- removeInequalityConstraints
void removeInequalityConstraints()
Remove inequality constraints
- setDefaultInitialStep
void setDefaultInitialStep(T dx)
void setDefaultInitialStep(double dx)
Sets default initial step for derivative-free local optimization
algorithms.
- setFTolAbs
void setFTolAbs(double tol)
Sets the absolute tolerance for objective function f(x).
- setFTolRel
void setFTolRel(double tol)
Sets the relative tolerance for objective function f(x).
- setForceStop
void setForceStop(int val)
- setInitialStep
void setInitialStep(T dx)
void setInitialStep(double dx)
Sets initial step for derivative-free local optimization algorithms.
- setLocalOptimizer
void setLocalOptimizer(nlopt_opt local_opt)
void setLocalOptimizer(Opt local_opt)
From NLopt Reference: "Some of the algorithms, especially MLSL and
AUGLAG, use a different optimization algorithm as a subroutine, typically
for local optimization."
- setLowerBounds
void setLowerBounds(T lb)
void setLowerBounds(double lb)
- setMaxObjective
void setMaxObjective(T f, U f_data)
- setMaxeval
void setMaxeval(int maxeval)
Sets the maximum number of evaluations.
- setMaxtime
void setMaxtime(double maxtime)
Sets the maximum amount of time spent on optimization.
- setMinObjective
void setMinObjective(T f, U f_data)
- setPopulation
void setPopulation(uint pop)
For use in stochastic search algorithms, size of initial population of
random points. Default is that it is chosen heuristically by algorithm.
- setPrecondMaxObjective
void setPrecondMaxObjective(T f, U pre, V f_data)
Set Maximum Objective with Pre-conditioned Hessian
- setPrecondMinObjective
void setPrecondMinObjective(T f, U pre, V f_data)
Set Minimum Objective with Pre-conditioned Hessian
- setStopval
void setStopval(double stopval)
- setUpperBounds
void setUpperBounds(T ub)
void setUpperBounds(double ub)
- setVectorStorage
void setVectorStorage(uint M)
For use with limited-memory algorithms that remember gradients from
previous iterations.
- setXTolAbs
void setXTolAbs(T tol)
void setXTolAbs(double tol)
Sets the absolute tolerance for x.
- setXTolRel
void setXTolRel(double tol)
Sets the relative tolerance for x.
- srand
void srand(uint seed)
Sets the seed for stochastic optimization.
- srandTime
void srandTime()
Re-sets the seed for stochastic optimization back to system time.
Defines an object to interact with nlopt C API.
Equivalent in C API: nlopt_opt