Skip to content

Commit

Permalink
Issue #0: Exclude ending windows from upcoming opportunities
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark2000 committed Dec 14, 2023
1 parent 1974d52 commit 47b1d76
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ def upcoming_opportunities(self) -> list[dict]:
list: list of upcoming opportunities
"""
start = bisect.bisect_left(
self.opportunities, self.simulator.sim_time, key=lambda x: x["window"][1]
self.opportunities,
self.simulator.sim_time + 1e-12,
key=lambda x: x["window"][1],
)
upcoming = self.opportunities[start:]
return upcoming
Expand Down

0 comments on commit 47b1d76

Please sign in to comment.