using System;
using System.Collections.Generic;
namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Output
{
///
/// 全局分配可行性分析结果
///
public class GlobalAllocationAnalysisResult
{
///
/// 是否可行
///
public bool IsFeasible { get; set; }
///
/// 可行性分数(0-100)
///
public double FeasibilityScore { get; set; }
///
/// 预估执行时间(秒)
///
public int EstimatedExecutionTimeSeconds { get; set; }
///
/// 潜在冲突分析
///
public List PotentialConflicts { get; set; } = new();
///
/// 人员资源分析
///
public GlobalPersonnelResourceAnalysis ResourceAnalysis { get; set; } = new();
///
/// 约束满足度预估
///
public GlobalConstraintSatisfactionEstimate ConstraintEstimate { get; set; } = new();
///
/// 负载均衡预测
///
public GlobalLoadBalancePrediction LoadBalancePrediction { get; set; } = new();
///
/// 推荐优化参数
///
public GlobalRecommendedOptimizationParams RecommendedParams { get; set; } = new();
///
/// 风险评估
///
public List RiskFactors { get; set; } = new();
///
/// 分配摘要
///
public string AllocationSummary { get; set; } = string.Empty;
}
///
/// 全局潜在冲突分析
///
public class GlobalPotentialConflictAnalysis
{
///
/// 冲突类型
///
public GlobalConflictType ConflictType { get; set; }
///
/// 影响的任务数量
///
public int AffectedTaskCount { get; set; }
///
/// 影响的人员数量
///
public int AffectedPersonnelCount { get; set; }
///
/// 冲突概率(0-1)
///
public double ConflictProbability { get; set; }
///
/// 解决难度等级
///
public GlobalResolutionDifficulty ResolutionDifficulty { get; set; }
///
/// 建议解决方案
///
public List SuggestedSolutions { get; set; } = new();
}
///
/// 全局人员资源分析
///
public class GlobalPersonnelResourceAnalysis
{
///
/// 总可用人员数
///
public int TotalAvailablePersonnel { get; set; }
///
/// 符合资质的人员数
///
public int QualifiedPersonnelCount { get; set; }
///
/// 人员-任务匹配度分布
///
public Dictionary MatchQualityDistribution { get; set; } = new();
///
/// 资源紧张度(0-1)
///
public double ResourceTension { get; set; }
///
/// 关键技能瓶颈
///
public List SkillBottlenecks { get; set; } = new();
}
///
/// 全局约束满足度预估
///
public class GlobalConstraintSatisfactionEstimate
{
///
/// 硬约束满足率预估
///
public double HardConstraintSatisfactionRate { get; set; }
///
/// 班次规则满足率预估
///
public double ShiftRuleSatisfactionRate { get; set; }
///
/// 时间冲突风险等级
///
public GlobalRiskLevel TimeConflictRisk { get; set; }
///
/// 工作限制违规风险
///
public GlobalRiskLevel WorkLimitViolationRisk { get; set; }
///
/// 约束违规详情预测
///
public List ViolationPredictions { get; set; } = new();
}
///
/// 全局负载均衡预测
///
public class GlobalLoadBalancePrediction
{
///
/// 预测基尼系数
///
public double PredictedGiniCoefficient { get; set; }
///
/// 预测公平性等级
///
public GlobalFairnessLevel PredictedFairnessLevel { get; set; }
///
/// 最大负载差异预测
///
public decimal PredictedMaxLoadDifference { get; set; }
///
/// 负载分布预测
///
public Dictionary PredictedWorkloadDistribution { get; set; } = new();
///
/// 均衡化难度
///
public GlobalBalancingDifficulty BalancingDifficulty { get; set; }
}
///
/// 全局推荐优化参数
///
public class GlobalRecommendedOptimizationParams
{
///
/// 推荐种群大小
///
public int RecommendedPopulationSize { get; set; }
///
/// 推荐迭代次数
///
public int RecommendedGenerations { get; set; }
///
/// 推荐权重配置
///
public Dictionary RecommendedWeights { get; set; } = new();
///
/// 预期执行时间
///
public int ExpectedExecutionTimeSeconds { get; set; }
///
/// 参数调整原因
///
public string RecommendationReason { get; set; } = string.Empty;
}
///
/// 全局分配风险因子
///
public class GlobalAllocationRiskFactor
{
///
/// 风险类型
///
public string RiskType { get; set; } = string.Empty;
///
/// 风险等级
///
public GlobalRiskLevel RiskLevel { get; set; }
///
/// 影响评估
///
public string ImpactAssessment { get; set; } = string.Empty;
///
/// 缓解建议
///
public List MitigationSuggestions { get; set; } = new();
///
/// 风险概率(0-1)
///
public double RiskProbability { get; set; }
}
///
/// 全局技能瓶颈
///
public class GlobalSkillBottleneck
{
///
/// 技能/资质名称
///
public string SkillName { get; set; } = string.Empty;
///
/// 需求任务数
///
public int RequiredTaskCount { get; set; }
///
/// 可用人员数
///
public int AvailablePersonnelCount { get; set; }
///
/// 供需比率
///
public double SupplyDemandRatio { get; set; }
///
/// 瓶颈严重程度
///
public GlobalBottleneckSeverity Severity { get; set; }
}
///
/// 全局约束违规预测
///
public class GlobalConstraintViolationPrediction
{
///
/// 约束类型
///
public string ConstraintType { get; set; } = string.Empty;
///
/// 预测违规概率
///
public double ViolationProbability { get; set; }
///
/// 影响的任务数
///
public int AffectedTaskCount { get; set; }
///
/// 预防措施建议
///
public List PreventionSuggestions { get; set; } = new();
}
///
/// 全局解决难度枚举
///
public enum GlobalResolutionDifficulty
{
///
/// 容易解决
///
Easy = 1,
///
/// 中等难度
///
Medium = 2,
///
/// 困难
///
Hard = 3,
///
/// 极难解决
///
VeryHard = 4
}
///
/// 全局风险等级枚举
///
public enum GlobalRiskLevel
{
///
/// 低风险
///
Low = 1,
///
/// 中等风险
///
Medium = 2,
///
/// 高风险
///
High = 3,
///
/// 极高风险
///
Critical = 4
}
///
/// 全局均衡化难度枚举
///
public enum GlobalBalancingDifficulty
{
///
/// 容易均衡
///
Easy = 1,
///
/// 中等难度
///
Medium = 2,
///
/// 困难
///
Hard = 3,
///
/// 无法均衡
///
Impossible = 4
}
///
/// 全局瓶颈严重程度枚举
///
public enum GlobalBottleneckSeverity
{
///
/// 轻微瓶颈
///
Minor = 1,
///
/// 中等瓶颈
///
Moderate = 2,
///
/// 严重瓶颈
///
Severe = 3,
///
/// 关键瓶颈
///
Critical = 4
}
}