Ejemplo n.º 1
0
 public static NowCastSimulationResult Simulation(double[][] wakeFarmControlDataOut, NowCastConfig config, out List<string> warningMessages)
 {
     ILArray<double> Data = ILArrayFromArray(wakeFarmControlDataOut);
     string outMethod;
     ILArray<double> outTime;
     ILArray<double> outX;
     ILArray<double> outXhmsAll;
     int outXhmsAllTimeOffset;
     int outXhmsLLength;
     int outXhmsUOffset;
     lock (TranslatedCode.WarningMessages)
     {
         TranslatedCode.WarningMessages.Clear();
     }
     TranslatedCode.NowCastWFPFunc(out outMethod, out outTime, out outX, out outXhmsAll, out outXhmsAllTimeOffset, out outXhmsLLength, out outXhmsUOffset, Data[ILMath.full, 1], config.TPredict, config.Method, config.r, config.Ts);
     lock (TranslatedCode.WarningMessages)
     {
         warningMessages = new List<string>(TranslatedCode.WarningMessages);
     }
     NowCastSimulationResult nowCastSimulationResult = new NowCastSimulationResult();
     nowCastSimulationResult.Method = outMethod;
     nowCastSimulationResult.Time = outTime.ToArray();
     nowCastSimulationResult.X = outX.ToArray();
     nowCastSimulationResult.XhmsAll = outXhmsAll.ToDoubleArray();
     nowCastSimulationResult.XhmsAllTimeOffset = outXhmsAllTimeOffset;
     nowCastSimulationResult.XhmsLLength = outXhmsLLength;
     nowCastSimulationResult.XhmsUOffset = outXhmsUOffset;
     return nowCastSimulationResult;
 }
Ejemplo n.º 2
0
        public static NowCastSimulationResult Simulation(double[][] wakeFarmControlDataOut, NowCastConfig config, out List <string> warningMessages)
        {
            ILArray <double> Data = ILArrayFromArray(wakeFarmControlDataOut);
            string           outMethod;
            ILArray <double> outTime;
            ILArray <double> outX;
            ILArray <double> outXhmsAll;
            int outXhmsAllTimeOffset;
            int outXhmsLLength;
            int outXhmsUOffset;

            lock (TranslatedCode.WarningMessages)
            {
                TranslatedCode.WarningMessages.Clear();
            }
            TranslatedCode.NowCastWFPFunc(out outMethod, out outTime, out outX, out outXhmsAll, out outXhmsAllTimeOffset, out outXhmsLLength, out outXhmsUOffset, Data[ILMath.full, 1], config.TPredict, config.Method, config.r, config.Ts);
            lock (TranslatedCode.WarningMessages)
            {
                warningMessages = new List <string>(TranslatedCode.WarningMessages);
            }
            NowCastSimulationResult nowCastSimulationResult = new NowCastSimulationResult();

            nowCastSimulationResult.Method            = outMethod;
            nowCastSimulationResult.Time              = outTime.ToArray();
            nowCastSimulationResult.X                 = outX.ToArray();
            nowCastSimulationResult.XhmsAll           = outXhmsAll.ToDoubleArray();
            nowCastSimulationResult.XhmsAllTimeOffset = outXhmsAllTimeOffset;
            nowCastSimulationResult.XhmsLLength       = outXhmsLLength;
            nowCastSimulationResult.XhmsUOffset       = outXhmsUOffset;
            return(nowCastSimulationResult);
        }