A Functional Heuristic Algorithm for the Flowshop Scheduling Problem