Optimization of Wire Electrical Discharge Machining