Automated sequencing and sub group detection in assembly planning