robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::ConstraintsData Class Reference

Data for constraints. Composed of ConstraintComponentData corrensponding to the components of Constraints. More...

#include <constraints_data.hpp>

Public Member Functions

 ConstraintsData (const int time_stage)
 Constructor. More...
 
 ConstraintsData ()
 Default constructor. More...
 
 ~ConstraintsData ()=default
 Default destructor. More...
 
 ConstraintsData (const ConstraintsData &)=default
 Default copy constructor. More...
 
ConstraintsDataoperator= (const ConstraintsData &)=default
 Default copy operator. More...
 
 ConstraintsData (ConstraintsData &&) noexcept=default
 Default move constructor. More...
 
ConstraintsDataoperator= (ConstraintsData &&) noexcept=default
 Default move assign operator. More...
 
void setTimeStage (const int time_stage)
 Sets the time stage info. More...
 
bool isPositionLevelValid () const
 Checks wheather the position-level constraints are valid or not. More...
 
bool isVelocityLevelValid () const
 Checks wheather the velocity-level constraints are valid or not. More...
 
bool isAccelerationLevelValid () const
 Checks wheather the acceleration-level constraints are valid or not. More...
 
bool isImpactLevelValid () const
 Checks wheather the impact-level constraints are valid or not. More...
 
double KKTError () const
 Returns the sum of the squared norm of the KKT error (primal residual and complementary slackness) of all the constraints. More...
 
double logBarrier () const
 Returns the sum of the log-barrier of the slack variables of all the constraints. More...
 
template<int p = 1>
double primalFeasibility () const
 Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter. More...
 
template<int p = 1>
double dualFeasibility () const
 Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter. More...
 

Public Attributes

std::vector< ConstraintComponentDataposition_level_data
 The collection of the position-level constraints data. More...
 
std::vector< ConstraintComponentDatavelocity_level_data
 The collection of the velocity-level constraints data. More...
 
std::vector< ConstraintComponentDataacceleration_level_data
 The collection of the acceleration-level constraints data. More...
 
std::vector< ConstraintComponentDataimpact_level_data
 The collection of the impact-level constraints data. More...
 

Detailed Description

Data for constraints. Composed of ConstraintComponentData corrensponding to the components of Constraints.

Constructor & Destructor Documentation

◆ ConstraintsData() [1/4]

robotoc::ConstraintsData::ConstraintsData ( const int  time_stage)

Constructor.

Parameters
[in]time_stageTime stage.

◆ ConstraintsData() [2/4]

robotoc::ConstraintsData::ConstraintsData ( )

Default constructor.

◆ ~ConstraintsData()

robotoc::ConstraintsData::~ConstraintsData ( )
default

Default destructor.

◆ ConstraintsData() [3/4]

robotoc::ConstraintsData::ConstraintsData ( const ConstraintsData )
default

Default copy constructor.

◆ ConstraintsData() [4/4]

robotoc::ConstraintsData::ConstraintsData ( ConstraintsData &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ dualFeasibility()

template<int p>
double robotoc::ConstraintsData::dualFeasibility
inline

Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter.

Template Parameters
pIndex of norm. Default is 1 (l1-norm).
Returns
The lp norm of the dual feasibility.

◆ isAccelerationLevelValid()

bool robotoc::ConstraintsData::isAccelerationLevelValid ( ) const
inline

Checks wheather the acceleration-level constraints are valid or not.

Returns
true if the acceleration-level constraints are valid. false otherwise.

◆ isImpactLevelValid()

bool robotoc::ConstraintsData::isImpactLevelValid ( ) const
inline

Checks wheather the impact-level constraints are valid or not.

Returns
true if the impact-level constraints are valid. false otherwise.

◆ isPositionLevelValid()

bool robotoc::ConstraintsData::isPositionLevelValid ( ) const
inline

Checks wheather the position-level constraints are valid or not.

Returns
true if the position-level constraints are valid. false otherwise.

◆ isVelocityLevelValid()

bool robotoc::ConstraintsData::isVelocityLevelValid ( ) const
inline

Checks wheather the velocity-level constraints are valid or not.

Returns
true if the velocity-level constraints are valid. false otherwise.

◆ KKTError()

double robotoc::ConstraintsData::KKTError ( ) const
inline

Returns the sum of the squared norm of the KKT error (primal residual and complementary slackness) of all the constraints.

Returns
true if the impact-level constraints are valid. false otherwise.

◆ logBarrier()

double robotoc::ConstraintsData::logBarrier ( ) const
inline

Returns the sum of the log-barrier of the slack variables of all the constraints.

Returns
The sum of the log-barrier of the slack variables of all the constraints.

◆ operator=() [1/2]

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

Default copy operator.

◆ operator=() [2/2]

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

Default move assign operator.

◆ primalFeasibility()

template<int p>
double robotoc::ConstraintsData::primalFeasibility
inline

Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter.

Template Parameters
pIndex of norm. Default is 1 (l1-norm).
Returns
The lp norm of the primal feasibility.

◆ setTimeStage()

void robotoc::ConstraintsData::setTimeStage ( const int  time_stage)

Sets the time stage info.

Parameters
[in]time_stageTime stage.

Member Data Documentation

◆ acceleration_level_data

std::vector<ConstraintComponentData> robotoc::ConstraintsData::acceleration_level_data

The collection of the acceleration-level constraints data.

◆ impact_level_data

std::vector<ConstraintComponentData> robotoc::ConstraintsData::impact_level_data

The collection of the impact-level constraints data.

◆ position_level_data

std::vector<ConstraintComponentData> robotoc::ConstraintsData::position_level_data

The collection of the position-level constraints data.

◆ velocity_level_data

std::vector<ConstraintComponentData> robotoc::ConstraintsData::velocity_level_data

The collection of the velocity-level constraints data.


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