humoto
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
humoto::kktsolver::Solver Class Reference

Detailed Description

QP solver.

Definition at line 88 of file kktsolver.h.

#include <kktsolver.h>

Inheritance diagram for humoto::kktsolver::Solver:
Inheritance graph

Public Member Functions

 Solver ()
 Default constructor (with default parameters) More...
 
 Solver (const SolverParameters &parameters)
 Set parameters. More...
 
 ~Solver ()
 Destructor. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="kktsolver") const
 Log a QP problem. More...
 
void setParameters (const SolverParameters &parameters)
 Construct solver with specified parameters. More...
 
void solve (humoto::Solution &solution, const humoto::OptimizationProblem &hierarchy)
 Solve an optimization problem (using previously specified parameters) More...
 
void solve (humoto::Solution &solution, const humoto::OptimizationProblem &hierarchy, const SolverParameters &parameters)
 Solve an optimization problem (using previously specified parameters) More...
 

Protected Member Functions

virtual void checkInputs (const humoto::OptimizationProblem &hierarchy) const
 Checks input, does nothing by default, may include extra checks in mixins. More...
 
void checkResults (const humoto::Solution &solution) const
 Check return status and crash if it indicates a failure and crashing is enabled. More...
 
virtual void reset ()
 Reset solver. More...
 

Protected Attributes

SolverParameters parameters_
 

Private Member Functions

void initialize (const humoto::OptimizationProblem &hierarchy, const humoto::SolutionStructure &sol_structure)
 Initialize solver. More...
 
void solveDirect (humoto::Solution &solution, const humoto::OptimizationProblem &hierarchy)
 Solve KKT system directly. More...
 
void solveHierarchy (humoto::Solution &solution, const humoto::OptimizationProblem &hierarchy)
 Solve the hierarchy. More...
 
void solveWithElimination (humoto::Solution &solution, const humoto::OptimizationProblem &hierarchy)
 Eliminate constraints and solve (only diagonal Hessians are supported). More...
 

Private Attributes

humoto::QPProblem_AB qp_problem_
 

Constructor & Destructor Documentation

◆ Solver() [1/2]

humoto::kktsolver::Solver::Solver ( )
inline

Default constructor (with default parameters)

Definition at line 212 of file kktsolver.h.

◆ ~Solver()

humoto::kktsolver::Solver::~Solver ( )
inline

Destructor.

Definition at line 220 of file kktsolver.h.

◆ Solver() [2/2]

humoto::kktsolver::Solver::Solver ( const SolverParameters parameters)
inlineexplicit

Set parameters.

Parameters
[in]parametersparameters

Definition at line 230 of file kktsolver.h.

Member Function Documentation

◆ checkInputs()

virtual void humoto::Solver< SolverParameters >::checkInputs ( const humoto::OptimizationProblem hierarchy) const
inlineprotectedvirtualinherited

Checks input, does nothing by default, may include extra checks in mixins.

Parameters
[in]hierarchy

Reimplemented in humoto::QPSolverMixin< humoto::Solver< SolverParameters > >, and humoto::QPSolverMixin< humoto::SolverGuessSolutionActiveSet< SolverParameters > >.

Definition at line 102 of file solver.h.

◆ checkResults()

void humoto::Solver< SolverParameters >::checkResults ( const humoto::Solution solution) const
inlineprotectedinherited

Check return status and crash if it indicates a failure and crashing is enabled.

Parameters
[in]solution

Definition at line 85 of file solver.h.

◆ initialize()

void humoto::kktsolver::Solver::initialize ( const humoto::OptimizationProblem hierarchy,
const humoto::SolutionStructure sol_structure 
)
inlineprivatevirtual

Initialize solver.

Parameters
[in]hierarchyhierarchy
[in]sol_structuresolution structure

Implements humoto::Solver< SolverParameters >.

Definition at line 97 of file kktsolver.h.

◆ log()

void humoto::kktsolver::Solver::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "kktsolver" 
) const
inline

Log a QP problem.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Definition at line 243 of file kktsolver.h.

◆ reset()

virtual void humoto::Solver< SolverParameters >::reset ( )
inlineprotectedvirtualinherited

Reset solver.

Reimplemented in humoto::qpoases::Solver.

Definition at line 110 of file solver.h.

◆ setParameters()

void humoto::Solver< SolverParameters >::setParameters ( const SolverParameters &  parameters)
inlineinherited

Construct solver with specified parameters.

Parameters
[in]parametersparameters

Definition at line 141 of file solver.h.

◆ solve() [1/2]

void humoto::Solver< SolverParameters >::solve ( humoto::Solution solution,
const humoto::OptimizationProblem hierarchy 
)
inlineinherited

Solve an optimization problem (using previously specified parameters)

Parameters
[out]solution
[in]hierarchy

Definition at line 155 of file solver.h.

◆ solve() [2/2]

void humoto::Solver< SolverParameters >::solve ( humoto::Solution solution,
const humoto::OptimizationProblem hierarchy,
const SolverParameters &  parameters 
)
inlineinherited

Solve an optimization problem (using previously specified parameters)

Parameters
[out]solution
[in]hierarchy
[in]parametersparameters

Definition at line 173 of file solver.h.

◆ solveDirect()

void humoto::kktsolver::Solver::solveDirect ( humoto::Solution solution,
const humoto::OptimizationProblem hierarchy 
)
inlineprivate

Solve KKT system directly.

Parameters
[out]solution
[in]hierarchy

Definition at line 170 of file kktsolver.h.

◆ solveHierarchy()

void humoto::kktsolver::Solver::solveHierarchy ( humoto::Solution solution,
const humoto::OptimizationProblem hierarchy 
)
inlineprivatevirtual

Solve the hierarchy.

Parameters
[out]solutionsolution
[in]hierarchyhierarchy

Implements humoto::Solver< SolverParameters >.

Definition at line 106 of file kktsolver.h.

◆ solveWithElimination()

void humoto::kktsolver::Solver::solveWithElimination ( humoto::Solution solution,
const humoto::OptimizationProblem hierarchy 
)
inlineprivate

Eliminate constraints and solve (only diagonal Hessians are supported).

Parameters
[out]solution
[in]hierarchy

Definition at line 137 of file kktsolver.h.

Member Data Documentation

◆ parameters_

SolverParameters humoto::Solver< SolverParameters >::parameters_
protectedinherited

Definition at line 67 of file solver.h.

◆ qp_problem_

humoto::QPProblem_AB humoto::kktsolver::Solver::qp_problem_
private

Definition at line 91 of file kktsolver.h.


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