Repository navigation
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
This PR closes #55.
TimeStructv0.9.12 introducedPeriodPartitions, which are used, e.g., by thePeriodDemandSinkofEnergyModelsFlex(PartitionProfilefields and the variablesdemand_sink_*[n, pd]). The GUI crashed on such models. This PR adds support for visualizing partition-indexed data, both from aJuMP.Modeland from CSV files.The implementation is tested through incorporating a
PeriodDemandSinkto thecase7test set. However, I think we should rework the test set. Currently, the location of the individual required files is spread over the examples and the test set, even if, e.g., examples/utils.jl is only required in the test set and not the examples.Important
I plan to run through the documentation and docstrings in a different PR after this one. This is the reason why I have not yet increased the version number yet.
Main changes
PeriodPartitions (JuMP variables andPartitionProfilefields). It is only offered for elements that have such data; the standard axes are unchanged.TimePeriods, so they are extracted from the variable itself or built from the element. The new functionEnergyModelsGUI.period_partitions(element, 𝒯)by default uses the fieldperiod_duration. Packages whose elements follow another convention can add a method for their type; without it, a warning names the element and the method to provide, and the element's partition data is skipped instead of raising an error.save_resultswrites partition indices in apdcolumn (it previously threw aMethodError). As the partition labels are not unique across elements, the CSV reader rebuilds them per element throughperiod_partitions, so the hook above also governs reading results from files.Also included
AbstractPeriodDemandSink/StratPeriodDemandSinkand thedemand_sink_*variables.The PR was created with with Claude Code as can be seen from the individual commits. All commits were however reviewed by myself to avoid any potential problems in the code structure.