KrisLibrary
1.0.0
|
A structure defining a nonlinear program. More...
#include <NonlinearProgram.h>
Public Member Functions | |
NonlinearProgram (const std::shared_ptr< ScalarFieldFunction > &f, const std::shared_ptr< VectorFieldFunction > &c=NULL, const std::shared_ptr< VectorFieldFunction > &d=NULL) | |
void | PreEval (const Vector &x) |
bool | SatisfiesEquality (const Vector &x, Real tol=Epsilon) |
bool | SatisfiesInequality (const Vector &x) |
Real | Lagrangian (const Vector &x, const Vector &lambda, const Vector &mu) |
Real | LagrangianEval (const Vector &x, const Vector &lambda, const Vector &mu) |
use these if it's faster to evaluate all constraints together | |
void | LagrangianGradient (const Vector &x, const Vector &lambda, const Vector &mu, Vector &grad) |
void | LagrangianHessian (const Vector &x, const Vector &lambda, const Vector &mu, Matrix &H) |
Real | LagrangianEval_Sparse (const Vector &x, const Vector &lambda, const Vector &mu) |
use these if it's faster to evaluate constraints separately | |
void | LagrangianGradient_Sparse (const Vector &x, const Vector &lambda, const Vector &mu, Vector &grad) |
void | LagrangianHessian_Sparse (const Vector &x, const Vector &lambda, const Vector &mu, Matrix &H) |
Public Attributes | |
std::shared_ptr< ScalarFieldFunction > | f |
std::shared_ptr< VectorFieldFunction > | c |
std::shared_ptr< VectorFieldFunction > | d |
bool | minimize |
bool | inequalityLess |
true if f is to be minimized, false if maximized | |
A structure defining a nonlinear program.
This has the structure
min/max f(x)
s.t. c(x)=0
d(x)<?>0
where <?> can be either >= or <= depending on the value of inequalityLess. By default, <= is used.