Ejemplo n.º 1
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,
     });
 }
Ejemplo n.º 2
0
        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;
            }
        }
 public static List <SimulationResult> ResultsByTypeUnitResultType(this List <SimulationResult> results, SimulationResultType simulationType, ProfileResultUnit unit, ProfileResultType resultType)
 {
     results = results.ResultsByTypeUnit(simulationType, unit);
     return(results.ResultsByResultType(resultType));
 }
Ejemplo n.º 4
0
        public static List <SimulationResult> FilterResultsByResultType(this List <SimulationResult> results, ProfileResultType resultType)
        {
            List <SimulationResult> resultList = new List <SimulationResult>();

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

            return(resultList);
        }
Ejemplo n.º 5
0
        public static List <SimulationResult> ResultsByResultType(this List <SimulationResult> results, ProfileResultType resultType)
        {
            List <SimulationResult> resultList = new List <SimulationResult>();

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

            return(resultList);
        }