All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SurgSim::Math::MlcpProblem Struct Reference

A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved. More...

#include <SurgSim/Math/MlcpProblem.h>

Inheritance diagram for SurgSim::Math::MlcpProblem:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Math::MlcpProblem:
Collaboration graph
[legend]

Public Types

typedef Eigen::Matrix< double,
Eigen::Dynamic, Eigen::Dynamic > 
Matrix
 
typedef Eigen::Matrix< double,
Eigen::Dynamic, 1 > 
Vector
 

Public Member Functions

virtual ~MlcpProblem ()
 Destructor. More...
 
size_t getSize () const
 Gets the size of the system. More...
 
bool isConsistent () const
 Checks if the sizes of various elements of the system are consistent with each other. More...
 
virtual void setZero (size_t numDof, size_t numConstraintDof, size_t numConstraints)
 Resize an MlcpProblem and set to zero. More...
 

Static Public Member Functions

static MlcpProblem Zero (size_t numDof, size_t numConstraintDof, size_t numConstraints)
 Initialize an MlcpProblem with zero values. More...
 

Public Attributes

Matrix A
 Matrix \(\mathbf{A}\) used to describe the mixed LCP problem. More...
 
Vector b
 Vector \(b\) used to describe the mixed LCP problem. More...
 
Vector mu
 A vector of friction coefficients used to describe the mixed LCP problem. More...
 
std::vector< MlcpConstraintTypeconstraintTypes
 A vector of constraint types used to describe the mixed LCP problem. More...
 

Detailed Description

A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved.

A traditional (not mixed!) LCP problem is expressed as \(\mathbf{A}x + b = c\), where \(x\) is the vector of variables of interest to be determined, \(c\) is the vector of slack variables (transforming a system of inequalities into a system of equalities), and \(x\) and \(c\) are subject to the inequality conditions \(x_i \ge 0\), \(c_i \ge 0\), and \(x \perp c\) (i.e., \(x \cdot c = 0\)). Thus for each row \(i\), either

Solving the problem produces the vector \(x\), from which \(c\) can also be computed if needed.

A mixed LCP problem is defined in the same way, except that for a certain subset of indices, the conditions are restricted further to require \(c_i\) to be zero, \(\mathbf{A}_{i,*}\cdot x+b_i = 0\). These are referred to as bilateral constraints, as opposed to the unilateral constraints in the LCP problem.

Friction is integrated directly into the problem, using the general approach described e.g. in:
Duriez, Christian; Dubois, F.; Kheddar, A.; Andriot, C., "Realistic haptic rendering of interacting deformable objects in virtual environments," IEEE Transactions on Visualization and Computer Graphics, vol.12, no.1, pp.36,47, Jan.-Feb. 2006.

See also
SurgSim::Physics::MlcpPhysicsProblem, MlcpSolution, MlcpSolver

Member Typedef Documentation

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> SurgSim::Math::MlcpProblem::Matrix
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> SurgSim::Math::MlcpProblem::Vector

Constructor & Destructor Documentation

SurgSim::Math::MlcpProblem::~MlcpProblem ( )
virtual

Destructor.

Member Function Documentation

size_t SurgSim::Math::MlcpProblem::getSize ( ) const
inline

Gets the size of the system.

Returns
the number of degrees of freedom of the system.
bool SurgSim::Math::MlcpProblem::isConsistent ( ) const
inline

Checks if the sizes of various elements of the system are consistent with each other.

Returns
true if consistent, false otherwise.
void SurgSim::Math::MlcpProblem::setZero ( size_t  numDof,
size_t  numConstraintDof,
size_t  numConstraints 
)
virtual

Resize an MlcpProblem and set to zero.

Parameters
numDofthe total degrees of freedom.
numConstraintDofthe total constrained degrees of freedom.
numConstraintsthe number of constraints.

Reimplemented in SurgSim::Physics::MlcpPhysicsProblem.

MlcpProblem SurgSim::Math::MlcpProblem::Zero ( size_t  numDof,
size_t  numConstraintDof,
size_t  numConstraints 
)
static

Initialize an MlcpProblem with zero values.

Parameters
numDofthe total degrees of freedom for the MlcpProblem to be constructed.
numConstraintDofthe total constrained degrees of freedom for the MlcpProblem to be constructed.
numConstraintsthe number of constraints for the MlcpProblem to be constructed.
Returns
An MlcpProblem appropriately sized and initialized to zero.

Member Data Documentation

Matrix SurgSim::Math::MlcpProblem::A

Matrix \(\mathbf{A}\) used to describe the mixed LCP problem.

Vector SurgSim::Math::MlcpProblem::b

Vector \(b\) used to describe the mixed LCP problem.

std::vector<MlcpConstraintType> SurgSim::Math::MlcpProblem::constraintTypes

A vector of constraint types used to describe the mixed LCP problem.

Todo:
This API will change in the future to something more independent of physics.
Vector SurgSim::Math::MlcpProblem::mu

A vector of friction coefficients used to describe the mixed LCP problem.

Todo:
This API will change in the future to something more independent of physics.

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