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;--formatand--quiethave no keyword.Python only:
callback=(aSolveCallback, whoseon_progressgets the progress rows asSolveProgress),stop=(aStopTokenthat ends the solve from another thread),config=(aSearchConfig).
Input formats¶
The model file’s format is chosen by its extension.
C++ CLI: ./build/cbls --help¶
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¶
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)