add GroupTotalAnnualMaxNewCapacity / duckdb changes - #51
Open
loeffko wants to merge 3 commits into
Open
Conversation
…5); SC2 min-increment floor TCC5 caps the summed NewCapacity (annual additions) of a technology subset x region subset per year, complementing the TCC3/TCC4 level limits: the build PATH of a tech group can now be smoothed from input data, with no per-tech or per-region hardcoding. Optional sheet Par_GroupTotalAnnualMaxNewCap (TechnologySubset, RegionSubset, Year, Value); absent sheet or a 999999 value means no limit. SC2 additionally gets a min-increment floor: the annual RE-additions cap can never fall below the new build required to stay on the TotalAnnualMinCapacity path. Without it, a dataset whose max funnel hugs a steeply rising min becomes infeasible under switch_investLimit; min_inc is a constant computed from input parameters, so the model stays linear. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…b; add DB manager script One database file holds everything a run produces: processed tables (output_*), raw variables (raw_*), VarPar intermediates (varpar_*), selected duals (duals_*) and the input-data dump (input_* tables, one per parameter / set / tag). Result writes stay Scenario-keyed (purge + insert per scenario); re-dumping inputs replaces only the input_* tables. Readers fall back to the pre-merge genesysmod_results_db.duckdb filename so dispatch runs still find older investment results. Scripts/manage_results_db.py: interactive manager for the merged database - list scenarios/tables, rename a scenario, split scenarios into a separate file, purge, and compact (VACUUM into a fresh file with a .pre_compact.bak). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5 tasks
dqpinel
approved these changes
Aug 3, 2026
dqpinel
left a comment
Member
There was a problem hiding this comment.
See my comment regarding the location of the script manage_results_db.
| `Scenario` column (results db AND dispatch db); tables without one (input_*, | ||
| SET_* ...) are treated as shared. | ||
|
|
||
| Usage: python Scripts/manage_results_db.py [path/to/db.duckdb] |
Member
There was a problem hiding this comment.
Possible to have it in Julia? Should this be in the tool repository?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Pull Request Summary
Adds Par_GroupTotalAnnualMaxNewCapacity, improves duckdb functionalities.
🔗 Related Issue(s)
N/A
🛠️ Changes Introduced
📋 Checklist