Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 3.49 KB

File metadata and controls

91 lines (57 loc) · 3.49 KB

Architecture & Mathematical Model

1. Problem Statement

Given a cylindrical log with diameter D, length L, and taper rate τ (diameter reduction per unit length), find the set of rectangular boards that maximizes total recovered value while respecting physical constraints.

2. Decision Variables

Let x_i ∈ {0, 1} indicate whether board candidate i is included in the cutting pattern. Each candidate i is defined by:

  • (w_i, h_i): width and height of the board cross-section
  • (cx_i, cy_i): center position within the log cross-section
  • grade_i: lumber grade (determined by defect exposure)
  • price_i: market value per board-foot for the given dimensions and grade

3. Objective Function (QUBO)

3.1 Value Reward

$$\max \sum_{i} \text{price}_i \cdot \text{volume}_i \cdot x_i$$

where volume_i = w_i · h_i · L_eff (effective board length accounting for taper).

3.2 Overlap Penalty

For every pair (i, j) of board candidates whose bounding rectangles intersect:

$$P_{\text{overlap}} = \lambda_1 \sum_{i \lt j} A_{ij} \cdot x_i \cdot x_j$$

where A_ij is the area of intersection (normalized), and λ₁ is a penalty weight set high enough to make any overlapping solution infeasible (typically λ₁ ≥ 2 · max(price_i)).

3.3 Boundary Penalty

Board i must fit inside the inscribed ellipse of the log cross-section at every point along its length. The boundary penalty is:

$$P_{\text{boundary}} = \lambda_2 \sum_{i} B_i \cdot x_i$$

where B_i > 0 if any corner of board i falls outside the log radius (accounting for taper), and B_i = 0 otherwise. Infeasible candidates are pre-filtered so this penalty acts as a safeguard.

3.4 Defect Penalty

Each defect zone d is a sphere at (dx, dy, dz) with radius r_d. If board i intersects defect d:

$$P_{\text{defect}} = \lambda_3 \sum_{i} \sum_{d} G_i \cdot \text{overlap}(i, d) \cdot x_i$$

where G_i is a grade-dependent multiplier (higher for premium grades that cannot tolerate knots) and overlap(i, d) is the fractional volume intersection.

3.5 Combined QUBO

$$\min Q(\mathbf{x}) = -\sum_i \text{value}_i \cdot x_i + \lambda_1 \sum_{i \lt j} O_{ij} x_i x_j + \lambda_2 \sum_i B_i x_i + \lambda_3 \sum_i D_i x_i$$

4. Ising Hamiltonian Mapping

The QUBO is mapped to an Ising Hamiltonian via the substitution x_i = (1 - Z_i) / 2:

$$H = \sum_i h_i Z_i + \sum_{i \lt j} J_{ij} Z_i Z_j + \text{const}$$

Coefficients h_i and J_ij are derived algebraically from the QUBO matrix.

5. QAOA Circuit

  • Mixer: Standard X-mixer exp(-iβ Σ X_i)
  • Cost: exp(-iγ H_C) where H_C encodes the Ising cost
  • Depth: p = 2 layers (tunable)
  • Optimizer: COBYLA for variational parameter optimization

6. Defect Re-optimization

When the classical pipeline encounters a "hidden" defect (one not visible on the surface), the affected region is masked and the QUBO is rebuilt for the remaining usable volume. The quantum solver is re-invoked on this reduced problem, which is where it most outperforms greedy approaches — the greedy solver simply discards the affected board and continues, while QAOA can globally re-optimize the remaining space.

7. FAO Cost Model Integration

Based on FAO "Cost Estimation in Sawmilling Industries":

  • Log cost: proportional to volume (Huber's formula)
  • Processing cost: fixed + per-cut variable cost
  • Value recovery % = (total board value) / (log cost + processing cost) × 100
  • ROI = (value recovery − total cost) / total cost × 100