




已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
高坝洲水电站的经济运行课程设计报告班 级: 姓 名: 学 号:负 责:结果框图模块和结果分析二零一三年三月目 录1 引言31.1 课题提出背景及意义31.2研究内容及目标32 算法框图32.1水电站动态规划方法32.2 动态计算框图42.3 负荷分配框图4 3 原始数据54程序实现54.1 编程语言54.2 各程序功能模块5 4.2.1 主程序模块5 4.2.2 窗体设计程序模块6 4.2.3 初始界面生成程序模块9 4.2.4 原始数据输入表格生成模块10 4.2.5 结果框图模块12 4.2.6 负荷分配程序模块135结果分析156 参考文献16论文主体1 引言:1.1 课题提出背景及意义 水电站的特点决定了水电站经济运行问题的复杂性1. 安全性要求2. 可靠性要求3. 调节性要求(负荷平衡)4. 经济性要求(包括水电站间的水力联系) 1.2 研究内容及目标 任务:利用水电站工程、技术设施,对其进行合理调度,兴利除害。内容:编制调度方案,指导水电站运行。2 算法框图 水电站厂内经济运行的动态规划方法阶段变量k以机组编号为序,机组台数k为阶段变量;状态变量k台机组的总负荷;决策变量 第k台机组的负荷;状态转移方程:最优值函数 k台机组共同带负荷时的最优流量;递推方程:初始(边界)条件:0,0)(00*0=NNQ动态规划递推示意图变量说明k:机组台号及台数;N(k):第k号机组的装机容量;Nk:1k号机组的总容量;Nk1: 1k-1号机组的总容量;j:状态变量,总出力的取值;i:决策变量, k号机组的出力;Q2 (j):1k号机组的总工作流量(最优);Q1(j):1k-1号机组的总工作流量(最优);N0(j,k):存放优化负荷分配结果,当负荷j由k台机组承担时,k号机组所承担的负荷(最优决策)。3 原始数据 待解决:找到流量最优化解4程序实现4.1编程环境Microsoft Visual Studio 2010 4.2 各程序功能模块 4.2.1主程序 using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;namespace DynamicProgramming static class Program STAThread static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(); 4.2.2Windows窗体设计程序模块 private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label4 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); (System.ComponentModel.ISupportInitialize)(this.pictureBox1).BeginInit(); this.SuspendLayout(); / / textBox1 / this.textBox1.Location = new System.Drawing.Point(173, 44); this.textBox1.Margin = new System.Windows.Forms.Padding(4); this.textBox1.Name = textBox1; this.textBox1.Size = new System.Drawing.Size(64, 25); this.textBox1.TabIndex = 0; / / label1:场内经济运行的动态规划方法 this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font(宋体, 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)(134); this.label1.Location = new System.Drawing.Point(115, 11); this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = label1; this.label1.Size = new System.Drawing.Size(269, 20); this.label1.TabIndex = 1; this.label1.Text = 厂内经济运行的动态规划方法; / / label2:请输入机组总台数 / this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(32, 48); this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = label2; this.label2.Size = new System.Drawing.Size(142, 15); this.label2.TabIndex = 2; this.label2.Text = 请输入机组总台数; / / label3请输入各机组的出力和流量关系表 / this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(32, 81); this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = label3; this.label3.Size = new System.Drawing.Size(247, 15); this.label3.TabIndex = 3; this.label3.Text = 请输入各机组的流量关系“ / / pictureBox1 / this.pictureBox1.Image = (System.Drawing.Image)(resources.GetObject(pictureBox1.Image); this.pictureBox1.Location = new System.Drawing.Point(35, 111); this.pictureBox1.Margin = new System.Windows.Forms.Padding(4); this.pictureBox1.Name = pictureBox1; this.pictureBox1.Size = new System.Drawing.Size(80, 48); this.pictureBox1.TabIndex = 5; this.pictureBox1.TabStop = false; / / label4请输入单台机组出力最大值 / this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(269, 48); this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = label4; this.label4.Size = new System.Drawing.Size(202, 15); this.label4.TabIndex = 9; this.label4.Text = 请输入单台机组出力最大值; / / textBox2 / this.textBox2.Location = new System.Drawing.Point(476, 44); this.textBox2.Margin = new System.Windows.Forms.Padding(4); this.textBox2.Name = textBox2; this.textBox2.Size = new System.Drawing.Size(63, 25); this.textBox2.TabIndex = 10; / / button1开始计算 / this.button1.Location = new System.Drawing.Point(440, 382); this.button1.Margin = new System.Windows.Forms.Padding(4); this.button1.Name = button1; this.button1.Size = new System.Drawing.Size(100, 29); this.button1.TabIndex = 11; this.button1.Text = 开始计算; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); / / button2输入完成 / this.button2.Location = new System.Drawing.Point(319, 382); this.button2.Margin = new System.Windows.Forms.Padding(4); this.button2.Name = button2; this.button2.Size = new System.Drawing.Size(100, 29); this.button2.TabIndex = 12; this.button2.Text = 输入完成; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); / / button3确定 / this.button3.Location = new System.Drawing.Point(476, 81); this.button3.Name = button3; this.button3.Size = new System.Drawing.Size(75, 23); this.button3.TabIndex = 13; this.button3.Text = 确定; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); / 以上程序执行后结果如下:4.2.3初始界面生成程序模块如下: / Form1 / this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(592, 426); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.textBox2); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label1); this.Controls.Add(this.textBox1); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.label2); this.Margin = new System.Windows.Forms.Padding(4); this.MaximizeBox = false; this.Name = Form1; this.Text = 动态规划计算; (System.ComponentModel.ISupportInitialize)(this.pictureBox1).EndInit(); this.ResumeLayout(false); this.PerformLayout(); #endregion private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label4; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; 4.2.4 原始数据输入表格生成程序模块 private void button3_Click(object sender, EventArgs e) string str1 = textBox1.Text.Trim(); string str2 = textBox2.Text.Trim(); n = Convert.ToInt16(str1); N = Convert.ToInt16(str2); if (!string.IsNullOrEmpty(str1) for (int k = 0; k n; k+) TextBox tb1 = new TextBox(); tb1.Text = rn + k.ToString(); tb1.Multiline = true; tb1.Location = new Point(pictureBox1.Location.X + pictureBox1.Size.Width + 35 * k), pictureBox1.Location.Y); tb1.Size = new Size(35, pictureBox1.Size.Height); this.Controls.Add(tb1); if (!string.IsNullOrEmpty(str2) for (int i = 0; i N + 1; i+) TextBox tb1 = new TextBox(); tb1.Text = + i.ToString(); tb1.Location = new Point(pictureBox1.Location.X, (pictureBox1.Location.Y + pictureBox1.Size.Height + 21 * i); tb1.Size = new Size(pictureBox1.Size.Width, 21); this.Controls.Add(tb1); for (int k = 0; k n; k+) TextBox tb1 = new TextBox(); tb1.Text = 0; tb1.Location = new Point(pictureBox1.Location.X + pictureBox1.Size.Width + 35 * k), (pictureBox1.Location.Y + pictureBox1.Size.Height); tb1.Size = new Size(35, 21); this.Controls.Add(tb1); tb(N + 1) * k = tb1; for (int i = 1; i N + 1; i+) TextBox tb2 = new TextBox(); tb2.Location = new Point(pictureBox1.Location.X + pictureBox1.Size.Width + 35 * k), (pictureBox1.Location.Y + pictureBox1.Size.Height + 21 * i); tb2.Size = new Size(35, 21); this.Controls.Add(tb2); tb(N + 1) * k + i = tb2; 输入机组总台数4和单台机组最大出力4,确定后,运行结果为:4.2.5 结果框图程序模块 private void button2_Click(object sender, EventArgs e) for (int k = 0; k n; k+) for (int i = 0; i N + 1; i+) if (!string.IsNullOrEmpty(tb(N + 1) * k + i.Text.Trim() Qi, k = Convert.ToByte(tb(N + 1) * k + i.Text.Trim(); else break; Nkk = i; /MessageBox.Show(Nk0.ToString() + Nk1.ToString() + Nk2.ToString() + Nk3.ToString(); 输入初始值,点击“输入完成”,初始值保存。点击“开始计算”,弹出结果框图 private void button1_Click(object sender, EventArgs e) int k = 1; int j; int i; int M; /动态计算框图代码段 while (k = 4) if (k = 1) NK2 = Nkk - 1; for (j = 0; j = Nkk - 1; j+) Q1j = Qj, k - 1; N0j, k - 1 = j; else NK1 = NK2; NK2 = NK2 + Nkk - 1; for (j = 0; j = NK2; j+) int Y = 10000; int I0 = 0; int X; for (i = 0; i = Nkk - 1; i+) if (j - i = NK1) if (i = j) X = Qi, k - 1 + Q1j - i; if (X Y) Y = X; I0 = i; else break;
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 标签感知嵌入与表征学习
- 毕业实习教育总结(30篇)
- 专业车辆碰撞责任界定与赔偿协议
- 场地环境风险评估合同
- 民间借贷财产保全法律文书定制服务协议
- 2025年中考考前最后一卷化学(深圳卷)(全解全析)
- 乡镇宗教活动方案
- 吉林医药宿舍管理制度
- 学校节日活动管理制度
- 公司高管用车管理制度
- 某市道路客运班线管理台账
- DB37-T 1854-2020 山东省化工装置安全试车工作规范-(高清版)
- 消防档案范本(企业类)
- 消防安全管理评分表
- 国际足联球员经纪人规则
- 电梯更换钢丝绳施工方案
- 植物保护学考试复习资料
- 科学二年级第二学期双减期末综合测评方案
- 6.医院感染综合性监测制度
- 贯彻三标一规范咨询工作计划
- 定语从句语法讲解
评论
0/150
提交评论