Ejemplo n.º 1
0
        /// <summary>
        /// Internal constructor
        /// </summary>
        internal Baseline(AeccBaseline baseline, int index, Corridor corridor)
        {
            this._baseline = baseline;
            this._start    = baseline.StartStation;
            this._end      = baseline.EndStation;
            this._corridor = corridor;

            IList <double> stations = new List <double>();

            foreach (double s in baseline.GetSortedStations())
            {
                if (!stations.Contains(Math.Round(s, 3)))
                {
                    stations.Add(s);
                }
            }

            this._stations = stations.ToArray();
            this._index    = index;

            // 20190524 - Start
            IList <BaselineRegion> output = new List <BaselineRegion>();

            int i = 0;

            foreach (AeccBaselineRegion blr in this._baseline.BaselineRegions)
            {
                // Can return Unspecified Error when the regions are not generated
                try
                {
                    output.Add(new BaselineRegion(this, blr, i));
                }
                catch (Exception ex)
                {
                    Utils.Log(string.Format("ERROR: Baseline Regions: {0}", ex.Message));
                    output.Add(null);
                }

                i += 1;
            }

            this._baselineRegions = output;
            // 20190524 - End
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Internal constructor
        /// </summary>
        internal Baseline(AeccBaseline baseline, int index)
        {
            this._baseline = baseline;
            this._start    = baseline.StartStation;
            this._end      = baseline.EndStation;

            IList <double> stations = new List <double>();

            foreach (double s in baseline.GetSortedStations())
            {
                if (!stations.Contains(Math.Round(s, 3)))
                {
                    stations.Add(s);
                }
            }

            this._stations = stations.ToArray();
            this._index    = index;
        }