Cvar factor add investment cost expression#1615
Closed
florinelaseur wants to merge 19 commits into
Closed
Conversation
Wrap stochastic_scenario selection in an ordered_scenarios CTE so
nextval('id') assigns ids only after ORDER BY scenario. This guarantees
all per-scenario tables align to scenario 1..N in alphabetical order,
a prerequisite for positional index access in the CVaR expressions.
Co-Authored-By: GitHub Copilot (claude-sonnet-4-6) <noreply@github.com>
Builds one TulipaExpression per operational cost type (flows, vintage_flows, units_on) before the objective is assembled, so the CVaR constraint can read precomputed per-scenario sums directly. Renames units_on_cost.jl to units_on_operational_cost.jl for consistency. Splits prepare_objective_tables! out of add_objective! so discount-table preparation runs before expression building. Co-Authored-By: GitHub Copilot (claude-sonnet-4-6) <noreply@github.com>
Builds total_cost_per_scenario as a TulipaExpression by summing the three precomputed per-scenario cost expressions. Creates tail excess constraints xi_s >= cost_s - mu using row.id-based access throughout, eliminating the _scenario_cost_lookup Dict and any |> collect on CVaR indices. Registers :cvar and :objective tags in TAGS_DATA and replaces the outdated CVaR objective test with an updated one. Co-Authored-By: GitHub Copilot (claude-sonnet-4-6) <noreply@github.com>
Co-authored-by: Abel Soares Siqueira <abel.siqueira@esciencecenter.nl>
Co-authored-by: Abel Soares Siqueira <abel.s.siqueira@gmail.com>
Co-authored-by: Abel Soares Siqueira <abel.siqueira@esciencecenter.nl>
Fix test assertion for cost per scenario in tail excess constraints
Member
|
close in favour of #1631 |
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.
Hi Diego, this is the TEM version I locally run in the Experiments_CVaR repo. Thanks for pulling it before considering my other PR. Cheers,
Florine
Related issues
Closes #
Checklist