Exemplo n.º 1
0
        protected void GenerateOptimumTablou()
        {
            int counter = 0;

            do
            {
                var pivotIndex = SimplexLineCollection.objectiveFunction.GetPivotColumnIndex();
                SimplexLineCollection.DetectPivotConstrain(pivotIndex);
                SimplexLineCollection.PivotConstrain.ReduceToPivotColumnValueOne(pivotIndex);
                SimplexLineCollection.ReduceConstrainsToZero(pivotIndex);
                SimplexLineCollection.objectiveFunction.ReduceToZero(SimplexLineCollection.PivotConstrain, pivotIndex);
                counter++;
                if (counter > 1000)
                {
                    throw new Exception("Tabelle konnte nicht optimiert werden");
                }
            } while (!SimplexLineCollection.objectiveFunction.isAllNegativ());
        }