• 大小: 283KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-07
  • 语言: C#
  • 标签: C#  排课系统  

资源简介

C#.net 使用模拟退火算法实现的排课系统

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.xml;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
namespace PaiKe
{
    class Program
    {
        static void Main(string[] args)
        {
           PaiKe paike = new PaiKe();
           paike.Test1();
                Console.ReadLine();
        }
    }
    class ClassUnit
    {
        static List CourseList = new List();
        public const int WeekDay = 5;
        public const int CourseCount = 6;
        public int ID;
        public int[] XuLie = new int[WeekDay * ClassUnit.CourseCount];
        public ClassUnit(int id int[] xulie)
        {
            ID = id;
            XuLie = xulie;
        }
    }
    [Serializable()]
    class Course
    {
        static int Seed = 0;
        public int ID;
        public int ClassID;
        public string TeacherName;
        public int TeacherID;
        public string Name;
        public int Priority = 0;
        public Course(int id int techerid string name string teacherName int priority)
        {
            Seed++;
            Name = name;
            ID = id;
            TeacherID = id;// techerid;
            TeacherName = teacherName;
            Priority = priority;
        }
    }
    class CoursePriority
    {         
      public static int[] Priority=new int[ClassUnit.CourseCount]{554421}; 
    }
    class PaiKe
    {
        Random rnd = new Random();
        ClassUnit tClassUnit;// = new ClassUnit(1);            
        List ClassList = new List();
        List CourseList = new List();
        //---------------惩罚值列表--------------
        //冲突
        const int ChongTu = 200;
        //一天有2节相同的课
        const int OneDayForTowCourse = 150;
        //连续2天有2节相同课
        const int TowDayForTowCourse = 40;
        //课程优先级单位值
        const int CoursePr = 15;
        void Init()
        {
            int[] Tshuzu ;
            Tshuzu = new int[ClassUnit.CourseCount * ClassUnit.WeekDay] 
            {
               111112
               222233
               333444
               556668
               8997710
            };
            tClassUnit = new ClassUnit(1 Tshuzu);
            ClassList.Add(tClassUnit);

            Tshuzu = new int[ClassUnit.CourseCount * ClassUnit.WeekDay] 
            {
               111112
               222233
               333444
               556668
               8997710
            };
            tClassUnit = new ClassUnit(1 Tshuzu);
            ClassList.Add(tClassUnit);
            Tshuzu = new int[ClassUnit.CourseCount * ClassUnit.WeekDay] 
            {
               111111111112
               121212121313
               131313141414
     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        553  2007-04-14 11:03  WinPaike\About.cs

     文件       2096  2007-04-14 11:01  WinPaike\About.Designer.cs

     文件       5814  2007-04-14 11:01  WinPaike\About.resx

     文件      38400  2014-07-13 17:35  WinPaike\bin\Debug\WinPaike.exe

     文件      83456  2014-07-13 17:35  WinPaike\bin\Debug\WinPaike.pdb

     文件      11608  2014-07-13 17:40  WinPaike\bin\Debug\WinPaike.vshost.exe

     目录          0  2014-07-13 17:35  WinPaike\bin\Debug

     目录          0  2014-07-13 17:34  WinPaike\bin\Release

     目录          0  2014-07-13 17:34  WinPaike\bin

     文件        754  2007-02-28 09:43  WinPaike\ClassUnit.cs

     文件       1719  2007-02-28 10:17  WinPaike\CommonClass.cs

     文件        639  2007-02-28 10:11  WinPaike\Course.cs

     文件        437  2007-02-28 09:57  WinPaike\CourseInClass.cs

     文件       5481  2014-07-13 17:35  WinPaike\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1548  2014-07-13 17:35  WinPaike\obj\Debug\GenerateResource-ResGen.read.1.tlog

     文件          2  2014-07-13 17:35  WinPaike\obj\Debug\GenerateResource-ResGen.read.5.tlog

     文件       2496  2014-07-13 17:35  WinPaike\obj\Debug\GenerateResource-ResGen.write.1.tlog

     文件       4608  2014-07-13 17:34  WinPaike\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     目录          0  2014-07-13 17:34  WinPaike\obj\Debug\TempPE

     文件        180  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.About.resources

     文件       2070  2014-07-13 17:40  WinPaike\obj\Debug\WinPaike.csproj.FileListAbsolute.txt

     文件      38400  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.exe

     文件      83456  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.pdb

     文件        180  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.Properties.Resources.resources

     文件       1996  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.WinClass.resources

     文件       1269  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.WinCourse.resources

     文件       1996  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.WinCourseInClass.resources

     文件        180  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.WinMain.resources

     文件       1992  2014-07-13 17:35  WinPaike\obj\Debug\WinPaike.WinPaiKe.resources

     目录          0  2014-07-13 17:35  WinPaike\obj\Debug

............此处省略95个文件信息

评论

共有 条评论