Exemple #1
0
        public void AddDeviceTuple([NotNull] CalcDevice dev,
                                   [NotNull] CalcProfile newprof,
                                   [NotNull] CalcLoadType lt,
                                   decimal timeoffset,
                                   TimeSpan internalstepsize,
                                   double multiplier,
                                   double probability)
        {
            //TODO: remove this, it is only used in unit testing
            var calctup = new DeviceEnergyProfileTuple(dev, newprof, lt, timeoffset, internalstepsize, multiplier, probability);

            Energyprofiles.Add(calctup);
        }
Exemple #2
0
            public DeviceEnergyProfileTuple([NotNull] CalcDevice pdev,
                                            [NotNull] CalcProfile ep,
                                            [NotNull] CalcLoadType pLoadType,
                                            decimal timeOffset,
                                            TimeSpan stepsize,
                                            double multiplier,
                                            double probability)
            {
                _calcDevice = pdev;
                TimeProfile = ep;
                LoadType    = pLoadType;
                TimeOffset  = timeOffset;
                _multiplier = multiplier;
                var minutesperstep = (decimal)stepsize.TotalMinutes;

                TimeOffsetInSteps = (int)(timeOffset / minutesperstep);
                Probability       = probability;
            }