Handling binary constraints in CAE of electrical machines