コード例 #1
0
ファイル: TASTSDAdapter.cs プロジェクト: BHoM/TAS_Toolkit
        public TasTSDAdapter(FileSettings fileSettings, TSDResultType tsdResultQuery = TSDResultType.Simulation, SimulationResultType simType = SimulationResultType.BuildingResult, ProfileResultUnit resultUnit = ProfileResultUnit.Yearly, ProfileResultType resultType = ProfileResultType.TemperatureExternal, int hour = -1, int day = -1, TASSettings tasSettings = null)
        {
            tsdFilePath          = fileSettings.GetFullFileName();
            tsdResultType        = tsdResultQuery;
            SimulationResultType = simType;
            ProfileResultUnits   = resultUnit;
            ProfileResultType    = resultType;
            Hour         = hour;
            Day          = day;
            _tasSettings = tasSettings;

            if (!CheckInputCombinations())
            {
                return;
            }
        }
コード例 #2
0
        public static List <SimulationResult> ResultsByUnit(this List <SimulationResult> results, ProfileResultUnit unit)
        {
            List <SimulationResult> resultList = new List <SimulationResult>();

            foreach (SimulationResult sr in results)
            {
                List <ProfileResult> pResults = sr.SimulationResults.Where(x => x.Unit == unit).ToList();
                if (pResults.Count > 0)
                {
                    resultList.Add(Create.SimulationResult(sr.Name, sr.SimulationResultType, pResults));
                }
            }

            return(resultList);
        }
コード例 #3
0
 public static ProfileResult ProfileResult(string name = "", ProfileResultType type = ProfileResultType.Undefined, ProfileResultUnit unit = ProfileResultUnit.Undefined, List <double> results = null)
 {
     results = results ?? new List <double>();
     return(new ProfileResult
     {
         Name = name,
         Unit = unit,
         Type = type,
         Results = results,
     });
 }
コード例 #4
0
 public static List <SimulationResult> ResultsByTypeUnitResultType(this List <SimulationResult> results, SimulationResultType simulationType, ProfileResultUnit unit, ProfileResultType resultType)
 {
     results = results.ResultsByTypeUnit(simulationType, unit);
     return(results.ResultsByResultType(resultType));
 }
コード例 #5
0
ファイル: FilterResults.cs プロジェクト: BHoM/BHoM_Engine
 public static List <SimulationResult> FilterResultsByTypeUnit(this List <SimulationResult> results, SimulationResultType simulationType, ProfileResultUnit unit)
 {
     results = results.FilterResultsByType(simulationType);
     return(results.FilterResultsByUnit(unit));
 }