Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL > Class Template Reference

Mixed constrained quadratic programming problem (MCQPP) formulation. More...

#include <convex.hpp>

Public Types

using backend_t = Backend
using linear_op_storage_a_t = LinearOpAStorage
using linear_op_storage_l_t = LinearOpLStorage
using q_vector_storage_t = QVectorStorage
using f_vector_storage_t = FVectorStorage
using q_vector_t = impl::unwrapped_storage_t<q_vector_storage_t>
using f_vector_t = impl::unwrapped_storage_t<f_vector_storage_t>
using space_t = ConvexSpace
using a_workspace_t = WorkspaceA
using l_workspace_t = WorkspaceL
using value_type = impl::vector_value_type<q_vector_t>

Public Member Functions

 MCQPPProblem (Backend, linear_op_storage_a_t A, q_vector_storage_t q, linear_op_storage_l_t L, f_vector_storage_t f_b, const space_t &space)
 MCQPPProblem (Backend, linear_op_storage_a_t A, q_vector_storage_t q, linear_op_storage_l_t L, f_vector_storage_t f_b, const space_t &space, a_workspace_t a_workspace, l_workspace_t l_workspace)
Backend backend () const
const auto & A () const
const auto & q () const
const auto & L () const
const auto & f_b () const
const space_tspace () const
a_workspace_ta_workspace () const
l_workspace_tl_workspace () const

Detailed Description

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
class mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >

This is for a mixed constrained convex quadratic programming problem such as: x^*, y^* = argmin_{x in Omega_x, y in R^m} q^T x + b^T y + 0.5 (Dx + By)^T M (Dx + By) + 0.5 y^T K^{-1} y where M and K^{-1} are symmetric positive definite matrices, D and B are linear operators, q and b are vectors, and Omega_x is a convex space.

This can be mapped onto a reduced CQPP in x alone via the Schur complement. Define: S^{-1} := B^T M B + K^{-1} (symmetric positive definite) H := D^T M D - D^T M B S B^T M D g := q - D^T M B S b Then the reduced CQPP is: x^* = argmin_{x in Omega_x} 0.5 x^T H x + g^T x y^* = -S^{-1}(b + B^T M D x^*)

In more general terms, the mixed problem exists because of an affine operator mapping x -> f: f = (I + L M) D x + f_b, where f_b = f(x = 0) and L is an spsd linear operator

In the less-general problem above: L = B S B^T and f_b = B S b. In this form, the reduced CQPP is: x^* = argmin_{x in Omega_x} 0.5 x^T H x + g^T x H := D^T M (D - L M D) g := q - D^T M f_b y^*, f^*, and u^* are all intermediates that may or may not be explicitly formed during the solution process depending on the structure of L. We refer to these variables as your "workspace" variables. They are updated by the linear operators during the solution process, and their final values are "committed" at the end of the solve to indicate that they are the correct values corresponding to the optimal x^*.

We may also have the simpler problem where D = I, in which case the reduced CQPP is: x^* = argmin_{x in Omega_x} 0.5 x^T H x + g^T x H := A (I - L A) g := q - A f_b

Just like the CQPP, we will either accept the simple case of (A, q, L, f_b) or the more general case of (DT, M, D, q, BT, S, B, b).

TODO(palmerb4): The workspaces here need to be of a storge type.

Member Typedef Documentation

◆ backend_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::backend_t = Backend

◆ linear_op_storage_a_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::linear_op_storage_a_t = LinearOpAStorage

◆ linear_op_storage_l_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::linear_op_storage_l_t = LinearOpLStorage

◆ q_vector_storage_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::q_vector_storage_t = QVectorStorage

◆ f_vector_storage_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::f_vector_storage_t = FVectorStorage

◆ q_vector_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::q_vector_t = impl::unwrapped_storage_t<q_vector_storage_t>

◆ f_vector_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::f_vector_t = impl::unwrapped_storage_t<f_vector_storage_t>

◆ space_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::space_t = ConvexSpace

◆ a_workspace_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::a_workspace_t = WorkspaceA

◆ l_workspace_t

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::l_workspace_t = WorkspaceL

◆ value_type

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
using mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::value_type = impl::vector_value_type<q_vector_t>

Constructor & Destructor Documentation

◆ MCQPPProblem() [1/2]

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::MCQPPProblem ( Backend ,
linear_op_storage_a_t A,
q_vector_storage_t q,
linear_op_storage_l_t L,
f_vector_storage_t f_b,
const space_t & space )
inline

◆ MCQPPProblem() [2/2]

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::MCQPPProblem ( Backend ,
linear_op_storage_a_t A,
q_vector_storage_t q,
linear_op_storage_l_t L,
f_vector_storage_t f_b,
const space_t & space,
a_workspace_t a_workspace,
l_workspace_t l_workspace )
inline

Member Function Documentation

◆ backend()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
Backend mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::backend ( ) const
inline

◆ A()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
const auto & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::A ( ) const
inline

◆ q()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
const auto & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::q ( ) const
inline

◆ L()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
const auto & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::L ( ) const
inline

◆ f_b()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
const auto & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::f_b ( ) const
inline

◆ space()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
const space_t & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::space ( ) const
inline

◆ a_workspace()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
a_workspace_t & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::a_workspace ( ) const
inline

◆ l_workspace()

template<typename Backend, typename LinearOpAStorage, typename QVectorStorage, typename LinearOpLStorage, typename FVectorStorage, space::ValidConvexSpace ConvexSpace, typename WorkspaceA = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpAStorage>>, typename WorkspaceL = impl::workspace_for_t<impl::unwrapped_storage_t<LinearOpLStorage>>>
l_workspace_t & mundy::convex::MCQPPProblem< Backend, LinearOpAStorage, QVectorStorage, LinearOpLStorage, FVectorStorage, ConvexSpace, WorkspaceA, WorkspaceL >::l_workspace ( ) const
inline