lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5286b9e 2/3: Force input inforce-as-of date t


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5286b9e 2/3: Force input inforce-as-of date to be an exact monthiversary date
Date: Mon, 2 Jul 2018 10:51:05 -0400 (EDT)

branch: master
commit 5286b9eac04ae269ccd8d389d895bf266a879775
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Force input inforce-as-of date to be an exact monthiversary date
    
    This experimental change warns when the input inforce-as-of date is not
    an exact monthiversary date, and then forces it to be so. This is the
    same as the behavior prior to 2015-11, except that now a warning is
    displayed in all cases, and no input file is summarily rejected.
    
    Changes in 2015-11 gave an error message essentially identical to this
    commit's warning, and terminated the current task. This was found to be
    too severe, because it prevented editing an offending cell to correct
    the problem. For that reason, the date check was bypassed (and any
    problem was not even diagnosed) except for input files from external
    sources.
    
    Now, several years later, the problem is not seen in external files: the
    diagnostic code provides peace of mind, but its message is not observed
    in practice. However, input entered in lmi has continued to be treated
    as it was before 2015-11.
    
    The new behavior might not be ideal, and may later be refined. The
    immediate goal is to remove the dependency on Input::InforceDataSource,
    which needs to be expunged.
---
 input_harmonization.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/input_harmonization.cpp b/input_harmonization.cpp
index a47814c..042b3cc 100644
--- a/input_harmonization.cpp
+++ b/input_harmonization.cpp
@@ -1126,15 +1126,13 @@ void Input::set_inforce_durations_from_dates()
 // Therefore, these diagnostics are temporarily suppressed for input
 // files created by lmi--but not for extracts from vendor systems,
 // whose dates should not be altered by lmi users.
-if(1 != InforceDataSource.value())
-  {
     if(expected != InforceAsOfDate.value() && 
!contains(global_settings::instance().pyx(), "off_monthiversary"))
         {
-        alarum()
+        warning()
             << "Input inforce-as-of date, "
             << InforceAsOfDate.value().str()
             << ", should be an exact monthiversary date."
-            << "\nIt would be interpreted as "
+            << "\nIt will be interpreted as "
             << expected.str()
             << ", which is "
             << InforceYear
@@ -1146,6 +1144,8 @@ if(1 != InforceDataSource.value())
             << " effective date."
             << LMI_FLUSH
             ;
+        InforceAsOfDate = expected;
+        LastMaterialChangeDate = std::min(LastMaterialChangeDate, 
InforceAsOfDate);
         }
 
     if
@@ -1153,11 +1153,10 @@ if(1 != InforceDataSource.value())
         && (0 == InforceYear && 0 == InforceMonth)
         )
         {
-        alarum()
+        warning()
             << "Inforce illustrations not permitted during month of issue."
             << LMI_FLUSH
             ;
         }
-  }
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]