[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 387eeaa 10/15: Prepare to resolve some marked
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 387eeaa 10/15: Prepare to resolve some marked defects |
Date: |
Sun, 14 Feb 2021 18:24:54 -0500 (EST) |
branch: master
commit 387eeaa4cca0a947ebd5c017110eda9684a78acb
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Prepare to resolve some marked defects
Markers attribute discrepancies in the lengths of certain vectors to the
antediluvian branch, but that branch has long since used the same input
class as production, so that diagnosis has become incorrect. The vectors
in question are of unexpected length (zero) only when initialized by the
BasicValues ctor used by the 7702 server, so the root cause is resolved
by amending that ctor.
For the moment, it is merely asserted that simplification will work.
The actual simplification will follow in the next commit.
---
ihs_basicval.cpp | 13 +++++++++++++
interest_rates.cpp | 6 ++++++
2 files changed, 19 insertions(+)
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index e883234..e6e73bb 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -160,6 +160,19 @@ BasicValues::BasicValues
yare_input_.CurrentCoiMultiplier .assign(db_len, 1.0);
yare_input_.FlatExtra .resize(db_len);
+ // Used by class InterestRates:
+ yare_input_.GeneralAccountRateType = mce_credited_rate;
+ yare_input_.SeparateAccountRateType = mce_gross_rate;
+ yare_input_.LoanRateType = mce_fixed_loan_rate;
+ yare_input_.HoneymoonEndorsement = false;
+ yare_input_.GeneralAccountRate .assign(db_len, 1.0);
+ yare_input_.SeparateAccountRate .assign(db_len, 1.0);
+ yare_input_.ExtraCompensationOnAssets .assign(db_len, 1.0);
+ yare_input_.AmortizePremiumLoad = false;
+ yare_input_.LoanRate = 0.0;
+ yare_input_.HoneymoonValueSpread .assign(db_len, 1.0);
+ yare_input_.PostHoneymoonSpread = 0.0;
+
Init();
}
diff --git a/interest_rates.cpp b/interest_rates.cpp
index 7f00555..17a1fd3 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -323,6 +323,8 @@ void InterestRates::Initialize(BasicValues const& v)
);
// TODO ?? At least for the antediluvian branch, the vector in
// the input class has an inappropriate size.
+ LMI_ASSERT_EQUAL(Length_, lmi::ssize(v.yare_input_.GeneralAccountRate));
+ LMI_ASSERT_EQUAL(Length_, lmi::ssize(GenAcctGrossRate_[mce_gen_curr]));
GenAcctGrossRate_[mce_gen_curr].resize(Length_);
// General-account interest bonus implemented only as a simple
@@ -358,6 +360,8 @@ void InterestRates::Initialize(BasicValues const& v)
);
// TODO ?? At least for the antediluvian branch, the vector in
// the input class has an inappropriate size.
+ LMI_ASSERT_EQUAL(Length_, lmi::ssize(v.yare_input_.SeparateAccountRate));
+ LMI_ASSERT_EQUAL(Length_,
lmi::ssize(SepAcctGrossRate_[mce_annual_rate][mce_sep_full]));
SepAcctGrossRate_[mce_annual_rate][mce_sep_full].resize(Length_);
v.database().query_into(DB_GuarMandE , MAndERate_[mce_gen_guar]);
@@ -367,6 +371,8 @@ void InterestRates::Initialize(BasicValues const& v)
// the same way as M&E, iff database entity DB_AssetChargeType has
// the value 'oe_asset_charge_spread'; otherwise, reflect them
// elsewhere as an account-value load.
+ LMI_ASSERT_EQUAL(Length_,
lmi::ssize(v.yare_input_.ExtraCompensationOnAssets));
+ LMI_ASSERT_EQUAL(Length_, lmi::ssize(ExtraSepAcctCharge_));
if(oe_asset_charge_spread ==
v.database().query<oenum_asset_charge_type>(DB_AssetChargeType))
{
// TODO ?? At least for the antediluvian branch, the vector in
- [lmi-commits] [lmi] master dd991f3 05/15: Resolve a marked defect [315], (continued)
- [lmi-commits] [lmi] master dd991f3 05/15: Resolve a marked defect [315], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master f74f14c 06/15: Avoid non-const reference arguments, Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 48caef4 07/15: Resolve a marked defect [313], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 9b46a92 08/15: Assume genacct and loan rates are always needed [312], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master a7bf1d0 04/15: Remove a duplicative defect marker [316], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master d58eb9b 12/15: Remove assertions that provably cannot fire, Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master bc8e2d9 13/15: Remove a defunct defect marker [307], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master dbac503 14/15: Demote a marked defect [306], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 791ccce 02/15: Expunge disused stable-value fund charge from database, Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 9f4e2a2 09/15: Expunge an unused member function [311], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 387eeaa 10/15: Prepare to resolve some marked defects,
Greg Chicares <=
- [lmi-commits] [lmi] master cb5e424 11/15: Resolve several marked defects [308], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 4912e96 03/15: Simplify [317], Greg Chicares, 2021/02/14
- [lmi-commits] [lmi] master 3143a30 15/15: Simplify using expression templates [305], Greg Chicares, 2021/02/14