robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::JointAccelerationLowerLimit Class Referencefinal

Constraint on the lower limits of the joint acceleration. More...

#include <joint_acceleration_lower_limit.hpp>

Inheritance diagram for robotoc::JointAccelerationLowerLimit:
Collaboration diagram for robotoc::JointAccelerationLowerLimit:

Public Member Functions

 JointAccelerationLowerLimit (const Robot &robot, const Eigen::VectorXd &amin)
 Constructor. More...
 
 JointAccelerationLowerLimit ()
 Default constructor. More...
 
 ~JointAccelerationLowerLimit ()
 Destructor. More...
 
 JointAccelerationLowerLimit (const JointAccelerationLowerLimit &)=default
 Default copy constructor. More...
 
JointAccelerationLowerLimitoperator= (const JointAccelerationLowerLimit &)=default
 Default copy operator. More...
 
 JointAccelerationLowerLimit (JointAccelerationLowerLimit &&) noexcept=default
 Default move constructor. More...
 
JointAccelerationLowerLimitoperator= (JointAccelerationLowerLimit &&) noexcept=default
 Default move assign operator. More...
 
KinematicsLevel kinematicsLevel () const override
 Checks the kinematics level of the constraint component. More...
 
void allocateExtraData (ConstraintComponentData &data) const override
 Allocates extra data in ConstraintComponentData. More...
 
bool isFeasible (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const override
 Checks whether the current solution s is feasible or not. More...
 
void setSlack (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const override
 Sets the slack variables of each constraint components. More...
 
void evalConstraint (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const override
 Computes the primal residual, residual in the complementary slackness, and the log-barrier function of the slack varible. More...
 
void evalDerivatives (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s, SplitKKTResidual &kkt_residual) const override
 Computes the derivatives of the priaml residual, i.e., the Jacobian of the inequality constraint, and add the product of the Jacobian and the dual variable to the KKT residual. This function is always called just after evalConstraint(). More...
 
void condenseSlackAndDual (const ContactStatus &contact_status, ConstraintComponentData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const override
 Condenses the slack and dual variables, i.e., factorizes the
condensed Hessians and KKT residuals. This function is always called just after evalDerivatives(). More...
 
void expandSlackAndDual (const ContactStatus &contact_status, ConstraintComponentData &data, const SplitDirection &d) const override
 Expands the slack and dual, i.e., computes the directions of the slack and dual variables from the directions of the primal variables. More...
 
int dimc () const override
 Returns the size of the constraint. More...
 
- Public Member Functions inherited from robotoc::ConstraintComponentBase
 ConstraintComponentBase (const double barrier_param=1.0e-03, const double fraction_to_boundary_rule=0.995)
 Constructor. More...
 
virtual ~ConstraintComponentBase ()
 Destructor. More...
 
 ConstraintComponentBase (const ConstraintComponentBase &)=default
 Default copy constructor. More...
 
ConstraintComponentBaseoperator= (const ConstraintComponentBase &)=default
 Default copy operator. More...
 
 ConstraintComponentBase (ConstraintComponentBase &&) noexcept=default
 Default move constructor. More...
 
ConstraintComponentBaseoperator= (ConstraintComponentBase &&) noexcept=default
 Default move assign operator. More...
 
virtual KinematicsLevel kinematicsLevel () const =0
 Checks the kinematics level of the constraint component. More...
 
virtual void allocateExtraData (ConstraintComponentData &data) const =0
 Allocates extra data in ConstraintComponentData. More...
 
virtual bool isFeasible (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const =0
 Checks whether the current solution s is feasible or not. More...
 
virtual void setSlack (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const =0
 Sets the slack variables of each constraint components. More...
 
virtual void evalConstraint (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s) const =0
 Computes the primal residual, residual in the complementary slackness, and the log-barrier function of the slack varible. More...
 
virtual void evalDerivatives (Robot &robot, const ContactStatus &contact_status, ConstraintComponentData &data, const SplitSolution &s, SplitKKTResidual &kkt_residual) const =0
 Computes the derivatives of the priaml residual, i.e., the Jacobian of the inequality constraint, and add the product of the Jacobian and the dual variable to the KKT residual. This function is always called just after evalConstraint(). More...
 
virtual void condenseSlackAndDual (const ContactStatus &contact_status, ConstraintComponentData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const =0
 Condenses the slack and dual variables, i.e., factorizes the
condensed Hessians and KKT residuals. This function is always called just after evalDerivatives(). More...
 
virtual void expandSlackAndDual (const ContactStatus &contact_status, ConstraintComponentData &data, const SplitDirection &d) const =0
 Expands the slack and dual, i.e., computes the directions of the slack and dual variables from the directions of the primal variables. More...
 
virtual int dimc () const =0
 Returns the size of the constraint. More...
 
void setSlackAndDualPositive (ConstraintComponentData &data) const
 Sets the slack and dual variables positive. More...
 
double maxSlackStepSize (const ConstraintComponentData &data) const
 Computes and returns the maximum step size by applying fraction-to-boundary-rule to the direction of the slack variable. More...
 
double maxDualStepSize (const ConstraintComponentData &data) const
 Computes and returns the maximum step size by applying fraction-to-boundary-rule to the direction of the dual variable. More...
 
virtual double getBarrierParam () const final
 Gets the barrier parameter. More...
 
virtual double getFractionToBoundaryRule () const final
 Gets the margin parameter of the fraction-to-boundary-rule. More...
 
virtual void setBarrierParam (const double barrier_param) final
 Sets the barrier parameter. More...
 
virtual void setFractionToBoundaryRule (const double fraction_to_boundary_rule) final
 Sets the margin parameter of the fraction-to-boundary-rule. More...
 
template<typename Derived >
std::shared_ptr< Derived > as_shared_ptr ()
 Gets the shared ptr of this object as the specified type. If this fails in dynamic casting, throws an exception. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from robotoc::ConstraintComponentBase
static void updateSlack (ConstraintComponentData &data, const double step_size)
 Updates the slack variable according to the step size. More...
 
static void updateDual (ConstraintComponentData &data, const double step_size)
 Updates the dual variable according to the step size. More...
 
- Protected Member Functions inherited from robotoc::ConstraintComponentBase
void computeComplementarySlackness (ConstraintComponentData &data) const
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
void computeComplementarySlackness (ConstraintComponentData &data, const int start, const int size) const
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
template<int Size>
void computeComplementarySlackness (ConstraintComponentData &data, const int start) const
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
double computeComplementarySlackness (const double slack, const double dual) const
 Computes the residual in the complementarity slackness between
the slack and dual variables. More...
 
template<typename VectorType >
double logBarrier (const Eigen::MatrixBase< VectorType > &slack) const
 Computes the log barrier function of the slack variable. More...
 
- Static Protected Member Functions inherited from robotoc::ConstraintComponentBase
static void computeCondensingCoeffcient (ConstraintComponentData &data)
 Computes the coefficient of the condensing. More...
 
static void computeCondensingCoeffcient (ConstraintComponentData &data, const int start, const int size)
 Computes the coefficient of the condensing. More...
 
template<int Size>
static void computeCondensingCoeffcient (ConstraintComponentData &data, const int start)
 Computes the coefficient of the condensing. More...
 
static 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...
 
static void computeDualDirection (ConstraintComponentData &data)
 Computes the direction of the dual variable from slack, primal residual, complementary slackness, and the direction of the slack. More...
 
static 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>
static 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...
 
static 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...
 

Detailed Description

Constraint on the lower limits of the joint acceleration.

Constructor & Destructor Documentation

◆ JointAccelerationLowerLimit() [1/4]

robotoc::JointAccelerationLowerLimit::JointAccelerationLowerLimit ( const Robot robot,
const Eigen::VectorXd &  amin 
)

Constructor.

Parameters
[in]robotRobot model.
[in]aminLower limits of the joint acceleration.

◆ JointAccelerationLowerLimit() [2/4]

robotoc::JointAccelerationLowerLimit::JointAccelerationLowerLimit ( )

Default constructor.

◆ ~JointAccelerationLowerLimit()

robotoc::JointAccelerationLowerLimit::~JointAccelerationLowerLimit ( )

Destructor.

◆ JointAccelerationLowerLimit() [3/4]

robotoc::JointAccelerationLowerLimit::JointAccelerationLowerLimit ( const JointAccelerationLowerLimit )
default

Default copy constructor.

◆ JointAccelerationLowerLimit() [4/4]

robotoc::JointAccelerationLowerLimit::JointAccelerationLowerLimit ( JointAccelerationLowerLimit &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ allocateExtraData()

void robotoc::JointAccelerationLowerLimit::allocateExtraData ( ConstraintComponentData data) const
inlineoverridevirtual

Allocates extra data in ConstraintComponentData.

Parameters
[in]dataConstraint component data.

Implements robotoc::ConstraintComponentBase.

◆ condenseSlackAndDual()

void robotoc::JointAccelerationLowerLimit::condenseSlackAndDual ( const ContactStatus contact_status,
ConstraintComponentData data,
SplitKKTMatrix kkt_matrix,
SplitKKTResidual kkt_residual 
) const
overridevirtual

Condenses the slack and dual variables, i.e., factorizes the
condensed Hessians and KKT residuals. This function is always called just after evalDerivatives().

Parameters
[in]contact_statusContact status.
[in]dataConstraint data.
[out]kkt_matrixSplit KKT matrix. The condensed Hessians are added
to this object.
[out]kkt_residualSplit KKT residual. The condensed residuals are added to this object.

Implements robotoc::ConstraintComponentBase.

◆ dimc()

int robotoc::JointAccelerationLowerLimit::dimc ( ) const
overridevirtual

Returns the size of the constraint.

Returns
Size of the constraint.

Implements robotoc::ConstraintComponentBase.

◆ evalConstraint()

void robotoc::JointAccelerationLowerLimit::evalConstraint ( Robot robot,
const ContactStatus contact_status,
ConstraintComponentData data,
const SplitSolution s 
) const
overridevirtual

Computes the primal residual, residual in the complementary slackness, and the log-barrier function of the slack varible.

Parameters
[in]robotRobot model.
[in]contact_statusContact status.
[in]dataConstraint data.
[in]sSplit solution.

Implements robotoc::ConstraintComponentBase.

◆ evalDerivatives()

void robotoc::JointAccelerationLowerLimit::evalDerivatives ( Robot robot,
const ContactStatus contact_status,
ConstraintComponentData data,
const SplitSolution s,
SplitKKTResidual kkt_residual 
) const
overridevirtual

Computes the derivatives of the priaml residual, i.e., the Jacobian of the inequality constraint, and add the product of the Jacobian and the dual variable to the KKT residual. This function is always called just after evalConstraint().

Parameters
[in]robotRobot model.
[in]contact_statusContact status.
[in]dataConstraint data.
[in]sSplit solution.
[out]kkt_residualSplit KKT residual.

Implements robotoc::ConstraintComponentBase.

◆ expandSlackAndDual()

void robotoc::JointAccelerationLowerLimit::expandSlackAndDual ( const ContactStatus contact_status,
ConstraintComponentData data,
const SplitDirection d 
) const
overridevirtual

Expands the slack and dual, i.e., computes the directions of the slack and dual variables from the directions of the primal variables.

Parameters
[in]contact_statusContact status.
[in,out]dataConstraint data.
[in]dSplit direction.

Implements robotoc::ConstraintComponentBase.

◆ isFeasible()

bool robotoc::JointAccelerationLowerLimit::isFeasible ( Robot robot,
const ContactStatus contact_status,
ConstraintComponentData data,
const SplitSolution s 
) const
overridevirtual

Checks whether the current solution s is feasible or not.

Parameters
[in]robotRobot model.
[in]contact_statusContact status.
[in]dataConstraint data.
[in]sSplit solution.
Returns
true if s is feasible. false if not.

Implements robotoc::ConstraintComponentBase.

◆ kinematicsLevel()

KinematicsLevel robotoc::JointAccelerationLowerLimit::kinematicsLevel ( ) const
overridevirtual

Checks the kinematics level of the constraint component.

Returns
Kinematics level of the constraint component.

Implements robotoc::ConstraintComponentBase.

◆ operator=() [1/2]

JointAccelerationLowerLimit & robotoc::JointAccelerationLowerLimit::operator= ( const JointAccelerationLowerLimit )
default

Default copy operator.

◆ operator=() [2/2]

JointAccelerationLowerLimit & robotoc::JointAccelerationLowerLimit::operator= ( JointAccelerationLowerLimit &&  )
defaultnoexcept

Default move assign operator.

◆ setSlack()

void robotoc::JointAccelerationLowerLimit::setSlack ( Robot robot,
const ContactStatus contact_status,
ConstraintComponentData data,
const SplitSolution s 
) const
overridevirtual

Sets the slack variables of each constraint components.

Parameters
[in]robotRobot model.
[in]contact_statusContact status.
[out]dataConstraint data.
[in]sSplit solution.

Implements robotoc::ConstraintComponentBase.


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