A hierarchical approach for the FMS scheduling problem