PartJobShop: write function to calculate routes