lmi-commits
[Top][All Lists]

## [lmi-commits] [lmi] valyuta/002 6b28993 06/65: clarify non-MEC solves

 From: Greg Chicares Subject: [lmi-commits] [lmi] valyuta/002 6b28993 06/65: clarify non-MEC solves Date: Wed, 16 Sep 2020 16:55:12 -0400 (EDT)

```branch: valyuta/002
commit 6b28993bcae428e57c3205b45dc424d308dc0ca5
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

clarify non-MEC solves
---
ihs_avsolve.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 2464be5..7631208 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -126,6 +126,9 @@ class SolveHelper
/// contract ever becomes a MEC. The result is naturally a boundary
/// value, so it is not interesting to compare it to any solve input.
///
+/// Non-MEC solves for loan or withdrawal are untested--see:
+///   https://lists.nongnu.org/archive/html/lmi/2009-02/msg00028.html
+///
/// Non-MEC solves seem acceptably fast despite this two-valued step
/// function. Other options considered include:
///  - Use MEC duration. This inserts a monotone segment into the
@@ -232,8 +235,7 @@ currency AccountValue::SolveTest(currency a_CandidateValue)

if(mce_solve_for_non_mec == SolveTarget_)
{
-//      return 0.5 - InvariantValues().IsMec;
-        return currency(InvariantValues().IsMec ? -1.0 : 1.0); // Backport
first.
+        return currency(InvariantValues().IsMec ? -1.0 : 1.0);
}

return value - SolveTargetCsv_;

```