using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using IStation.Calculation.DispatchAna;
|
using IStation.Numerics;
|
|
namespace IStation.Calculation
|
{
|
/// <summary>
|
/// 调度分析计算器工厂
|
/// </summary>
|
public class DispatchAnalyCalculatorFactory
|
{
|
/// <summary>
|
/// 计算工具
|
/// </summary>
|
public enum eCalcTool
|
{
|
/// <summary>
|
///
|
/// </summary>
|
General = 0,
|
/// <summary>
|
///
|
/// </summary>
|
EPT = 1
|
}
|
/// <summary>
|
/// 创建计算器(当前调度信息)
|
/// </summary>
|
public static IGetCurrentRecord CreateGetCurrentRecord(
|
long CorpID, string ObjectType, long ObjectID )
|
{
|
if (ObjectType == IStation.ObjectType.Station)
|
{
|
IGetCurrentRecord calc = null;
|
if (CorpID == 4)
|
{//上海 原水
|
if (ObjectID == 2)
|
{
|
calc = new IStation.Calculation.DispatchAna.Calculator_Current_SHYS_长兴岛();
|
}
|
}
|
|
|
|
|
if (calc == null)
|
{
|
var general = new IStation.Calculation.DispatchAna.Calculator_Current_Gneral();
|
calc = general;
|
}
|
return calc;
|
}
|
|
|
|
return null;
|
}
|
|
/// <summary>
|
/// 创建计算器(最优方案计算)
|
/// </summary>
|
public static IOptAnaCalc CreateOptAnaCalculator(
|
long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)
|
{
|
if (ObjectType == IStation.ObjectType.Station)
|
{
|
IOptAnaCalc calc = null;
|
if (CorpID == 4)
|
{//上海 原水
|
if (ObjectID == 2)
|
{
|
calc = new IStation.Calculation.DispatchAna.Calculator_OptAna_SHYS_长兴岛();
|
}
|
}
|
|
if (calc == null)
|
{
|
var general = new IStation.Calculation.DispatchAna.Calculator_OptAna_General();
|
calc = general;
|
}
|
|
|
return calc;
|
}
|
|
|
|
return null;
|
}
|
|
|
/// <summary>
|
/// 创建计算器(最优方案计算)
|
/// </summary>
|
public static IKeepStatusCalc CreateKeepStatusCalculator(
|
long CorpID, string ObjectType, long ObjectID, eCalcTool? CalcTool)
|
{
|
if (ObjectType == IStation.ObjectType.Station)
|
{
|
IKeepStatusCalc calc = null;
|
if (CorpID == 4)
|
{//上海 原水
|
if (ObjectID == 2)
|
{
|
calc = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_SHYS_长兴岛();
|
}
|
}
|
|
if (calc == null)
|
{
|
var general = new IStation.Calculation.DispatchAna.Calculator_KeepStatus_General();
|
calc = general;
|
}
|
|
|
return calc;
|
}
|
|
|
|
return null;
|
}
|
|
|
|
}
|
}
|