Skip to content

FRLM to_dataframes summary uses wrong coverage key #517

Description

@samay2504

Description

FRLM.to_dataframes() computes the summary coverage percentage using a non-existent coverage key instead of the covered_volume values already produced by flow coverage results, which causes the exported summary percentage to be wrong.

Steps to reproduce

from spopt.locate.flow import FRLM
# Build and solve any small FRLM instance
# Then export
summary_df = model.to_dataframes()["summary"]
print(summary_df)

Expected behaviour

The Coverage % value in the summary dataframe should match covered_volume / total_flow from the model's computed coverage.

Actual behaviour

The summary uses an incorrect key path and can report an incorrect percentage.

Environment

  • spopt version: main
  • Python version: 3.11
  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions