コード例 #1
0
        public void SumLossesFrom(AllocationStateCollection2 otherLosses)
        {
            if (this.NumBldgs == otherLosses.NumBldgs)
            {
                double[] othersubjectloss = otherLosses.subjectloss;
                double[] otherexcess      = otherLosses.excess;
                double[] otherrecoverable = otherLosses.recoverable;
                double[] otherdeductible  = otherLosses.deductible;
                double[] otherpayout      = otherLosses.payout;

                for (int i = 0; i < NumBldgs; i++)
                {
                    subjectloss[i] += othersubjectloss[i];
                    excess[i]      += otherexcess[i];
                    recoverable[i] += otherrecoverable[i];
                    deductible[i]  += otherdeductible[i];
                    payout[i]      += otherpayout[i];
                }
            }
            else if (this.NumBldgs == 1)
            {
                subjectloss[0] += otherLosses.GetTotalSum.S;
                excess[0]      += otherLosses.GetTotalSum.X;
                recoverable[0] += otherLosses.GetTotalSum.R;
                deductible[0]  += otherLosses.GetTotalSum.D;
                payout[0]      += otherLosses.GetTotalSum.P;
            }

            CalcTotalSum();
        }
コード例 #2
0
 public CoverageAtomicRITE(string _subperil, ExposureType _expType, RITE _rite, long ID)
 {
     SubPeril                         = _subperil;
     ExpType                          = _expType;
     RITE                             = _rite;
     RITCharacterisiticID             = ID;
     CurrentAllocationStateCollection = new AllocationStateCollection2(RITE.ActNumOfSampleBldgs);
     //CurrentAllocationStateSummed = new AllocationState();
     CurrentLossStateCollection = new LossStateCollection2(RITE.ActNumOfSampleBldgs);
 }
コード例 #3
0
 public TermNode(PrimarySubject _subject) : base(_subject)
 {
     if (_subject.IsDerived)
     {
         throw new ArgumentOutOfRangeException("Terms Nodes cannot have a derivied subject!");
     }
     CurrentAllocationState = new AllocationStateCollection2(_subject.Schedule.ActNumOfBldgs);
     Deductibles            = new DeductibleCollection();
     Limits = new LimitCollection();
 }
コード例 #4
0
        public TermNode(PrimarySubject _subject, TermNode tNode) : base(_subject)
        {
            CurrentAllocationState = new AllocationStateCollection2(_subject.Schedule.ActNumOfBldgs);

            //Deductibles = tNode.Deductibles;
            //Limits = tNode.Limits;
            //should do shallow copy, not copy whole object
            Deductibles = new DeductibleCollection(tNode.Deductibles);
            Limits      = new LimitCollection(tNode.Limits);
        }
コード例 #5
0
        public CoverNode(Subject _subject, string _coverName)
            : base(_subject)
        {
            Payout    = 0;
            CoverName = _coverName;
            CurrentAllocationState = new AllocationStateCollection2(1);

            //CurrentAggState = new AggState(Cover.AggDedAmount, Cover.AggLimitAmount, Cover.DedOfAggDedLayer.Amount, Cover.LimitOfAggDedLayer.Amount);
            CurrentAggState = new AggState();
            keystring       = keystring + "-Cov: " + _coverName;
        }
コード例 #6
0
        public void SetAllocState(AllocationStateCollection2 allocstate)
        {
            CurrentAllocationStateCollection = allocstate;
            AllocatedLossSeries = subjectLoss.Clone();
            double ratio;

            if (subjectLoss.TotalLoss > 0)
            {
                ratio = allocstate.GetPayout() / subjectLoss.TotalLoss;
                AllocatedLossSeries.AllocateRatio(ratio);
            }
        }
コード例 #7
0
        public ContractAtomicRITE(GraphInfo _contractGraph, string _subPeril, ExposureType _expType, PositionType _positionType)
        {
            contractGraph = _contractGraph;
            SubPeril      = _subPeril;
            ExpType       = _expType;
            positionType  = _positionType;

            CurrentAllocationStateCollection = new AllocationStateCollection2(1);

            if (_contractGraph.Graph.IsExecuted)
            {
                subjectLoss = _contractGraph.Graph.exResults.GetFilteredTimeSeries(_subPeril, _expType);
            }
        }
コード例 #8
0
        public CoverNode(Subject _subject, string _coverName, CoverNode cNode)
            : base(_subject)
        {
            Payout    = 0;
            CoverName = _coverName;
            CurrentAllocationState = new AllocationStateCollection2(1);

            //CurrentAggState = new AggState(Cover.AggDedAmount, Cover.AggLimitAmount, Cover.DedOfAggDedLayer.Amount, Cover.LimitOfAggDedLayer.Amount);
            CurrentAggState = new AggState();
            keystring       = keystring + "-Cov: " + _coverName;
            //Cover = cNode.Cover;
            Cover = new Cover(cNode.Cover.CoverName, cNode.Cover.AttIsFranchise, cNode.Cover.AttPoint, cNode.Cover.Limit, cNode.Cover.ProRata, cNode.Cover.Unlimited, cNode.Cover.AttachmentTimeBasis,
                              cNode.Cover.LimitTimeBasis, cNode.Cover.LimitValType, cNode.Cover.NumofReinstatements, cNode.Cover.UnlimitedReinstatements);
        }
コード例 #9
0
 public void SetAllocState(AllocationStateCollection2 allocState)
 {
     CurrentAllocationState = allocState;
 }