Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(solve): Fix planning_horizons in solve_network #1560

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

coroa
Copy link
Member

@coroa coroa commented Feb 27, 2025

Follow-up to #1537 .

Closes #1551 .

Changes proposed in this Pull Request

In perfect foresight, the planning_horizons param remains the list
of all planning horizons (to trigger re-runs).

The current planning horizons is always taken from the planning_horizons
wildcard and passed into extra_functionality as a partial kwarg.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.

yechenyan and others added 4 commits February 24, 2025 13:50
In perfect foresight, the planning_horizons param remains the list
of all planning horizons (to trigger re-runs).

The current planning horizons is always taken from the planning_horizons
wildcard and passed into extra_functionality as a partial kwarg.
@yechenyan
Copy link
Contributor

yechenyan commented Feb 27, 2025

In this PR, if CCL is added to the perfect forecast, errors will occur as shown in the following image:

image

This is because the network is missing planning_horizons.

config.perfect.yaml is configured as follows:

solving:
  solver:
    name: highs
    options: highs-simplex
  mem: 4000

  check_objective:
    enable: true
    expected_value: 1.3778753459e+10
  
  agg_p_nom_limits:
    agg_offwind: true
    include_existing: false
    file: data/agg_p_nom_minmax.csv
  
  constraints: 
    CCL: true

Run the command: snakemake make_summary_perfect --configfile config/test/config.perfect.yaml

I think it doesn't affect the merging of this PR; this is just a reminder that there are still issues when adding CCL to the perfect forecast.

@coroa
Copy link
Member Author

coroa commented Feb 27, 2025

@yechenyan you are right, i added now a very concrete error message, that CCL has not been implemented for perfect foresight, yet

@coroa
Copy link
Member Author

coroa commented Feb 27, 2025

the n.planning_horizons was actually an intermediate idea that leaked into the commit. sorry for that.

@coroa coroa merged commit f6fe0e4 into master Feb 27, 2025
12 checks passed
@coroa coroa deleted the fix-solve_network-planning_horizons branch February 27, 2025 22:34
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.

3 participants