Selection of Optimal Working Conditions in EDM