def calculer_date_dispo(self, ordo, machine, job):
     nouvelle_date_fin = 0
     for operation in range(machine):
         nouvelle_date_debut = max(nouvelle_date_fin,
                                   ordo.date_disponibilite(operation))
         nouvelle_date_fin = nouvelle_date_debut + job.duree_operation(
             operation)
     return nouvelle_date_fin - ordo.date_disponibilite(0)
 def calculer_duree_latence(self, ordo, machine, job):
     if machine == ordo.nb_machines - 1:
         return 0
     else:
         nouvelle_date_fin = 0
         for operation in range(machine + 1, job.nb_op):
             nouvelle_date_debut = max(nouvelle_date_fin,
                                       ordo.date_disponibilite(operation))
             nouvelle_date_fin = nouvelle_date_debut + job.duree_operation(
                 operation)
         return nouvelle_date_fin - ordo.date_disponibilite(machine + 1)
 def ordonnancer_job(self, job):
     self.seq += [job]
     for mach in range(self.nb_machines):
         if mach == 0:   # première machine
             self.fixer_date_debut_operation(job, 0, self.date_dispo[0])
         else:   # machines suivantes
             date = max(self.date_dispo[mach-1], self.date_dispo[mach])
             self.fixer_date_debut_operation(job, mach, date)
         self.date_dispo[mach] = self.date_debut_operation(job, mach) + \
         job.duree_operation(mach)
     self.dur = max(self.dur, self.date_dispo[self.nb_machines-1])
    def hypothetic_ordonnancer_job(self, job):
        seq = self.seq +[job]
        date_dispo = self.date_dispo.copy()
        date_deb = job.date_deb

        for mach in range(self.nb_machines):
            if mach == 0:  # première machine
                date_deb[mach] = date_dispo[0]
            else:  # machines suivantes
                date = max(date_dispo[mach - 1], date_dispo[mach])
                date_deb[mach] = date
            date_dispo[mach] = date_deb[mach] + job.duree_operation(mach)
        return max(self.dur, date_dispo[self.nb_machines - 1])
 def ordonnancer_job(self, job):
     self.seq.append(job)
     for operation in range(job.nb_op):
         date1 = self.date_disponibilite(operation)
         date2 = job.date_deb[operation]
         nouvelle_date_debut = max(date1, date2)
         nouvelle_date_fin = nouvelle_date_debut + job.duree_operation(
             operation)
         self.fixer_date_disponibilite(operation, nouvelle_date_fin)
         self.fixer_date_debut_operation(job, operation,
                                         nouvelle_date_debut)
         if operation < job.nb_op - 1:
             self.fixer_date_debut_operation(job, operation + 1,
                                             nouvelle_date_fin)
Beispiel #6
0
 def calculer_duree_jobs(self, machine, liste_jobs):
     jobs = [self.get_job_by_id(i) for i in liste_jobs]
     return sum([job.duree_operation(machine) for job in jobs])
 def calculer_duree_jobs(self, machine, liste_jobs):
     return sum([job.duree_operation(machine) for job in liste_jobs])