新增按学期配置的“自动排课优化”页签,可调教师/行政班同日集中、行政班空档与连堂、首末节、教室容量冗余等权重。
自动排课在所有硬约束满足后,对候选排法应用这些软约束评分;不会改动既有课程或已发布课表。
This commit is contained in:
1 parent
8074d59e82
commit
0513e251df
10 files changed
+7588
-2
No files matched your search
@@ -43,6 +43,26 @@ public sealed class ScheduleTimeSlot : EntityBase
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 学期级自动排课的软约束权重。所有值为 0 时表示关闭对应偏好;
|
||||
/// 硬约束(冲突、容量和课程可用范围)始终优先于这些设置。
|
||||
/// </summary>
|
||||
public sealed class ScheduleOptimizationSettings : EntityBase
|
||||
{
|
||||
public Guid AcademicTermId { get; set; }
|
||||
public AcademicTerm? AcademicTerm { get; set; }
|
||||
public int TeacherSameDayWeight { get; set; } = 120;
|
||||
public int ClassSameDayWeight { get; set; } = 100;
|
||||
public int ClassGapWeight { get; set; } = 240;
|
||||
public int ConsecutiveClassWeight { get; set; } = 60;
|
||||
public int EarlyPeriodPenalty { get; set; } = 30;
|
||||
public int LatePeriodPenalty { get; set; } = 30;
|
||||
public int RoomCapacityWasteWeight { get; set; } = 1;
|
||||
|
||||
public static ScheduleOptimizationSettings CreateDefault(Guid academicTermId) =>
|
||||
new() { AcademicTermId = academicTermId };
|
||||
}
|
||||
|
||||
public sealed class TeachingTaskScheduleConstraint : EntityBase
|
||||
{
|
||||
public Guid TeachingTaskId { get; set; }
|
||||
|
||||
Reference in new issue
Block a user