Tolerance plays a crucial role in the quality of a product. When different parts of an assembly are assembled, gap
arises due to variation in dimensions. The tolerance for the gap is calculated using two methodologies: ANFIS and cost function
optimization. In ANFIS the network is trained using mean dimensions, standard deviations as inputs and tolerances as output.