Implementation and empirical comparison of the Branch-and-Adjust (BnA) algorithm for the static Weapon-Target Assignment problem, based on Andersen et al. (2022).
Static WTA is a nonlinear integer program: assign weapons to targets to minimise the total expected survival value of all targets.
subject to
BnA linearises the nonlinear objective using a piecewise-linear lower approximation controlled by the parameter
- Computes the true nonlinear cost
$T^*_j$ for each target. - Adds tangent lazy cuts $z_j \ge c_j(1 + y_j - y_j^)$ (globally valid lower bounds on $\exp$) that force the LP relaxation to converge to $T^$.
-
(v2 only) Injects the corrected incumbent $(x^, z^_j = T^_j)$ via
cbSetSolutionso Gurobi records $T^$ immediately as the upper bound.
| File | Function | Mechanism | Speed |
|---|---|---|---|
exact.py |
solve_branch_and_adjust |
tangent cuts only | baseline |
exact_v2.py |
solve_branch_and_adjust_v2 |
tangent cuts + cbSetSolution |
~2–3× faster |
exact_v2.py is recommended. Both produce correct results.
# Run benchmark on all 30 Andersen instances (delta=1e-5, 7200 s limit)
python benchmark.py --method bna_v2
# Compare results against Andersen et al. (2022) Table 5
python compare_andersen.pyCLI options for benchmark.py:
| Flag | Default | Description |
|---|---|---|
--method |
bna |
bna (exact.py) or bna_v2 (exact_v2.py) |
--time-limit |
7200 |
Per-instance time limit in seconds |
--delta |
1e-5 |
Approximation parameter δ |
--data-dir |
data/data_andersen |
Directory with instance files |
Instance files (wta_{W}x{T}x{mu}.txt) from the Andersen et al. (2022) Mendeley dataset. Sizes range from 50×100 to 500×1000 (weapons × targets), with μ ∈ {1, 2, 3}.
Andersen et al. reference results are in data/results.csv.
src/wta_optimization/
models.py — WTAInstance, WTASolution dataclasses
data.py — instance loaders (Andersen format + random)
exact.py — BnA v1 (tangent cuts)
exact_v2.py — BnA v2 (tangent cuts + cbSetSolution injection)
benchmark.py — CLI benchmark runner (resume-capable)
compare_andersen.py — comparison vs Andersen et al. Table 5
data/data_andersen/ — 30 benchmark instances
results/ — benchmark CSVs and comparison plots
Developed as a course project for Optimization in Data Analysis @ WUT.