Exemplo n.º 1
0
    public void CalcSimplexForList(List <double> list, int f, string id)
    {
        double[,] simplexArray = new double[, ] {
            { 0, 0, 10.41, 10.4, 9.817163594, 9.85, 15.3732, 0, 0, 0, 0, 9.6754, 10.0939, 19.5, 16.46, 7.5391, 7.3702, 1.5633, 3.42, 0.9295, 12.5294, 17.8137858, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20.75, 9.44, 0, 13.07, 18.03, 0, 0, 0, 0, 0, 0, 0, 2.05, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58.84, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0.38, 0, 0.12149786, 0, 7.8908, 40.04426534, 20.0185592, 21.73, 29.44, 0.1066, 0.0377, 0, 0, 0.0156, 0.1426, 8.7168, 8.63, 9.3243, 16.5257, 17.63863053, 0, 39.05798859, 0, 0, 0, 0, 0, 0, 20.44022825, 0, 0, 0.04, 0.49, 0, 1.43, 0.45, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34.5, 0, 0, 0, 0, 79.85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 33.86, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0.05, 0.04, 0.0979097, 0.08, 0.199, 0, 12.55342226, 0, 0, 20.3305, 10.5241, 0.08, 3.19, 7.9141, 13.0428, 12.7119, 11.26, 6.3783, 9.494, 0, 72.34827478, 0, 30.49887156, 46.59103012, 0, 34.3, 0, 0, 0, 0, 0, 0.16, 2.23, 33.45, 9.21, 2.38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0.11, 0.24, 13.33707643, 13.5, 0.1423, 0, 0, 0, 0, 0.0161, 0.0335, 8.37, 9.14, 7.8631, 7.3473, 0.1038, 0.43, 0.0668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.17, 0.37, 7.81, 0.04, 0.01, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0.01, 0.02, 0, 0, -0.0012, 0, 6.071985112, 13.18, 0, 9.3554, 14.3654, 0.05, 0.81, 11.8337, 8.2094, 8.065, 8.03, 11.4574, 0.0194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.04, 1.87, 0, 5.23, 5.69, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0.03, -0.0065, 0, 0, 0, 0, 0.0787, 0.0387, 0.093, 0, 0.052, 0.0686, 0.0905, 0.48, 0.1231, 0.1798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.023, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
            { 0, 0, 7.8, 8.21, 0.126114876, 0.31, 3.8507, 0, 0, 0, 0, 0.0455, 0.0293, 0.47, 0.08, 0.0718, 0.0769, 0.204, 0.78, 0.2079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.07, 1.61, 0, 1.26, 1.46, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18.17529238, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23.55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 53.4, 0, 19.7, 40.1, 20.15, 0, 0, 13.74, 0, 0, 12.81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
            { 0, 0, 0, 0, 0, 0.03, 0.002, 0, 0, 0, 0, 0.0163, 0.0267, 0, 0.1, 1.0092, 0.9201, 0.0574, 0.53, 0.0767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24.46569855, 59.96494742, 0, 0.05, 0.04, 0, 1.51, 0.24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
            { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88.15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 },
            { 0, 100.00, 81.24, 81.09, 76.50, 75.95, 72.55, 59.96, 61.36, 65.09, 47.01, 60.38, 64.85, 71.44, 70.22, 63.70, 62.82, 68.49, 66.44, 71.44, 61.25, 64.55, 27.65, 42.77, 0.00, 0.01, 11.85, 0.00, 0.00, 0.00, 55.09, 40.04, 27.42, 78.72, 83.93, 45.93, 68.25, 71.74, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 64.09, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
            { 0, -7, -5, -5, -7, -7, -3, -0.3, -5.4, -3, -0.7, -10, -10, -7.1, -5, -9, -9.5, -8, -7.5, -6, -4, -3, -7, -10, -8, -5, -10, -10, -10, -6, -2, 1, 1, -7.2, -7.2, -5.0, -7.5, -6, 100, 100, 100, 100, 100, 100, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
        };


        for (int i = 0; i < simplexArray.GetUpperBound(0); i++)
        {
            simplexArray[i, 0] = list[i];
        }

        //int[] variablesSimplex = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
        int[]      variablesSimplex = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
        SimplexOct s = new SimplexOct();

        s.Init(simplexArray, variablesSimplex);
        s.Solve();

        s.AllTableausToString(f, id);
    }
Exemplo n.º 2
0
    void DontStart()
    {
        Debug.Log("is this happening more than once?");
        //Linear programming, Simplex algorithm
        //Harald Kneidinger


        //Bsp. 1.21
        double[,] testarr1 = new double[, ] {
            { 5.0, 1.0, 2.5, -0.5, 0.0, 0.0 },
            { 2.0, 0.0, 2.0, -1.0, 1.0, 0.0 },
            { 18.0, 0.0, 11.0, -3.0, 0.0, 1.0 },
            { -40.0, 0.0, -11.0, 4.0, 0.0, 0.0 }
        };
        //Bsp. 1.20
        double[,] testarr2 = new double[, ] {
            { 5.0, 2.0, -1.0, 3.0, 1.0, 0.0, 0.0 },
            { 1.0, 1.0, 4.0, -2.0, 0.0, 1.0, 0.0 },
            { 4.0, 3.0, 0.0, 6.0, 0.0, 0.0, 1.0 },
            { 0.0, -3.0, 1.0, -4.0, 0.0, 0.0, 0.0 }
        };

        //Beispiel 1.2 (Landwirt):
        double[,] testarr3 = new double[, ] {
            { 50.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0 },
            { 20.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0 },
            { 1300.0, 20.0, 40.0, 30.0, 0.0, 0.0, 1.0 },
            { 0.0, -500.0, -800.0, -600.0, 0.0, 0.0, 0.0 }
        };


        //Bsp. 1.24 empty admissability range {}
        double[,] testarr4 = new double[, ] {
            { 10.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 },
            { 10.0, 1.0, -1.0, 0.0, -1.0, 0.0, 1.0, 0.0 },
            { 48.0, 1.0, 4.0, 0.0, 0.0, -1.0, 0.0, 1.0 },
            { -58.0, -2.0, -3.0, 0.0, 1.0, 1.0, 0.0, 0.0 }
        };

        //Bsp. 1.23 starting solution
        double[,] testarr5 = new double[, ] {
            { 10.0, 2.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0 },
            { 3.0, 1.0, 1.0, 1.0, 0.0, -1.0, 1.0, 0.0 },
            { 1.0, 4.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0 },
            { -4.0, -5.0, -3.0, -1.0, 0.0, 1.0, 0.0, 0.0 }
        };


        //Beispiel 1.2 (Landwirt) modifiziert mit dezimalstellen:
        double[,] testarr6 = new double[, ] {
            { 50.0, 1.3, 1.0, 1.0, 1.0, 0.0, 0.0 },
            { 20.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0 },
            { 1300.0, 20.34, 40.98989, 30.0, 0.0, 0.0, 1.0 },
            { 0.0, -500.111, -800.0, -600.0, 0.0, 0.0, 0.0 }
        };

        //1.26 entartete Ecke
        double[,] testarr7 = new double[, ] {
            { 7.0, 1.0, 1.0, 1.0, 0.0, 0.0 },
            { 18.0, 2.0, 3.0, 0.0, 1.0, 0.0 },
            { 15.0, 1.0, 3.0, 0.0, 0.0, 1.0 },
            { 0.0, -2.0, -3.0, 0.0, 0.0, 0.0 }
        };



        //A 1.14 suche nach starting solution
        double[,] testarr8 = new double[, ] {
            { 6.0, 3.0, 2.0, 0.0, 1.0, 0.0, 0.0, 0.0 },
            { 4.0, 1.0, 0.0, 2.0, 0.0, -1.0, 1.0, 0.0 },
            { 10.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0 },
            { -14.0, -2.0, -1.0, -3.0, 0.0, 1.0, 0.0, 0.0 }
        };

        //A 1.14 nicht lösbar, pivotspalte alle negativ
        double[,] testarr9 = new double[, ] {
            { 6.0, 3.0, 2.0, 0.0, 1.0, 0.0, 0.0, 0.0 },
            { 4.0, 1.0, 0.0, -2.0, 0.0, -1.0, 1.0, 0.0 },
            { 10.0, 1.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0 },
            { -14.0, -2.0, -1.0, -3.0, 0.0, 1.0, 0.0, 0.0 }
        };


        //Bsp 1.23 aufbauend auf starting solution
        double[,] testarr10 = new double[, ] {
            { 27 / 4.0, 0.0, -3 / 2.0, 0.0, 1.0, 1.0 },
            { 11 / 4.0, 0.0, 0.5, 1.0, 0.0, -1.0 },
            { 1 / 4.0, 1.0, 0.5, 0.0, 0.0, 0.0 },
            { 23 / 4.0, 0.0, 0.5, 0.0, 0.0, -2.0 }
        };

        double[,] testarr11 = new double[, ] {
            { 5.12, 2.3111, -1.0, 3.4, 1.0, 0.0, 0.0 },
            { 1.31, 1.0, 4.41, -2.0, 0.0, 1.0, 0.0 },
            { 4.9, 3.21, 0.0, 6.47, 0.0, 0.0, 1.0 },
            { 0.0, -3.1, 1.0, -4.0, 0.0, 0.0, 0.0 }
        };


        //Bsp. 1.25 unendlich viele Lösungen
        double[,] testarr12 = new double[, ] {
            { 5.0, 1.0, 2.5, -0.5, 0.0, 0.0 },
            { 2.0, 0.0, 2.0, -1.0, 1.0, 0.0 },
            { 18.0, 0.0, 11.0, -3.0, 0.0, 1.0 },
            { -40.0, 0.0, -8.0, 4.0, 0.0, 0.0 }
        };


        //A 1.14 von startlösung ausgehend
        double[,] testarr13 = new double[, ] {
            { 3.0, 1.5, 1.0, 0.0, 0.5, 0.0 },
            { 7.0, -0.5, 0.0, 1.0, -0.5, 0.0 },
            { 10.0, -2.0, 0.0, 0.0, -1.0, 1.0 },
            { 24.0, -2.0, 0.0, 0.0, -1.0, 0.0 }
        };

        //A 1.14 von startlösung ausgehend
        double[,] testarr14 = new double[, ] {
            { 87.0, 2.0, 3.0, 4.0, 1.0, 1.0, 0.0, 0.0 },
            { 55.0, 1.0, 1.0, 5.0, 2.0, 0.0, 1.0, 0.0 },
            { 61.0, 3.0, 3.0, 2.0, 1.0, 0.0, 0.0, 1.0 },
            { 0.0, -17.0, -9.0, -20.0, 8.0, 0.0, 0.0, 0.0 }
        };

        //https://www.youtube.com/watch?v=fgX_7QaFzE4
        double[,] testarr15 = new double[, ] {
            { 2.0, 1.0, 0.0, 1.0, 0.0, 0.0 },
            { 2.0, 0.0, 1.0, 0.0, 1.0, 0.0 },
            { 3.0, 1.0, 1.0, 0.0, 0.0, 1.0 },
            { 0.0, -1.0, -2.0, 0.0, 0.0, 0.0 }
        };

        double[,] inputArray = { { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { },
                                 { } };

        double[,] simplexArray = new double[, ] {
            { 867, 0, 10.41, 10.4, 9.817163594, 9.85, 15.3732, 0, 0, 0, 0, 9.6754, 10.0939, 19.5, 16.46, 7.5391, 7.3702, 1.5633, 3.42, 0.9295, 12.5294, 17.8137858, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20.75, 9.44, 0, 13.07, 18.03, 0, 0, 0, 0, 0, 0, 0, 2.05, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 0.21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 6.8, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58.84, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 122, 0, 0.38, 0, 0.12149786, 0, 7.8908, 40.04426534, 20.0185592, 21.73, 29.44, 0.1066, 0.0377, 0, 0, 0.0156, 0.1426, 8.7168, 8.63, 9.3243, 16.5257, 17.63863053, 0, 39.05798859, 0, 0, 0, 0, 0, 0, 20.44022825, 0, 0, 0.04, 0.49, 0, 1.43, 0.45, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 1.49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34.5, 0, 0, 0, 0, 79.85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 33.86, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 266, 0, 0.05, 0.04, 0.0979097, 0.08, 0.199, 0, 12.55342226, 0, 0, 20.3305, 10.5241, 0.08, 3.19, 7.9141, 13.0428, 12.7119, 11.26, 6.3783, 9.494, 0, 72.34827478, 0, 30.49887156, 46.59103012, 0, 34.3, 0, 0, 0, 0, 0, 0.16, 2.23, 33.45, 9.21, 2.38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 292, 0, 0.11, 0.24, 13.33707643, 13.5, 0.1423, 0, 0, 0, 0, 0.0161, 0.0335, 8.37, 9.14, 7.8631, 7.3473, 0.1038, 0.43, 0.0668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.17, 0.37, 7.81, 0.04, 0.01, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 64, 0, 0.01, 0.02, 0, 0, -0.0012, 0, 6.071985112, 13.18, 0, 9.3554, 14.3654, 0.05, 0.81, 11.8337, 8.2094, 8.065, 8.03, 11.4574, 0.0194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.04, 1.87, 0, 5.23, 5.69, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
            { 4.77, 0, 0, 0, 0, 0.03, -0.0065, 0, 0, 0, 0, 0.0787, 0.0387, 0.093, 0, 0.052, 0.0686, 0.0905, 0.48, 0.1231, 0.1798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.023, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
            { 0.08, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
            { 397, 0, 7.8, 8.21, 0.126114876, 0.31, 3.8507, 0, 0, 0, 0, 0.0455, 0.0293, 0.47, 0.08, 0.0718, 0.0769, 0.204, 0.78, 0.2079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.07, 1.61, 0, 1.26, 1.46, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
            { 7.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18.17529238, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
            { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23.55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 53.4, 0, 19.7, 40.1, 20.15, 0, 0, 13.74, 0, 0, 12.81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
            { 30, 0, 0, 0, 0, 0.03, 0.002, 0, 0, 0, 0, 0.0163, 0.0267, 0, 0.1, 1.0092, 0.9201, 0.0574, 0.53, 0.0767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24.46569855, 59.96494742, 0, 0.05, 0.04, 0, 1.51, 0.24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
            { 0.051, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88.15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 },
            { 7940.3, 100.00, 81.24, 81.09, 76.50, 75.95, 72.55, 59.96, 61.36, 65.09, 47.01, 60.38, 64.85, 71.44, 70.22, 63.70, 62.82, 68.49, 66.44, 71.44, 61.25, 64.55, 27.65, 42.77, 0.00, 0.01, 11.85, 0.00, 0.00, 0.00, 55.09, 40.04, 27.42, 78.72, 83.93, 45.93, 68.25, 71.74, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 64.09, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
            { 0, -7, -5, -5, -7, -7, -3, -0.3, -5.4, -3, -0.7, -10, -10, -7.1, -5, -9, -9.5, -8, -7.5, -6, -4, -3, -7, -10, -8, -5, -10, -10, -10, -6, -2, 1, 1, -7.2, -7.2, -5.0, -7.5, -6, 100, 100, 100, 100, 100, 100, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
        };
        //{ 0, 7,5,5,7,7,3,0.3,5.4,3,0.7,10,10,7.1,5,9,9.5,8,7.5,6,4,3,7,10,8,5,10,10,10,6,2,-1,-1,7.2,7.2,5.0,7.5,6,-100,-100,-100,-100,-100,-100,-100,0,-100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} };
        //{ 0, -7,-5,-5,-7,-7,-3,-0.3,-5.4,-3,-0.7,-10,-10,-7.1,-5,-9,-9.5,-8,-7.5,-6,-4,-3,-7,-10,-8,-5,-10,-10,-10,-6,-2,1,1,-7.2,-7.2,-5.0,-7.5,-6,100,100,100,100,100,100,100,0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} };



        SimplexOct s = new SimplexOct();

        //-1 stands for basic variable
        int[] variables1  = new int[] { 0, -1, -1, 1, 2 };
        int[] variables2  = new int[] { -1, -1, -1, 0, 1, 2 };
        int[] variables3  = new int[] { -1, -1, -1, 0, 1, 2 };
        int[] variables4  = new int[] { -1, -1, 0, -1, -1, 1, 2 };
        int[] variables5  = new int[] { -1, -1, -1, 0, -1, 1, 2 };
        int[] variables6  = new int[] { -1, -1, -1, 0, 1, 2 };
        int[] variables7  = new int[] { -1, -1, 0, 1, 2 };
        int[] variables8  = new int[] { -1, -1, -1, 0, -1, 1, 2 };
        int[] variables9  = new int[] { -1, -1, -1, 0, -1, 1, 2 };
        int[] variables10 = new int[] { 2, -1, 1, 0, -1 };
        int[] variables11 = new int[] { -1, -1, -1, 0, 1, 2 };
        int[] variables12 = new int[] { 0, -1, -1, 1, 2 };
        int[] variables13 = new int[] { -1, 0, 1, -1, 2 };
        int[] variables14 = new int[] { -1, -1, -1, -1, 0, 1, 2 };
        int[] variables15 = new int[] { -1, -1, 0, 0, 0 };

        //int[] variablesSimplex = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

        int[] variablesSimplex = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
        //int[] variablesSimplex = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };


        s.Init(simplexArray, variablesSimplex);
        s.Solve();

        Debug.Log(s.AllTableausToString(0, ""));
    }