Commit 2f9b188c authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Klaus Wölfel

RuleMixin: Don't compensate on frozen if quantity is 0

parent 90cec717
......@@ -344,6 +344,9 @@ class RuleMixin(Predicate):
if decision_movement.isFrozen():
# Frozen must be compensated
if not _compare(divergence_tester_list, prevision_movement, decision_movement):
if not decision_movement_quantity:
# We don't compensate if compensated quantity is 0
continue
new_movement = decision_movement.asContext(
quantity=-decision_movement_quantity)
new_movement.setDelivery(None)
......
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