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

The optimal control problem. More...

#include <ocp.hpp>

Collaboration diagram for robotoc::OCP:

Public Member Functions

 OCP (const Robot &robot, const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints, const std::shared_ptr< STOCostFunction > &sto_cost, const std::shared_ptr< STOConstraints > &sto_constraints, const std::shared_ptr< ContactSequence > &contact_sequence, const double T, const int N, const int reserved_num_discrete_events=0)
 Construct the optiaml control problem. More...
 
 OCP (const Robot &robot, const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints, const std::shared_ptr< ContactSequence > &contact_sequence, const double T, const int N, const int reserved_num_discrete_events=0)
 Construct the optiaml control problem. More...
 
 OCP (const Robot &robot, const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints, const double T, const int N)
 Construct the optiaml control problem. More...
 
 OCP ()
 Default constructor. More...
 
 ~OCP ()=default
 Default destructor. More...
 
 OCP (const OCP &)=default
 Default copy constructor. More...
 
OCPoperator= (const OCP &)=default
 Default copy assign operator. More...
 
 OCP (OCP &&) noexcept=default
 Default move constructor. More...
 
OCPoperator= (OCP &&) noexcept=default
 Default move assign operator. More...
 
void disp (std::ostream &os) const
 

Public Attributes

Robot robot
 The robot model. More...
 
std::shared_ptr< CostFunctioncost = nullptr
 The cost function. More...
 
std::shared_ptr< Constraintsconstraints = nullptr
 The constraints. More...
 
std::shared_ptr< STOCostFunctionsto_cost = nullptr
 The STO cost function. More...
 
std::shared_ptr< STOConstraintssto_constraints = nullptr
 The STO constraints. More...
 
std::shared_ptr< ContactSequencecontact_sequence = nullptr
 
double T = 0.0
 
int N = 0
 
int reserved_num_discrete_events = 0
 

Friends

std::ostream & operator<< (std::ostream &os, const OCP &ocp)
 

Detailed Description

The optimal control problem.

Constructor & Destructor Documentation

◆ OCP() [1/6]

robotoc::OCP::OCP ( const Robot robot,
const std::shared_ptr< CostFunction > &  cost,
const std::shared_ptr< Constraints > &  constraints,
const std::shared_ptr< STOCostFunction > &  sto_cost,
const std::shared_ptr< STOConstraints > &  sto_constraints,
const std::shared_ptr< ContactSequence > &  contact_sequence,
const double  T,
const int  N,
const int  reserved_num_discrete_events = 0 
)

Construct the optiaml control problem.

Parameters
[in]robotRobot model.
[in]costShared ptr to the cost function.
[in]constraintsShared ptr to the constraints.
[in]sto_costShared ptr to the STO cost function.
[in]sto_constraintsShared ptr to the STO constraints.
[in]contact_sequenceShared ptr to the contact sequence.
[in]TLength of the horzion. Must be positive.
[in]NNumber of the discretization grids of the horizon. Must be positive.
[in]reserved_num_discrete_eventsReserved size of the discrete-event data. Must be non-negative. Default is 0.

◆ OCP() [2/6]

robotoc::OCP::OCP ( const Robot robot,
const std::shared_ptr< CostFunction > &  cost,
const std::shared_ptr< Constraints > &  constraints,
const std::shared_ptr< ContactSequence > &  contact_sequence,
const double  T,
const int  N,
const int  reserved_num_discrete_events = 0 
)

Construct the optiaml control problem.

Parameters
[in]robotRobot model.
[in]costShared ptr to the cost function.
[in]constraintsShared ptr to the constraints.
[in]contact_sequenceShared ptr to the contact sequence.
[in]TLength of the horzion. Must be positive.
[in]NNumber of the discretization grids of the horizon. Must be positive.
[in]reserved_num_discrete_eventsReserved size of the discrete-event data. Must be non-negative. Default is 0.

◆ OCP() [3/6]

robotoc::OCP::OCP ( const Robot robot,
const std::shared_ptr< CostFunction > &  cost,
const std::shared_ptr< Constraints > &  constraints,
const double  T,
const int  N 
)

Construct the optiaml control problem.

Parameters
[in]robotRobot model.
[in]costShared ptr to the cost function.
[in]constraintsShared ptr to the constraints.
[in]TLength of the horzion. Must be positive.
[in]NNumber of the discretization grids of the horizon. Must be positive.

◆ OCP() [4/6]

robotoc::OCP::OCP ( )

Default constructor.

◆ ~OCP()

robotoc::OCP::~OCP ( )
default

Default destructor.

◆ OCP() [5/6]

robotoc::OCP::OCP ( const OCP )
default

Default copy constructor.

◆ OCP() [6/6]

robotoc::OCP::OCP ( OCP &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ disp()

void robotoc::OCP::disp ( std::ostream &  os) const

◆ operator=() [1/2]

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

Default copy assign operator.

◆ operator=() [2/2]

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

Default move assign operator.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const OCP ocp 
)
friend

Member Data Documentation

◆ constraints

std::shared_ptr<Constraints> robotoc::OCP::constraints = nullptr

The constraints.

◆ contact_sequence

std::shared_ptr<ContactSequence> robotoc::OCP::contact_sequence = nullptr
Returns
The contact sequence.

◆ cost

std::shared_ptr<CostFunction> robotoc::OCP::cost = nullptr

The cost function.

◆ N

int robotoc::OCP::N = 0
Returns
Number of the discretization grids of the horizon.

◆ reserved_num_discrete_events

int robotoc::OCP::reserved_num_discrete_events = 0
Returns
Reserved size of the discrete-event data.

◆ robot

Robot robotoc::OCP::robot

The robot model.

◆ sto_constraints

std::shared_ptr<STOConstraints> robotoc::OCP::sto_constraints = nullptr

The STO constraints.

◆ sto_cost

std::shared_ptr<STOCostFunction> robotoc::OCP::sto_cost = nullptr

The STO cost function.

◆ T

double robotoc::OCP::T = 0.0
Returns
The length of the horizon.

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