Commit 482f2f41 authored by Jérome Perrin's avatar Jérome Perrin

hack: integreate float equivalence tester patch

parent 385d0e05
......@@ -94,6 +94,13 @@ class FloatEquivalenceTester(Predicate, EquivalenceTesterMixin):
# How to know if the other value is negligible or not ?
epsilon = abs(prevision_value * DEFAULT_PRECISION)
if decision_value == 0.0:
# A delivery quantity of 0 is an exceptional case that we cannot really
# handle with the current approach of delivery ratio.
decision_value = sum([m.getCorrectedQuantity() for m in
decision_movement.getDeliveryRelatedValueList(
portal_type='Simulation Movement')])
delta = abs(decision_value - prevision_value)
# XXX we should use appropriate property sheets and getter methods
......
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