Commit 0dfeb83e authored by Dr.李's avatar Dr.李

turn over threshold to be relative

parent 4ac14795
...@@ -25,7 +25,7 @@ class ThresholdExecutor(ExecutorBase): ...@@ -25,7 +25,7 @@ class ThresholdExecutor(ExecutorBase):
else: else:
turn_over = self.calc_turn_over(target_pos, self.current_pos) turn_over = self.calc_turn_over(target_pos, self.current_pos)
if turn_over >= self.threshold: if turn_over >= self.threshold * self.current_pos.weight.sum():
self.current_pos = target_pos.copy() self.current_pos = target_pos.copy()
return turn_over, self.current_pos.copy() return turn_over, self.current_pos.copy()
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment