Beispiel #1
0
        /// <summary>  Returns wind speed cross-prediction estimate index that used specified model. </summary>
        public int GetWS_PredIndOneModel(Model model, ModelCollection modelList)
        {
            int  WS_PredInd    = -1;
            bool gotWS_PredInd = false;

            for (int i = WS_PredCount - 1; i >= 0; i--)
            {
                int numRadii = WS_Pred.GetUpperBound(1) + 1;
                for (int j = 0; j <= numRadii - 1; j++)
                {
                    bool isSameModel = modelList.IsSameModel(model, WS_Pred[i, j].model);
                    if (isSameModel == true)
                    {
                        WS_PredInd    = i;
                        gotWS_PredInd = true;
                        break;
                    }
                }
                if (gotWS_PredInd == true)
                {
                    break;
                }
            }

            return(WS_PredInd);
        }
Beispiel #2
0
        /// <summary> Returns index of WS estimate with specified model </summary>
        public int GetWS_PredInd(Model[] model, ModelCollection modelList)
        {
            int WS_PredInd = -1;

            for (int i = 0; i < WS_PredCount; i++)
            {
                bool isSameModel = modelList.IsSameModel(model[0], WS_Pred[i, 0].model); // just comparing with first radii to find WS_PredInd

                if (isSameModel == true)
                {
                    WS_PredInd = i;
                    break;
                }
            }

            return(WS_PredInd);
        }
Beispiel #3
0
        /// <summary>  Returns wind speed cross-prediction estimate with specified model. </summary>
        public WS_CrossPreds GetWS_CrossPred(Model model)
        {
            WS_CrossPreds   thisCrossPred = new WS_CrossPreds();
            ModelCollection modelList     = new ModelCollection();

            for (int i = 0; i < WS_PredCount; i++)
            {
                for (int j = 0; j <= WS_Pred.GetUpperBound(1); j++)
                {
                    bool isSameModel = modelList.IsSameModel(model, WS_Pred[i, j].model);

                    if (isSameModel == true)
                    {
                        thisCrossPred = WS_Pred[i, j];
                        break;
                    }
                }
            }

            return(thisCrossPred);
        }
Beispiel #4
0
        /// <summary> Assigns pathOfNodes to WS_Cross_Pred's nodePath </summary>
        public void AddNodesToWS_Pred(Model[] model, Nodes[] pathOfNodes, int radius, ModelCollection modelList)
        {
            bool isSameModel;

            for (int i = 0; i < WS_PredCount; i++)
            {
                isSameModel = modelList.IsSameModel(WS_Pred[i, 0].model, model[0]);

                if (isSameModel == true)
                {
                    for (int j = 0; j <= WS_Pred.GetUpperBound(1); j++)
                    {
                        if (WS_Pred[i, j].model.radius == radius)
                        {
                            WS_Pred[i, j].nodePath = pathOfNodes;
                            break;
                        }
                    }
                }
            }
        }