Skip to content

Whole-machine mode: optional integer building counts (MIP solve) #98

Description

@ApocDev

The solver reports fractional building counts (7.3 assemblers), which is correct math but not what anyone builds. Once the block solve runs on HiGHS (#91), an integer mode becomes nearly free: HiGHS does MIP, so a per-block "whole machines" toggle can constrain building counts to integers and re-balance, with surplus-ok dispositions absorbing the overshoot from rounding up.

Shape:

  • Per-block toggle (default off — fractional stays the truth for ratio work; whole-machine is the build view).
  • Machine-count variables become integers; goals become >= instead of = so rounding up overproduces rather than failing; the objective keeps the overshoot minimal.
  • UI shows the integer counts plus the delta vs the fractional ideal (e.g. "8 (7.3 needed, +9% output)"), so it is obvious what the rounding costs.
  • Boundary flows cached from the integer solution when the mode is on, so factory totals and the what-if LP see what will actually be built.

MIP on block-sized systems (tens of integer variables) solves instantly, so no performance concern. Depends on #91.

Part of #31.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: plannerProduction block / planning modelenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions