Compare the signs - 3dec fish

Hi,
I would like to see the sign (in terms of velocity) of some blocks (after applying the input) and compare it with the sign (in terms of acceleration) of the input.

My idea is as follows:
sgn (vbk) = sgn (a)
And depending on the situation create two scenarios
If sgn (vbk) is equal to sgn (a) → scenario 1
If sgn (vbk) is not equal to sgn (a) → scenario 2

Can you tell me how to do it?
Thanks in advance

1 Like

You can use the math.sgn function. See here: math.sgn — 3DEC 7.0 documentation (itascacg.com)

1 Like

instead, for obtain the sum in terms of mass of all the blocks in the model?