Skip to content

Conversation

@tsmbland
Copy link
Collaborator

@tsmbland tsmbland commented Nov 3, 2025

Description

Allows us to run dispatch runs with unmet demand variables turned on for a specific subset of markets being balances. This will be necessary for the implementing investment for commodity loops.

Note: this is different to the dispatch runs that we already do with unmet demand variables, which run with unmet demand variables turned on for all markets in the event of an infeasible model, to find out which markets are to blame. The changes here are so that we can intentionally run dispatch with unmet demand variables turned on for some markets.

Also note: the difference between adding an a market to markets_to_allow_unmet_demand and excluding it from markets_to_balance is that the former will incentivise the model to balance supply/demand as much as it can, with imbalance penalised by the "value of lost load" parameter, whereas the latter gives no incentive

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 42.30769% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.71%. Comparing base (c64a7a8) to head (9649310).

Files with missing lines Patch % Lines
src/simulation/optimisation.rs 18.91% 28 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
- Coverage   83.94%   83.71%   -0.24%     
==========================================
  Files          52       52              
  Lines        5794     5815      +21     
  Branches     5794     5815      +21     
==========================================
+ Hits         4864     4868       +4     
- Misses        695      711      +16     
- Partials      235      236       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from combine_regions_v2 to main November 7, 2025 10:08
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