Beispiel #1
0
 public void GetResultForSimplex()
 {
     if (!TaskForMax)
     {
         simplexTable.ChangTargetFunction();
     }
     SelectBasis();
     CalculateD();
     while (FindGuideColumnForSimplex())
     {
         Console.WriteLine(simplexTable.ToString());
         Console.WriteLine("D:");
         for (int j = 0; j < simplexTable.nColumns; j++)
         {
             Console.Write(d[j] + "\t");
         }
         Console.WriteLine();
         FindGuideRowForSimplex();
         RecalculateTable();
         basis[guideRow] = guideColumn;
         //CalculateD();
     }
     if (!TaskForMax)
     {
         simplexTable.ChangTargetFunction();
     }
     GetResult();
 }
Beispiel #2
0
 public SimplexAlgorithm GetResult(SimplexTable simplexTable, bool taskForMax)
 {
     if (!taskForMax)
     {
         simplexTable.ChangTargetFunction();
     }
     return(GetResult(simplexTable, 0));
 }