Ejemplo n.º 1
0
        /// <summary>
        /// Runs one iteration of the Simplex method on the given model.
        /// </summary>
        /// <param name="tableau"></param>
        protected void DoIteration(SimplexTableau <T, TPolicy> tableau)
        {
            IncrementIterationCount();

            int?pivotCol = GetPivotColumn(tableau);
            int?pivotRow = GetPivotRow(tableau, pivotCol.Value);

            if (pivotRow == null)
            {
                throw new UnboundedSolutionException();
            }

            tableau.PerformRowOperations(pivotCol.Value, pivotRow.Value);
        }