📄 about.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace timetabling
{
/// <summary>
/// about 的摘要说明。
/// </summary>
public class about : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public about()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
string str="考试时间表。考试时间表涉及的因素有{教室,班级,考试科目(即课程),监考教师,时间}。考试时间表的最终目的是求得一个(时间,资源(教室,监考教师),事件(班级考试)}安排表,这个安排表要求满足一些硬约束条件,并已满足软约束条件程度评定其优良程度。硬约束:1. 考同一考试科目的班级必须在同一时段考同一科目;2. 每一个教室考试人数不能超过教室容量;3. 同一时段同一班级只能出现在唯一教室考唯一科目;4. 每一教室需两名监考教师;5. 同一时段一名教师只能出现在一个教室;软约束:1. 考生不希望同一天参加两门及以上的考试科目;2. 考试的公共科目希望编排在考试的头几天;3. 同一时间同一教室的考试科目近可能的少;在这个的问题中,我们可以注意到在约束中,与教师产生关系的仅有教室,与时间,且不同的考试科目对教师与教师之间不同并不敏感,因此,我们可以把关于教师的约束从问题中剥离开来,在对{教室,班级,考试科目,时间}的编排完成之后,再进行监考教师编排。这样主问题少了两个硬约束,一个关键因素,而教师编排问题,也仅相关两个约束。我们再对剩下的问题进一步分析,考试科目对教室与教室之间不同也不敏感,只是对教室的容量有所约束。因此我们把所有教室的集合看成为一个大的教室,同一时段的所有考试均在这大教室内进行,这样问题又可分解为,不同时间段的考试科目的编排和同一时间段不同班级及考试科目对教室的编排。不同时间段考试科目的编排仅需考虑约束硬约束2,3和软约束1,2。其中硬约束2可改为,此时间段考试人数不超过所有教室容量总和,而硬约束1,很自然地直接可以满足。而同一时间段对班级教室的编排,只需硬约束2,和软约束3即可。这样一个复杂的问题被分解为三个相对简单容易处理的问题了。";
textBox1.Text=str;
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.AcceptsReturn = true;
this.textBox1.AcceptsTab = true;
this.textBox1.Location = new System.Drawing.Point(16, 40);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(256, 144);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "textBox1";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(104, 232);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "ok";
//
// about
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "about";
this.Text = "about";
this.ResumeLayout(false);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -