/// <summary>
        /// Çıkış değerlerinin hesaplaması yapılıyor. -Verilen PDF dokümanındaki değerler göre
        /// </summary>
        /// <param name="centerId"></param>
        /// <param name="row"></param>
        /// <param name="centerOfGravity"></param>
        /// <returns></returns>
        private List <PointF> DeterminingPoints(int centerId, double row, EnumValues.CenterOfGravity centerOfGravity)
        {
            List <PointF> points = new List <PointF>();
            double        result;

            #region Ağırlık merkezi değeri = Dönüş hızı ise
            if (centerOfGravity == EnumValues.CenterOfGravity.DonusHizi)
            {
                #region Gelen ağırlık merkezi değeri = 0 ise
                if (centerId == 0)
                {
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction1[0], 0));
                    result = ConstantsValues.rotateMemberShipFunction1[0] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction1[0] - ConstantsValues.rotateMemberShipFunction1[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.rotateMemberShipFunction1[3] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction1[2] - ConstantsValues.rotateMemberShipFunction1[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction1[3], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 1 ise
                if (centerId == 1)
                {
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction2[0], 0));
                    result = ConstantsValues.rotateMemberShipFunction2[0] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction2[0] - ConstantsValues.rotateMemberShipFunction2[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.rotateMemberShipFunction1[2] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction2[1] - ConstantsValues.rotateMemberShipFunction2[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction2[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 2 ise
                if (centerId == 2)
                {
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction3[0], 0));
                    result = ConstantsValues.rotateMemberShipFunction3[0] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction3[0] - ConstantsValues.rotateMemberShipFunction3[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.rotateMemberShipFunction3[2] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction3[1] - ConstantsValues.rotateMemberShipFunction3[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction3[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 3 ise
                if (centerId == 3)
                {
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction4[0], 0));
                    result = ConstantsValues.rotateMemberShipFunction4[0] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction4[0] - ConstantsValues.rotateMemberShipFunction4[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.rotateMemberShipFunction4[2] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction4[1] - ConstantsValues.rotateMemberShipFunction4[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction4[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 4 ise
                if (centerId == 4)
                {
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction5[0], 0));
                    result = ConstantsValues.rotateMemberShipFunction5[0] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction5[0] - ConstantsValues.rotateMemberShipFunction5[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.rotateMemberShipFunction5[3] + (row * (Math.Abs(ConstantsValues.rotateMemberShipFunction5[2] - ConstantsValues.rotateMemberShipFunction5[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.rotateMemberShipFunction5[3], 0));
                }
                #endregion
            }
            #endregion
            #region Ağırlık merkezi değeri = Deterjan ise
            else if (centerOfGravity == EnumValues.CenterOfGravity.Deterjan)
            {
                #region Gelen ağırlık merkezi değeri = 0 ise
                if (centerId == 0)
                {
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction1[0], 0));
                    result = ConstantsValues.detergentMemberShipFunction1[0] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction1[0] - ConstantsValues.detergentMemberShipFunction1[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.detergentMemberShipFunction1[3] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction1[2] - ConstantsValues.detergentMemberShipFunction1[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction1[3], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 1 ise
                if (centerId == 1)
                {
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction2[0], 0));
                    result = ConstantsValues.detergentMemberShipFunction2[0] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction2[0] - ConstantsValues.detergentMemberShipFunction2[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.detergentMemberShipFunction2[2] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction2[1] - ConstantsValues.detergentMemberShipFunction2[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction2[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 2 ise
                if (centerId == 2)
                {
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction3[0], 0));
                    result = ConstantsValues.detergentMemberShipFunction3[0] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction3[0] - ConstantsValues.detergentMemberShipFunction3[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.detergentMemberShipFunction3[2] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction3[1] - ConstantsValues.detergentMemberShipFunction3[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction3[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 3 ise
                if (centerId == 3)
                {
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction4[0], 0));
                    result = ConstantsValues.detergentMemberShipFunction4[0] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction4[0] - ConstantsValues.detergentMemberShipFunction4[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.detergentMemberShipFunction4[2] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction4[1] - ConstantsValues.detergentMemberShipFunction4[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction4[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 4 ise
                if (centerId == 4)
                {
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction5[0], 0));
                    result = ConstantsValues.detergentMemberShipFunction5[0] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction5[0] - ConstantsValues.detergentMemberShipFunction5[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.detergentMemberShipFunction5[3] + (row * (Math.Abs(ConstantsValues.detergentMemberShipFunction5[2] - ConstantsValues.detergentMemberShipFunction5[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.detergentMemberShipFunction5[3], 0));
                }
                #endregion
            }
            #endregion
            #region Ağırlık merkezi değeri = Süre ise
            else
            {
                #region Gelen ağırlık merkezi değeri = 0 ise
                if (centerId == 0)
                {
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction1[0], 0));
                    result = ConstantsValues.timeMemberShipFunction1[0] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction1[0] - ConstantsValues.timeMemberShipFunction1[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.timeMemberShipFunction1[3] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction1[2] - ConstantsValues.timeMemberShipFunction1[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction1[3], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 1 ise
                if (centerId == 1)
                {
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction2[0], 0));
                    result = ConstantsValues.timeMemberShipFunction2[0] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction2[0] - ConstantsValues.timeMemberShipFunction2[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.timeMemberShipFunction2[2] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction2[1] - ConstantsValues.timeMemberShipFunction2[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction2[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 2 ise
                if (centerId == 2)
                {
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction3[0], 0));
                    result = ConstantsValues.timeMemberShipFunction3[0] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction3[0] - ConstantsValues.timeMemberShipFunction3[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.timeMemberShipFunction3[2] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction3[1] - ConstantsValues.timeMemberShipFunction3[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction3[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 3 ise
                if (centerId == 3)
                {
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction4[0], 0));
                    result = ConstantsValues.timeMemberShipFunction4[0] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction4[0] - ConstantsValues.timeMemberShipFunction4[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.timeMemberShipFunction4[2] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction4[1] - ConstantsValues.timeMemberShipFunction4[2])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction4[2], 0));
                }
                #endregion
                #region Gelen ağırlık merkezi değeri = 4 ise
                if (centerId == 4)
                {
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction5[0], 0));
                    result = ConstantsValues.timeMemberShipFunction5[0] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction5[0] - ConstantsValues.timeMemberShipFunction5[1])));
                    points.Add(new PointF((float)result, (float)row));
                    result = ConstantsValues.timeMemberShipFunction5[3] + (row * (Math.Abs(ConstantsValues.timeMemberShipFunction5[2] - ConstantsValues.timeMemberShipFunction5[3])));
                    points.Add(new PointF((float)result, (float)result));
                    points.Add(new PointF((float)ConstantsValues.timeMemberShipFunction5[3], 0));
                }
                #endregion
            }
            #endregion

            return(points);
        }
 /// <summary>
 /// Hesaplama
 /// </summary>
 /// <param name="outputCenter"></param>
 /// <param name="row"></param>
 /// <param name="centerId"></param>
 /// <returns>List<PointF></returns>
 public List <PointF> Calculated(EnumValues.CenterOfGravity outputCenter, double row, int centerId)
 {
     return(OutputAreaRotationalDetergentTime(row, centerId, outputCenter));
 }
        /// <summary>
        /// Çıkış alanı Dönme Hızı - Deterjan - Süre
        /// </summary>
        /// <param name="row"></param>
        /// <param name="centerId"></param>
        /// <param name="centerOfGravity"></param>
        /// <returns>List<PointF></returns>
        private List <PointF> OutputAreaRotationalDetergentTime(double row, int centerId, EnumValues.CenterOfGravity centerOfGravity)
        {
            List <PointF> points = new List <PointF>();

            switch (centerOfGravity)
            {
            case EnumValues.CenterOfGravity.DonusHizi:
                points = DeterminingPoints(centerId, row, EnumValues.CenterOfGravity.DonusHizi);
                break;

            case EnumValues.CenterOfGravity.Deterjan:
                points = DeterminingPoints(centerId, row, EnumValues.CenterOfGravity.Deterjan);
                break;

            case EnumValues.CenterOfGravity.Sure:
                points = DeterminingPoints(centerId, row, EnumValues.CenterOfGravity.Sure);
                break;
            }
            return(points);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Genişlikler getiriliyor
        /// </summary>
        /// <param name="centerOfGravity"></param>
        /// <returns></returns>
        public double BringWeight(EnumValues.CenterOfGravity centerOfGravity)
        {
            double rotationalWeight = 0, timeWeight = 0, detergentWeight = 0;

            #region Dönüş Hızı ise
            switch (RotationalSpeed)
            {
            case EnumValues.RotationalSpeed.Hassas:
                rotationalWeight = -1.15; break;

            case EnumValues.RotationalSpeed.NormalHassas:
                rotationalWeight = 2.75; break;

            case EnumValues.RotationalSpeed.Orta:
                rotationalWeight = 5; break;

            case EnumValues.RotationalSpeed.NormalGuclu:
                rotationalWeight = 7.25; break;

            case EnumValues.RotationalSpeed.Guclu:
                rotationalWeight = 11.15; break;
            }
            #endregion

            #region Deterjan ise
            switch (Detergent)
            {
            case EnumValues.Detergent.CokAz:
                detergentWeight = 10; break;

            case EnumValues.Detergent.Az:
                detergentWeight = 85; break;

            case EnumValues.Detergent.Orta:
                detergentWeight = 150; break;

            case EnumValues.Detergent.Fazla:
                detergentWeight = 215; break;

            case EnumValues.Detergent.CokFazla:
                detergentWeight = 290; break;
            }
            #endregion

            #region Süre ise
            switch (Time)
            {
            case EnumValues.Time.Kisa:
                timeWeight = 23.79; break;

            case EnumValues.Time.NormalKisa:
                timeWeight = 39.9; break;

            case EnumValues.Time.Orta:
                timeWeight = 57.5; break;

            case EnumValues.Time.NormalUzun:
                timeWeight = 75.1; break;

            case EnumValues.Time.Uzun:
                timeWeight = 102.15; break;
            }
            #endregion

            #region Ağırlık Merkezinde gelen değerlerin sonucu döndürülüyor..
            switch (centerOfGravity)
            {
            case EnumValues.CenterOfGravity.DonusHizi: return(rotationalWeight);

            case EnumValues.CenterOfGravity.Deterjan: return(detergentWeight);

            case EnumValues.CenterOfGravity.Sure: return(timeWeight);
            }
            #endregion

            return(0);
        }