osqp 1.0.0 copy "osqp: ^1.0.0" to clipboard
osqp: ^1.0.0 copied to clipboard

Dart bindings for the OSQP quadratic programming solver.

package:osqp #

pub package Build Status

Dart bindings for the OSQP (Operator Splitting Quadratic Program) solver.

OSQP is a numerical optimization package for solving convex quadratic programs. Quadratic programming is a superset of linear programming, so this solver can also handle linear programming problems.

Loads of real world optimisation problems can be formulated as linear or quadratic programming problems. For example, I wrote this package so that I could use OSQP to optimise my home solar panel and battery.

Features #

  • High-level Dart API: Idiomatic wrappers around OSQP's C API. For example, the C OSQPSolver is wrapped by the Dart Solver, and OSQPCscMatrix is wrapped by Matrix.
  • Automatic Memory Management: Memory is freed automatically via NativeFinalizers.
  • Cross-Platform Build Hooks: Automated native compilation using Dart build hooks on Linux, MacOS, and Windows (probably works on iOS and Android too, but I haven't tested it).
  • Raw FFI Access: You can also use the FFI bindings directly if you need low level access.

Usage #

See example/osqp_example.dart for a complete working example. For more information, check out the OSQP documentation.

Building #

This package uses Dart build hooks to build the native OSQP C library using CMake. This works automatically, provided you have installed:

  • CMake (version 3.18 or newer)
  • A C/C++ compiler toolchain (e.g., GCC, Clang, or MSVC)
1
likes
160
points
278
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Dart bindings for the OSQP quadratic programming solver.

Repository (GitHub)
View/report issues

Topics

#math #optimization #ffi #linear-programming #quadratic-programming

License

Apache-2.0 (license)

Dependencies

code_assets, ffi, hooks, logging, native_toolchain_cmake

More

Packages that depend on osqp