35 lines
1.6 KiB
C#
35 lines
1.6 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Threading.Tasks;
|
||
using NPP.SmartSchedue.Api.Contracts.Services.Integration.Input;
|
||
using NPP.SmartSchedue.Api.Contracts.Services.Integration.Output;
|
||
using NPP.SmartSchedue.Api.Contracts.Services.Integration.Internal;
|
||
using NPP.SmartSchedue.Api.Contracts.Domain.Work;
|
||
|
||
namespace NPP.SmartSchedue.Api.Contracts.Services.Integration
|
||
{
|
||
/// <summary>
|
||
/// 全局优化人员分配服务接口
|
||
/// 基于遗传算法和基尼系数的智能全局优化分配
|
||
/// </summary>
|
||
public interface IGlobalPersonnelAllocationService
|
||
{
|
||
Task<GlobalAllocationResult> AllocatePersonnelGloballyAsync(GlobalAllocationInput input);
|
||
|
||
Task<GlobalAllocationAnalysisResult> AnalyzeAllocationFeasibilityAsync(GlobalAllocationInput input);
|
||
|
||
/// <summary>
|
||
/// 【性能优化】公共的人员可用性计算方法 - 专为遗传算法优化
|
||
/// 替代原有的反射调用,消除15-20%的性能开销
|
||
/// </summary>
|
||
Task<double> CalculatePersonnelAvailabilityForGeneticAsync(
|
||
GlobalPersonnelInfo personnel, WorkOrderEntity task, List<WorkOrderEntity> contextTasks);
|
||
|
||
/// <summary>
|
||
/// 【性能优化】公共的班次规则合规性评分方法 - 专为遗传算法优化
|
||
/// 替代原有的反射调用,提升约束检查性能
|
||
/// </summary>
|
||
Task<double> CalculateShiftRuleComplianceForGeneticAsync(
|
||
long personnelId, DateTime workDate, long shiftId, GlobalAllocationContext context);
|
||
}
|
||
} |