Ejemplo n.º 1
0
        public void Close()
        {
            //
            Keys         = null;
            ModelSignals = null;

            AVG = null;

            ResultSignals = null;
            VyazovkinE    = null;
            alpha         = null;
            func          = null;

            ViewTG = null;
        }
Ejemplo n.º 2
0
        public Model(List <List <string> > paths, Dictionary <string, int> _Keys, ViewSignal _ViewTG, ViewSignal _ViewE, ViewSignal _ViewAlpha, ViewSignal _ViewEHidd, ViewSignal _ViewAlphaHidd, int[] _DataIndex) // скорость <эксперимент>
        {
            ViewTG        = _ViewTG;
            ViewE         = _ViewE;
            ViewAlpha     = _ViewAlpha;
            ViewEHidd     = _ViewEHidd;
            ViewAlphaHidd = _ViewAlphaHidd;
            DataIndex     = _DataIndex;

            Keys         = _Keys;
            ModelSignals = new List <List <SimpleSignal> >();

            foreach (List <string> P in paths)
            {
                List <SimpleSignal> newSignalList = new List <SimpleSignal>();
                foreach (string str in P)
                {
                    newSignalList.Add(new SimpleSignal(str, Keys, DataIndex));
                }
                ModelSignals.Add(newSignalList);
            }

            double dBetta = 0;
            bool   bFlag  = true;

            for (int i = 0; i < ModelSignals.Count; i++)
            {
                if (bFlag || ModelSignals[i][0].Betta > dBetta)
                {
                    dBetta = ModelSignals[i][0].Betta;
                    TemperatureRangeLeft  = ModelSignals[i][0].Tstart;
                    TemperatureRangeRight = ModelSignals[i][0].Tend;
                    bFlag = false;
                }
            }

            double Tstart = Tmin(), Tend = Tmax();

            AVG = new AVGModel(this, TemperatureRangeLeft, TemperatureRangeRight, DataIndex);
            TemperatureRangeRight = Math.Ceiling((TemperatureRangeRight - TemperatureRangeLeft) * 0.25);
        }