Constrain solving - as complicated as that

Constrain solving - as complicated as that

Cris-Ideas
Advisor Advisor
7,197 Views
117 Replies
Message 1 of 118

Constrain solving - as complicated as that

Cris-Ideas
Advisor
Advisor

Hello All,

I have started this thread to bring up and hopefully explain problems related to constrain solver and gain knowledge on how exactly constrain solver handles the assembly.

This is because I am experiencing many problems related to assembly solving that should not be expected.

Originally I was discussing this issues in the thread related to problems with flexible assemblies but I decided to split this topics and this thread is intended to focus on constrain solver it self.

 

I would like to encourage especially people from Autodesk who have the knowledge about constrain solver it self to participate and help us understand better how this works to make our lives easier.

 

I will be posting videos and data sets, so anyone could try the same what I do and see if is getting the same outcome.

I also would like to ask you to do the same, and if possible use videos with comment rather than long posts, as this is more easy to follow and understand the intent.

I will be also giving each example a name, so it was easy to track replays. So when posting please make it obvious what you are referring to. 

 

If you are interested in problems related to flexible assemblies please visit this thread Flexibility not working properly in inventor - BUG that has been there for ever

 

Cris.

 

 

Cris,
https://simply.engineering
0 Likes
7,198 Views
117 Replies
Replies (117)
Message 21 of 118

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

I was talking about case #172. Beta site offers a no-install-needed build to try. You can take a look.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 22 of 118

Cris-Ideas
Advisor
Advisor

Hi @johnsonshiue

regarding #172 have you seen (video) that we have found very different behaviour when "enable redundant constrain analysis" Application option checked and unchecked?

So there is something obviously related to application option.

 

I have installed 2019 so will try.

for  now was not able to get beta running (some problems with FRAMES).

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 23 of 118

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

Yes, the option does alter solve behavior. When the option is off, Inventor would do the so-called "quick solve" based on the component status known to the solver. It means if a given component was not in the constraint loop and it was solved previously, the given constraint will not be re-solved. When the option is on, Inventor will do full solve, meaning every constraint will be solved again. It will take slightly longer but the result should be more robust.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 24 of 118

Cris-Ideas
Advisor
Advisor

#172

@johnsonshiue

But when option is ON it fails and when it is off it works.

So totally the opposite what you say we should expect.

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 25 of 118

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

It is sort of by luck in this case. It is not really about solve or fail solve. The case benefits from the option off is because other "solved" components stay put. While in the full solve, all components are solved based on solver-defined order. What you are seeing is actually the situation of multiple solutions. Sometimes, the solver may run into a rabbit hole and cannot find an apparent solution, when there is clearly one. Sometimes, it may find the solution but it is not what user wants. Certainly, the number of solutions is not open-ended for any given case. The art here is to find the one closest to users' intent quickly.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 26 of 118

Cris-Ideas
Advisor
Advisor

#172

@johnsonshiue

But there is one solution for a given set of constrains.

All other free DOFs are completely free and not related.

 

So how this is possible so solver gets in to position is not able to find a solution? It is not finding other solution as new setting for mate10 is satisfied only in ONE explicit position.

So if it was solving everything from the beginning it should find this solution easily. As no other constrain is preventing this assembly elements from moving in a way that mate10 is satisfied on both faces of the plate.

 

So there is no logical explanation why this solution is not obtained. Even if we consider bolt as solved it only has two constrains to the plate. Axial mate and face mate.

Axial mate is undirectional. Face mate is explicitly directional. So axial mate in any case is not capable of blocking face mate from getting assigned value.

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 27 of 118

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

It is not true for every set of constraints, there is only one solution. For simple cases, it may be true. But, when there are more constraints involved, usually there are more than one solution. For example, for an opposite mate, the two vectors can be pointing at each other. But, they can also pointing away from each other (180 deg). When two vectors are angled at 180 deg, there are also two solutions: stay put (rotate around) or flip.

I am not saying every constraint system always has multiple solutions. But, whenever you have two vectors at 0 or 180 degree, you will have multiple solutions.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 28 of 118

Cris-Ideas
Advisor
Advisor

#172

@johnsonshiue

But here we have a simple example we can stick to.

This needs explanation why inventor brings up this error. when it should not. We all agree this is wrong.

For this example we can clearly analyse how each constrain acts and what are all possible solutions.

I am not talking in general, but about this particular case.

 

We know all about this case. And he have confirmed consistent way of getting error message we should not be getting. Also we have confirmed that setting "enable redundant constrain analysis" is getting this error message to appear, and when it is off error does not appear.

 

So I do not want explanation for ALL cases I want only explanation for this particular case. I am not interested here in analysing constrains we do not have and assemblies we do not have.

We have an assembly in hand, it is simple, it is constrained in the way we all would accept as "properly constrained", although of course other workflows are available.

So my point is that in such situation software should produce stable correct solution. Other possible explanation is only that this assembly is not constrained properly, but  until now no one brought this up.

 

So are we able to explain this particular assembly in this particular circumstances? Or why this error message appears must remain unsolved mystery?

 

Cris.

 

Cris,
https://simply.engineering
0 Likes
Message 29 of 118

johnsonshiue
Community Manager
Community Manager

Hi Cris,

 

I will follow up with the solver team to find the explanation. I am not equipped to explain this behavior but I am not surprised by the behavior regardless. I will get back to you with the findings.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 30 of 118

Cris-Ideas
Advisor
Advisor

@johnsonshiue wrote:

Hi Cris,

 

I will follow up with the solver team to find the explanation. I am not equipped to explain this behavior but I am not surprised by the behavior regardless. I will get back to you with the findings.

Many thanks!


@johnsonshiue

We will hold to the promise.

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 31 of 118

Frederick_Law
Mentor
Mentor

This a bug in the solver.  Too bad the error didn't tell user which relation was conflicting.  Need to run it in debugger to see which one cause the conflict.

 

I'll try to guess what the solver is doing.  I could be completely wrong.

Before the mate is edited.  The plate cannot move.  The bolt and washer can slide and rotate on the hole.  Washer and nut could slide and rotate on the bolt.

The washer and the bolt.  They slide together because of face-face constrain.  Now they move, does the bolt move with the washer or the washer move with the bolt?  We don't know.  It doesn't matter to us but its important to the solver.

Now add the other washer and nut.  Which one move first when we drag them?  Which one move first when we edit a constrain?

Don't forget the plate.  It is fixed but we don't know where it fit in the sequence of events.

 

Now we edit the constrain and click apply.  In our mind we'll take the washer and flip it to the other side add mate it to the plate, then do the same to the bolt and then do the same to the washer and nut.  Logical, to human, because we anticipated the result.

The computer have no idea what the result is until it is done.

Since the constrain is on the plate and washer, solve might start with them.  After that, it'll depends on if it'll go through constrains in the part its resolving now (washer or plate).  Or next part in memory ( ie. Occurrence.Item(1) ).

You can see it get complex real quick.

 

Assume it take the washer on the bolt first.  New mate need to move it and rotate it.  Again which first?

Lets move it first.  Can the mate be resolve?  No, face normal are on same direction.

Rotate the washer so face normal opposite.  Ok it works.

 

Now who's next?  Lets fix all constrains in the washer first, my call.

Next constrain, assume the axis-axis with the bolt.  Looks good.  So the washer is done.

 

BTW it took my 30min to think and type this but less then a second for the computer to solve the whole thing.

 

Lets go to next part in the Occurrence list.  Is it the bolt?  Maybe not, it could be the plate or the nut.

Let say its the nut.  Can we resolve the nut?  It doesn't have any constrain to the washer, so it looks good.

 

So you can see during the solving, parts are in a temporary state until the solver go through everything a few times.  It may not (most likely not) get a solution in the first pass.  It'll need to go through multiple passes to get to a solution.  In between there are lots of paths and solutions.  It depends which one the solver ran into (THE rabbit hole) and get stuck.

 

Of cause we all blame the developer for not testing everything.  Well you (anyone care to read my stupid postSmiley Wink) can try to count how many possible branches this simple assembly could have.

 

Now I get tried of typing.  I'll go take a break.

Message 32 of 118

johnsonshiue
Community Manager
Community Manager

Hi Frederick,

 

You are not far off. What you described is exactly how I anticipate it works. The inconsistent behavior is wrong. It shows there is indeed "a" solution which would satisfy the user's need. But, it would depend on which components stay put and who move first. Anyway, I will work with the solver team to understand the behavior better. Hopefully, there would be a good solution or at least a reasonable explanation.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 33 of 118

Cris-Ideas
Advisor
Advisor

@Frederick_Law


@Frederick_Law wrote:

Now I get tried of typing.  I'll go take a break.


Smiley Wink Use video recording with mic.

 

I will also speculate a bit before we get an answer form actual solver team.

 

As for the solver I would never approach solving this kid of task in sequential method as you described.

Instead taking all the constrains in the assembly I would build single set of geometrical equations describing relations of the components and try to solve this non linear set as whole.

Now this would not limit direction (witch component is master in constrain) nor order of constrains.

Only this brings a problem of scale and time.

So to improve performance depending on what has changed in the assembly since last solve some algorithms would be needed to limit the number of constrains in the solve assuming other all being met by the solution. (do the local solve)

This would however bring risk of that after local solve calculated position of the component does not meet constrains that was assumed as already met.

So if there is no check for such situation this would lead to the situation when component is not where it should be according to its constrains because its position was only calculated basing on constrains included in the local solve.

And that's would look exactly like some assemblies form my videos.

 

But if there was condition to validate the solution for whole assembly this would most likely be found out and stopped and global solve would must have been done.

 

Taking the components are most often constrained in groups on to the other and not all together in totally tangled scheme equations split in to blocks that are only connected together by few unknowns. This allows for some optimisation in solving.

 

So that's my theory in general.  

But of course it may be far from reality Smiley Wink

 

Cris.

Cris,
https://simply.engineering
Message 34 of 118

Cris-Ideas
Advisor
Advisor

I have an idea.

Lest have some fun and try to guess which is closer to truth. 

 

I propose to give likes to the theory you thing is better.

 

Cris.

Cris,
https://simply.engineering
Message 35 of 118

Frederick_Law
Mentor
Mentor

Its bad enough I'm typing this at work.  Video?  Voice?  You got a job for me?Smiley LOL

 

Linear equations.  Don't even know where to start to solve this problem.

I think it will still need to try/consider translating and rotating parts to find a solution but I have no idea.

 

Still it could have more then one solutions depends on how its setup.  Can't prove it, not setting up equations.

 

And if you can come up with a solution, you don't need a job.

 

My brain hurts and fingers too.  Lets go home, its long weekend here.

0 Likes
Message 36 of 118

Cris-Ideas
Advisor
Advisor

I do not know exactly how to build this equations from constrains.

But overall process would be solved very similar to FEM analysis where equivalent of  constrain are shape functions of elements.

Elements are connected but even human does not know (only meshing algorithm know) in what order and all elements interact with each other.

Solution is found once everything moves in to the state where whole set has minimum energy.

 

Logically (for a human) both situations (constrains solving and FEM solving) are similar.

Only I have no idea how to code constrain solve. FEM I did form scratch.

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 37 of 118

Frederick_Law
Mentor
Mentor

FEM mesh (points and vectors) all bodies and you know how long it take to mesh and solve.

You can try consider constrains in points and vectors.

0 Likes
Message 38 of 118

Cris-Ideas
Advisor
Advisor

In case of contrarians equivalent to meshing is done by the user so it takes no time. (constrains are the mesh), and nodes are components.

 

Solve does not take to long as equation set would be fairly simple and not very big.

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 39 of 118

Curtis_Waguespack
Consultant
Consultant

@Frederick_Law @johnsonshiue @Cris-Ideas

 

You three sitting around trying to "think like a constraint" are starting to worry me! Smiley Tongue

 

Something that I noticed ... someone else might have mentioned this already... but if you place an insert constraint between DIN 9021 6,4:1 and DIN 9021 6,4:2  with an offset of 5 mm, and then edit Mate:10 and change it's selection to the other side of the plate.... then there is no warning message even with the "Enable Relationship Redundancy Analysis turned on.

 

Does that jibe with what you were thinking when you were "thinking like a constraint"?

 

Also, I suspect that if this assembly is opened in 2019 and an axis to axis constraint like Mate:3 is made to be Opposed or Aligned, then we might see different results too... but I didn't experiment with it.

EESignature

0 Likes
Message 40 of 118

Cris-Ideas
Advisor
Advisor

I think like a constrain all the time. Smiley Happy

There is no other way to get things done.

 

Cris.

Cris,
https://simply.engineering
0 Likes