fhops.model.milp.tactical_operational Module
Pyomo builder and solver driver for the Phase 6 TOPM-inspired tactical–operational MILP. The model supports continuous, semi-continuous, and whole-block harvest modes; product flows; facility inventories; purchases; optional roads/silviculture/fleet investment; and cost/profit/NPV objective profiles.
TOPM-inspired tactical–operational MILP builder and driver.
This module implements the Phase 6 aggregate planning model. It operates on
TacticalOperationalScenario objects and chooses
block × system × period harvest areas subject to continuous, semi-continuous, or whole-block
quantity modes; product yields; fleet capacity; and facility demand targets. The same model carries
product transport flows, outside purchases, facility consumption/inventory, optional road
activation, silviculture follow-up, and fleet investment modules. The objective supports discounted
cost, profit, and NPV-style profiles, with objective decomposition and model-size/timing telemetry
returned to callers.
- class fhops.model.milp.tactical_operational.DemandBasis(value)[source]
Bases:
StrEnumFacility demand envelope component enforced by the tactical–operational MILP.
- MINIMUM = 'minimum'
- TARGET = 'target'
- class fhops.model.milp.tactical_operational.TacticalHarvestMode(value)[source]
Bases:
StrEnumSupported harvest-quantity semantics for aggregate planning.
- CONTINUOUS = 'continuous'
- SEMI_CONTINUOUS = 'semi_continuous'
- WHOLE_BLOCK = 'whole_block'
- class fhops.model.milp.tactical_operational.TacticalOperationalMilpBundle(scenario, config)[source]
Bases:
objectNormalized model bundle for tactical–operational MILP construction.
- Parameters:
scenario (TacticalOperationalScenario)
config (TacticalOperationalMilpConfig)
- config: TacticalOperationalMilpConfig
- scenario: TacticalOperationalScenario
- class fhops.model.milp.tactical_operational.TacticalOperationalMilpConfig(harvest_mode=TacticalHarvestMode.SEMI_CONTINUOUS, demand_basis=DemandBasis.TARGET, enable_roads=False, enable_silviculture=False, enable_fleet_investment=False)[source]
Bases:
objectConfiguration for the aggregate tactical–operational MILP.
- Parameters:
harvest_mode (fhops.model.milp.tactical_operational.TacticalHarvestMode) – Harvest-quantity semantics.
semi_continuousenforces option-specific minimum active areas;continuousrelaxes the minimum;whole_blockforces the full operable area.demand_basis (fhops.model.milp.tactical_operational.DemandBasis) – Whether facility
target_m3(default) orminimum_m3values drive required production.enable_fleet_investment (bool) – Optional infrastructure modules. They default to
Falseso a scenario without explicit module configuration reproduces the product-flow core exactly.enable_roads (bool)
enable_silviculture (bool)
enable_fleet_investment
- demand_basis: DemandBasis = 'target'
- harvest_mode: TacticalHarvestMode = 'semi_continuous'
- fhops.model.milp.tactical_operational.build_tactical_operational_bundle(scenario, *, harvest_mode=TacticalHarvestMode.SEMI_CONTINUOUS, demand_basis=DemandBasis.TARGET, enable_roads=False, enable_silviculture=False, enable_fleet_investment=False)[source]
Create a tactical MILP bundle from a validated scenario.
- Parameters:
scenario (TacticalOperationalScenario)
harvest_mode (TacticalHarvestMode | str)
demand_basis (DemandBasis | str)
enable_roads (bool)
enable_silviculture (bool)
enable_fleet_investment (bool)
- Return type:
- fhops.model.milp.tactical_operational.build_tactical_operational_model(bundle)[source]
Build the aggregate harvest/system/period MILP.
Variables are generated only for eligible harvest-system options. Activation binaries use the option’s physical area/productivity bounds rather than arbitrary big-M constants.
- Parameters:
bundle (TacticalOperationalMilpBundle)
- Return type:
- fhops.model.milp.tactical_operational.solve_tactical_operational_milp(bundle, *, solver='highs', time_limit=None, gap=None, tee=False, solver_options=None)[source]
Build and solve the tactical–operational harvest-allocation MILP.
Returns a dictionary containing solver status, objective decomposition, harvest decisions, product production, transport flows, purchases, inventories, optional module decisions, model dimensions, and build/solve timing statistics.
- fhops.model.milp.tactical_operational.tactical_bundle_from_dict(payload)[source]
Rebuild a tactical MILP bundle from
tactical_bundle_to_dict()output.- Parameters:
- Return type: