Commit 55ece350 authored by Xiaowu Zhang's avatar Xiaowu Zhang

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

parent 946042a6
......@@ -331,6 +331,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