Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SimplexInputCreator.rowsCount      = Int32.Parse(numericUpDown1.Value.ToString());
            SimplexInputCreator.formsNeeded    = SimplexInputCreator.rowsCount;
            SimplexInputCreator.variablesСount = Int32.Parse(numericUpDown2.Value.ToString());
            SimplexInputCreator.AddSpace();
            SimplexInputCreator.minMax = comboBox1.Text;
            RowOne ro = new RowOne();

            ro.text = "F(x):";
            ro.b    = true;
            ShowNextForm(ro);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            double[] dmass = new double[SimplexInputCreator.variablesСount + 1];
            for (int i = 0; i < dmass.Length; i++)
            {
                dmass[i] = double.Parse(variables[i].Text);
                if (b)
                {
                    dmass[i] = -dmass[i];
                }
            }
            // Добавляем строку в задачу
            SimplexInputCreator.rows.Add(new MyRow(SimplexInputCreator.variablesСount, dmass, comboBox1.Text));
            if (SimplexInputCreator.formsNeeded-- == 0)
            {
                FinalForm ff = new FinalForm();
                ShowNextForm(ff, true);
                return;
            }
            RowOne ro = new RowOne();

            ro.text = "Ограничение:";
            ShowNextForm(ro, true);
        }