[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9ba754c 11/14: Replace 'EePmt' and 'ErPmt' (p
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9ba754c 11/14: Replace 'EePmt' and 'ErPmt' (production) |
Date: |
Sat, 29 Aug 2020 19:34:50 -0400 (EDT) |
branch: master
commit 9ba754cf64fdc2a6f31f032576c60b983c6e9fc0
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Replace 'EePmt' and 'ErPmt' (production)
In the production system, these are used only in circumstances where
they happen to equal their initial values in class modal_outlay. Each
replacement is guarded by an assertion that guarantees it's okay; those
assertions can be removed when 'EePmt' and 'ErPmt' are eradicated.
---
ihs_avstrtgy.cpp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/ihs_avstrtgy.cpp b/ihs_avstrtgy.cpp
index 6dcb90d..751c2a9 100644
--- a/ihs_avstrtgy.cpp
+++ b/ihs_avstrtgy.cpp
@@ -63,11 +63,13 @@ double AccountValue::CalculateSpecAmtFromStrategy
,mcenum_sa_strategy strategy
) const
{
+ LMI_ASSERT(Outlay_->ee_modal_premiums() == InvariantValues().EePmt);
+ LMI_ASSERT(Outlay_->er_modal_premiums() == InvariantValues().ErPmt);
double annualized_pmt =
- Outlay_->ee_premium_modes()[reference_year]
- * InvariantValues().EePmt [reference_year]
- + Outlay_->er_premium_modes()[reference_year]
- * InvariantValues().ErPmt [reference_year]
+ Outlay_->ee_premium_modes ()[reference_year]
+ * Outlay_->ee_modal_premiums()[reference_year]
+ + Outlay_->er_premium_modes ()[reference_year]
+ * Outlay_->er_modal_premiums()[reference_year]
;
switch(strategy)
{
@@ -318,12 +320,13 @@ double AccountValue::DoPerformPmtStrategy
double AccountValue::PerformEePmtStrategy() const
{
+ LMI_ASSERT(Outlay_->ee_modal_premiums() == InvariantValues().EePmt);
return DoPerformPmtStrategy
(mce_solve_ee_prem
,Outlay_->ee_premium_modes()[Year]
,Outlay_->ee_premium_modes()[0]
,yare_input_.InsuredPremiumTableFactor
- ,InvariantValues().EePmt
+ ,Outlay_->ee_modal_premiums()
,yare_input_.PaymentStrategy
);
}
@@ -332,12 +335,13 @@ double AccountValue::PerformEePmtStrategy() const
double AccountValue::PerformErPmtStrategy() const
{
+ LMI_ASSERT(Outlay_->er_modal_premiums() == InvariantValues().ErPmt);
return DoPerformPmtStrategy
(mce_solve_er_prem
,Outlay_->er_premium_modes()[Year]
,Outlay_->er_premium_modes()[0]
,yare_input_.CorporationPremiumTableFactor
- ,InvariantValues().ErPmt
+ ,Outlay_->er_modal_premiums()
,yare_input_.CorporationPaymentStrategy
);
}
- [lmi-commits] [lmi] master ccb70ce 04/14: Self test: measure speed for 'finra' as well as 'ill_reg', (continued)
- [lmi-commits] [lmi] master ccb70ce 04/14: Self test: measure speed for 'finra' as well as 'ill_reg', Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master f6dfcf1 05/14: Filter out self-test timings, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 19be5c7 07/14: Don't initialize what's already been initialized, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 5dec884 01/14: Include appropriate headers, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master fa15960 06/14: Don't touch a ledger object before calling its Init(), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 520bb97 14/14: Call ledger Init() less repeatedly [340], Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 74927c6 13/14: Eradicate 'EePmt' and 'ErPmt', Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master c017212 08/14: Make 'daily_interest_accounting' harder to overlook, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 80f3ab4 09/14: Don't touch a ledger object before calling its Init() (bis), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 4a28bc2 10/14: Replace 'EePmt' (antediluvian), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 9ba754c 11/14: Replace 'EePmt' and 'ErPmt' (production),
Greg Chicares <=
- [lmi-commits] [lmi] master 5827c93 12/14: No longer assign to 'EePmt' and 'ErPmt', Greg Chicares, 2020/08/29