Beispiel #1
0
        private void SimplexGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            currentSimplexTable = SimplexTables.Count - 1;
            SimplexTable cursmptbl = SimplexTables[currentSimplexTable];

            SimplexTable smptbl = new SimplexTable(cursmptbl.N, cursmptbl.M);

            smptbl.Assign(cursmptbl);

            SimplexTables.Clear();
            SimplexTables.Add(smptbl);

            if (smptbl.FillTable(SimplexGrid))
            {
                IsNewTask = false;

                smptbl.Solved     = false;
                smptbl.Infinity   = false;
                smptbl.Unsolvable = false;

                smptbl.ResetbaseVector();

                CanonicalN = smptbl.N;
                CanonicalM = smptbl.M;

                for (int i = 0; i < CanonicalM; i++)
                {
                    CanonicalSign[i] = 2;
                }

                CanonicalTaskType = TaskTypeComboBox.SelectedIndex;

                smptbl.FillVectorb(CanonicalVectorb);
                smptbl.FillVectorc(CanonicalVectorc);
                smptbl.FillMatrixA(CanonicalMatrixA);

                PrintSolveLog(TaskInfotextBox);

                toolStripStatusLabel.Text = "Итерация: ";
            }
        }