Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::problem< Data > Class Template Reference

#include <problem.hpp>

Detailed Description

template<typename Data>
class Feel::problem< Data >

Optimization problem specifications.

Author
Ivan Oliveira and Christophe Prud'homme

Inherits Data.

Classes

class  value
 compute the value of the functionals, equalities and inequalities associated with the problem More...
 

Public Types

enum  {
  _E_n = Data::_E_n,
  _E_f = 1,
  _E_g = Data::_E_g,
  _E_h = Data::_E_h,
  _E_nA = _E_n + ( _E_n )*( _E_n-1 )/2,
  _E_nL = 2*_E_n,
  _E_nAL = _E_nL + ( _E_nL )*( _E_nL-1 )/2
}
 
typedef super::ad_0_type ad_0_type
 automatic differentiation type of order one
 
typedef super::ad_1_type ad_1_type
 automatic differentiation type of order one
 
typedef super::ad_2_type ad_2_type
 automatic differentiation type of order two
 
typedef Data data_type
 
typedef functional< Data > f_type
 
typedef IF< _E_g!=0,
inequalities< Data >
, dummy_data< 0 > >::Result 
g_type
 
typedef IF< _E_h!=0,
equalities< Data >, dummy_data
< 1 > >::Result 
h_type
 
typedef ublas::matrix< double > matrix_type
 
typedef problem< Data > problem_type
 
typedef Data super
 super class for the problem. More...
 
typedef
ublas::symmetric_matrix
< double, ublas::upper > 
symmetric_matrix_type
 matrix type
 
typedef
super::ad_0_type::value_type 
value_type
 numerical type
 
typedef ublas::vector< double > vector_type
 vector type
 

Public Member Functions

void copy_x0_to_x (vector_type &_x)
 copy initialization x0 into x
 
void copy_x_to_x0 (vector_type const &_x)
 copy x to initialization x0
 
void custom_initialize_x0 (vector_type &__custom)
 use custom starting point
 
template<typename Defs >
void define_problem (Defs)
 define the bounds of the problem
 
vector_type distanceToLowerBounds (vector_type const &__x) const
 
vector_type distanceToUpperBounds (vector_type const &__x) const
 
template<int Order, typename Type >
void evaluate (vector_type const &__x, Type &__fx, diff_order< Order >) const
 evaluate components of the problem Type can be #) the objective functions #) the inequality contraints #) the equality contraints
 
void initialize_x0 ()
 initialize the starting point x0
 
bool isOn (int __i) const
 
vector_type const & lowerBounds () const
 
int n () const
 
int nA () const
 
void print (vector_type const &_x) const
 prints current value of x
 
void print_bound_constraints () const
 
void print_complete (std::string const &, vector_type const &_x) const
 
void print_complete (vector_type const &_x, vector_type const &_s) const
 
void print_stationary_x (vector_type const &_x, vector_type const &_lambda_l, vector_type const &_lambda_u) const
 
void print_stationaryN_x (vector_type const &_x, vector_type const &_s, vector_type const &_lambda_h, vector_type const &_lambda_g) const
 
 problem ()
 default constructor: initialize with infinite bounds
 
 problem (value_type x_definitions[_E_n][3])
 define specific bounds for each control variable
 
 problem (problem< Data > const &p)
 
 problem (Data const &p)
 
vector_type const & upperBounds () const
 
value_type x_l (unsigned int i) const
 
value_type x_u (unsigned int i) const
 
 ~problem ()
 destructor
 

Member Typedef Documentation

template<typename Data>
Data Feel::problem< Data >::super

super class for the problem.

This type defines the cost functional and eventually the constraints(inequalities and equalities)

Member Enumeration Documentation

template<typename Data>
anonymous enum
Enumerator
_E_n 

number of control variables

_E_f 

number of objective functions

_E_g 

number of inequality constraints

_E_h 

number of equality constraints

_E_nA 

size of the matrix

_E_nL 

number of multiplers

_E_nAL 

size of the multipliers matrix

Member Function Documentation

template<typename Data>
bool Feel::problem< Data >::isOn ( int  __i) const
inline

test if __x_definitions is on

Returns
true if greater in absolute value to _S_on_flag, false otherwise
template<typename Data>
int Feel::problem< Data >::n ( ) const
inline
Returns
number of control variables which are on

References Feel::problem< Data >::_E_n.

template<typename Data>
int Feel::problem< Data >::nA ( ) const
inline
Returns
size of the matrix

References Feel::problem< Data >::_E_nA.

template<typename Data>
value_type Feel::problem< Data >::x_l ( unsigned int  i) const
inline
Returns
lower bound of control variable i
template<typename Data>
value_type Feel::problem< Data >::x_u ( unsigned int  i) const
inline
Returns
upper bound of control variable i

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

Generated on Sun Oct 20 2013 08:25:09 for Feel++ by doxygen 1.8.4