1#ifndef ROBOTOC_DIRECT_MULTIPLE_SHOOTING_HPP_
2#define ROBOTOC_DIRECT_MULTIPLE_SHOOTING_HPP_
111 const Eigen::VectorXd& q, const Eigen::VectorXd& v,
126 const Eigen::VectorXd& q, const Eigen::VectorXd& v,
139 const Eigen::VectorXd& q,
140 const Eigen::VectorXd& v,
180 const
double primal_step_size,
193 const
double primal_step_size,
209 Eigen::VectorXd max_primal_step_sizes_, max_dual_step_sizes_;
Direct multiple shooting method of the optimal control problems.
Definition: direct_multiple_shooting.hpp:32
void initConstraints(aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const Solution &s)
Initializes the priaml-dual interior point method for inequality constraints.
void computeInitialStateDirection(const Robot &robot, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, Direction &d) const
Computes the initial state direction.
bool isFeasible(aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const Solution &s)
Checks whether the solution is feasible under inequality constraints.
void evalOCP(aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, KKTResidual &kkt_residual)
Computes the cost and constraint violations.
DirectMultipleShooting(DirectMultipleShooting &&) noexcept=default
Default move constructor.
void evalKKT(aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual)
Computes the KKT residual and matrix.
void resizeData(const TimeDiscretization &time_discretization)
Resizes the internal data.
DirectMultipleShooting(const DirectMultipleShooting &)=default
Default copy constructor.
DirectMultipleShooting & operator=(const DirectMultipleShooting &)=default
Default copy assign operator.
const PerformanceIndex & getEval() const
Gets the performance index of the evaluation.
void integrateSolution(const aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const double primal_step_size, const double dual_step_size, Direction &d, Solution &s)
Integrates the solution.
DirectMultipleShooting(const OCP &ocp, const int nthreads)
Construct the direct multiple shooting method.
DirectMultipleShooting()
Default constructor.
void computeStepSizes(const TimeDiscretization &time_discretization, Direction &d)
Computes the step sizes via the fraction-to-boundary-rule.
void integratePrimalSolution(const aligned_vector< Robot > &robots, const TimeDiscretization &time_discretization, const double primal_step_size, const Direction &d, Solution &s)
Integrates the primal solution.
~DirectMultipleShooting()=default
Default destructor.
double maxDualStepSize() const
Gets the maximum dual step size of the fraction-to-boundary-rule.
double maxPrimalStepSize() const
Gets the maximum primal step size of the fraction-to-boundary-rule.
void setNumThreads(const int nthreads)
Sets the number of threads of the parallel computations.
Impact stage computations for optimal control problems.
Definition: impact_stage.hpp:27
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Terminal stage computations for optimal control problems.
Definition: terminal_stage.hpp:26
Time discretization of the optimal control problem.
Definition: time_discretization.hpp:20
Definition: constraint_component_base.hpp:17
aligned_vector< SplitKKTMatrix > KKTMatrix
The KKT matrix of the optimal control problem.
Definition: kkt_matrix.hpp:16
aligned_vector< SplitSolution > Solution
Solution to the optimal control problem.
Definition: solution.hpp:16
aligned_vector< SplitDirection > Direction
Newton direction of the solution to the optimal control problem.
Definition: direction.hpp:16
std::vector< T, Eigen::aligned_allocator< T > > aligned_vector
std vector with Eigen::aligned_allocator.
Definition: aligned_vector.hpp:14
aligned_vector< SplitKKTResidual > KKTResidual
The KKT residual of the optimal control problem.
Definition: kkt_residual.hpp:16
A data structure for an optimal control problem.
Definition: ocp_data.hpp:18
The optimal control problem.
Definition: ocp.hpp:22