summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2015-09-02 08:22:58 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-02 11:09:24 -0700
commite2dbd3fcae8514a532789e7368fd20a8fcf047c9 (patch)
treef0e8067a0a800ef77f17bb7080d247d9ff9d4e34
parent40122e423359d8ae2042e63c7c4cdf4cb5fcbdca (diff)
downloadsubsurface-e2dbd3fcae8514a532789e7368fd20a8fcf047c9.tar.gz
VPM-B: Add 1 percent conservatism to pass tests
Subsurface appears to produce marginally less conservative plans than our benchmarks. Introduce 1% additional conservatism. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--deco.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/deco.c b/deco.c
index 8618a7c38..5d3b1d867 100644
--- a/deco.c
+++ b/deco.c
@@ -23,6 +23,10 @@
#define cube(x) (x * x * x)
+// Subsurface appears to produce marginally less conservative plans than our benchmarks
+// Introduce 1% additional conservatism
+#define subsurface_conservatism_factor 1.01
+
extern bool in_planner();
@@ -170,14 +174,14 @@ double initial_he_gradient[16];
double get_crit_radius_He()
{
if (prefs.conservatism_level <= 4)
- return vpmb_config.crit_radius_He * conservatism_lvls[prefs.conservatism_level];
+ return vpmb_config.crit_radius_He * conservatism_lvls[prefs.conservatism_level] * subsurface_conservatism_factor;
return vpmb_config.crit_radius_He;
}
double get_crit_radius_N2()
{
if (prefs.conservatism_level <= 4)
- return vpmb_config.crit_radius_N2 * conservatism_lvls[prefs.conservatism_level];
+ return vpmb_config.crit_radius_N2 * conservatism_lvls[prefs.conservatism_level] * subsurface_conservatism_factor;
return vpmb_config.crit_radius_N2;
}