Skip to content

Commit

Permalink
Merge pull request #407 from bryanmiller/GSCHED-613
Browse files Browse the repository at this point in the history
GSCHED-613: fix avail_resources array comparison
  • Loading branch information
sraaphorst authored Feb 16, 2024
2 parents d0555a0 + e5ec3b6 commit 3c96fa5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions scheduler/core/components/collector/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,18 +394,9 @@ def _calculate_target_info(self,
# 3. The elevation constraints are met
sa_idx = night_events.sun_alt_indices[night_idx]

# TODO: This is to help diagnose GSCHED-613.
if len(sa_idx) != len(night_events.times[night_idx]):
# This is for the purposes of setting a breakpoint to intercept when we know that the following c_idx
# calculation will fail due to broadcasting incompatible numpy arrays.
# In the typical default date case, this happens at night_idx 6 for GN, with shapes:
# (633,) for sa_idx
# (634,) for the other arrays.
set_breakpoint_here = 1

c_idx = np.where(
np.logical_and(sb[sa_idx] <= targ_sb,
np.logical_and(avail_resources == 1,
np.logical_and(avail_resources[sa_idx] == 1,
np.logical_and(targ_prop[sa_idx] >= elev_min,
targ_prop[sa_idx] <= elev_max)))
)[0]
Expand Down

0 comments on commit 3c96fa5

Please sign in to comment.