robotoc
robotoc - efficient ROBOT Optimal Control solvers
|
#include <vector>
#include <memory>
#include "robotoc/robot/robot.hpp"
#include "robotoc/core/split_solution.hpp"
#include "robotoc/core/split_kkt_residual.hpp"
#include "robotoc/core/split_kkt_matrix.hpp"
#include "robotoc/constraints/constraint_component_data.hpp"
#include "robotoc/constraints/constraints_impl.hxx"
Go to the source code of this file.
Namespaces | |
namespace | robotoc |
namespace | robotoc::constraintsimpl |
Functions | |
template<typename ConstraintComponentBaseTypePtr > | |
void | robotoc::constraintsimpl::clear (std::vector< ConstraintComponentBaseTypePtr > &constraints) |
Clears the vector of the constraints. More... | |
template<typename ConstraintComponentBaseTypePtr > | |
void | robotoc::constraintsimpl::createConstraintsData (const std::vector< ConstraintComponentBaseTypePtr > &constraints, std::vector< ConstraintComponentData > &data) |
Creates constraints data. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType > | |
bool | robotoc::constraintsimpl::isFeasible (const std::vector< ConstraintComponentBaseTypePtr > &constraints, Robot &robot, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, const SplitSolution &s) |
Checks whether the current solution s is feasible or not. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType > | |
void | robotoc::constraintsimpl::setSlackAndDual (const std::vector< ConstraintComponentBaseTypePtr > &constraints, Robot &robot, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, const SplitSolution &s) |
Sets the slack and dual variables of each constraint components. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType > | |
void | robotoc::constraintsimpl::evalConstraint (const std::vector< ConstraintComponentBaseTypePtr > &constraints, Robot &robot, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, const SplitSolution &s) |
Computes the primal residual, residual in the complementary slackness, and the log-barrier_param function of the slack varible. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType > | |
void | robotoc::constraintsimpl::linearizeConstraints (const std::vector< ConstraintComponentBaseTypePtr > &constraints, Robot &robot, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, const SplitSolution &s, SplitKKTResidual &kkt_residual) |
Evaluates the constraints (i.e., calls evalConstraint()) and adds the products of the Jacobian of the constraints and Lagrange multipliers. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType > | |
void | robotoc::constraintsimpl::condenseSlackAndDual (const std::vector< ConstraintComponentBaseTypePtr > &constraints, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) |
Condenses the slack and dual variables. linearizeConstraints() must be called before this function. More... | |
template<typename ConstraintComponentBaseTypePtr , typename ContactStatusType , typename SplitDirectionType > | |
void | robotoc::constraintsimpl::expandSlackAndDual (const std::vector< ConstraintComponentBaseTypePtr > &constraints, const ContactStatusType &contact_status, std::vector< ConstraintComponentData > &data, const SplitDirectionType &d) |
Expands the slack and dual, i.e., computes the directions of the slack and dual variables from the directions of the primal variables. More... | |
template<typename ConstraintComponentBaseTypePtr > | |
double | robotoc::constraintsimpl::maxSlackStepSize (const std::vector< ConstraintComponentBaseTypePtr > &constraints, const std::vector< ConstraintComponentData > &data) |
Computes and returns the maximum step size by applying fraction-to-boundary-rule to the direction of the slack variable. More... | |
template<typename ConstraintComponentBaseTypePtr > | |
double | robotoc::constraintsimpl::maxDualStepSize (const std::vector< ConstraintComponentBaseTypePtr > &constraints, const std::vector< ConstraintComponentData > &data) |
Computes and returns the maximum step size by applying fraction-to-boundary-rule to the direction of the dual variable. More... | |
void | robotoc::constraintsimpl::updateSlack (std::vector< ConstraintComponentData > &data, const double step_size) |
Updates the slack variables according to the step size. More... | |
void | robotoc::constraintsimpl::updateDual (std::vector< ConstraintComponentData > &data, const double step_size) |
Updates the dual variables according to the step size. More... | |
template<typename ConstraintComponentBaseTypePtr > | |
void | robotoc::constraintsimpl::setBarrierParam (std::vector< ConstraintComponentBaseTypePtr > &constraints, const double barrier_param) |
Sets the barrier parameter. More... | |
template<typename ConstraintComponentBaseTypePtr > | |
void | robotoc::constraintsimpl::setFractionToBoundaryRule (std::vector< ConstraintComponentBaseTypePtr > &constraints, const double fraction_to_boundary_rule) |
Sets the parameter of the fraction-to-boundary-rule. More... | |