Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CondensingBasedCPsolver Class Reference

Solves banded conic programs arising in optimal control using condensing. More...

#include <condensing_based_cp_solver.hpp>

Inheritance diagram for CondensingBasedCPsolver:
Inheritance graph
[legend]

Public Member Functions

BooleanType areRealTimeParametersDefined () const
 
virtual BandedCPsolverclone () const
 
 CondensingBasedCPsolver ()
 
 CondensingBasedCPsolver (UserInteraction *_userInteraction, uint nConstraints_, const DVector &blockDims_)
 
 CondensingBasedCPsolver (const CondensingBasedCPsolver &rhs)
 
virtual returnValue finalizeSolve (BandedCP &cp)
 
virtual returnValue freezeCondensing ()
 
virtual returnValue getFirstControl (DVector &u0_) const
 
uint getNA () const
 
uint getNC () const
 
uint getNF () const
 
uint getNP () const
 
uint getNU () const
 
uint getNumPoints () const
 
uint getNW () const
 
uint getNX () const
 
uint getNXA () const
 
virtual returnValue getParameters (DVector &p_) const
 
virtual returnValue getVarianceCovariance (DMatrix &var)
 
virtual returnValue init (const OCPiterate &iter_)
 
CondensingBasedCPsolveroperator= (const CondensingBasedCPsolver &rhs)
 
virtual returnValue prepareSolve (BandedCP &cp)
 
virtual returnValue setRealTimeParameters (const DVector &DeltaX, const DVector &DeltaP=emptyConstVector)
 
virtual returnValue solve (BandedCP &cp)
 
virtual returnValue unfreezeCondensing ()
 
virtual ~CondensingBasedCPsolver ()
 
- Public Member Functions inherited from BandedCPsolver
 BandedCPsolver ()
 
 BandedCPsolver (UserInteraction *_userInteraction)
 
 BandedCPsolver (const BandedCPsolver &rhs)
 
BandedCPsolveroperator= (const BandedCPsolver &rhs)
 
virtual ~BandedCPsolver ()
 
- Public Member Functions inherited from AlgorithmicBase
int addLogRecord (LogRecord &_record)
 
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOptionsList ()
 
 AlgorithmicBase ()
 
 AlgorithmicBase (UserInteraction *_userInteraction)
 
 AlgorithmicBase (const AlgorithmicBase &rhs)
 
returnValue get (OptionsName name, int &value) const
 
returnValue get (OptionsName name, double &value) const
 
returnValue get (OptionsName name, std::string &value) const
 
returnValue get (uint idx, OptionsName name, int &value) const
 
returnValue get (uint idx, OptionsName name, double &value) const
 
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
Options getOptions (uint idx) const
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
AlgorithmicBaseoperator= (const AlgorithmicBase &rhs)
 
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue printLogRecord (std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue set (OptionsName name, int value)
 
returnValue set (OptionsName name, double value)
 
returnValue set (OptionsName name, const std::string &value)
 
returnValue set (uint idx, OptionsName name, int value)
 
returnValue set (uint idx, OptionsName name, double value)
 
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DVector &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DMatrix &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
virtual ~AlgorithmicBase ()
 

Protected Member Functions

returnValue computeCondensingOperator (BandedCP &cp)
 
returnValue condense (BandedCP &cp)
 
returnValue expand (BandedCP &cp)
 
returnValue generateBoundVectors ()
 
returnValue generateConstraintBlockLine (uint nn, uint rowOffset, uint &rowOffset1)
 
returnValue generateConstraintVectors (uint nn, uint rowOffset, uint &rowOffset1)
 
returnValue generateHessianBlockLine (uint nn, uint rowOffset, uint &rowOffset1)
 
returnValue generateObjectiveGradient ()
 
returnValue generateStateBoundBlockLine (uint nn, uint rowOffset, uint &rowOffset1)
 
returnValue generateStateBoundVectors (uint nn, uint rowOffset, uint &rowOffset1)
 
returnValue initializeCondensingOperator ()
 
virtual returnValue initializeCPsolver (InfeasibleQPhandling infeasibleQPhandling)
 
returnValue projectHessian (DMatrix &H_, double dampingFactor)
 
virtual returnValue setupRelaxedQPdata (InfeasibleQPhandling infeasibleQPhandling, DenseCP &_denseCPrelaxed) const
 
virtual returnValue setupRelaxedQPdataL1 (DenseCP &_denseCPrelaxed) const
 
virtual returnValue setupRelaxedQPdataL2 (DenseCP &_denseCPrelaxed) const
 
virtual returnValue solveCPsubproblem ()
 
virtual returnValue solveQP (uint maxIter, InfeasibleQPhandling infeasibleQPhandling=IQH_UNDEFINED)
 
- Protected Member Functions inherited from BandedCPsolver
virtual returnValue setupLogging ()
 
virtual returnValue setupOptions ()
 

Protected Attributes

BlockMatrix ADense
 
DVector blockDims
 
CondensingStatus condensingStatus
 
DenseCPsolvercpSolver
 
DenseQPsolvercpSolverRelaxed
 
BlockMatrix d
 
DVector deltaP
 
DVector deltaX
 
DenseCP denseCP
 
BlockMatrix gDense
 
BlockMatrix HDense
 
BlockMatrix hT
 
OCPiterate iter
 
BlockMatrix lbADense
 
BlockMatrix lbDense
 
uint nConstraints
 
BlockMatrix T
 
BlockMatrix ubADense
 
BlockMatrix ubDense
 
- Protected Attributes inherited from AlgorithmicBase
int outputLoggingIdx
 
BooleanType useModuleStandalone
 
UserInteractionuserInteraction
 

Detailed Description

Solves banded conic programs arising in optimal control using condensing.

The class condensing based CP solver is a special solver for band structured conic programs that can be solved via a condensing technique.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 59 of file condensing_based_cp_solver.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO CondensingBasedCPsolver::CondensingBasedCPsolver ( )

Default constructor.

Definition at line 46 of file condensing_based_cp_solver.cpp.

CondensingBasedCPsolver::CondensingBasedCPsolver ( UserInteraction _userInteraction,
uint  nConstraints_,
const DVector blockDims_ 
)

Definition at line 58 of file condensing_based_cp_solver.cpp.

CondensingBasedCPsolver::CondensingBasedCPsolver ( const CondensingBasedCPsolver rhs)

Copy constructor (deep copy).

Definition at line 73 of file condensing_based_cp_solver.cpp.

CondensingBasedCPsolver::~CondensingBasedCPsolver ( )
virtual

Destructor.

Definition at line 94 of file condensing_based_cp_solver.cpp.

Member Function Documentation

BooleanType CondensingBasedCPsolver::areRealTimeParametersDefined ( ) const
inline
BandedCPsolver * CondensingBasedCPsolver::clone ( ) const
virtual

Assignment operator (deep copy).

Implements BandedCPsolver.

Definition at line 130 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::computeCondensingOperator ( BandedCP cp)
protected

Definition at line 1378 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::condense ( BandedCP cp)
protected

Performes the condensing of the dynamic system if necessary.

Definition at line 513 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::expand ( BandedCP cp)
protected

Expands the KKT system if necessary.

Definition at line 1079 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::finalizeSolve ( BandedCP cp)
virtual

Solves a given banded conic program

Reimplemented from BandedCPsolver.

Definition at line 248 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::freezeCondensing ( )
virtual

Reimplemented from BandedCPsolver.

Definition at line 329 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateBoundVectors ( )
protected

Definition at line 941 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateConstraintBlockLine ( uint  nn,
uint  rowOffset,
uint rowOffset1 
)
protected

Definition at line 765 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateConstraintVectors ( uint  nn,
uint  rowOffset,
uint rowOffset1 
)
protected

Definition at line 901 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateHessianBlockLine ( uint  nn,
uint  rowOffset,
uint rowOffset1 
)
protected

Definition at line 697 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateObjectiveGradient ( )
protected

Definition at line 1017 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateStateBoundBlockLine ( uint  nn,
uint  rowOffset,
uint rowOffset1 
)
protected

Definition at line 833 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::generateStateBoundVectors ( uint  nn,
uint  rowOffset,
uint rowOffset1 
)
protected

Definition at line 921 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::getFirstControl ( DVector u0_) const
virtual

Implements BandedCPsolver.

Definition at line 292 of file condensing_based_cp_solver.cpp.

uint CondensingBasedCPsolver::getNA ( ) const
inline
uint CondensingBasedCPsolver::getNC ( ) const
inline
uint CondensingBasedCPsolver::getNF ( ) const
inline
uint CondensingBasedCPsolver::getNP ( ) const
inline
uint CondensingBasedCPsolver::getNU ( ) const
inline
uint CondensingBasedCPsolver::getNumPoints ( ) const
inline
uint CondensingBasedCPsolver::getNW ( ) const
inline
uint CondensingBasedCPsolver::getNX ( ) const
inline
uint CondensingBasedCPsolver::getNXA ( ) const
inline
returnValue CondensingBasedCPsolver::getParameters ( DVector p_) const
virtual

Implements BandedCPsolver.

Definition at line 278 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::getVarianceCovariance ( DMatrix var)
virtual

Returns a variance-covariance estimate if possible or an error message otherwise.

Returns
SUCCESSFUL_RETURN RET_MEMBER_NOT_INITIALISED

Reimplemented from BandedCPsolver.

Definition at line 307 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::init ( const OCPiterate iter_)
virtual

initializes the banded conic solver

Implements BandedCPsolver.

Definition at line 137 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::initializeCondensingOperator ( )
protected

Definition at line 1348 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::initializeCPsolver ( InfeasibleQPhandling  infeasibleQPhandling)
protectedvirtual

Initializes QP objects.

Returns
SUCCESSFUL_RETURN
RET_QP_INIT_FAILED

Definition at line 1619 of file condensing_based_cp_solver.cpp.

CondensingBasedCPsolver & CondensingBasedCPsolver::operator= ( const CondensingBasedCPsolver rhs)

Assignment operator (deep copy).

Definition at line 101 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::prepareSolve ( BandedCP cp)
virtual

Solves a given banded conic program

Reimplemented from BandedCPsolver.

Definition at line 162 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::projectHessian ( DMatrix H_,
double  dampingFactor 
)
protected

Checks whether the Hessian is positive definite and projects
the Hessian based on a heuristic damping factor. If this
damping factor is smaller than 0, the routine does nothing.

Returns
SUCCESSFUL_RETURN.

Definition at line 354 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::setRealTimeParameters ( const DVector DeltaX,
const DVector DeltaP = emptyConstVector 
)
virtual

Reimplemented from BandedCPsolver.

Definition at line 317 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::setupRelaxedQPdata ( InfeasibleQPhandling  infeasibleQPhandling,
DenseCP _denseCPrelaxed 
) const
protectedvirtual

Determines relaxed (constraints') bounds of an infeasible QP.

Parameters
_denseCPrelaxedOUTPUT: Relaxed QP data.

Definition at line 1484 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::setupRelaxedQPdataL1 ( DenseCP _denseCPrelaxed) const
protectedvirtual

Determines relaxed (constraints') bounds of an infeasible QP.

Parameters
_denseCPrelaxedOUTPUT: Relaxed QP data.

Definition at line 1502 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::setupRelaxedQPdataL2 ( DenseCP _denseCPrelaxed) const
protectedvirtual

Determines relaxed (constraints') bounds of an infeasible QP.

Parameters
_denseCPrelaxedOUTPUT: Relaxed QP data.

Definition at line 1561 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::solve ( BandedCP cp)
virtual

Solves a given banded conic program in feedback mode:

Parameters
cpthe banded conic program to be solved
DeltaXdifference between state estimate and previous prediction
DeltaPdifference between current and previous parameter value

Returns
SUCCESSFUL_RETURN (if successful)
or a specific error message from the dense CP solver.

Implements BandedCPsolver.

Definition at line 192 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::solveCPsubproblem ( )
protectedvirtual

Definition at line 387 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::solveQP ( uint  maxIter,
InfeasibleQPhandling  infeasibleQPhandling = IQH_UNDEFINED 
)
protectedvirtual

Solves current QP (or relaxation) using not more than the given number of iterations.

Returns
SUCCESSFUL_RETURN
RET_QP_INIT_FAILED
Parameters
maxIterMaximum number of iterations.

Definition at line 1642 of file condensing_based_cp_solver.cpp.

returnValue CondensingBasedCPsolver::unfreezeCondensing ( )
virtual

Reimplemented from BandedCPsolver.

Definition at line 340 of file condensing_based_cp_solver.cpp.

Member Data Documentation

BlockMatrix CondensingBasedCPsolver::ADense
protected

Constraint matrix

Definition at line 263 of file condensing_based_cp_solver.hpp.

DVector CondensingBasedCPsolver::blockDims
protected

Definition at line 243 of file condensing_based_cp_solver.hpp.

CondensingStatus CondensingBasedCPsolver::condensingStatus
protected

Definition at line 246 of file condensing_based_cp_solver.hpp.

DenseCPsolver* CondensingBasedCPsolver::cpSolver
protected

Definition at line 271 of file condensing_based_cp_solver.hpp.

DenseQPsolver* CondensingBasedCPsolver::cpSolverRelaxed
protected

Definition at line 272 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::d
protected

the condensing offset

Definition at line 252 of file condensing_based_cp_solver.hpp.

DVector CondensingBasedCPsolver::deltaP
protected

Definition at line 277 of file condensing_based_cp_solver.hpp.

DVector CondensingBasedCPsolver::deltaX
protected

Definition at line 276 of file condensing_based_cp_solver.hpp.

DenseCP CondensingBasedCPsolver::denseCP
protected

Definition at line 274 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::gDense
protected

Objective gradient after condensing

Definition at line 262 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::HDense
protected

Hessian after condensing

Definition at line 261 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::hT
protected

Definition at line 254 of file condensing_based_cp_solver.hpp.

OCPiterate CondensingBasedCPsolver::iter
protected

Definition at line 242 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::lbADense
protected

Constraint lower bounds

Definition at line 264 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::lbDense
protected

Simple lower bounds

Definition at line 266 of file condensing_based_cp_solver.hpp.

uint CondensingBasedCPsolver::nConstraints
protected

Definition at line 244 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::T
protected

the condensing operator

Definition at line 251 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::ubADense
protected

Constraint upper bounds

Definition at line 265 of file condensing_based_cp_solver.hpp.

BlockMatrix CondensingBasedCPsolver::ubDense
protected

Simple upper bounds

Definition at line 267 of file condensing_based_cp_solver.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:22