This repository contains code used in the journal publication:
@article{template_pricing:2026,
title = {Accelerating Column Generation in Highly Degenerate Integer Programming Problems with Template Pricing},
author = {Marshall, L. and Shah, P. and Dey, S.},
journal = {Journal Name},
year = {2026},
note = {Code: https://github.com/mathgeekcoder/template-pricing}
}- An optimized column generation implementation of GAP with several pricers (dantzig, pessoa, template).
- Lagrangian-relaxation implementation.
- Uses HiGHS and optionally Gurobi (when available).
- Taskflow-based parallelization and lightweight logging integration.
- C++20-capable compiler
- CMake >= 3.15
- vcpkg to install third-party dependencies
- Optional: Gurobi
Below are minimal steps to build on linux using vcpkg.
- Install compiler and build tools:
apt install cmake ninja-build curl zip unzip tar-
Install and bootstrap vcpkg if you don't have it already. Follow the instructions at https://github.com/microsoft/vcpkg.
-
From the repository root:
# configure variables
export VCPKG_ROOT="$HOME/vcpkg" # path to your vcpkg clone
# build
cmake --preset linux-release
cmake --build out/build/linux-releaseNotes:
- If you installed dependencies system-wide or via another package manager, you can omit the vcpkg toolchain option, but CMake must be able to find the required packages.
- CMake will attempt to detect Gurobi automatically. To enable Gurobi support, set the environment variable
GUROBI_DIRorGUROBI_HOMEto your Gurobi installation directory before running CMake.
After a successful build the executable colgen_pricing will be produced in the build output directory. Run it with --help for available options:
./colgen_pricing --helpUsage:
./colgen_pricing input [options]input is required and can be an input file or directory (wildcard patterns * are supported).
-
-f, --force
Force overwrite of existing log files. -
--farkas_only
Only perform RMP initialization. -
-g, --gurobi
Use Gurobi solver (only if built with Gurobi support). -
--set_partition
Use set-partition RMP instead of set-cover. -
-m, --method METHOD
Pricer method. Choices:mt,lt,p,d,mip,lr.
Default:lt. -
-i, --init METHOD
Farkas method. Choices:mt,lt,d,auto.
Default:auto. -
-s, --seed N
Random seed (-1use replication count for repeatibility).
Default:-1. -
-r, --replications N
Number of replications. Must be>= 1.
Default:1. -
-p, --parallel N
Number of parallel instances. Must be>= 1.
Default:1. -
-t, --threads N
Number of threads per parallel instance. Must be>= 1.
Default: hardware concurrency. -
--time_limit SECS
Time limit in seconds for each instance.
Default:21600.
-
--func A B C
Quadratic coefficients for column-age policy, interpreted asax^2 + bx + cwherex = jobs/machines. -
--age_sweep START END STEP
Sweep values forage_limit. -
--multiplier_sweep START END STEP
Sweep values formax_col_multiplier.
Notes for sweep mode:
--age_sweepand--multiplier_sweepmust be provided together.--age_sweepvalidation in code requires:START >= 1,END >= START,STEP >= 1.
# Basic run with defaults for method/init
./colgen_pricing data/instance.json
# Use lagrangian-relaxation, 4 threads
./colgen_pricing data -m lr -t 4
# Provide custom quadratic retention function
./colgen_pricing data/instance.json -m lt --func 0 0 10
# Parameter sweep (both sweep flags required)
./colgen_pricing data/ --age_sweep 1 10 1 --multiplier_sweep 1 3 0.5To reproduce the experiments in the paper, run the following commands (adjusting paths as needed).
Each command produces many CSV files, one for each instance and replication.
The merge.py script is then used to combine the individual CSV files into a single summary file for analysis. The -x flag to merge.py ignores all iterations except initialization and termination results.
To reproduce the statistics in the paper, run the following commands. These scripts reference the files in the results directory.
python src/gap/statistics_yagiura.py
python src/gap/statistics_isa.py./colgen_pricing instances/ISA/original -m d --farkas_only --time_limit 600 -r 5
./colgen_pricing instances/ISA/original -m lt --farkas_only --time_limit 600 -r 5
./colgen_pricing instances/ISA/original -m mt --farkas_only --time_limit 600 -r 5
python merge.py *.csv -x -o yagiura-init-setcover.csv./colgen_pricing instances/ISA/original -m d --farkas_only --set_partition --time_limit 600 -r 5
./colgen_pricing instances/ISA/original -m lt --farkas_only --set_partition --time_limit 600 -r 5
./colgen_pricing instances/ISA/original -m mt --farkas_only --set_partition --time_limit 600 -r 5
python merge.py *.csv -x -o yagiura-init-setpartition.csv./colgen_pricing instances/ISA/original -m d --time_limit 21600 -r 5
./colgen_pricing instances/ISA/original -m p --time_limit 21600 -r 5
./colgen_pricing instances/ISA/original -m lt --time_limit 21600 -r 5
./colgen_pricing instances/ISA/original -m mt --time_limit 21600 -r 5
python merge.py *.csv -x -o yagiura-results.csv./colgen_pricing instances/ISA/new_types -m d --farkas_only --time_limit 600
./colgen_pricing instances/ISA/new_types -m lt --farkas_only --time_limit 600
./colgen_pricing instances/ISA/new_types -m mt --farkas_only --time_limit 600
./colgen_pricing instances/ISA/extended -m d --farkas_only --time_limit 600
./colgen_pricing instances/ISA/extended -m lt --farkas_only --time_limit 600
./colgen_pricing instances/ISA/extended -m mt --farkas_only --time_limit 600
python merge.py *.csv -x -o isa-init-setcover.csv./colgen_pricing instances/ISA/new_types -m p --time_limit 21600
./colgen_pricing instances/ISA/new_types -m lt --time_limit 21600
./colgen_pricing instances/ISA/new_types -m lr --time_limit 21600
./colgen_pricing instances/ISA/extended -m p --time_limit 21600
./colgen_pricing instances/ISA/extended -m lt --time_limit 21600
./colgen_pricing instances/ISA/extended -m lr --time_limit 21600
python merge.py *.csv -x -o isa-results.csvThis repository is provided under the terms of the included LICENSE file.
If you find bugs, need help building, or want to contribute, please open an issue or pull request on the repository.