Skip to content

Commit

Permalink
ZLT bugfix : If there is no rates available between acceptable and fi…
Browse files Browse the repository at this point in the history
…rst dropping rate (i.e. If the current variables already do the max throughput) just skip monotonic processing
  • Loading branch information
cdelzotti authored and tbarbette committed Nov 4, 2024
1 parent c47f1ec commit 17a63ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion npf/expdesign/zltexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def need_run_for(self, next_val):

def ensure_monotonic(self, max_r, vals_for_current):

if not self.monotonic:
if not self.monotonic and max_r < max(self.executable_values):
# If the function is not monotonic, we now have to try rates between the max acceptable and the first dropping rate
after_max = next(iter(filter(lambda x : x > max_r, self.executable_values)))
if after_max not in vals_for_current:
Expand Down

0 comments on commit 17a63ae

Please sign in to comment.