Skip to content

PeriodPartition breaks EMGUI #55

Description

@Zetison

PeriodPartition, introduced in TimeStruct 0.9.12, creates a bug when used together with EMGUI. Running the GUI on the introduced tests of this PR illustrates this with the error

Type TimeStruct.OperationalPeriod{TimeStruct.SimplePeriod{Float64}} can not be used as index for a PartitionProfile{Float64}

Ideally, a solution to this should be first implemented in EMGUI before this PR can be merged.

Activity

  1. JulStraus commented on Jun 27, 2026

    @JulStraus
    Member

    The problem is within the processing of EnergyModelsGUI which does not fully support the new time profile types and subdivisions. The reason for that is that partition_duration can be different for different type of nodes. As a consequence, it cannot be directly incorporated within the TimePeriod as it is the case for all other potential time structures. Subsequently, a PartitionProfile cannot be indexed by a TimePeriod as the information of the partition is not accessible as this level, despite being theoretically able to use them as indices.

    That being said, it requires a rework of the plotting functionality to work properly for all nodes that have variables or parameters that require PeriodPartition. As I do not consider it in this case prudent to wait for the implementation in EMGUI (which may take a bit of work), I say that we instead still merge PR 12 in EnergyModelsFlex and provide a warning in the README.md and the documentation instead.

  2. JulStraus commented on Sep 17, 2026

    @JulStraus
    Member

    This problem also leads to not being able to load saved data that is indexed over a partition period. To this end, you must exclude the result files for these variables from the folder you load..

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions