public LateralFlowAmountRecord GetRecord( int?stockTypeId, int flowTypeId, int primaryStratumId, int?secondaryStratumId, int?tertiaryStratumId, int stateClassId, int minimumAge) { if (this.m_AllRecords.Count == 0) { return(null); } SortedKeyMap1 <LateralFlowAmountRecord> m = this.m_Map.GetItem( stockTypeId, flowTypeId, primaryStratumId, secondaryStratumId, tertiaryStratumId, stateClassId); if (m == null) { return(null); } LateralFlowAmountRecord r = m.GetItem(minimumAge); if (r != null) { Debug.Assert(r.StockTypeId == stockTypeId); return(r); } return(null); }
public StochasticTimeRaster GetRaster(int transitionGroupId, int iteration) { if (!this.m_HasItems) { return(null); } SortedKeyMap1 <InitialTSTSpatial> m = this.m_Map.GetItem(transitionGroupId); if (m == null) { return(null); } InitialTSTSpatial v = m.GetItem(iteration); if (v == null) { return(null); } string FullFileName = Spatial.GetSpatialInputFileName(this.m_DataSheet, v.FileName, false); if (!this.m_Rasters.ContainsKey(FullFileName)) { string CmpMsg = null; StochasticTimeRaster r = new StochasticTimeRaster(FullFileName, RasterDataType.DTInteger); CompareMetadataResult cmpResult = this.m_InputRasters.CompareMetadata(r, ref CmpMsg); if (cmpResult == CompareMetadataResult.RowColumnMismatch) { string Message = string.Format(CultureInfo.InvariantCulture, MessageStrings.ERROR_SPATIAL_FILE_MISMATCHED_METADATA, v.FileName, CmpMsg); throw new STSimException(Message); } else if (cmpResult == CompareMetadataResult.UnimportantDifferences) { string Message = string.Format(CultureInfo.InvariantCulture, MessageStrings.STATUS_SPATIAL_FILE_MISMATCHED_METADATA_INFO, v.FileName, CmpMsg); this.Scenario.RecordStatus(StatusType.Information, Message); } this.m_Rasters.Add(FullFileName, r); } return(this.m_Rasters[FullFileName]); }
protected T GetItem(int?k1, int?k2) { if (!this.HasItems) { return(default(T)); } SortedKeyMap1 <T> p = this.m_map.GetItem(k1); if (p == null) { return(default(T)); } return(p.GetItem(k2)); }
public TstRandomize GetTstRandomize( int?transitionGroupId, int?stratumId, int?secondaryStratumId, int?tertiaryStratumId, int?stateClassId, int?iteration) { if (!this.HasItems) { return(null); } SortedKeyMap1 <TstRandomize> m = this.m_map.GetItem( transitionGroupId, stratumId, secondaryStratumId, tertiaryStratumId, stateClassId); if (m == null) { return(null); } return(m.GetItem(iteration)); }