# Options Both command lines take the options in their `--help` below; `cbls.solve` takes them as keywords, with the same defaults. - **Flag to keyword**: `--time-limit` → `time_limit=`, `--seed` → `seed=`, `--threads` → `threads=`, `--lns` → `lns=`, `--intensify` → `intensify=True`, `--lns-interval` → `config.lns_interval`; `--format` and `--quiet` have no keyword. - **Python only**: `callback=` (a `SolveCallback`, whose `on_progress` gets the progress rows as `SolveProgress`), `stop=` (a `StopToken` that ends the solve from another thread), `config=` (a `SearchConfig`). ## Input formats The model file's format is chosen by its extension. - **`.cbls`**: cbls's JSONL model, one variable, node, constraint or objective per line ([example](https://github.com/spoorendonk/cbls/blob/main/examples/simple.cbls)); both CLIs, `cbls.load_model(path)`. - **`.mps`, `.mps.gz`**: MPS ([reader](https://github.com/spoorendonk/cbls/blob/main/include/cbls/io_mps.h)); the Python CLI, `cbls.mps_to_model(cbls.read_mps(path)).model`. - **`.nl`**: AMPL's `.nl` ([spec](https://ampl.github.io/nlwrite.pdf)); the Python CLI, `cbls.nl_to_model(cbls.read_nl(path)).model`. ## C++ CLI: `./build/cbls --help` ```text Usage: cbls [OPTIONS] MODEL Constraint-Based Local Search solver. Reads a JSONL model file (.cbls) and finds optimal or feasible variable assignments. Arguments: MODEL Path to JSONL model file (.cbls) Options: --time-limit SECS Maximum solve time in seconds (default: 10.0) --seed INT Random seed for reproducibility (default: 42) --lns FRACTION LNS destroy fraction, e.g. 0.3 (default: off) --lns-interval INT LNS fires every N diversification kicks (default: 3) --intensify Enable float intensification hook (default: off) --threads N Number of search threads (default: 0 = one per core) --format human|jsonl Output format (default: human) --quiet Print only the final result, no progress (default: off) --help Show this help message --version Show version number Exit status: 0 when a feasible point is found, else 1 (also on a bad argument or model) ``` ## Python CLI: `cbls --help`, `python -m cbls --help` ```text Usage: cbls [OPTIONS] MODEL Constraint-Based Local Search solver. Reads a model file (.cbls JSONL, .mps, .mps.gz or AMPL .nl, by extension) and finds optimal or feasible variable assignments. Arguments: MODEL Path to the model file (.cbls, .mps, .mps.gz, .nl) Options: --time-limit SECS Maximum solve time in seconds (default: 10.0) --seed INT Random seed for reproducibility (default: 42) --lns FRACTION LNS destroy fraction, e.g. 0.3 (default: off) --lns-interval INT LNS fires every N diversification kicks (default: 3) --intensify Enable float intensification hook (default: off) --threads N Number of search threads (default: 0 = one per core) --format human|jsonl Output format (default: human) --quiet Print only the final result, no progress (default: off) --help Show this help message --version Show version number Exit status: 0 when a feasible point is found, else 1 (also on a bad argument or model) ```