robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::pdipm Namespace Reference

Functions

void setSlackAndDualPositive (const double barrier_param, ConstraintComponentData &data)
 Sets the slack and dual variables positive. More...
 
void computeComplementarySlackness (const double barrier_param, ConstraintComponentData &data)
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
void computeComplementarySlackness (const double barrier_param, ConstraintComponentData &data, const int start, const int size)
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
template<int Size>
void computeComplementarySlackness (const double barrier_param, ConstraintComponentData &data, const int start)
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
double computeComplementarySlackness (const double barrier_param, const double slack, const double dual)
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
void computeCondensingCoeffcient (ConstraintComponentData &data)
 Computes the coefficient of the condensing. More...
 
void computeCondensingCoeffcient (ConstraintComponentData &data, const int start, const int size)
 Computes the coefficient of the condensing. More...
 
template<int Size>
void computeCondensingCoeffcient (ConstraintComponentData &data, const int start)
 Computes the coefficient of the condensing. More...
 
double computeCondensingCoeffcient (const double slack, const double dual, const double residual, const double cmpl)
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
double fractionToBoundarySlack (const double fraction_rate, const ConstraintComponentData &data)
 Applies the fraction-to-boundary-rule to the directions of the slack variables. More...
 
double fractionToBoundaryDual (const double fraction_rate, const ConstraintComponentData &data)
 Applies the fraction-to-boundary-rule to the directions of the dual variables. More...
 
double fractionToBoundary (const int dim, const double fraction_rate, const Eigen::VectorXd &vec, const Eigen::VectorXd &dvec)
 Applies the fraction-to-boundary-rule. More...
 
double fractionToBoundary (const double fraction_rate, const double var, const double dvar)
 Applies the fraction-to-boundary-rule. More...
 
void computeDualDirection (ConstraintComponentData &data)
 Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack. More...
 
void computeDualDirection (ConstraintComponentData &data, const int start, const int size)
 Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack. More...
 
template<int Size>
void computeDualDirection (ConstraintComponentData &data, const int start)
 Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack. More...
 
double computeDualDirection (const double slack, const double dual, const double dslack, const double cmpl)
 Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack. More...
 
template<typename VectorType >
double logBarrier (const double barrier_param, const Eigen::MatrixBase< VectorType > &vec)
 Computes the log barrier function. More...
 

Function Documentation

◆ computeComplementarySlackness() [1/4]

double robotoc::pdipm::computeComplementarySlackness ( const double  barrier_param,
const double  slack,
const double  dual 
)
inline

Computes the residual in the complementarity slackness between
the slack and dual variables.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in]slackAn element of the slack variable.
[in]dualAn element of the dual variable.
Returns
The complementarity slackness between the slack and dual variables.

◆ computeComplementarySlackness() [2/4]

void robotoc::pdipm::computeComplementarySlackness ( const double  barrier_param,
ConstraintComponentData data 
)
inline

Computes the residual in the complementarity slackness between
the slack and dual variables.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in,out]dataConstraint component data.

◆ computeComplementarySlackness() [3/4]

template<int Size>
void robotoc::pdipm::computeComplementarySlackness ( const double  barrier_param,
ConstraintComponentData data,
const int  start 
)
inline

Computes the residual in the complementarity slackness between
the slack and dual variables.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in,out]dataConstraint data.
[in]startStart position of the segment.
Template Parameters
SizeSize of the segment.

◆ computeComplementarySlackness() [4/4]

void robotoc::pdipm::computeComplementarySlackness ( const double  barrier_param,
ConstraintComponentData data,
const int  start,
const int  size 
)
inline

Computes the residual in the complementarity slackness between
the slack and dual variables.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in,out]dataConstraint data.
[in]startStart position of the segment.
[in]sizeSize of the segment.

◆ computeCondensingCoeffcient() [1/4]

double robotoc::pdipm::computeCondensingCoeffcient ( const double  slack,
const double  dual,
const double  residual,
const double  cmpl 
)
inline

Computes the residual in the complementarity slackness between
the slack and dual variables.

Parameters
[in]slackAn element of the slack variable.
[in]dualAn element of the dual variable.
[in]residualAn element of the primal residual.
[in]cmplAn element of the complementarity slackness.
Returns
Coefficient of the condensing.

◆ computeCondensingCoeffcient() [2/4]

void robotoc::pdipm::computeCondensingCoeffcient ( ConstraintComponentData data)
inline

Computes the coefficient of the condensing.

Parameters
[in,out]dataConstraint component data.

◆ computeCondensingCoeffcient() [3/4]

template<int Size>
void robotoc::pdipm::computeCondensingCoeffcient ( ConstraintComponentData data,
const int  start 
)
inline

Computes the coefficient of the condensing.

Parameters
[in,out]dataConstraint data.
[in]startStart position of the segment.
Template Parameters
SizeSize of the segment.

◆ computeCondensingCoeffcient() [4/4]

void robotoc::pdipm::computeCondensingCoeffcient ( ConstraintComponentData data,
const int  start,
const int  size 
)
inline

Computes the coefficient of the condensing.

Parameters
[in,out]dataConstraint data.
[in]startStart position of the segment.
[in]sizeSize of the segment.

◆ computeDualDirection() [1/4]

double robotoc::pdipm::computeDualDirection ( const double  slack,
const double  dual,
const double  dslack,
const double  cmpl 
)
inline

Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack.

Parameters
[in]slackThe slack variable.
[in]dualThe dual variable.
[in]dslackThe direction of the slack variable.
[in]cmplThe complementary slackness.
Returns
The direction of the dual variable.

◆ computeDualDirection() [2/4]

void robotoc::pdipm::computeDualDirection ( ConstraintComponentData data)
inline

Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack.

Parameters
[in,out]dataConstraint component data.

◆ computeDualDirection() [3/4]

template<int Size>
void robotoc::pdipm::computeDualDirection ( ConstraintComponentData data,
const int  start 
)
inline

Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack.

Parameters
[in,out]dataConstraint data.
[in]startStart position of the segment.

◆ computeDualDirection() [4/4]

void robotoc::pdipm::computeDualDirection ( ConstraintComponentData data,
const int  start,
const int  size 
)
inline

Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack.

Parameters
[in,out]dataConstraint data.
[in]startStart position of the segment.
[in]sizeSize of the segment.

◆ fractionToBoundary() [1/2]

double robotoc::pdipm::fractionToBoundary ( const double  fraction_rate,
const double  var,
const double  dvar 
)
inline

Applies the fraction-to-boundary-rule.

Parameters
[in]fraction_rateMust be larger than 0 and smaller than 1. Should be between 0.9 and 0.995.
[in]varA variable.
[in]dvarA direction the variable.
Returns
Fraction-to-boundary of dvec.

◆ fractionToBoundary() [2/2]

double robotoc::pdipm::fractionToBoundary ( const int  dim,
const double  fraction_rate,
const Eigen::VectorXd &  vec,
const Eigen::VectorXd &  dvec 
)
inline

Applies the fraction-to-boundary-rule.

Parameters
[in]dimDimension of vec and dvec.
[in]fraction_rateMust be larger than 0 and smaller than 1. Should be between 0.9 and 0.995.
[in]vecA vector.
[in]dvecA direction vector of vec.
Returns
Fraction-to-boundary of dvec.

◆ fractionToBoundaryDual()

double robotoc::pdipm::fractionToBoundaryDual ( const double  fraction_rate,
const ConstraintComponentData data 
)
inline

Applies the fraction-to-boundary-rule to the directions of the dual variables.

Parameters
[in]fraction_rateMust be larger than 0 and smaller than 1. Should be between 0.9 and 0.995.
[in]dataConstraint component data.
Returns
Fraction-to-boundary of the direction of the dual variables.

◆ fractionToBoundarySlack()

double robotoc::pdipm::fractionToBoundarySlack ( const double  fraction_rate,
const ConstraintComponentData data 
)
inline

Applies the fraction-to-boundary-rule to the directions of the slack variables.

Parameters
[in]fraction_rateMust be larger than 0 and smaller than 1. Should be between 0.9 and 0.995.
[in]dataConstraint component data.
Returns
Fraction-to-boundary of the direction of the slack variables.

◆ logBarrier()

template<typename VectorType >
double robotoc::pdipm::logBarrier ( const double  barrier_param,
const Eigen::MatrixBase< VectorType > &  vec 
)
inline

Computes the log barrier function.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in]vecArgument of the log function. All the components must be positive.
Returns
log barrier function.

◆ setSlackAndDualPositive()

void robotoc::pdipm::setSlackAndDualPositive ( const double  barrier_param,
ConstraintComponentData data 
)
inline

Sets the slack and dual variables positive.

Parameters
[in]barrier_paramBarrier parameter. Must be positive.
[in,out]dataConstraint component data.