Arco is an optimization library for linear and mixed-integer programming on constrained hardware. It ships as a Python package backed by a Rust core, with the HiGHS solver embedded so there is nothing extra to install. If your problem fits in memory, arco will solve it; the library is designed to be direct about resource limits rather than silently degrading. The name stands for Assembled Resource-Constrained Optimization.
>>> import arco
>>> model = arco.Model()
>>> x = model.add_variable(bounds=arco.Bounds(lower=0.0, upper=float("inf")), name="x")
>>> y = model.add_variable(bounds=arco.Bounds(lower=0.0, upper=float("inf")), name="y")
>>> model.add_constraint(x + y >= 10.0, name="demand")
Constraint('demand', Bounds(10, inf))
>>> model.minimize(3.0 * x + 2.0 * y)
>>> solution = model.solve(log_to_console=False)
>>> solution.is_optimal()
True
>>> round(solution.objective_value, 6)
20.0Note
Arco embeds the HiGHS solver. No external solver installation is needed.
Step-by-step walkthroughs that build your understanding from a simple LP to multi-stage block composition.
- Your First Model -- build and solve a two-variable linear program.
- Integer Programming -- add integer and binary decision variables to a model.
- Indexed Models -- use index sets and variable arrays for structured problems.
- Block Composition -- compose multi-stage optimization workflows from reusable blocks.
Task-oriented recipes for common operations. Each guide gets straight to the point with self-contained examples you can copy and run.
- Building Optimization Models -- variables, constraints, objectives, and solving in recipe form.
- Define Block Schemas -- define typed block input/output contracts for block composition.
- Numpy Integration -- array arithmetic, element-wise bounds, indexing, and reduction operators.
- Configure Solver -- solver objects, settings, and reusable configurations.
- Debug Infeasibility -- use slacks and elastic constraints to diagnose infeasible models.
- Inspect a Model -- examine model structure with snapshots before and after solving.
- Handle Errors -- catch model-building exceptions and check solver outcomes.
- Enable Logging -- configure Rust-side tracing and solver output.
Background material and design decisions that help you understand why arco works the way it does.
- Why Arco -- motivation and design philosophy behind the library.
- Architecture -- how the Rust crates and Python bindings fit together.
- Core Concepts -- variables, constraints, expressions, and the model lifecycle.
- API Reference -- type stubs, classes, and method signatures for the full Python API.
- Known Problems -- solver-correctness contract encoding canonical optimization problems with expected solutions.