A genetic algorithm for distibuted and flexible job-shop scheduling problems