/// <summary>
        /// <para>Placed inside <see cref="KO_CentralVariables"/> because we need to use literall all the 4 <see cref="KO_CornverVariables"/> to compute the Outboard Toe Link Points</para>
        /// <para>Method to Compute the Outboard Toe Link Points using the Ackermann and Pitman Arm Length</para>
        /// </summary>
        /// <param name="_kocvFL"><see cref="KO_CornverVariables"/> object of the Front Left</param>
        /// <param name="_kocvFR"><see cref="KO_CornverVariables"/> object of the Front Right</param>
        /// <param name="_kocvRL"><see cref="KO_CornverVariables"/> object of the Rear Left</param>
        /// <param name="_kocvRR"><see cref="KO_CornverVariables"/> object of the Rear Right</param>
        public void Compute_OutboardToeLink(ref KO_CornverVariables _kocvFL, ref KO_CornverVariables _kocvFR, ref KO_CornverVariables _kocvRL, ref KO_CornverVariables _kocvRR)
        {
            ///<summary>Translating the Ackermann Percentage to a Line poostion based on the Wheelbase</summary>
            double ackermannLinePos = (Ackermann / 100) * WheelBase;


            ///<summary>Computing the Rear Axle Line (approximating that the Rear Axle and Wheelbase is at the same position) </summary>
            Line rearAxleLine = new Line(_kocvRL.VCornerParams.WheelCenter, _kocvRR.VCornerParams.WheelCenter);


            ///<summary>Computing the Ackermann Line</summary>
            Line ackermannLine = new Line(_kocvRL.VCornerParams.WheelCenter.Clone() as Point3D, _kocvRR.VCornerParams.WheelCenter.Clone() as Point3D);

            ackermannLine.Translate(0, 0, -(WheelBase - ackermannLinePos));


            ///Creating the Pitman Lines of the Left and Right
            Line pitmanLine_Left  = new Line(ackermannLine.MidPoint, _kocvFL.VCornerParams.LBJ);
            Line pitmanLine_Right = new Line(ackermannLine.MidPoint, _kocvFR.VCornerParams.LBJ);


            ///<summary>Computing the Pitman Vector and its corresponding Unit Vector</summary>
            Vector3D pitmanLineVector_Left = new Vector3D(pitmanLine_Left.StartPoint, pitmanLine_Left.EndPoint);

            pitmanLineVector_Left.Normalize();
            Vector3D pitmanLineVector_Right = new Vector3D(pitmanLine_Right.StartPoint, pitmanLine_Right.EndPoint);

            pitmanLineVector_Right.Normalize();


            ///<summary>Computing the Outboard Toe Link Point based on the Pitman Arm Lenght of the Left and Right</summary
            _kocvFL.VCornerParams.ToeLinkOutboard = _kocvFL.VCornerParams.LBJ + (_kocvFL.PitmanTrail * pitmanLineVector_Left);
            _kocvFR.VCornerParams.ToeLinkOutboard = _kocvFR.VCornerParams.LBJ + (_kocvFR.PitmanTrail * pitmanLineVector_Right);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="_koCV">Object of the <see cref="KO_CornverVariables"/> Class</param>
        /// <param name="_vCorner">Corner of the Vehicle which is being computed</param>
        /// <param name="_vehicle">The <see cref="Vehicle"/> item itself</param>
        public KO_Solver(ref KO_CornverVariables _koCV, ref KO_CentralVariables _koCentral, ref KO_SimulationParams _simpParams, VehicleCorner _vCorner, ref DesignForm _designForm, OptimizaionParameter _optParam)
        {
            KO_CV = _koCV;

            VCorner = _vCorner;

            KO_Central = _koCentral;

            SimParams = _simpParams;

            Design_Form = _designForm;

            optParam = _optParam;

            if (optParam == OptimizaionParameter.BumpSteer)
            {
                Initialize_Optimizer_BS();
            }
            else if (optParam == OptimizaionParameter.SpringMotionRatio)
            {
                Initialize_Optimizer_ActuationPoints_RockerPoints();
            }
            else if (optParam == OptimizaionParameter.ARBMotionRatio)
            {
            }
        }
        /// <summary>
        /// Method to Intialze the Corner Components of a given corner of a Vehicle
        /// </summary>
        /// <param name="_vehicle">The <see cref="Vehicle"/> class' object</param>
        /// <param name="_vCorner">Corner of the Vhicle</param>
        /// <param name="_numberOfIterations">Number of iterations that the Kinematic Solver (<see cref="DoubleWishboneKinematicsSolver"/></param> or <see cref="McPhersonKinematicsSolver"/> is going to
        /// run for
        /// <returns>Returns an object of the <see cref="VehicleCornerParams"/> Class</returns>
        public void Initialize_VehicleCornerParams(ref KO_CornverVariables _koCV, Vehicle _vehicle, VehicleCorner _vCorner, int _numberOfIterations)
        {
            Dictionary <string, object> tempVehicleParams = VehicleParamsAssigner.AssignVehicleParams_PreKinematicsSolver(_vCorner, _vehicle, _numberOfIterations);



            ///<summary>Passing the <see cref="Dictionary{TKey, TValue}"/> of Vehicle Params's objects into the right Parameter</summary>
            _koCV.VCornerParams.SCM = tempVehicleParams["SuspensionCoordinateMaster"] as SuspensionCoordinatesMaster;

            _koCV.VCornerParams.SCM_Clone = new SuspensionCoordinatesMaster();
            _koCV.VCornerParams.SCM_Clone.Clone(VCornerParams.SCM);

            _koCV.VCornerParams.Tire = tempVehicleParams["Tire"] as Tire;

            _koCV.VCornerParams.Spring = tempVehicleParams["Spring"] as Spring;

            _koCV.VCornerParams.Damper = tempVehicleParams["Damper"] as Damper;

            _koCV.VCornerParams.ARB         = tempVehicleParams["AntirollBar"] as AntiRollBar;
            _koCV.VCornerParams.ARBRate_Nmm = (double)tempVehicleParams["ARB_Rate_Nmm"];

            _koCV.VCornerParams.WA = tempVehicleParams["WheelAlignment"] as WheelAlignment;

            ///<remarks>Chassis is not a part of the <see cref="VehicleCornerParams"/> and hence it is taken care of outside of this method just like the <see cref="Vehicle"/></remarks>

            _koCV.VCornerParams.OC = tempVehicleParams["OutputClass"] as List <OutputClass>;

            _koCV.VCornerParams.OC_BumpSteer = VehicleParamsAssigner.AssignVehicleParams_Custom_OC_BumpSteer(VCornerParams.SCM, _vCorner, _vehicle, /*Setup_CV.BS_Params.WheelDeflections.Count*/ _numberOfIterations);

            _koCV.VCornerParams.Identifier = (int)tempVehicleParams["Identifier"];

            //VCornerParams.Initialize_Points();

            //return VCornerParams;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Overloaded Constructor
        /// </summary>
        /// <param name="_name">Name of <see cref="KO_GUI"/></param>
        /// <param name="_id">ID of the <see cref="KO_GUI"/></param>
        public KO_GUI(string _name, int _id)
        {
            Name_GUI = _name;

            ID_GUI = _id;

            KO_CV_FL_GUI = new KO_CornverVariables(VehicleCorner.FrontLeft);

            KO_CV_FR_GUI = new KO_CornverVariables(VehicleCorner.FrontRight);

            KO_CV_RL_GUI = new KO_CornverVariables(VehicleCorner.RearLeft);

            KO_CV_RR_GUI = new KO_CornverVariables(VehicleCorner.RearRight);

            KO_Central = new KO_CentralVariables();

            KO_SimParams = new KO_SimulationParams();

            //xuc_KO = new XUC_KinematicOptimization();

            //Param_Imp_Form = new ParametersAndImportance();

            Design_Form = new DesignForm();

            Design_Form.Set_KO_Variables(ref KO_Central, ref KO_CV_FL_GUI, ref KO_CV_FR_GUI, ref KO_CV_RL_GUI, ref KO_CV_RR_GUI);

            Design_Form.Set_KO_SimulationParams(ref KO_SimParams);

            /////<summary>Passing the <see cref="KO_CornverVariables"/> Objects of the 4 corners to the <see cref="Param_Imp_Form"/></summary>
            //Param_Imp_Form.SetCornerVariables(KO_CV_FL_GUI, KO_CV_FR_GUI, KO_CV_RL_GUI, KO_CV_RR_GUI);
        }
        public void GetParentObjectData(KO_CornverVariables _koCV)
        {
            KO_CV = _koCV;

            KO_CV.BumpSteerCurve = BumpSteerParms;

            AddPointToChart(chartControl1, 0, 0, 0, false);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// <para>---1st--- This methid is to be called first</para>
        /// <para>Method to initialize the crucial <see cref="KO_CornverVariables"/> object of each of the corners</para>
        /// </summary>
        /// <param name="_koFL">Front Left <see cref="KO_CornverVariables"/> object</param>
        /// <param name="_koFR">Front Right <see cref="KO_CornverVariables"/> object</param>
        /// <param name="_koRL">Rear Left <see cref="KO_CornverVariables"/> object</param>
        /// <param name="_koRR">Rear Right <see cref="KO_CornverVariables"/> object</param>
        public void GetCornerVariablesData(KO_CornverVariables _koFL, KO_CornverVariables _koFR, KO_CornverVariables _koRL, KO_CornverVariables _koRR)
        {
            ko_CV_FL = _koFL;

            ko_CV_FR = _koFR;

            ko_CV_RL = _koRL;

            ko_CV_RR = _koRR;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Method to Updat the <see cref="KO_CornverVariables"/> using the <see cref="KO_GUI"/> Class objects which have been updated by the user him/her self
        /// </summary>
        /// <param name="_koCV_FL_GUI">Front Left <see cref="KO_CornverVariables"/></param>
        /// <param name="_koCV_FR_GUI">Front Right <see cref="KO_CornverVariables"/></param>
        /// <param name="_koCV_RL_GUI">Rear Left <see cref="KO_CornverVariables"/></param>
        /// <param name="_koCV_RR_GUI">Rear Right <see cref="KO_CornverVariables"/></param>
        public void Init_Update_CornerVariables(KO_CornverVariables _koCV_FL_GUI, KO_CornverVariables _koCV_FR_GUI, KO_CornverVariables _koCV_RL_GUI, KO_CornverVariables _koCV_RR_GUI)
        {
            KO_CV_FL = _koCV_FL_GUI;

            KO_CV_FR = _koCV_FR_GUI;

            KO_CV_RL = _koCV_RL_GUI;

            KO_CV_RR = _koCV_RR_GUI;
        }
        /// <summary>
        /// ---Used for Assymetric Suspensions---
        /// Method to Obtain the object of the <see cref="DesignForm"/> which is the Parent of this Form and Assign Parent Object of <see cref="actuationPointCompute'"/>
        /// </summary>
        /// <param name="_KOCentral"></param>
        /// <param name="_KO_CV"></param>
        /// <param name="_designForm"></param>
        public void Get_ParentObject_Data(ref KO_CentralVariables _KOCentral, ref KO_CornverVariables _KO_CV, DesignForm _designForm, VehicleCorner _vCorner, ref KO_SimulationParams _koSim)
        {
            KO_Central = _KOCentral;

            KO_CV_Main = _KO_CV;

            ParentObject = _designForm;

            VCorner_Main = _vCorner;

            Symmetry = false;

            KO_SimParams = _koSim;

            actuationPointCompute.Get_ParentObjectData(ref KO_CV_Main, ParentObject, VCorner_Main, DevelopmentStages.ActuationPoints);
        }
        /// <summary>
        /// ---Used for Assymetric Suspension---
        /// Method to obtain the <see cref="KO_CornverVariables"/> object corresponding to the corner which is calling the functions of this class and the <see cref="DesignForm"/> object which is the parent of this UserControl
        /// </summary>
        /// <param name="_koCV">Object of the <see cref="KO_CornverVariables"/></param>
        /// <param name="_designForm">Object of hte <see cref="DesignForm"/></param>
        public void Get_ParentObjectData(ref KO_CornverVariables _koCV, DesignForm _designForm, VehicleCorner _vCorner, DevelopmentStages _devStage)
        {
            VCorner_Main = _vCorner;

            KO_CV_Main = _koCV;
            KO_CV_Main.VCornerParams.Initialize_Points();

            Design_Form = _designForm;

            Set_SelectedIndices();

            CurrentDevStage = _devStage;

            UpdateListBox();

            SymmetricSuspension = false;
        }
        /// <summary>
        /// ---Used for Symmetry---
        /// Method to Obtain the object of the <see cref="DesignForm"/> which is the Parent of this Form and Assign Parent Object of <see cref="actuationPointCompute'"/>
        /// </summary>
        /// <param name="_KOCentral"></param>
        /// <param name="_KO_CV_Main"></param>
        /// <param name="_KO_CV_Counter"></param>
        /// <param name="_VCornerMain"></param>
        /// <param name="_VCornerCounter"></param>
        /// <param name="_designForm"></param>
        public void Get_ParentObject_Data(ref KO_CentralVariables _KOCentral, ref KO_CornverVariables _KO_CV_Main, ref KO_CornverVariables _KO_CV_Counter, VehicleCorner _VCornerMain, VehicleCorner _VCornerCounter, DesignForm _designForm, ref KO_SimulationParams _koSim)
        {
            KO_Central = _KOCentral;

            KO_CV_Main    = _KO_CV_Main;
            KO_CV_Counter = _KO_CV_Counter;

            ParentObject = _designForm;

            VCorner_Main    = _VCornerMain;
            VCorner_Counter = _VCornerCounter;

            Symmetry = true;

            KO_SimParams = _koSim;

            actuationPointCompute.Get_ParentObjectData(ref _KO_CV_Main, ref _KO_CV_Counter, ParentObject, VCorner_Main, _VCornerCounter, DevelopmentStages.ActuationPoints);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Method to extract the <see cref="KO_CornverVariables"/> objects for each of the corners
        /// </summary>
        /// <param name="_flCV"></param>
        /// <param name="_frCV"></param>
        /// <param name="_rlCV"></param>
        /// <param name="_rrCV"></param>
        public void SetCornerVariables(KO_CornverVariables _flCV, KO_CornverVariables _frCV, KO_CornverVariables _rlCV, KO_CornverVariables _rrCV)
        {
            ///<summary>Initializing the <see cref="KO_CornverVariables"/> object of each corner</summary>
            KO_CV_FL = _flCV;

            KO_CV_FR = _frCV;

            KO_CV_RL = _rlCV;

            KO_CV_RR = _rrCV;

            ///<summary>Passing the Corner Variables Object to the <see cref="CustomListBox"/> User Control</summary>
            adjustableListBoxFL.GetCornerVariableObject(KO_CV_FL /*, VehicleCorner.FrontLeft*/);

            adjustableListBoxFR.GetCornerVariableObject(KO_CV_FR /*, VehicleCorner.FrontRight*/);

            adjustableListBoxRL.GetCornerVariableObject(KO_CV_RL /*, VehicleCorner.RearLeft*/);

            adjustableListBoxRR.GetCornerVariableObject(KO_CV_RR /*, VehicleCorner.RearRight*/);
        }
Ejemplo n.º 12
0
 public void GetParentObjectData(KO_CornverVariables _koCV)
 {
     KO_CV = _koCV;
 }
        /// <summary>
        /// Method to obtain <see cref="KO_CornverVariables"/> object corresponding to correct Vehicle Corner of which this class is a part of
        /// </summary>
        /// <param name="_koCV"></param>
        public void GetCornerVariableObject(KO_CornverVariables _koCV /*, VehicleCorner _vCorner*/)
        {
            KO_CV = _koCV;

            //VCorner = _vCorner;
        }
 /// <summary>
 /// Method to invoke the Optimization Algorithm mwthods to compute the Actuation points of Damper and Pushrod on the Rocker
 /// </summary>
 /// <param name="_koCV">Object of the <see cref="KO_CornverVariables"/></param>
 /// <param name="_koCentral">Object of the <see cref="KO_CentralVariables"/></param>
 /// <param name="_koSimParams">Object of the <see cref="KO_SimulationParams"/></param>
 /// <param name="_vCorner">Corner of the Vehicle which is caling this method</param>
 /// <param name="_designForm">Object of the <see cref="DesignForm"/> which is the parent GUI form</param>
 public void Optimize_Actuation_RockerPoints(ref KO_CornverVariables _koCV, ref KO_CentralVariables _koCentral, ref KO_SimulationParams _koSimParams, VehicleCorner _vCorner, DesignForm _designForm)
 {
     KO_SOlver = new KO_Solver(ref _koCV, ref _koCentral, ref _koSimParams, _vCorner, ref _designForm, OptimizaionParameter.SpringMotionRatio);
 }
        /// <summary>
        /// Method to Invoke the Optimization Algorithm to compute the Inboard Toe Link Point for Minimum Bump Steer or User Requested Bump Steer
        /// </summary>
        /// <param name="_koCV">Object of the <see cref="KO_CornverVariables"/></param>
        /// <param name="_koCentral">Object of the <see cref="KO_CentralVariables"/></param>
        /// <param name="_koSimParams">Object of the <see cref="KO_SimulationParams"/></param>
        /// <param name="_vCorner">Corner of the Vehicle which is caling this method</param>
        /// <param name="_designForm">Object of the <see cref="DesignForm"/> which is the parent GUI form</param>
        public void Optimize_InboardToeLink(ref KO_CornverVariables _koCV, ref KO_CentralVariables _koCentral, ref KO_SimulationParams _koSimParams, VehicleCorner _vCorner, DesignForm _designForm)
        {
            KO_SOlver = new KO_Solver(ref _koCV, ref _koCentral, ref _koSimParams, _vCorner, ref _designForm, OptimizaionParameter.BumpSteer);

            _koCV.VCornerParams.ToeLinkInboard = Round_Point(_koCV.VCornerParams.ToeLinkInboard, 3);
        }