Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
NLoptSolver Class Reference

#include <nlopt_solver.h>

List of all members.

Public Member Functions

void EqualityConstraintCost (double *g)
 等式制約条件
void InequalityConstraintCost (double *h)
 不等式制約条件
 NLoptSolver (double *x, const double *x_min, const double *x_max, int(*f)(double *, double *), int(*df)(double *, double *), int(*g)(double *, double *), int(*dg)(double *, double *), int(*h)(double *, double *), int(*dh)(double *, double *), int m_x, int m_g, int m_h, double ftol, double xtol, double eqthre, int max_eval, double max_time, Optimization::NLopt::Algorithm algorithm)
double ObjectiveFunctionCost ()
 評価関数の和を計算する
int Optimize ()
void output_result (int result)
void stop ()
 ~NLoptSolver ()

Static Public Member Functions

static void my_copy (double *in, double *out, int size)
static void my_log (std::string comment)
static void my_log (std::string comment, double val)
static void my_log (std::string comment, double *val, uint cnt)

Public Attributes

double * dfbuf
double * dgbuf
double * dhbuf
double * fbuf
double * gbuf
double * hbuf
double * x

Private Member Functions

void EqualityConstraintGradient (double *dg)
 等式制約条件の勾配
void InequalityConstraintGradient (double *dh)
 不等式制約条件の勾配
void ObjectiveFunctionGradient (double *df)
 評価関数の和の勾配を計算する

Static Private Member Functions

static void EqualityConstraintWrapper (unsigned int m, double *g, unsigned int n, const double *x, double *dg, void *self)
 等式制約条件のラッパー
static void InequalityConstraintWrapper (unsigned int m, double *h, unsigned int n, const double *x, double *dh, void *self)
 不等式制約条件のラッパー
static double ObjectiveFunctionWrapper (unsigned int n, const double *x, double *df, void *self)
 評価関数のラッパー

Private Attributes

nlopt_opt core_solver
int(*)(*) df (double *, double *)
int(*)(*) dg (double *, double *)
int(*)(*) dh (double *, double *)
int(* f )(double *, double *)
unsigned int frequency
 最適化計算の出力頻度
int(* g )(double *, double *)
 等式制約条件
int(* h )(double *, double *)
 不等式制約条件
unsigned int iteration
 最適化計算のイテレーション数
unsigned int m_g
 等式制約条件の次元
unsigned int m_h
 不等式制約条件の次元
unsigned int m_x
unsigned int n_df
 評価関数の勾配の計算回数
unsigned int n_dg
 等式制約条件の勾配の計算回数
unsigned int n_dh
 不等式制約条件の勾配の計算回数
unsigned int n_f
 評価関数の計算回数
unsigned int n_g
 等式制約条件の計算回数
unsigned int n_h
 不等式制約条件の計算回数
nlopt_opt solver

Detailed Description

Definition at line 5 of file nlopt_solver.h.


Constructor & Destructor Documentation

NLoptSolver::NLoptSolver ( double *  x,
const double *  x_min,
const double *  x_max,
int(*)(double *, double *)  f,
int(*)(double *, double *)  df,
int(*)(double *, double *)  g,
int(*)(double *, double *)  dg,
int(*)(double *, double *)  h,
int(*)(double *, double *)  dh,
int  m_x,
int  m_g,
int  m_h,
double  ftol,
double  xtol,
double  eqthre,
int  max_eval,
double  max_time,
Optimization::NLopt::Algorithm  algorithm 
)

Definition at line 8 of file nlopt_solver.cpp.

Definition at line 205 of file nlopt_solver.cpp.


Member Function Documentation

等式制約条件

等式制約条件を縦に並べたベクトルを計算する

Parameters:
[out]g等式制約条件を縦に並べたベクトル

Definition at line 281 of file nlopt_solver.cpp.

void NLoptSolver::EqualityConstraintGradient ( double *  dg) [private]

等式制約条件の勾配

等式制約条件を縦に並べたベクトルの勾配を計算する

Parameters:
[out]dg制約条件を縦に並べたベクトルの勾配

Definition at line 290 of file nlopt_solver.cpp.

void NLoptSolver::EqualityConstraintWrapper ( unsigned int  m,
double *  g,
unsigned int  n,
const double *  x,
double *  dg,
void *  self 
) [static, private]

等式制約条件のラッパー

等式制約条件のラッピング関数

Parameters:
m等式制約条件の次元
g等式制約条件
n変数の次元
x変数
dg勾配ベクトル
selfthisポインタ

Definition at line 261 of file nlopt_solver.cpp.

不等式制約条件

不等式制約条件を縦に並べたベクトルを計算する

Parameters:
[out]h不等式制約条件を縦に並べたベクトル

Definition at line 317 of file nlopt_solver.cpp.

void NLoptSolver::InequalityConstraintGradient ( double *  dh) [private]

不等式制約条件の勾配

不等式制約条件を縦に並べたベクトルの勾配を計算する

Parameters:
[out]dh不等式制約条件を縦に並べたベクトルの勾配

Definition at line 325 of file nlopt_solver.cpp.

void NLoptSolver::InequalityConstraintWrapper ( unsigned int  m,
double *  h,
unsigned int  n,
const double *  x,
double *  dh,
void *  self 
) [static, private]

不等式制約条件のラッパー

不等式制約条件のラッピング関数

Parameters:
m不等式制約条件の次元
h不等式制約条件
n変数の次元
x変数
dh勾配ベクトル
selfthisポインタ

Definition at line 296 of file nlopt_solver.cpp.

static void NLoptSolver::my_copy ( double *  in,
double *  out,
int  size 
) [inline, static]

Definition at line 63 of file nlopt_solver.h.

static void NLoptSolver::my_log ( std::string  comment) [inline, static]

Definition at line 41 of file nlopt_solver.h.

static void NLoptSolver::my_log ( std::string  comment,
double  val 
) [inline, static]

Definition at line 45 of file nlopt_solver.h.

static void NLoptSolver::my_log ( std::string  comment,
double *  val,
uint  cnt 
) [inline, static]

Definition at line 52 of file nlopt_solver.h.

評価関数の和を計算する

Returns:
評価値の和

Definition at line 243 of file nlopt_solver.cpp.

void NLoptSolver::ObjectiveFunctionGradient ( double *  df) [private]

評価関数の和の勾配を計算する

評価関数 評価関数の勾配

Parameters:
[out]df評価関数の和の勾配ベクトル

Definition at line 252 of file nlopt_solver.cpp.

double NLoptSolver::ObjectiveFunctionWrapper ( unsigned int  n,
const double *  x,
double *  df,
void *  self 
) [static, private]

評価関数のラッパー

評価関数のラッピング関数

Parameters:
n変数の次元
x変数
df勾配ベクトル
selfthisポインタ
Returns:
評価値

Definition at line 214 of file nlopt_solver.cpp.

Definition at line 332 of file nlopt_solver.cpp.

void NLoptSolver::output_result ( int  result) [inline]

Definition at line 69 of file nlopt_solver.h.

void NLoptSolver::stop ( ) [inline]

Definition at line 122 of file nlopt_solver.h.


Member Data Documentation

nlopt_opt NLoptSolver::core_solver [private]

Definition at line 128 of file nlopt_solver.h.

int(*)(*) NLoptSolver::df(double *, double *) [private]

Definition at line 130 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

int(*)(*) NLoptSolver::dg(double *, double *) [private]

Definition at line 132 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

int(*)(*) NLoptSolver::dh(double *, double *) [private]

Definition at line 134 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

int(* NLoptSolver::f)(double *, double *) [private]

Definition at line 130 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

unsigned int NLoptSolver::frequency [private]

最適化計算の出力頻度

Definition at line 141 of file nlopt_solver.h.

int(* NLoptSolver::g)(double *, double *) [private]

等式制約条件

Definition at line 132 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

int(* NLoptSolver::h)(double *, double *) [private]

不等式制約条件

Definition at line 134 of file nlopt_solver.h.

Definition at line 37 of file nlopt_solver.h.

unsigned int NLoptSolver::iteration [private]

最適化計算のイテレーション数

Definition at line 143 of file nlopt_solver.h.

unsigned int NLoptSolver::m_g [private]

等式制約条件の次元

Definition at line 137 of file nlopt_solver.h.

unsigned int NLoptSolver::m_h [private]

不等式制約条件の次元

Definition at line 139 of file nlopt_solver.h.

unsigned int NLoptSolver::m_x [private]

Definition at line 135 of file nlopt_solver.h.

unsigned int NLoptSolver::n_df [private]

評価関数の勾配の計算回数

Definition at line 147 of file nlopt_solver.h.

unsigned int NLoptSolver::n_dg [private]

等式制約条件の勾配の計算回数

Definition at line 151 of file nlopt_solver.h.

unsigned int NLoptSolver::n_dh [private]

不等式制約条件の勾配の計算回数

Definition at line 155 of file nlopt_solver.h.

unsigned int NLoptSolver::n_f [private]

評価関数の計算回数

Definition at line 145 of file nlopt_solver.h.

unsigned int NLoptSolver::n_g [private]

等式制約条件の計算回数

Definition at line 149 of file nlopt_solver.h.

unsigned int NLoptSolver::n_h [private]

不等式制約条件の計算回数

Definition at line 153 of file nlopt_solver.h.

nlopt_opt NLoptSolver::solver [private]

Definition at line 127 of file nlopt_solver.h.

double * NLoptSolver::x

Definition at line 37 of file nlopt_solver.h.


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


eus_nlopt
Author(s):
autogenerated on Wed Sep 16 2015 04:37:02