• 大小: 233KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-05
  • 语言: C#
  • 标签: 排课算法  源码  

资源简介

C#编写 教务管理中自动排课系统 算法 源码

资源截图

代码片段和文件信息

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
     

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

     文件       1157  2007-02-27 11:16  PaiKe\PaiKe\Properties\AssemblyInfo.cs

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\Properties

     文件       1944  2007-02-27 11:16  PaiKe\PaiKe\PaiKe.csproj

     文件       5632  2005-12-08 14:51  PaiKe\PaiKe\bin\Debug\PaiKe.vshost.exe

     文件      24576  2007-03-01 18:41  PaiKe\PaiKe\bin\Debug\PaiKe.exe

     文件      26112  2007-03-01 18:41  PaiKe\PaiKe\bin\Debug\PaiKe.pdb

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\bin\Debug

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\bin

     文件      24576  2007-03-01 18:41  PaiKe\PaiKe\obj\Debug\PaiKe.exe

     文件      26112  2007-03-01 18:41  PaiKe\PaiKe\obj\Debug\PaiKe.pdb

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\obj\Debug\TempPE

     目录          0  2007-02-27 11:37  PaiKe\PaiKe\obj\Debug\Refactor

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\obj\Debug

     文件        126  2007-04-14 11:03  PaiKe\PaiKe\obj\PaiKe.csproj.FileList.txt

     目录          0  2007-02-27 11:16  PaiKe\PaiKe\obj

     文件      18998  2007-03-01 18:41  PaiKe\PaiKe\Program.cs

     目录          0  2007-02-27 11:16  PaiKe\PaiKe

     文件       1382  2007-02-27 21:42  PaiKe\PaiKe.sln

    ..A..H.     30208  2007-04-14 11:04  PaiKe\PaiKe.suo

     文件       5612  2007-02-27 21:36  PaiKe\WinPaike\Properties\Resources.resx

     文件        249  2007-02-27 21:36  PaiKe\WinPaike\Properties\Settings.settings

     文件       1164  2007-02-27 21:36  PaiKe\WinPaike\Properties\AssemblyInfo.cs

     文件       2870  2007-02-27 21:36  PaiKe\WinPaike\Properties\Resources.Designer.cs

     文件       1091  2007-02-27 21:36  PaiKe\WinPaike\Properties\Settings.Designer.cs

     目录          0  2007-02-27 21:36  PaiKe\WinPaike\Properties

     文件       3290  2007-02-28 19:57  PaiKe\WinPaike\WinClass.cs

     文件       1558  2007-03-01 19:26  PaiKe\WinPaike\WinPaiKe.cs

     文件       5272  2007-04-14 11:02  PaiKe\WinPaike\WinPaike.csproj

     文件      49152  2007-04-14 11:04  PaiKe\WinPaike\bin\Debug\WinPaike.exe

     文件     112128  2007-04-14 11:04  PaiKe\WinPaike\bin\Debug\WinPaike.pdb

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

评论

共有 条评论