Skip to content

[BUG] Excess not labeled in plots #427

@FBumann

Description

@FBumann

Version Confirmation

  • I have confirmed this bug exists on the latest release of FlixOpt

Bug Description

When plotting a node balance of a bus, the excess is not labeled properly.

Image

Minimal Reproducible Example

import numpy as np
import pandas as pd

import flixopt as fx

timesteps = pd.date_range('2020-01-01', periods=3, freq='h')
flow_system = fx.FlowSystem(timesteps)

flow_system.add_elements(
    fx.Bus('District Heating'),
    fx.Effect('costs', '€', 'Cost', is_standard=True, is_objective=True),
    fx.Sink(
        'Heat Demand',
        inputs=[
            fx.Flow(label='Thermal Load', bus='District Heating', size=1, fixed_relative_profile=np.array([30, 0, 20]))
        ],
    ),
)

calculation = fx.FullCalculation('Simulation1', flow_system).do_modeling().solve(fx.solvers.HighsSolver(0.01, 60))
calculation.results['District Heating'].plot_node_balance()

Error Output

Solver Used

HiGHS (default)

Operating System

Mac OS 26

Python Version

3.13

Environment Info

<details>
 Replace this with your environment info 
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions