Пример #1
0
 public Runner(RunSettings rs, TableManager tm, ScenarioManager sm, Tools.DBConnParams dp)
 {
     RSettings = rs;
     TM        = tm;
     SM        = sm;
     DbParams  = dp;
 }
Пример #2
0
        public void SetCF(IModel model, Policy p, ScenarioManager sm)
        {
            if (GroupsBySG)
            {
                int no = 1;  //SgToNo[p.SubGroup];
                DtBySG[no].AddUp(Cf.GetCF(model, p, sm));
            }

            if (GroupsByScen)
            {
                int no = 1; // SgToNo[p.SubGroup];
                DtBySG[no].AddUp(Cf.GetCF(model, p, sm));
            }

            if (GroupsByPol)
            {
            }

            if (GroupsByMth)
            {
            }

            if (ShouldGetMonthlyValues(p))
            {
                IMonthlyValues mv = (IMonthlyValues)Activator.CreateInstance(MVType);
                mv.SetValues(model, p, sm);
                monthlyValuesList.Add(mv);
            }
        }
Пример #3
0
        public ModelBase(RunSettings rs, Policy p, ScenarioManager sm, ProjVars v_)
        {
            // 속성 할당
            RunP = rs;
            Pol  = p;
            SM   = sm;
            v    = v_;

            //ResultVals = new Result();
        }
Пример #4
0
        public void SetValues(IModel model, Policy p, ScenarioManager sm)
        {
            //if (model is Model1)
            //{
            //    Model1 md = model as Model1;

            //    //V1 = md.member1;
            //    //V2 = md.member2;
            //    //V3 = md.member3;

            //    NavBegin = new double[10];
            //    NavEnd = new double[10];
            //}
        }
Пример #5
0
        //private string _tableName = "N/A";
        //public string TableName { get => _tableName; }

        public ICFTable GetCF(IModel model, Policy p, ScenarioManager sm)
        {
            CFTable1 cf = new CFTable1();

            //if (model.GetType() == typeof(Model1))
            //{
            //    Model1 modelFrom = model as Model1;
            //    //cf.Member1 = modelFrom.member1;
            //    //cf.Member2 = modelFrom.member2;
            //    //cf.Member3 = modelFrom.member3;
            //}

            return(cf);
        }
Пример #6
0
 public static ModelBase GetSelectedModel(RunSettings rs, Policy p, ScenarioManager sm)
 {
     if (p.Rec.ProdCode < 4)
     {
         return(new ModelAnnuityRop(rs, p, sm, new ModelAnnuity.ProjVarsAnnuity()));
     }
     else if (p.Rec.ProdCode < 8)
     {
         return(new ModelAnnuityGLWB(rs, p, sm, new ModelAnnuityGLWB.ProjVarsAnnuityGLWB()));
     }
     else if (p.Rec.ProdCode < 12)
     {
         return(new ModelLifeFixed(rs, p, sm, new ModelLife.ProjVarsLife()));
     }
     else
     {
         return(new ModelLifeIncreasing(rs, p, sm, new ModelLifeIncreasing.ProjVarsLifeIncreasing()));
     }
 }
Пример #7
0
        public void LoadData()
        {
            try
            {
                // 계리적가정 테이블
                tm = new TableManager(rs, dbP);
                tm.SetTables();

                // 인포스 로딩
                var mphandler = new MPHandler(rs);
                mphandler.LoadRecords(dbP);
                pols = Policy.GetPolicies(mphandler.Recs, tm);

                // 경제적 가정
                string query = $@"select * from ScenSource where id = '{scenId}'";
                var    res   = msConn.GetResult(query)[0];
                var    irs   = new List <double>();
                for (int i = 4; i < 18; i++)
                {
                    irs.Add(Convert.ToDouble(res[i]));
                }
                var sp = new LiabilityCalc.ScenParams()
                {
                    SourceCurve = irs,
                    EqSigma     = Convert.ToDouble(res[1]),
                    HW_a        = Convert.ToDouble(res[2]),
                    HW_sigma    = Convert.ToDouble(res[3])
                };

                sm = new ScenarioManager(sp, 1200);
                Console.WriteLine($@"Load Run Data {machineName}");
            }
            catch
            {
                WriteLog("Failed_LoadData");
                throw new Exception("Fail to start program");
            }
        }
Пример #8
0
 public ModelAnnuityRop(RunSettings rs, Policy p, ScenarioManager sm, ProjVarsAnnuity vAnnRop_) : base(rs, p, sm, vAnnRop_)
 {
     vAnnRop = vAnnRop_;
 }
Пример #9
0
 public ModelAnnuityGLWB(RunSettings rs, Policy p, ScenarioManager sm, ProjVarsAnnuityGLWB vAnnGlwb_) : base(rs, p, sm, vAnnGlwb_)
 {
     vAnnGlwb = vAnnGlwb_;
 }
Пример #10
0
 public ModelLife(RunSettings rs, Policy p, ScenarioManager sm, ProjVarsLife vLife_) : base(rs, p, sm, vLife_)
 {
     vLife = vLife_;
 }
Пример #11
0
 public ModelLifeIncreasing(RunSettings rs, Policy p, ScenarioManager sm, ProjVarsLifeIncreasing vLifeInc_) : base(rs, p, sm, vLifeInc_)
 {
     vLifeInc = vLifeInc_;
 }