I have a question.
I have a distance that is filled by a start rail, rail * number of rails and an end rail.
Only sometimes the end rail is a very small size, so that the start rail has to be shortened so that the end rail becomes longer.
The formulas for the rails are;
Start rail= 2.5*pallet+100
Number of rails= Floor((distance-start rail)/rail)
End rail= distance – start rail- (rail*number of rails)
Now I have a code :
If end rail <= 1000
Start rail= 1.5*pallet+100
If the end rail is longer than 1000mm, it is fine.
Only when the end rail is shorter than 1000mm, the start rail is shortened making the end rail longer, but since it then becomes longer than 1000mm again, the model automatically adjusts the start rail again to 2.5*pallet+100, making the end rail is again less than 1000mm. This way the model automatically goes back and forth every time you regenerate.
Is there a way to create conditions so that this doesn't go back and forth?
I can't figure it out myself, thanks in advance for the help.