diff --git a/src/smart_grid/ModelState.cpp b/src/smart_grid/ModelState.cpp index 22c19b01ed4c7ea164a10470b2fa093298dc11bc..241b3cca325cc61ff5ebb48ccda12370ba09571b 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