Plan generation for flexible assembly systems