Quick Start
Run Local-MIP
Install the Python bindings in a local virtual environment, or build the CLI solver from source when you need a local binary, C++ APIs, examples, or callbacks.
Install with pip
For CPython 3.8-3.12 on Linux x86_64, the published 2.0.10 wheels are the quickest way to try Local-MIP. The command below creates a local virtual environment first, so it works on Debian/Ubuntu systems that block global pip installs.
python3 -m venv .venv && .venv/bin/python -m pip install localmip
.venv/bin/python -c "import localmip_py as lm; print(lm.LocalMIP)"
Use the source build below when you need the standalone Local-MIP CLI, the static C++ library, or the repository examples.
Requirements
The source CLI path needs the build tools below. The wheel path above targets CPython 3.8-3.12 on Linux x86_64 and needs the standard venv module. A legacy local bindings build also requires pybind11>=2.10,<3.
Build and Run in 3 Steps
These commands were verified against the current solver tree and keep the first run to 10 seconds.
Download
Use a tagged source archive for a stable snapshot, or clone the repository for the latest development version.
Build
From the repository root, start with the release build. Use ./build.sh all when you also need examples and Python bindings; the local bindings step expects CPython 3.8-3.12 and pybind11>=2.10,<3.
./build.sh release
Run
Run from build/ so bundled test-set paths resolve correctly.
cd build
./Local-MIP -i ../test-set/2club200v15p5scn.mps -t 10
The build writes the solver binary and static library under build/. Use ./Local-MIP --help for the exact CLI flags in your version.
Command-Line Parameters
A representative CLI invocation looks like this:
./Local-MIP --model_file <model_file> [options]
CLI flags support both short and long forms, for example -i and --model_file.
| Flag | Parameter | Description | Default |
|---|---|---|---|
-i |
model_file |
Path to input model file (.mps/.lp) | Required |
-t |
time_limit |
Positive time limit in seconds | 10 |
-s |
sol_path |
Path to output solution file (.sol) | "" |
-k |
start_sol_path |
Path to a warm-start solution file (.sol) | "" |
-m |
start |
Built-in start method: zero, random, objective, or locks |
zero |
-l |
log_obj |
Log a bounded incumbent trace (at most 3000 points) | 1 |
-S |
random_seed |
Random seed (0 uses default) | 0 |
# Solve the bundled sample for 10 seconds and save a solution
cd build
./Local-MIP --model_file ../test-set/2club200v15p5scn.mps --time_limit 10 --sol_path quickstart.sol --log_obj 1
Use a previous .sol file with --start_sol_path, or select a built-in start method with --start. A warm-start file may omit variables; supplied values are validated against finiteness, bounds, and integrality.
# Reuse a prior solution
./Local-MIP --model_file ../test-set/2club200v15p5scn.mps --start_sol_path quickstart.sol --time_limit 10
# Start from objective-guided finite bounds
./Local-MIP --model_file ../test-set/2club200v15p5scn.mps --start objective --time_limit 10
Instead of passing all parameters via command line, you can use a configuration file:
cd build
./Local-MIP --param_set_file ../default.set --model_file ../test-set/2club200v15p5scn.mps
The repository includes default.set as a template with all available parameters and their default values. Its default time limit is 10 seconds.
- One parameter per line:
parameter_name = value - Lines starting with
#or;are comments - Command-line arguments override values from the configuration file
Next Steps
Where to Look Next
These files contain the full setup details:
Troubleshooting
CMake version too old
Install CMake 3.15 or later.
C++20 compiler not found
Install a C++20-capable compiler (GCC or Clang) and ensure it is on your PATH.
Cannot find input file
Run from the build/ directory or use absolute paths.
Slow performance
Prefer a release build when you want the best runtime performance.