MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChLcpSimplexSolver Class Reference

#include <CHlcpSimplexSolver.h>

Inheritance diagram for chrono::ChLcpSimplexSolver:

Inheritance graph
[legend]
Collaboration diagram for chrono::ChLcpSimplexSolver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual double Solve (ChLcpSystemDescriptor &sysd, bool add_Mq_to_f=false)
void SetTruncationStep (int mstep)
void SetNoTruncation ()
double GetTruncationStep ()

Protected Attributes

int truncation_step
ChSparseMatrixMC
ChMatrixX
ChMatrixB
ChUnilateralData * unilaterals


Detailed Description

A simplex (pivoting) method which solves LCP problems by activating/deactivating constraints and solving a linear problem each time (using a custom sparse solver) It is by far slower than iterative methods, but it gives an almost exact solution (within numerical roundoff and accumulation errors, of course). It can handle redundant constraints. This solver must be used for mixed-linear complementarity problems (MLCP) in this form:

| M -Cq'|*|q|- | f|= |0| , c>=0, l>=0, l*c=0; | Cq 0 | |l| |-b| |c|

as arising in the solution of QP with inequalities or in multibody problems.


Member Function Documentation

double chrono::ChLcpSimplexSolver::Solve ( ChLcpSystemDescriptor sysd,
bool  add_Mq_to_f = false 
) [virtual]

Performs the solution of the LCP, using the simplex method. If you must solve many LCP problems with the same amount of variables and constraints, we suggest you to use the same ChLcpSimplexSolver object, because it exploits coherency: avoids reallocating the sparse matrix each time.

Returns:
the maximum constraint violation after termination.
Parameters:
sysd  system description with constraints and variables
add_Mq_to_f  if true, takes the initial 'q' and adds [M]*q to 'f' vector

Implements chrono::ChLcpSolver.

void chrono::ChLcpSimplexSolver::SetTruncationStep ( int  mstep  ) 

Set truncation step (that is, the method stops anyway after this amount of pivots in simplex explorations, even if the solution isn't reached). NOTE!! This limits cases with exponential complexity explosion, but premature termination can give _meaningless_ results (differently from premature termination of iterative methods). For truncation step = 0 continue endlessly up to exact solution (default)


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen