Skip to content

Truncation vs ceiling in fuselage and cabin sizing (legacy behavior vs intended behavior) #85

@enricostragiotti

Description

@enricostragiotti

While working on the fix for the NumPy 2.3 issue (PR #83), we discovered an additional problem in the fuselage and cabin sizing module.

In several places, we were using int() on float values. This results in truncation, not ceiling, which is problematic because it is not the intended behavior for sizing quantities (e.g. number of rows, seats, equipage members, etc.), where rounding up is usually required.

In the fix PR, we intentionally kept the truncation behavior to preserve legacy behavior and avoid introducing further breaking changes while addressing the NumPy issue.

The relevant implementation is here:

However, from a modeling and sizing standpoint, this should likely use ceil instead of truncation.

This issue is to track that:

  • current behavior is legacy-compatible but likely incorrect
  • we should evaluate switching from truncation to ceil
  • this change would be behavior-breaking and should be handled explicitly

Metadata

Metadata

Assignees

No one assigned

    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