Beispiel #1
0
    private void NewtonIterationProcess_CalculateFCoefficient_ValidFCoefficient()
    {
        FillListsCoordinationData(PathToTestTxt, out var listSrc, out var listDest);

        var nip     = new NewtonIterationProcess(listSrc, listDest);
        var aMatrix = nip.FormingAMatrixTst();
        var yMatrix = nip.FormingYMatrixTst();
        var paramsTransformMatrix = nip.GetVectorWithTransformParametersTst(aMatrix, yMatrix);
        var vMatrix = nip.GetVMatrixTst(aMatrix, yMatrix, paramsTransformMatrix);

        var fCoefficientActual   = nip.CalculateFCoefficientTst(vMatrix);
        var fCoefficientExpected = 3.68548085E-07;

        Assert.Equal(fCoefficientExpected, fCoefficientActual, 12); // 10^-12 m^2
    }
Beispiel #2
0
    private void NewtonIterationProcess_CalculateMCoefficient_ValidMCoefficient()
    {
        FillListsCoordinationData(PathToTestTxt, out var listSrc, out var listDest);

        var nip     = new NewtonIterationProcess(listSrc, listDest);
        var aMatrix = nip.FormingAMatrixTst();
        var yMatrix = nip.FormingYMatrixTst();
        var paramsTransformMatrix = nip.GetVectorWithTransformParametersTst(aMatrix, yMatrix);
        var vMatrix      = nip.GetVMatrixTst(aMatrix, yMatrix, paramsTransformMatrix);
        var fCoefficient = nip.CalculateFCoefficientTst(vMatrix);

        var mCoefficientActual   = nip.CalculateMCoefficientTst(fCoefficient);
        var mCoefficientExpected = 0.000126585;

        Assert.Equal(mCoefficientExpected, mCoefficientActual, 6); // 10^-6 m
    }
Beispiel #3
0
    private void NewtonIterationProcess_GetMeanSquareErrorsMatrix_ValidMeanSquareErrorsMatrix()
    {
        FillListsCoordinationData(PathToTestTxt, out var listSrc, out var listDest);

        var mceMatrixActual = ReadControlDataFromFile(PathToTestTxt + "\\mceMatrix.txt", 7, 1);

        var nip     = new NewtonIterationProcess(listSrc, listDest);
        var aMatrix = nip.FormingAMatrixTst();
        var yMatrix = nip.FormingYMatrixTst();
        var paramsTransformMatrix = nip.GetVectorWithTransformParametersTst(aMatrix, yMatrix);
        var vMatrix      = nip.GetVMatrixTst(aMatrix, yMatrix, paramsTransformMatrix);
        var fCoefficient = nip.CalculateFCoefficientTst(vMatrix);
        var mCoefficient = nip.CalculateMCoefficientTst(fCoefficient);
        var qMatrix      = nip.GetQMatrixTst(aMatrix);

        var mceMatrixExpected = nip.GetMeanSquareErrorsMatrixTst(qMatrix, mCoefficient);

        for (int row = 0; row < mceMatrixExpected.Count; row++)
        {
            Assert.Equal(mceMatrixExpected[row], mceMatrixActual[row, 0], 8);
        }
    }