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

Direct multiple shooting method of optimal control problems of unconstrained rigid-body systems. More...

#include <unconstr_direct_multiple_shooting.hpp>

Public Member Functions

 UnconstrDirectMultipleShooting (const OCP &ocp, const int nthreads=1)
 Construct the direct multiple shooting method. More...
 
 UnconstrDirectMultipleShooting ()
 Default constructor. More...
 
 ~UnconstrDirectMultipleShooting ()=default
 Destructor. More...
 
 UnconstrDirectMultipleShooting (const UnconstrDirectMultipleShooting &)=default
 Default copy constructor. More...
 
UnconstrDirectMultipleShootingoperator= (const UnconstrDirectMultipleShooting &)=default
 Default copy assign operator. More...
 
 UnconstrDirectMultipleShooting (UnconstrDirectMultipleShooting &&) noexcept=default
 Default move constructor. More...
 
UnconstrDirectMultipleShootingoperator= (UnconstrDirectMultipleShooting &&) noexcept=default
 Default move assign operator. More...
 
void setNumThreads (const int nthreads)
 Sets the number of threads of the parallel computations. More...
 
void initConstraints (aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Solution &s)
 Initializes the priaml-dual interior point method for inequality constraints. More...
 
bool isFeasible (aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Solution &s)
 Checks whether the solution is feasible under inequality constraints. More...
 
void evalOCP (aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, KKTResidual &kkt_residual)
 Computes the cost and constraint violations. More...
 
void evalKKT (aligned_vector< Robot > &robots, const std::vector< GridInfo > &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. More...
 
const PerformanceIndexgetEval () const
 Gets the performance index of the evaluation. More...
 
void computeStepSizes (const std::vector< GridInfo > &time_discretization, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual, Direction &d)
 Computes the step sizes via the fraction-to-boundary-rule. More...
 
double maxPrimalStepSize () const
 Gets the maximum primal step size of the fraction-to-boundary-rule. More...
 
double maxDualStepSize () const
 Gets the maximum dual step size of the fraction-to-boundary-rule. More...
 
void integrateSolution (const aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const double primal_step_size, const double dual_step_size, Direction &d, Solution &s)
 Integrates the solution. More...
 
void integratePrimalSolution (const aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const double primal_step_size, const Direction &d, Solution &s)
 Integrates the primal solution. More...
 

Static Public Member Functions

static void computeInitialStateDirection (const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, Direction &d)
 Computes the initial state direction. More...
 

Detailed Description

Direct multiple shooting method of optimal control problems of unconstrained rigid-body systems.

Constructor & Destructor Documentation

◆ UnconstrDirectMultipleShooting() [1/4]

robotoc::UnconstrDirectMultipleShooting::UnconstrDirectMultipleShooting ( const OCP ocp,
const int  nthreads = 1 
)

Construct the direct multiple shooting method.

Parameters
[in]ocpOptimal control problem.
[in]nthreadsNumber of the threads of the parallel computations. Must be positive.

◆ UnconstrDirectMultipleShooting() [2/4]

robotoc::UnconstrDirectMultipleShooting::UnconstrDirectMultipleShooting ( )

Default constructor.

◆ ~UnconstrDirectMultipleShooting()

robotoc::UnconstrDirectMultipleShooting::~UnconstrDirectMultipleShooting ( )
default

Destructor.

◆ UnconstrDirectMultipleShooting() [3/4]

robotoc::UnconstrDirectMultipleShooting::UnconstrDirectMultipleShooting ( const UnconstrDirectMultipleShooting )
default

Default copy constructor.

◆ UnconstrDirectMultipleShooting() [4/4]

robotoc::UnconstrDirectMultipleShooting::UnconstrDirectMultipleShooting ( UnconstrDirectMultipleShooting &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ computeInitialStateDirection()

static void robotoc::UnconstrDirectMultipleShooting::computeInitialStateDirection ( const Eigen::VectorXd &  q,
const Eigen::VectorXd &  v,
const Solution s,
Direction d 
)
static

Computes the initial state direction.

Parameters
[in]qInitial configuration.
[in]vInitial generalized velocity.
[in]sSolution.
[in,out]dDirection.

◆ computeStepSizes()

void robotoc::UnconstrDirectMultipleShooting::computeStepSizes ( const std::vector< GridInfo > &  time_discretization,
KKTMatrix kkt_matrix,
KKTResidual kkt_residual,
Direction d 
)

Computes the step sizes via the fraction-to-boundary-rule.

Parameters
[in]time_discretizationTime discretization.
[in,out]kkt_matrixKKT matrix.
[in,out]kkt_residualKKT residual.
[in,out]dDirection.

◆ evalKKT()

void robotoc::UnconstrDirectMultipleShooting::evalKKT ( aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  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.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]qInitial configuration.
[in]vInitial generalized velocity.
[in]sSolution.
[in,out]kkt_matrixKKT matrix.
[in,out]kkt_residualKKT residual.

◆ evalOCP()

void robotoc::UnconstrDirectMultipleShooting::evalOCP ( aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  time_discretization,
const Eigen::VectorXd &  q,
const Eigen::VectorXd &  v,
const Solution s,
KKTResidual kkt_residual 
)

Computes the cost and constraint violations.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]qInitial configuration.
[in]vInitial generalized velocity.
[in]sSolution.
[in,out]kkt_residualKKT residual.

◆ getEval()

const PerformanceIndex & robotoc::UnconstrDirectMultipleShooting::getEval ( ) const

Gets the performance index of the evaluation.

Returns
const reference to the performance index.

◆ initConstraints()

void robotoc::UnconstrDirectMultipleShooting::initConstraints ( aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  time_discretization,
const Solution s 
)

Initializes the priaml-dual interior point method for inequality constraints.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]sSolution.

◆ integratePrimalSolution()

void robotoc::UnconstrDirectMultipleShooting::integratePrimalSolution ( const aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  time_discretization,
const double  primal_step_size,
const Direction d,
Solution s 
)

Integrates the primal solution.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]primal_step_sizePrimal step size.
[in]dDirection.
[in,out]sSolution.

◆ integrateSolution()

void robotoc::UnconstrDirectMultipleShooting::integrateSolution ( const aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  time_discretization,
const double  primal_step_size,
const double  dual_step_size,
Direction d,
Solution s 
)

Integrates the solution.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]primal_step_sizePrimal step size.
[in]dual_step_sizeDual step size.
[in,out]dDirection.
[in,out]sSolution.

◆ isFeasible()

bool robotoc::UnconstrDirectMultipleShooting::isFeasible ( aligned_vector< Robot > &  robots,
const std::vector< GridInfo > &  time_discretization,
const Solution s 
)

Checks whether the solution is feasible under inequality constraints.

Parameters
[in,out]robotsaligned_vector of Robot for paralle computing.
[in]time_discretizationTime discretization.
[in]sSolution.

◆ maxDualStepSize()

double robotoc::UnconstrDirectMultipleShooting::maxDualStepSize ( ) const

Gets the maximum dual step size of the fraction-to-boundary-rule.

Returns
The dual step size of the fraction-to-boundary-rule.

◆ maxPrimalStepSize()

double robotoc::UnconstrDirectMultipleShooting::maxPrimalStepSize ( ) const

Gets the maximum primal step size of the fraction-to-boundary-rule.

Returns
The primal step size of the fraction-to-boundary-rule.

◆ operator=() [1/2]

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

Default copy assign operator.

◆ operator=() [2/2]

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

Default move assign operator.

◆ setNumThreads()

void robotoc::UnconstrDirectMultipleShooting::setNumThreads ( const int  nthreads)

Sets the number of threads of the parallel computations.

Parameters
[in]nthreadsNumber of the threads of the parallel computations. Must be positive.

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