Beispiel #1
0
        public FramePointResult GetMaximumAbsoluteForce(string ComboName, ForceType ForceType, StationType StationType)
        {
            FramePointResult resultMax = GetMaximumForce(ComboName, ForceType, StationType);
            FramePointResult resultMin = GetMinimumForce(ComboName, ForceType, StationType);

            return(Math.Abs(resultMax.ResultValue) > Math.Abs(resultMin.ResultValue) ? resultMax : resultMin);
        }
Beispiel #2
0
        public FramePointResult GetMinimumForceAtStationRatio(string ComboName, ForceType ForceType, double StationRatio)
        {
            double StationValue = this.Length * StationRatio;


            FramePointResult result = new FramePointResult();

            List <FramePointResult> FrameResults     = GetFrameForceList(ComboName, ForceType);
            List <double>           distinctStations = FrameResults.Select(r => r.Station).Distinct().ToList();


            double closestStation1 = distinctStations.OrderBy(item => Math.Abs(StationValue - item)).ToList()[0];
            double closestStation2 = distinctStations.OrderBy(item => Math.Abs(StationValue - item)).ToList()[1];

            var Value1List = FrameResults.Where(r => r.Station == closestStation1).ToList();
            var Value2List = FrameResults.Where(r => r.Station == closestStation2).ToList();

            var Value1 = Value1List.Min(v => v.ResultValue);
            var Value2 = Value2List.Min(v => v.ResultValue);

            double ResultVal = Interpolation.InterpolateLinear(closestStation1, Value1, closestStation2, Value2, StationValue);

            result.ResultValue = ResultVal;
            result.Station     = StationValue;

            return(result);
        }
Beispiel #3
0
        public FramePointResult GetMinimumForce(string ComboName, ForceType ForceType, StationType StationType)
        {
            FramePointResult        result       = new FramePointResult();
            List <FramePointResult> FrameResults = GetFrameForceList(ComboName, ForceType);

            switch (StationType)
            {
            case StationType.First:
                var MinStation = FrameResults.Select(p => p.Station).Min();
                result = GetMinimumForce(ComboName, ForceType, MinStation);
                break;

            case StationType.Last:
                var MaxStation = FrameResults.Select(p => p.Station).Max();
                result = GetMinimumForce(ComboName, ForceType, MaxStation);
                break;
            }

            return(result);
        }
Beispiel #4
0
        public FramePointResult GetMaximumForce(string ComboName, ForceType ForceType)
        {
            FramePointResult result   = new FramePointResult();
            double           MaxForce = double.NegativeInfinity;

            List <FramePointResult> FrameResults = GetFrameForceList(ComboName, ForceType);


            for (int i = 0; i < FrameResults.Count; i++)
            {
                if (FrameResults[i].ResultValue >= MaxForce)
                {
                    MaxForce           = FrameResults[i].ResultValue;
                    result.ResultValue = MaxForce;
                    result.Station     = FrameResults[i].Station;
                }
            }

            return(result);
        }