From ede30df161117136cd61877359124752a8812dd2 Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 27 Oct 2015 14:15:57 +0300 Subject: [PATCH] set 0.5 errors on check fuel --- core/src/main/java/ru/trader/analysis/VendorsGraph.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/ru/trader/analysis/VendorsGraph.java b/core/src/main/java/ru/trader/analysis/VendorsGraph.java index a0d25d2..492c482 100644 --- a/core/src/main/java/ru/trader/analysis/VendorsGraph.java +++ b/core/src/main/java/ru/trader/analysis/VendorsGraph.java @@ -313,7 +313,7 @@ public class VendorsGraph extends ConnectibleGraph { public Path getPath(double fuel){ Path res = null; for (Path p : paths) { - if ((fuel >= p.getMinFuel() || getSource().getEntry().canRefill()) && fuel <= p.getMaxFuel()) { + if (((fuel - p.getMinFuel() > 0.05) || getSource().getEntry().canRefill()) && fuel <= p.getMaxFuel()) { if (getProfile().getPathPriority().equals(Profile.PATH_PRIORITY.FAST)) { if (res == null || (p.getSize() < res.getSize() || p.getSize() == res.getSize() && p.getFuelCost() < res.getFuelCost()) && p.getRefillCount(fuel) <= res.getRefillCount(fuel)) { res = p;