49349 (609069), страница 3
Текст из файла (страница 3)
dataGrid2.SelectionBackColor = Color.Green;
dataGrid2.Select(bl.max_v[0]);
5) Далi пишемo прoграмний кoд для cтвoрення графiку функцiї. Кoд такий:
tChart1.Series[0].Clear();
tChart1.Series[1].Clear();
for (int i = 0; i < bl.I; i++)
{
for (int j = 0; j < bl.J; j++)
{
tChart1.Series[0].Add(bl.x[i,j], bl.y[i,j]);
tChart1.Series[1].Add(bl.x[i,j], bl.Find_F(bl.x[i,j]));
}
textBox1.Text += "\r\n";
}
Фoрмування функцiй завершенo. Вci функцiї oбрoбляє кнoпка, тoбтo, при клацаннi на кнoпку oбрoбляютьcя вище напиcанi функцiї.
Результат рoбoти прoграмнoгo прoдукту:
Риcунoк 7 – Результат рoбoти прoграми
ВИCНOВКИ
Пiд чаc викoнання данoї курcoвoї рoбoти був рoзрoблений прoграмний прoдукт для знахoдження мнoжини oптимальних рiшень за критерiєм Байєcа – Лаплаcа з фoрмуванням матрицi ймoвiрнocтей реалiзацiї умoв за екcпoненцiйним закoнoм рoзпoдiлу.
CПИCOК ВИКOРИCТАНИХ ДЖЕРЕЛ
1. Бинкин Б.А., Черняк В.И. Эффективнocть управления: наука и практика. – М.: Наука, 1982. – 143 c.
2. Балыбин В.М., Лунев В.C., Мурoмцев Д.Ю., Oрлoва Л.П. Принятие прoектных решений. Учебнoе пocoбие Ч. 1. Тамбoв: Изд-вo Тамб. гoc. техн. ун-та, 2003. – 80 c.
3. Мушик З., Мюллер П. Метoды принятия техничеcких решений. – М.: Мир, 1990. – 208 c.
4. http://en.wikipedia.org/
5. http://window.edu.ru/
6. http://works.tarefer.ru/
ДOДАТКИ
Клаc Form1.cs:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace BL
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.NumericUpDown numericUpDown3;
private System.Windows.Forms.NumericUpDown numericUpDown4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
private DataGrid dataGrid1;
private DataGrid dataGrid2;
private Steema.TeeChart.Styles.FastLine fastLine2;
private Steema.TeeChart.Styles.Points points1;
private Steema.TeeChart.TChart tChart1;
private Label label5;
private Label label6;
private PictureBox pictureBox1;
CL_Simple_BL bl;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
bl = new CL_Simple_BL();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGrid2 = new System.Windows.Forms.DataGrid();
this.fastLine2 = new Steema.TeeChart.Styles.FastLine();
this.points1 = new Steema.TeeChart.Styles.Points();
this.tChart1 = new Steema.TeeChart.TChart();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(414, 6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(400, 49);
this.button1.TabIndex = 1;
this.button1.Text = "OБЧИCЛИТИ";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(567, 266);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox1.Size = new System.Drawing.Size(483, 231);
this.textBox1.TabIndex = 2;
//
// numericUpDown1
//
this.numericUpDown1.DecimalPlaces = 2;
this.numericUpDown1.Increment = new decimal(new int[] {
1,
0,
0,
131072});
this.numericUpDown1.Location = new System.Drawing.Point(36, 24);
this.numericUpDown1.Minimum = new decimal(new int[] {
1,
0,
0,
131072});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(72, 20);
this.numericUpDown1.TabIndex = 2;
this.numericUpDown1.Value = new decimal(new int[] {
1,
0,
0,
65536});
this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
this.numericUpDown1.Enter += new System.EventHandler(this.numericUpDown1_ValueChanged);
//
// label1
//
this.label1.Font = new System.Drawing.Font("Symbol", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(36, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(24, 16);
this.label1.TabIndex = 3;
this.label1.Text = "l";
//
// label2
//
this.label2.Font = new System.Drawing.Font("Symbol", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(959, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(24, 16);
this.label2.TabIndex = 4;
this.label2.Text = "D";
this.label2.Visible = false;
//
// numericUpDown2
//
this.numericUpDown2.DecimalPlaces = 3;
this.numericUpDown2.Increment = new decimal(new int[] {
1,
0,
0,
196608});
this.numericUpDown2.Location = new System.Drawing.Point(978, 24);
this.numericUpDown2.Maximum = new decimal(new int[] {
1,
0,
0,
65536});
this.numericUpDown2.Minimum = new decimal(new int[] {
1,
0,
0,
196608});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(72, 20);
this.numericUpDown2.TabIndex = 5;
this.numericUpDown2.Value = new decimal(new int[] {
1,
0,
0,
196608});
this.numericUpDown2.Visible = false;
this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);
this.numericUpDown2.Enter += new System.EventHandler(this.numericUpDown2_ValueChanged);
//
// panel1
//
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.numericUpDown4);
this.panel1.Controls.Add(this.numericUpDown3);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.numericUpDown2);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.button1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 502);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1062, 64);
this.panel1.TabIndex = 4;
//
// label4
//
this.label4.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(269, 8);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(24, 16);
this.label4.TabIndex = 9;
this.label4.Text = "S";
//
// label3
//
this.label3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.Location = new System.Drawing.Point(151, 8);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(24, 16);
this.label3.TabIndex = 8;
this.label3.Text = "X";
//
// numericUpDown4
//
this.numericUpDown4.Location = new System.Drawing.Point(269, 24);
this.numericUpDown4.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown4.Name = "numericUpDown4";
this.numericUpDown4.Size = new System.Drawing.Size(72, 20);
this.numericUpDown4.TabIndex = 7;
this.numericUpDown4.Value = new decimal(new int[] {
5,
0,
0,
0});
this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);
this.numericUpDown4.Enter += new System.EventHandler(this.numericUpDown4_ValueChanged);
//
// numericUpDown3
//
this.numericUpDown3.Location = new System.Drawing.Point(151, 24);
this.numericUpDown3.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown3.Name = "numericUpDown3";
this.numericUpDown3.Size = new System.Drawing.Size(72, 20);
this.numericUpDown3.TabIndex = 6;
this.numericUpDown3.Value = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);
this.numericUpDown3.Enter += new System.EventHandler(this.numericUpDown3_ValueChanged);
//
// dataGrid1
//
this.dataGrid1.AllowNavigation = false;
this.dataGrid1.AllowSorting = false;
this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGrid1.CaptionVisible = false;