Beispiel #1
0
        public OilParkItem(int id, FOParam param, int times)
        {
            Id         = id;
            ObjectInfo = param;
            _nextItems = new List <OilParkItem>();
            _incomes   = new List <float> [times];
            _outcome   = new float[times];
            _mass      = new float[(times + 1)];
            _mass[0]   = param.MassBegin;

            for (int i = 0; i < times; i++)
            {
                _incomes[i] = new List <float>();
            }

            _times  = times;
            Quality = new Dictionary <string, float[][]>();
            foreach (var qualityName in OilParkModel.Qualitys)
            {
                Quality[qualityName] = new float[times + 1][];
                var qualityValue = param.QualityBegin != null ? param.QualityBegin[qualityName] : 0;
                Quality[qualityName][0] = Enumerable.Repeat(qualityValue, OilParkModel.QualityTimeSplits).ToArray();
                for (int i = 1; i < times + 1; i++)
                {
                    Quality[qualityName][i] = new float[OilParkModel.QualityTimeSplits];
                }
            }
        }
Beispiel #2
0
 public Pipe(int id, FOParam param, int times)
     : base(id, param, times)
 {
 }
Beispiel #3
0
 public Tank(int id, FOParam param, int times)
     : base(id, param, times)
 {
 }