Quick Start

Get up and running with Local-MIP in just a few minutes.


Requirements

Before you begin, ensure your system meets these requirements:

  • CMake ≥ 3.15
  • C++20 compiler (GCC or Clang)
  • bash, make, and standard POSIX utilities

Get Started in 3 Steps

Step 1: Download and Extract

Download the latest release (v2.0): Local-MIP v2.0

Extract the archive:

1
2
unzip Local-MIP-2.0.zip
cd Local-MIP-2.0

Or clone from GitHub:

1
2
git clone https://github.com/shaowei-cai-group/Local-MIP.git
cd Local-MIP

Step 2: Build

Build the solver using the provided script:

1
2
3
4
5
# Release build (recommended)
./build.sh release

# Debug build with assertions/logging
./build.sh debug

The solver binary Local-MIP and static library libLocalMIP.a will be created in the build/ directory.

Step 3: Run

Navigate to the build directory and run your first MIP instance:

1
2
cd build
./Local-MIP --model_file ../test-set/2club200v15p5scn.mps --time_limit 300

Expected Output:

1
2
3
4
5
6
c model name: 2club200v15p5scn
c reading mps file takes 0.14 seconds.
c original problem has 200 variables and 17013 constraints
...
c [    300.00] local search is terminated by timeout.
o best objective: -69

Basic Usage

Command-Line Parameters

The basic syntax is:

1
./Local-MIP -i <model_file> [options]

Common Options:

Flag Parameter Description Default
-i model_file Path to input model file (.mps/.lp) Required
-t time_limit Time limit in seconds 10
-s sol_path Path to output solution file (.sol) ””
-l log_obj Log objective values during search true
-S random_seed Random seed (0 uses default) 0

Example:

1
2
# Solve with 5-minute timeout and save solution
./Local-MIP -i problem.mps -t 300 -s solution.sol -l 1

Using a Parameter Configuration File

Instead of passing all parameters via command line, you can use a configuration file:

1
./Local-MIP --param_set_file ../default.set --model_file ../test-set/instance.mps

The repository includes default.set as a template with all available parameters and their default values.

Configuration File Format:

  • One parameter per line: parameter_name = value
  • Lines starting with # or ; are comments
  • Command-line arguments override values from the configuration file

Next Steps

Explore More

  • Software Page - Get the latest version and previous releases
  • Tutorials - Complete guide and parameter reference
  • Examples - Code examples for C++ API and callbacks

Use as a Library

  • C++ API - Integrate Local-MIP into your C++ projects
  • Python Bindings - Use from Python with pybind11

See the Examples page for detailed code examples.

Python bindings quick build:

1
2
3
python-bindings/build.sh   # builds core if needed and compiles the pybind11 module
export PYTHONPATH=$PWD/python-bindings/build:$PYTHONPATH
python3 python-bindings/sample.py

Run Tests

Verify your installation by running the test suite:

1
2
3
4
5
6
7
8
9
10
cd build

# Run unit test subsets
ctest --output-on-failure -R "^(api|callbacks|constraint_recognition|scoring|model_manager|reader|move_operations|neighbor_config)$"

# Run integration tests
ctest --output-on-failure -R "^integration$"

# Run all tests (including instance sweeps)
ctest --output-on-failure

Troubleshooting

Build Issues

Problem: CMake version too old

1
Solution: Install CMake 3.15 or later

Problem: C++20 compiler not found

1
Solution: Install GCC 10+ or Clang 12+

Runtime Issues

Problem: Cannot find input file

1
Solution: Ensure you run from the build/ directory or use absolute paths

Problem: Slow performance

1
Solution: Use release build (./build.sh release) instead of debug build

Getting Help

If you encounter problems:

  1. Check the Tutorials for detailed information
  2. Review the Examples for code samples
  3. Visit the GitHub repository for source code
  4. Open an issue on GitHub for bug reports

← Back to Home Software →