Task Assignment and Sub-assembly Scheduling in Flexible Assembly Lines