Skip to content
Snippets Groups Projects
Commit 6567e545 authored by Armin Co's avatar Armin Co
Browse files

Updated modell

parent fe0c70c3
No related branches found
No related tags found
No related merge requests found
...@@ -12,16 +12,16 @@ ModelState::ModelState(SmartGridModell &modell) ...@@ -12,16 +12,16 @@ ModelState::ModelState(SmartGridModell &modell)
void ModelState::update_wind() void ModelState::update_wind()
{ {
double wind_by_sun = m_sun * 7.0 / 100.0; // wind by sun should by 5 max. 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) * 5.0; auto random_wind = ((std::rand() * 1.0) / RAND_MAX) * 3.0;
m_wind = power_wind[static_cast<int>(wind_by_sun + random_wind)]; m_wind = power_wind[static_cast<int>(wind_by_sun + random_wind)];
} }
void ModelState::update_modell() void ModelState::update_modell()
{ {
auto sun = m_sun * 2.5; auto sun = m_sun * 3.5;
auto wind = m_wind / 8.3; auto wind = m_wind / 9.3;
auto renewable = (sun + wind) / 2; auto renewable = (sun + wind) / 2;
m_modell.set_solar_plant(sun); m_modell.set_solar_plant(sun);
m_modell.update_windmill_speed(wind); m_modell.update_windmill_speed(wind);
...@@ -114,4 +114,5 @@ void ModelState::next_hour() ...@@ -114,4 +114,5 @@ void ModelState::next_hour()
update_power_production(); update_power_production();
update_modell(); update_modell();
print_states(); print_states();
notify();
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment