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, num_workers=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.8.tar.gz (18.7 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.8-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mbls-0.0.8.tar.gz
Algorithm Hash digest
SHA256 f6a13052f8ac7f4b97db0922e91ff1f70218927b8ab5477e71706b1786c5ea85
MD5 d71920714ec0147fc9862a651ccd1f13
BLAKE2b-256 68da7e3c0b72b7d46ba060984006c2c28c79a56b83a087836d3575101b8696aa

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mbls-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c8a3e4ae20d6f98dbe862be789f811b58ed36cd33a184380e615b2bd32b217b2
MD5 1ff17b4ec325f88f16b7ed8511e8958c
BLAKE2b-256 696b84d00553e052c62d0b738918cffb04e16e0105cdc3793fd3cd199f4f38e4

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