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
{
///
/// 调度分析计算器工厂
///
public class DispatchAnalyCalculatorFactory
{
///
/// 计算工具
///
public enum eCalcTool
{
///
///
///
General = 0,
///
///
///
EPT = 1
}
///
/// 创建计算器(当前调度信息)
///
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;
}
///
/// 创建计算器(最优方案计算)
///
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;
}
///
/// 创建计算器(最优方案计算)
///
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;
}
}
}