Page 1 of 1

Bullet & ODE LCP Solver

Posted: Thu Sep 28, 2006 9:48 am
by jiangwei
Hi All

Code: Select all

if ((iteration & 7) == 0) {
			for (i=1; i<m; ++i) {
				IndexError tmp = order[i];
				int swapi = dRandInt2(i+1);
				order[i] = order[swapi];
				order[swapi] = tmp;
			}
                }
I attentioned this section code which in the "SorLcp.cpp" can improve the stable,but i don't know why.
There no papers to discussed this.
I am in a puzzle about this section of code.
What is the purpose of the method?Does anyone can answer this question?Thanks!

Re: Bullet & ODE LCP Solver

Posted: Thu Sep 28, 2006 2:31 pm
by Erwin Coumans
jiangwei wrote:Hi All

Code: Select all

if ((iteration & 7) == 0) {
			for (i=1; i<m; ++i) {
				IndexError tmp = order[i];
				int swapi = dRandInt2(i+1);
				order[i] = order[swapi];
				order[swapi] = tmp;
			}
                }
I found this section code which in the "SorLcp.cpp" can improve the stable,but i don't know why.
There no thesis to discussed this.
What is the purpose of the method?
I am in a puzzle about this section of code.
Good point. We recently discussed this reordering of constraints. Doing a randomize can work in some situations, but opinions vary. Other approaches are sweeping back-and-forwards or sorting them in order of deepest penetration. See the discussion here:

http://www.continuousphysics.com/Bullet ... 4&start=15

Erwin

Re: Bullet & ODE LCP Solver

Posted: Fri Sep 29, 2006 6:43 am
by jiangwei
Erwin Coumans wrote:
Good point. We recently discussed this reordering of constraints. Doing a randomize can work in some situations, but opinions vary. Other approaches are sweeping back-and-forwards or sorting them in order of deepest penetration. See the discussion here:

http://www.continuousphysics.com/Bullet ... 4&start=15

Erwin
Thanks Erwin for your quickly reply,but after tested ,i attention simply swap first and last constranit approach isn't as well as randomizing.

Re: Bullet & ODE LCP Solver

Posted: Fri Sep 29, 2006 7:07 am
by Erwin Coumans
jiangwei wrote:
Erwin Coumans wrote:
Good point. We recently discussed this reordering of constraints. Doing a randomize can work in some situations, but opinions vary. Other approaches are sweeping back-and-forwards or sorting them in order of deepest penetration. See the discussion here:

http://www.continuousphysics.com/Bullet ... 4&start=15

Erwin
Thanks Erwin for your quickly reply,but after tested ,i attention simply swap first and last constranit approach isn't as well as randomizing.
Which proves that opinions vary, as I mentioned.