Skip to content

Additional constructors for TwoLevelTree#77

Merged
JulStraus merged 8 commits intomainfrom
js/TwoLevelTree_constructor
Oct 10, 2025
Merged

Additional constructors for TwoLevelTree#77
JulStraus merged 8 commits intomainfrom
js/TwoLevelTree_constructor

Conversation

@JulStraus
Copy link
Copy Markdown
Collaborator

Ass outlined in #75, it could be beneficial to add additional constructors for TwoLevelTree. This version implements in practice the outlined version, although I did a few modifications to be clear how the constructors can be used. I also represent regular_tree in the new design.

Important

The system itself could be adjusted now. Some functionality was retained to maintain backward compatibility:

  • We do no longer need regular_tree as the new structure is based on a constructor for TwoLevelTree.
  • It is not required that TwoLevelTree is mutable with the new design.

These things should be, in my opinion, adjusted in the next breaking release.

This PR closes #75.

@JulStraus JulStraus requested review from hellemo and trulsf October 10, 2025 07:35
@JulStraus JulStraus added the enhancement New feature or request label Oct 10, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.83673% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utils.jl 0.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
src/TimeStruct.jl 100.00% <ø> (ø)
src/op_scenarios/core_types.jl 96.07% <ø> (ø)
src/representative/core_types.jl 96.07% <ø> (+1.96%) ⬆️
src/strat_scenarios/core_types.jl 85.29% <100.00%> (+1.08%) ⬆️
src/strat_scenarios/tree_periods.jl 91.11% <100.00%> (+7.11%) ⬆️
src/strategic/core_types.jl 89.83% <ø> (+1.69%) ⬆️
src/utils.jl 76.92% <0.00%> (+6.41%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trulsf
Copy link
Copy Markdown
Member

trulsf commented Oct 10, 2025

If you are into fixing docs, there is an unfinished sentence in the documentation for strategic_scenarios in strat_scenarios/core_types

Comment thread src/strat_scenarios/core_types.jl Outdated
Comment thread test/runtests.jl
Co-authored-by: Truls Flatberg <75753981+trulsf@users.noreply.github.com>
@JulStraus JulStraus merged commit f88cc63 into main Oct 10, 2025
6 checks passed
@JulStraus JulStraus deleted the js/TwoLevelTree_constructor branch October 10, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide new constructors for TwoLevelTree

3 participants