public ActionResult Nowcasting(VNowcastingProperties nowcastingModel) { if (_simulationDataOut == null) { return RedirectToAction("Simulation"); } lock (_nowcastingModel) { ObjectMapperManager.DefaultInstance.GetMapper<VNowcastingProperties, VNowcastingProperties>().Map(nowcastingModel, _nowcastingModel); _nowcastingModel.SamplingTime = _simulationTimeStep; } var config = new WakeFarmControl.NowCast.NowCastConfig(); config.Method = _nowcastingModel.Method.ToString(); config.TPredict = (double)(_nowcastingModel.TimeForStarting); config.r = _nowcastingModel.Decimation; config.Ts = (double)(_simulationTimeStep); List<string> nowcastingSimulationWarningMessages; _nowcastingSimulationResult = WakeFarmControl.NowCast.NowCast.Simulation(_simulationDataOut, config, out nowcastingSimulationWarningMessages); _nowcastingSimulationWarningMessages = nowcastingSimulationWarningMessages; return RedirectToAction("Nowcasting"); }
public ActionResult Nowcasting() { ViewBag.Title = NowcastingPageTitle; ViewBag.WasWakeSimulationPerformed = !(_simulationDataOut == null); if (_nowcastingModel == null) { _nowcastingModel = new VNowcastingProperties(); var config = new WakeFarmControl.NowCast.NowCastConfig(); _nowcastingModel.TimeForStarting = (decimal)(config.TPredict); _nowcastingModel.Decimation = config.r; _nowcastingModel.SamplingTime = (decimal)(config.Ts); } _nowcastingModel.SamplingTime = _simulationTimeStep; //_nowcastingModel.WasWakeSimulationPerformed = !(_simulationDataOut == null); return View(_nowcastingModel); }