From a4da134abb6a9e42ae52d3feb8503d3864fb5344 Mon Sep 17 00:00:00 2001 From: Alain Klotz Date: Thu, 19 Oct 2023 16:09:26 +0200 Subject: [PATCH] Update AK. --- src/core/pyros_django/scheduling/A_Scheduler.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/pyros_django/scheduling/A_Scheduler.py b/src/core/pyros_django/scheduling/A_Scheduler.py index 6bdaa99..8ef83f1 100755 --- a/src/core/pyros_django/scheduling/A_Scheduler.py +++ b/src/core/pyros_django/scheduling/A_Scheduler.py @@ -236,6 +236,10 @@ class A_Scheduler(Agent): """ t0 = time.time() self.DPRINT = True + + # =================== + # --- Initializations + # =================== # --- Get the incoming directory of the night info = self.get_infos() rootdir = info['rootdir'] @@ -263,7 +267,10 @@ class A_Scheduler(Agent): schedule_order = np.zeros(self.BINS_NIGHT, dtype=int) -1 schedule_jd = np.zeros(self.BINS_NIGHT, dtype=float) schedule_scientific_programm_id = np.zeros(self.BINS_NIGHT, dtype=int) -1 + + # =========================================================================================================== # --- Initialize the predictive schedule by the effective schedule from start of the current instant (=index) + # =========================================================================================================== try: last_schedule = EffectiveSchedule.objects.last() except EffectiveSchedule.DoesNotExist: @@ -285,7 +292,7 @@ class A_Scheduler(Agent): schedule_jd[0:index] = schedule_eff_jd[0:index] schedule_scientific_programm_id[0:index] = schedule_eff_scientific_programm_id[0:index] else: - # --- Case when there is not ever effective schedule for this night + # --- Case when there is no effective schedule for this night print(f"No effective schedule for this night {night}") else: # --- Case of invalid entry in the database @@ -314,9 +321,9 @@ class A_Scheduler(Agent): if os.path.exists(ephfile): self.dprint(f"Read file {seqfile}") # --- seq_info = sequence dictionary - # --- eph_info = ephemeris dictionary seq_info = pickle.load(open(seqfile,"rb")) #print("="*20 + "\n" + f"{seq_info=}") + # --- eph_info = ephemeris dictionary eph_info = pickle.load(open(ephfile,"rb")) #print("="*20 + "\n" + f"{eph_info=}") # --- -- libgit2 0.21.2