Пример #1
0
        public static IModelSimulation <double[], double, int> CreateAwbmSimulation(bool setSampleData = false)
        {
            var result = new ModelSimulation(new AWBM());

            if (setSampleData)
            {
                var data = DataHandling.GetSampleClimate();
                SimulationFactory.SetSampleSimulation(result, data);
            }
            return(result);
        }
Пример #2
0
        public IModelSimulation <double[], double, int> Clone()
        {
            if (!SupportsThreadSafeCloning)
            {
                throw new NotSupportedException();
            }
            var res = new ModelSimulation(TsModel.Clone());

            res.startIndex = startIndex;
            res.endIndex   = endIndex;
            foreach (var input in this.inputs)
            {
                res.inputs[input.Key] = inputs[input.Key];
            }
            foreach (var output in outputs)
            {
                res.outputs[output.Key] = (double[])outputs[output.Key].Clone();
            }
            return(res);
        }