Skip to content

Commit

Permalink
Merge pull request #276 from bryanmiller/gmax_refactoring
Browse files Browse the repository at this point in the history
Fixes a likely bug in standards placement
  • Loading branch information
stroncod authored Jul 11, 2023
2 parents f8a63a2 + 4171730 commit a6729d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scheduler/core/components/optimizer/greedymax.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,11 +960,14 @@ def add(self, night: int, max_group_info: MaxGroup) -> bool:

# if n_slots_remaining > len(best_interval): # this would avoid splitting
# split at atoms
# Reserve space for the cals, otherwise the science observes will fill the interval
n_slots_filled = n_slots_cal
for obs in prog_obs:
# Reserve space for the cals, otherwise the science observes will fill the interval
n_slots_filled = n_slots_cal
print(f"Adding science: {obs.to_unique_group_id} {obs.id.id}")
n_slots_filled = self._add_visit(night, obs, max_group_info, best_interval, n_slots_filled)
if after_std is not None:
# "put back" time for the final standard
n_slots_filled -= Plan.time2slots(self.time_slot_length, standards[-1].exec_time())

if after_std is not None:
obs = after_std
Expand Down

0 comments on commit a6729d9

Please sign in to comment.