Skip to content

Conversation

@tsmbland
Copy link
Collaborator

@tsmbland tsmbland commented Jan 23, 2025

Description

As described in #476, this parameter has nothing to do with foresight and just adds an extra year to the time framework this many years on from the final year.

The only reason it does this (as far as I can tell) is to make up for a feature(/bug?) with the outputs: MUSE runs each investment period (e.g. 2040 to 2045, 2045 to 2050) in a loop, and each time it saves output data for the current year rather than the investment year. Therefore, if you want to get output data for the final year in the user-defined time framework, you need to add an extra year to the framework and simulate an extra investment step which is never saved.

I think the simplest solution is to modify the output layer so it saves data for the investment year rather than the current year (see #657)

In this PR I'm getting rid of the foresight parameter (users will get a warning if it's stil present in the setting file), and cutting the time framework back to what's defined in the settings file. This means that (for now) the example results no longer have data for the final year in the framework. This is restored in #657

Fixes #476

@tsmbland tsmbland changed the base branch from main to techs January 27, 2025 12:50
@tsmbland tsmbland linked an issue Jan 30, 2025 that may be closed by this pull request
@tsmbland tsmbland changed the base branch from techs to limit_broadcast_techs February 4, 2025 13:33
@tsmbland tsmbland marked this pull request as ready for review February 4, 2025 19:06
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

LGTM. If that was the only use of foresight actually implemented, I agree it can be ditched.

I guess this will be part of the other PR, but as we are changing the meaning of the outputs - the year in which things are outputted - that should be super clear in the documentation and the release notes.

Base automatically changed from limit_broadcast_techs to main February 6, 2025 09:45
@tsmbland tsmbland merged commit bad5a3a into main Feb 6, 2025
14 checks passed
@tsmbland tsmbland deleted the foresight branch February 6, 2025 09:46
tsmbland added a commit that referenced this pull request Feb 6, 2025
* Move broadcast_techs out of quantities module

* Update _inner_split

* Fix trade model

* Fix constraints tests

* Fix demand_share tests

* Fix quantities tests

* Fix trade tests

* Fix adhoc model

* Rename broadcast_techs to broadcast_over_assets

* Better docstring, rename argument

* Delete filter_with_template

* Remove `broadcast_over_assets` from `capacity_in_use`

* Fix trade tests

* Edit TODO

* Remove foresight parameter

* Update settings and documentation

* Temporarily suppress test

* Fix carbon budget framework

* Revert change to settings

* Update settings and documentation

* Revert change to settings

* Update results

* Small changes to fix tests

* Add warning about deprecated parameter

* Clarify log messages

* Better final message
tsmbland added a commit that referenced this pull request Feb 7, 2025
* Fix outputs - save data for investment year

* Revert change to fix tests

* Update results files

* Restore test

* Revert change to outputs cache

* Get outputs for first year

* Update mca.py

* Remove foresight parameter (#641)

* Move broadcast_techs out of quantities module

* Update _inner_split

* Fix trade model

* Fix constraints tests

* Fix demand_share tests

* Fix quantities tests

* Fix trade tests

* Fix adhoc model

* Rename broadcast_techs to broadcast_over_assets

* Better docstring, rename argument

* Delete filter_with_template

* Remove `broadcast_over_assets` from `capacity_in_use`

* Fix trade tests

* Edit TODO

* Remove foresight parameter

* Update settings and documentation

* Temporarily suppress test

* Fix carbon budget framework

* Revert change to settings

* Update settings and documentation

* Revert change to settings

* Update results

* Small changes to fix tests

* Add warning about deprecated parameter

* Clarify log messages

* Better final message

* Update results

* Actually update results

* And more

* Add kwargs arguments to prevent complaints

* Add more kwargs arguments

* Update trade result

* Tidy run function
tsmbland added a commit that referenced this pull request Feb 7, 2025
* Fix outputs - save data for investment year

* Revert change to fix tests

* Update results files

* Restore test

* Revert change to outputs cache

* Get outputs for first year

* Update mca.py

* Remove foresight parameter (#641)

* Move broadcast_techs out of quantities module

* Update _inner_split

* Fix trade model

* Fix constraints tests

* Fix demand_share tests

* Fix quantities tests

* Fix trade tests

* Fix adhoc model

* Rename broadcast_techs to broadcast_over_assets

* Better docstring, rename argument

* Delete filter_with_template

* Remove `broadcast_over_assets` from `capacity_in_use`

* Fix trade tests

* Edit TODO

* Remove foresight parameter

* Update settings and documentation

* Temporarily suppress test

* Fix carbon budget framework

* Revert change to settings

* Update settings and documentation

* Revert change to settings

* Update results

* Small changes to fix tests

* Add warning about deprecated parameter

* Clarify log messages

* Better final message

* Update results

* Actually update results

* And more

* Add kwargs arguments to prevent complaints

* Add more kwargs arguments

* Update trade result

* Remove more forecast features

* Change docstring

* Remove forecast settings

* Simplify _interpolate

* Update docs

* Remove remaining references

* Warning about deprecated parameter

* Tidy run function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Get rid of the foresight parameter

3 participants