AUTOMATED LATTICE OPTIMIZATION OF HINGE FITTING WITH DISPLACEMENT CONSTRAINT