Skip to content

●  Combinatorial optimization

Hard planning problems,
cleared to go.

optimaru is an optimization engine for the problems operations teams actually face: routes, rosters, timetables and production plans with messy, real-world constraints — answered in seconds.

School timetable · Class 2-3

24 classes · 40 teachers · 25 rooms

Teacher · class · room clashes
0
First conflict-free timetable
11 ms

01 — Engine

One engine. Constraints as data.

The core is a dependency-free C++17 metaheuristic engine with Python bindings. Each problem is a small domain model on top of it; each business rule or preference is a constraint plugin you add, remove, weight and tune — no solver code changes.

Fast where it matters
Incremental scoring re-evaluates only what a move touches, so the search explores millions of candidate changes per second on a single core.
Measured, not claimed
We benchmark against Google OR-Tools on the same instances and time budget, and on public sets like CVRPLIB, Li & Lim and Patterson. Every solution is re-checked independently — results are on the Benchmarks page.
pip install optimaru
One Python package with every use case, compiled for Linux, macOS and Windows. Solve in a few lines, or embed it in your own service.
Constraints as plugins
Every hard rule and preference is a plugin with a name, a weight and a hard/soft level. Add or remove them per project; the solver core never changes, and the same rule means the same thing in the engine, the reference model and the UI.
$ pip install optimaru

from optimaru import vehicle_routing as vrp
from optimaru.vehicle_routing.constraints import (
    get_constraints, VehicleCapacityCost, UnassignedVisitsCost,
    TravelTimeCost, MaxRouteDurationCost,
)

# One depot in Seoul and four customers: (latitude, longitude).
locations = [vrp.Location(*p) for p in [
    (37.5665, 126.9780),  # 0: depot
    (37.5796, 126.9770), (37.5512, 126.9882),
    (37.5443, 127.0557), (37.5133, 127.1001),
]]
vehicles = [vrp.Vehicle(f"V{i}", capacity=10, home_location_index=0,
                        departure_time=9 * 3600, max_route_duration=4 * 3600)
            for i in (1, 2)]
visits = [vrp.Visit(f"C{i}", f"Customer {i}", location_index=i, demand=4,
                    min_start_time=9 * 3600, max_end_time=18 * 3600,
                    service_duration=600)
          for i in range(1, 5)]
plan = vrp.VehicleRoutePlan("demo", locations, vehicles, visits)

config = vrp.SolverConfig()
config.spent_limit_seconds = 5
solver = vrp.Solver(config)

# Plug in only the rules you need, weighted your way.
solver.solve_with_constraints(plan, get_constraints([
    VehicleCapacityCost(),
    UnassignedVisitsCost(),
    TravelTimeCost(weight=10),
    MaxRouteDurationCost(level="hard"),
]))

print(plan.score)     # 0hard/0medium/-12430soft
print(plan.routes())  # {'V1': ['C3', 'C4'], 'V2': ['C1', 'C2']}
Vehicle routing: the cost function is just a list of plugins.

04 — Why we exist

Combinatorial optimization runs quietly behind deliveries, hospital rosters and school timetables — yet most teams still choose between expensive black-box solvers and research code that breaks on the first real constraint. We started optimaru to build an open-source engine that is easy to use and holds up in the real world.

— Seunghyun Kang, Founder · About us →

Have a routing or scheduling problem?

Send us the rules you work with today. We will tell you honestly whether optimization helps, and how much.

Talk to us