/// <summary>
        /// Method to assign ORIENTATION to the Angles according to the User's Convention and then initialize the angles
        /// The goal is that, if a Setup Angle is requested then these angles below will be overridden by the <see cref="SetupChange_Optimizer"/>'s results and then later will be conditioned with the right orientation
        /// BUT, if a Setup ANgle is not requested, then initalizing it and conditioning it with right direction here itself will be useful as then it will simply have to be displayed in the Final Output Stage
        /// </summary>
        /// <param name="_fCamber"></param>
        /// <param name="_fToe"></param>
        /// <param name="_fCaster"></param>
        /// <param name="_fKPI"></param>
        public void InitializeAngles(Angle _fCamber, Angle _fToe, Angle _fCaster, Angle _fKPI)
        {
            double tempToe = _fToe.Degrees;

            double tempCamber = _fCamber.Degrees;

            double tempKPI = _fKPI.Degrees;

            //SolverMasterClass.AssignOrientation_CamberToe(ref tempCamber, ref tempToe, tempCamber, tempToe, Identifier);

            Calc_Camber = new Angle(tempCamber, AngleUnit.Degrees);

            Calc_Toe = new Angle(tempToe, AngleUnit.Degrees);

            Calc_Caster = -_fCaster;

            SolverMasterClass.AssignDirection_KPI(Identifier, ref tempKPI);

            Calc_KPI = new Angle(tempKPI, AngleUnit.Degrees);
        }
        /// <summary>
        /// Enumeration to decide which the Parent Change is. That is, the Entry point of the Setup Change Closed Loop Solver
        /// </summary>



        /// <summary>
        /// Overloaded constructor to <see cref="SolverMasterClass"/> and <see cref="OutputClass"/> and <see cref="SetupChange_CornerVariables"/> along with lists
        /// </summary>
        /// <param name="_sMC"></param>
        /// <param name="_oC"></param>
        /// <param name="_setupChange_DB_Dictionary"></param>
        public SetupChange_ClosedLoopSolver(SolverMasterClass _sMC, List <OutputClass> _oC, ref Dictionary <string, double> _setupChange_DB_Dictionary, Angle _finalCamber, Angle _finalToe, Angle _finalCaster, Angle _finalKPI)
        {
            ///<summary>Assining the object of the <see cref="SolverMasterClass"/></summary>
            SMC = _sMC;

            ///<summary>Assining the object of the <see cref="OutputClass"/></summary>
            OC = _oC;

            ///<summary>Assining the object of the <see cref="SetupChange_CornerVariables"/></summary>
            SetupChange_CV_Base = new SetupChange_CornerVariables();
            SetupChange_CV_Base = OC[0].sccvOP;

            ///<summary>Assining the object of the <see cref="SetupChangeDatabase"/></summary>
            SetupChange_DB = SMC.SetupChange_DB_Master;
            ///<remarks>---OBSELETE---</remarks>
            SetupChange_DB_Dictionary = _setupChange_DB_Dictionary;

            ///<summary>Initializing all the Lists of this class which will be used for the Setup Change Verificating and History maintainance</summary>
            InitializeLists();

            ///<summary>Creating delegates which will be stored in a master Multicast Delegate. This master delegate will the Invocation list and will call the methods according to that lsit </summary>
            invokeCamberClosedLoop     = new MethodInvocationOrderDecider(ClosedLoop_ChangeCamber_Invoker);
            invokeToeClosedLoop        = new MethodInvocationOrderDecider(ClosedLoop_ChangeToe_Invoker);
            invokeCasterClosedLoop     = new MethodInvocationOrderDecider(ClosedLoop_ChangeCaster_Invoker);
            invokeKPIClosedLoop        = new MethodInvocationOrderDecider(ClosedLoop_ChangeKPI_Invoker);
            invokeLinkLengthClosedLoop = new MethodInvocationOrderDecider(ClosedLoop_ChangeLinkLengths_Invoker);
            ///<summary>Dumping all the above delegates into the Multicast delegate. This will be sorted eventually based on the entry point to the closed loop </summary>
            AssignMulticastDelegate();

            FinalCamber = _finalCamber;

            FinalToe = _finalToe;

            FinalCaster = _finalCaster;

            FinalKPI = _finalKPI;
        }
        public void LinkLengthChanged(double _dLinkLength, Plane _linksPlane, List <Line> _link, List <Vector3D> _linnkVector, List <Line> _counterLink, SetupChangeDatabase _scd, SolverMasterClass _smc)
        {
            AddAdjusterToMasterAdjusterList(_link, _linnkVector);

            Custom3DGeometry _counter = new Custom3DGeometry(new Point3D(_counterLink[_counterLink.Count - 1].StartPoint.X, _counterLink[_counterLink.Count - 1].StartPoint.Y, _counterLink[_counterLink.Count - 1].StartPoint.Z),
                                                             new Point3D(_counterLink[_counterLink.Count - 1].EndPoint.X, _counterLink[_counterLink.Count - 1].EndPoint.Y, _counterLink[_counterLink.Count - 1].EndPoint.Z));

            Angle FV = SetupChangeDatabase.AngleInRequiredView(Custom3DGeometry.GetMathNetVector3D(_counter.ViewLines.FrontView.DeltaLine[_counter.ViewLines.FrontView.DeltaLine.Count - 1]),
                                                               Custom3DGeometry.GetMathNetVector3D(_scd.WheelCentreAxis.Vertical),
                                                               Custom3DGeometry.GetMathNetVector3D(_scd.WheelCentreAxis.Longitudinal));

            FV = new Angle(90 + FV.Degrees, AngleUnit.Degrees);

            _counter.PerpAlongY.Aft.Translate(_counterLink[_counterLink.Count - 1].MidPoint.X - _counterLink[_counterLink.Count - 1].StartPoint.X,
                                              _counterLink[_counterLink.Count - 1].MidPoint.Y - _counterLink[_counterLink.Count - 1].StartPoint.Y,
                                              _counterLink[_counterLink.Count - 1].MidPoint.Z - _counterLink[_counterLink.Count - 1].StartPoint.Z);


            Triangle SV = new Triangle(_link[_link.Count - 1].StartPoint, _link[_link.Count - 1].EndPoint, _counterLink[_counterLink.Count - 1].StartPoint);

            SV.Regen(0);

            Angle test = SetupChangeDatabase.AngleInRequiredView(Custom3DGeometry.GetMathNetVector3D(_counter.PerpAlongY.Aft),
                                                                 new MathNet.Spatial.Euclidean.Vector3D(SV.Normal.X, SV.Normal.Y, SV.Normal.Z),
                                                                 Custom3DGeometry.GetMathNetVector3D(_scd.WheelCentreAxis.Lateral));

            _counter.PerpAlongY.Aft.Rotate(FV.Radians, Custom3DGeometry.GetdevDeptVector3D(_scd.WheelCentreAxis.Longitudinal));
            _counter.PerpAlongY.Aft.Rotate(test.Radians, Custom3DGeometry.GetdevDeptVector3D(_scd.WheelCentreAxis.Lateral));

            Angle testAngleRotatate = new Angle(_dLinkLength / _counterLink[_counterLink.Count - 1].Length(), AngleUnit.Radians);

Start:
            _counterLink[_counterLink.Count - 1].Rotate(testAngleRotatate.Radians, Custom3DGeometry.GetdevDeptVector3D(_counter.PerpAlongY.Aft));
            _link[_link.Count - 1].EndPoint.X = _counterLink[_counterLink.Count - 1].EndPoint.X;
            _link[_link.Count - 1].EndPoint.Y = _counterLink[_counterLink.Count - 1].EndPoint.Y;
            _link[_link.Count - 1].EndPoint.Z = _counterLink[_counterLink.Count - 1].EndPoint.Z;

            double staticLength = _link[0].Length();
            double newLenggth   = _link[_link.Count - 1].Length();

            double checker = _dLinkLength - (_link[_link.Count - 1].Length() - _link[0].Length());

            if (Math.Abs(checker) > 0.5)
            {
                AddAdjusterToMasterAdjusterList(_link, _linnkVector);
                double testCounter = _counterLink[_counterLink.Count - 1].Length();
                testAngleRotatate = new Angle((checker / _counterLink[_counterLink.Count - 1].Length()), AngleUnit.Radians);
                goto Start;
            }
        }