An adaptive representation for a genetic algorithm in solving flexible job-shop scheduling and rescheduling problems