Commit a4da134abb6a9e42ae52d3feb8503d3864fb5344

Authored by Alain Klotz
1 parent c3727d8b
Exists in dev

Update AK.

Showing 1 changed file with 9 additions and 2 deletions   Show diff stats
src/core/pyros_django/scheduling/A_Scheduler.py
... ... @@ -236,6 +236,10 @@ class A_Scheduler(Agent):
236 236 """
237 237 t0 = time.time()
238 238 self.DPRINT = True
  239 +
  240 + # ===================
  241 + # --- Initializations
  242 + # ===================
239 243 # --- Get the incoming directory of the night
240 244 info = self.get_infos()
241 245 rootdir = info['rootdir']
... ... @@ -263,7 +267,10 @@ class A_Scheduler(Agent):
263 267 schedule_order = np.zeros(self.BINS_NIGHT, dtype=int) -1
264 268 schedule_jd = np.zeros(self.BINS_NIGHT, dtype=float)
265 269 schedule_scientific_programm_id = np.zeros(self.BINS_NIGHT, dtype=int) -1
  270 +
  271 + # ===========================================================================================================
266 272 # --- Initialize the predictive schedule by the effective schedule from start of the current instant (=index)
  273 + # ===========================================================================================================
267 274 try:
268 275 last_schedule = EffectiveSchedule.objects.last()
269 276 except EffectiveSchedule.DoesNotExist:
... ... @@ -285,7 +292,7 @@ class A_Scheduler(Agent):
285 292 schedule_jd[0:index] = schedule_eff_jd[0:index]
286 293 schedule_scientific_programm_id[0:index] = schedule_eff_scientific_programm_id[0:index]
287 294 else:
288   - # --- Case when there is not ever effective schedule for this night
  295 + # --- Case when there is no effective schedule for this night
289 296 print(f"No effective schedule for this night {night}")
290 297 else:
291 298 # --- Case of invalid entry in the database
... ... @@ -314,9 +321,9 @@ class A_Scheduler(Agent):
314 321 if os.path.exists(ephfile):
315 322 self.dprint(f"Read file {seqfile}")
316 323 # --- seq_info = sequence dictionary
317   - # --- eph_info = ephemeris dictionary
318 324 seq_info = pickle.load(open(seqfile,"rb"))
319 325 #print("="*20 + "\n" + f"{seq_info=}")
  326 + # --- eph_info = ephemeris dictionary
320 327 eph_info = pickle.load(open(ephfile,"rb"))
321 328 #print("="*20 + "\n" + f"{eph_info=}")
322 329 # ---
... ...