예제 #1
0
        public Coef[] GetDualSolution()
        {
            Coef[] coefs = new Coef[SymplexMatrix.GetCountBalance()];

            for (int i = SymplexMatrix.ObjectiveFunction.Coefs.Count - SymplexMatrix.GetCountArtificial() - SymplexMatrix.GetCountBalance(), j = 0; i < SymplexMatrix.GetCountBalance(); i++, j++)
            {
                coefs[j].Value    = LastsymplexDifference[i, 0];
                coefs[j].TypeCoef = TypeCoef.Balance;
            }

            return(coefs);
        }
예제 #2
0
        public SymplexTable(SymplexMatrix symplexMatrix)
        {
            SymplexMatrix = symplexMatrix;

            Table = new double[symplexMatrix.Basis.Length,
                               SymplexMatrix.Coefs.GetLength(1) +
                               SymplexMatrix.GetCountBalance() +
                               SymplexMatrix.GetCountArtificial() +
                               1];

            CurrentBasis = new Coef[SymplexMatrix.Basis.Length];

            InitTable();
        }