Skip to content

Conversation

@louispt1
Copy link
Contributor

A simple migration that checks if any capacity has been set on:

  • capacity_of_energy_heat_flexibility_p2h_boiler_electricity or
  • capacity_of_energy_heat_flexibility_p2h_heatpump_electricity

And if so sets the temperature-setpoint to its maximum.

Closes #1643 (further discussion in the issue)

@louispt1 louispt1 requested a review from noracato October 27, 2025 15:42

def up
migrate_scenarios do |scenario|
if scenario.user_values['capacity_of_energy_heat_flexibility_p2h_boiler_electricity'].to_f > 0 ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if scenario.user_values['capacity_of_energy_heat_flexibility_p2h_boiler_electricity'].to_f > 0 ||
if scenario.user_values['capacity_of_energy_heat_flexibility_p2h_boiler_electricity']&.positive? ||

Did you know this trick?

@mabijkerk mabijkerk changed the title P2h migration P2H migration Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants