fhops.hauling Package

The generated API reference is fhops.hauling Package. This page is the narrative guide.

The package contains the optional operational log-hauling layer. The first task (P11.1) ships the Pydantic contract; the Phase I flow model, Phase II scheduling model, and Phase III simulated annealing land in P11.2-P11.4.

Key models

  • fhops.hauling.contract.HaulingConfig – the optional hauling: section.

  • fhops.hauling.contract.LogSort – sorted or unsorted log assortment.

  • fhops.hauling.contract.Contractor / fhops.hauling.contract.TruckType / fhops.hauling.contract.Truck – the contracted fleet.

  • fhops.hauling.contract.Depot / fhops.hauling.contract.DepotLeg – central depot and its travel times.

  • fhops.hauling.contract.BargeType / fhops.hauling.contract.Barge – barge capacity, cost, and vessel ownership.

  • fhops.hauling.contract.Port / fhops.hauling.contract.PortLeg / fhops.hauling.contract.WaterArc / fhops.hauling.contract.MarineRoute – the explicit marine chain (terminal nodes, drayage legs, sailing legs, and a complete block-to-yard route).

  • fhops.hauling.contract.TransportMode – road/water/rail mode label; only road haul arcs and water marine routes are accepted by the first release.

  • fhops.hauling.contract.SortYard – storage and processing capacities.

  • fhops.hauling.contract.LoaderLocation – binding from a FHOPS machine to a pickup or delivery location.

  • fhops.hauling.contract.HaulingSupply / fhops.hauling.contract.HaulingDemand / fhops.hauling.contract.HaulArc – the Phase I flow inputs.

  • fhops.hauling.contract.DriverPolicy – regular time and overtime rules.

  • fhops.hauling.flow.HaulingFlowProblem – normalised Phase I data.

  • fhops.hauling.flow.build_flow_problem() / fhops.hauling.flow.solve_flow() – build and solve the monthly flow model.

  • fhops.hauling.flow.FlowSolveResult – flows, truckloads, inventories, workload, and solver provenance.

  • fhops.hauling.network.Truckload / fhops.hauling.network.ScheduleProblem – individual loads and normalised Phase II data.

  • fhops.hauling.network.build_schedule_problem() – Phase I result to one-day scheduling data.

  • fhops.hauling.schedule.solve_schedule() – continuous-time truck/loader scheduling MIP.

  • fhops.hauling.schedule.simulate_plan() / fhops.hauling.schedule.validate_schedule() – independent schedule oracles.

  • fhops.hauling.schedule.ScheduleSolveResult – schedule, truck/loader summaries, plan, and solver provenance.

  • fhops.hauling.marine.MarineScheduleProblem / fhops.hauling.marine.MarineTripRequest – normalized barge-trip data.

  • fhops.hauling.marine.build_marine_schedule_problem() – Phase I barge trips to a one-day marine schedule problem.

  • fhops.hauling.marine.schedule_barge_trips() – deterministic barge-cycle and port-loader scheduler.

  • fhops.hauling.marine.validate_barge_schedule() – barge/port-loader overlap and sequence validator.

  • fhops.hauling.marine.BargeScheduleResult – trip-level barge schedule, barge summary, and synchronized road windows.

  • fhops.hauling.heuristic.SAConfig – thesis-derived annealing parameters and operator weights.

  • fhops.hauling.heuristic.solve_sa() – route-permutation SA with the SPT decoder.

  • fhops.hauling.heuristic.evaluate_routes() / fhops.hauling.heuristic.decode_routes() – cost evaluation and loader-order decoding.

  • fhops.hauling.heuristic.HaulingSAResult – best schedule, cost components, search provenance, and history.

  • fhops.hauling.integration.scenario_from_operational_plan() – operational assignments to hauling supply.

  • fhops.hauling.integration.scenario_from_tactical_plan() – tactical production/demand to hauling supply/demand.

  • fhops.hauling.integration.residual_report() – supply/demand residual per log sort.

  • fhops.hauling.reporting.write_flow_run() / fhops.hauling.reporting.write_schedule_run() / fhops.hauling.reporting.write_solve_run() – stable artefact writers.

  • fhops.hauling.reporting.build_markdown_report() – Markdown run report.

Example

from fhops.scenario.io import load_scenario

scenario = load_scenario("examples/hauling/scenario.yaml")
assert scenario.hauling is not None
print(scenario.hauling.planning_horizon_days)
print(scenario.hauling.log_sort_ids())
print(scenario.hauling.trucks_for("c1", "highway"))

The marine fixture exercises the barge path:

marine = load_scenario("examples/hauling_marine/scenario.yaml")
assert marine.hauling is not None
assert marine.hauling.marine_route_ids() == {"sc_hs_y1"}
assert marine.hauling.port_ids() == {"sechelt", "howe_sound"}