Skip to main content

Model-Based Local Search algorithm designer built on Routix

Project description

mbls

A Python toolkit for Model-Based Local Search algorithm design.

Built on top of Routix, it provides a modular framework for orchestrating subroutines, managing experimental runs, and integrating mathematical models into heuristic search routines.

Features

  • Modular Architecture Compose and extend LNS-style strategies using reusable subroutine components.
  • Seamless Routix Integration Take advantage of structured routine execution, logging, timers, and experiment summarization.
  • Extensible Modeling Layer Easily add custom models, constraints, or solvers.

✅ Includes support for OR-Tools CP-SAT via mbls.cpsat.

Installation

pip install mbls

Requirements

  • routix (experiment orchestration)
  • ortools (for mbls.cpsat components)

🚀 Example

from mbls.cpsat import CustomCpModel

# Initialize model
model = CustomCpModel()

# Define variables, constraints, and objective
# ...

# Configure and solve
model.init_solver(computational_time=10.0, n_threads=4)
status, elapsed, ub, lb = model.solve_and_get_status(10.0, 4)

print(f"Status: {status}, UB: {ub}, LB: {lb}")

🧩 Extendability

mbls is designed for research and experimentation. You can:

  • Subclass SubroutineController to define custom LNS or hybrid metaheuristics
  • Extend CustomCpModel to support new problem domains
  • Compose repeatable flows with structured routine names and modular inputs

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbls-0.0.5.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbls-0.0.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mbls-0.0.5.tar.gz.

File metadata

  • Download URL: mbls-0.0.5.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for mbls-0.0.5.tar.gz
Algorithm Hash digest
SHA256 191df8d210c9d9acd9c1f9eddfe708f8ec22260bda99da14904b29e5559b26fa
MD5 ad3e000d8b6c4ca46b149d6d920ddab1
BLAKE2b-256 fb577b011ef122805670ea02b3120e9ab42223abcb92c27115f15c1f7ef980f1

See more details on using hashes here.

File details

Details for the file mbls-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: mbls-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for mbls-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3e39f387154dfba08e56e6f2e5e74e9446ba343d08f7692d46e69680a9ee8392
MD5 09d7ab63e24173eeef2c0eb86e8f4b2e
BLAKE2b-256 fb069ec7af1480072c37056a7cfc252df7632d72c3dbeae669a27149e15548c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page