Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
MAST::NLOptOptimizationInterface Class Reference

Detailed Description

Definition at line 31 of file nlopt_optimization_interface.h.

#include <nlopt_optimization_interface.h>

Inheritance diagram for MAST::NLOptOptimizationInterface:
Collaboration diagram for MAST::NLOptOptimizationInterface:

Public Member Functions

 NLOptOptimizationInterface (nlopt_algorithm alg)
virtual ~NLOptOptimizationInterface ()
void inequality_constraint_evaluation (unsigned m, double *result, unsigned n, const double *x, double *gradient)
 Computes the m inequality constraints and. More...
Real objective_evaluation (unsigned n, const double *x, double *grad)
 Computes and. More...
virtual void optimize ()
- Public Member Functions inherited from MAST::OptimizationInterface
 OptimizationInterface ()
virtual ~OptimizationInterface ()
virtual void attach_function_evaluation_object (MAST::FunctionEvaluation &feval)
virtual void set_integer_parameter (const std::string &nm, int val)
virtual void set_real_parameter (const std::string &nm, Real val)

Protected Attributes

nlopt_algorithm _alg
 NLOpt algorithm to use. More...
unsigned int _iter
- Protected Attributes inherited from MAST::OptimizationInterface

Constructor & Destructor Documentation

◆ NLOptOptimizationInterface()

MAST::NLOptOptimizationInterface::NLOptOptimizationInterface ( nlopt_algorithm  alg)

Definition at line 57 of file nlopt_optimization_interface.cpp.

◆ ~NLOptOptimizationInterface()

virtual MAST::NLOptOptimizationInterface::~NLOptOptimizationInterface ( )

Definition at line 37 of file nlopt_optimization_interface.h.

Member Function Documentation

◆ inequality_constraint_evaluation()

void MAST::NLOptOptimizationInterface::inequality_constraint_evaluation ( unsigned  m,
double *  result,
unsigned  n,
const double *  x,
double *  gradient 

Computes the m inequality constraints and.

them in result for the design variable vector x of size n. If gradient is a non-null vector, then the gradients are calculated and returned in this vector such that $ \partial f_i/\partial x_j$ is stored in grad[i*n + j].

Definition at line 183 of file nlopt_optimization_interface.cpp.

◆ objective_evaluation()

Real MAST::NLOptOptimizationInterface::objective_evaluation ( unsigned  n,
const double *  x,
double *  grad 

Computes and.

the value of the objective function for the specified design variable vector x of dimension n. If grad is non-null then the gradient of the objective function is returned in this vector.

Definition at line 143 of file nlopt_optimization_interface.cpp.

◆ optimize()

void MAST::NLOptOptimizationInterface::optimize ( )

Implements MAST::OptimizationInterface.

Definition at line 66 of file nlopt_optimization_interface.cpp.

Member Data Documentation

◆ _alg

nlopt_algorithm MAST::NLOptOptimizationInterface::_alg

NLOpt algorithm to use.

Definition at line 75 of file nlopt_optimization_interface.h.

◆ _iter

unsigned int MAST::NLOptOptimizationInterface::_iter

Definition at line 70 of file nlopt_optimization_interface.h.

The documentation for this class was generated from the following files: