From 6567e5458ee6097bf78fc4eecf7957c457fa6682 Mon Sep 17 00:00:00 2001
From: Armin Co <armin.co@hs-bochum.de>
Date: Sun, 4 Oct 2020 17:45:48 +0200
Subject: [PATCH] Updated modell

---
 src/smart_grid/ModelState.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/smart_grid/ModelState.cpp b/src/smart_grid/ModelState.cpp
index 22c19b0..241b3cc 100644
--- a/src/smart_grid/ModelState.cpp
+++ b/src/smart_grid/ModelState.cpp
@@ -12,16 +12,16 @@ ModelState::ModelState(SmartGridModell &modell)
 
 void ModelState::update_wind()
 {
-    double wind_by_sun = m_sun * 7.0 / 100.0; // wind by sun should by 5 max.
-    auto random_wind = ((std::rand() * 1.0) / RAND_MAX) * 5.0;
+    auto wind_by_sun = m_sun * 9.0 / 100.0; // wind by sun should be 5 max.
+    auto random_wind = ((std::rand() * 1.0) / RAND_MAX) * 3.0;
     m_wind = power_wind[static_cast<int>(wind_by_sun + random_wind)];
 }
 
 
 void ModelState::update_modell()
 {
-    auto sun = m_sun * 2.5;
-    auto wind = m_wind / 8.3;
+    auto sun = m_sun * 3.5;
+    auto wind = m_wind / 9.3;
     auto renewable = (sun + wind) / 2;
     m_modell.set_solar_plant(sun);
     m_modell.update_windmill_speed(wind);
@@ -114,4 +114,5 @@ void ModelState::next_hour()
     update_power_production();
     update_modell();
     print_states();
+    notify();
 }
\ No newline at end of file
-- 
GitLab