paiban/NPP.SmartSchedue.Api.Contracts/Services/Integration/IGlobalPersonnelAllocationService.cs
Asoka.Wang 21f044712c 1
2025-08-27 18:39:19 +08:00

35 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}