public ExposureDataAdaptor(ContractExposure contractExposure, JavascriptParser _jsParser, SubSamplingAnalysisSetting _subSamplingSettings) { JSParser = _jsParser; _contractExposure = contractExposure; SubSamplingSettings = _subSamplingSettings; MaxNumSamplesPerHiResLocation = SubSamplingSettings.MaxSampleBldgs; //Unnecessary if no more multiplier arrays... RITE.MaxNumOfBldgs = MaxNumSamplesPerHiResLocation; _contractJSON = GetJSONForContract(); ContractCOLs = GetContractCOLs(); UseAggregatedRITEs = IsExtractVersion2Disaggregated(); EDSDataExtract = new ExposureDataExtractor(_contractExposure); _characteristics = new HashSet <RITCharacteristic>(); _rites = new HashSet <RITE>(); _schedules = new HashSet <ScheduleOfRITEs>(); _characteristicsDict = new Dictionary <long, RITCharacteristic>(); _ritesDict = new Dictionary <long, RITE>(); _schedulesDict = new Dictionary <string, ScheduleOfRITEs>(); RiskCharIDtoAggregateID = new Dictionary <long, long>(); AggregateIDtoDisaggIDs = new Dictionary <long, HashSet <long> >(); DisaggRitCharToDisAggRIT = new Dictionary <long, long>(); if (_contractExposure.ContractType.IsReinsuranceContract()) { TreatyExposure = true; treatyIncludesPrimaryData = false; } else { TreatyExposure = false; } }
public PLTGenertorFactory(PartitionData PD, COLCollection _COLSet, SubSamplingAnalysisSetting subSamplingSettings, DateTime _start, TimeStyle _timestyle, LossStyle _lossstyle) { Start = _start; End = _start.AddYears(6); pData = new PartitionDataAdpator(PD, subSamplingSettings); GeneratorFactory = new GUInputGeneratorFactory(pData, _COLSet, _timestyle, _lossstyle); }
public PLTGenertorFactory(PartitionData PD, HashSet <string> _subperils, SubSamplingAnalysisSetting subSamplingSettings, DateTime _start, TimeStyle _timestyle, LossStyle _lossstyle) { Start = _start; End = _start.AddYears(6); pData = new PartitionDataAdpator(PD, subSamplingSettings); GeneratorFactory = new GUInputGeneratorFactory(pData, _subperils, _timestyle, _lossstyle); }
public AggNumSamplesGenerator(SubSamplingAnalysisSetting _DLMSetting) { //string eventWeightFile = @"D:\NGFM"; //string originWeightFile = @"D:\NGFM"; DLMSetting = _DLMSetting; //DLMSetting = new DisaggregationAnalysisSetting(true, (float)0.5, 2, eventWeightFile, originWeightFile); }
public PartitionDataAdpator(PartitionData _PData, SubSamplingAnalysisSetting _subSamplingSettings) { PData = _PData; expData = new Dictionary <long, ExposureDataAdaptor>(); JSParser = new JavascriptParser(GetParserSettings()); SubSamplingSettings = _subSamplingSettings; }
public GUInputGeneratorFactory(PartitionData PD, COLCollection _COLSet, SubSamplingAnalysisSetting subSmaplingSettings, TimeStyle _timestyle, LossStyle _lossstyle) { PData = new PartitionDataAdpator(PD, subSmaplingSettings); NeedDisposePData = true; subperils = _COLSet.GetSubperils(); timestyle = _timestyle; lossstyle = _lossstyle; }
public ReferencePrototype(PartitionData PD, ModuleSettingsProvider _moduleSettings, JavascriptContext JSContext) { SetModelList(_moduleSettings); RAPSettings _rapsettings = GetRAPSettings(_moduleSettings); SubSamplingAnalysisSetting _subSamplingSettings = GetSubSamplingSettings(_moduleSettings); InitilizePrototype(PD, _rapsettings, _subSamplingSettings, JSContext); }
public float GetOriginWeight(ExtractRITCharInfo rite, SubSamplingAnalysisSetting DLMSetting) { string geoId = GetGEOId(rite, DLMSetting); string lob = rite.OriginWEightsLOBLookupCode; int disAggResolution = rite.DisAggResolutionIntCode; if (DLMSetting.OriginWeightsDict.ContainsKey(Tuple.Create(disAggResolution, lob, geoId))) { return(DLMSetting.OriginWeightsDict[Tuple.Create(disAggResolution, lob, geoId)]); } else { return(1); } }
public string GetGEOId(ExtractRITCharInfo rite, SubSamplingAnalysisSetting DLMSetting) { if (DLMSetting.ResolutionIntCodeToFieldDict.ContainsKey(rite.OriginWeightsGeoIDLookupIntCode)) { string field = DLMSetting.ResolutionIntCodeToFieldDict[rite.OriginWeightsGeoIDLookupIntCode]; Type type = rite.Address.GetType(); PropertyInfo info = type.GetProperty(field); if (info == null) { return(null); } object value = info.GetValue(rite.Address, null); return(value.ToString()); } else { throw new InvalidOperationException("Resolution Int code " + rite.OriginWeightsGeoIDLookupIntCode + " not found"); } }
public ReferencePrototype(PartitionData PD, RAPSettings _rapsettings, JavascriptContext JSContext, SubSamplingAnalysisSetting _subSamplingSettings) { InitilizePrototype(PD, _rapsettings, _subSamplingSettings, JSContext); }
public ReferencePrototype(PartitionData PD, RAPSettings _rapsettings, SubSamplingAnalysisSetting _subSamplingSettings) { InitilizePrototype(PD, _rapsettings, _subSamplingSettings); }
private void InitilizePrototype(PartitionData PD, RAPSettings _rapsettings, SubSamplingAnalysisSetting _subSamplingSettings, JavascriptContext JSContext) { PDataAdaptor = new PartitionDataAdpator(PD, JSContext, _subSamplingSettings); Positions = new PositionData(); GraphCache = new GraphBuildCache(PDataAdaptor, _rapsettings); }
public VectorGUInputGeneratorFactory(PartitionData PD, HashSet <string> _subperils, TimeStyle _timestyle, LossStyle _lossstyle, bool UseAggregatedRITEs, SubSamplingAnalysisSetting subSamplingSettings) { subperils = _subperils; bool subperilsSupported = subperils.All(sp => subperilConfig.GetSubPerilList().Contains(sp)); if (!subperilsSupported) { throw new InvalidOperationException("Subperils specified cannot be supported at this time"); } pData = new PartitionDataAdpator(PD, subSamplingSettings); GeneratorFactory = new GUInputGeneratorFactory(pData, subperils, _timestyle, _lossstyle); }
public GUInputGeneratorFactory(PartitionData PD, HashSet <string> _subperils, SubSamplingAnalysisSetting subSmaplingSettings, TimeStyle _timestyle, LossStyle _lossstyle) { PData = new PartitionDataAdpator(PD, subSmaplingSettings); NeedDisposePData = true; subperils = _subperils; timestyle = _timestyle; lossstyle = _lossstyle; }