Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ipopt-rs
A safe Rust interface to the Ipopt non-linear optimization library.
From the Ipopt webpage:
Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software package for large-scale nonlinear optimization. It is designed to find (local) solutions of mathematical optimization problems of the from
min f(x) x in R^n s.t. g_L <= g(x) <= g_U x_L <= x <= x_U
where
f(x): R^n --> R
is the objective function, andg(x): R^n --> R^m
are the constraint functions. The vectorsg_L
andg_U
denote the lower and upper bounds on the constraints, and the vectorsx_L
andx_U
are the bounds on the variablesx
. The functionsf(x)
andg(x)
can be nonlinear and nonconvex, but should be twice continuously differentiable. Note that equality constraints can be formulated in the above formulation by setting the corresponding components ofg_L
andg_U
to the same value.
This crate aims to
- Reduce the boilerplate, especially for setting up simple unconstrained problems
- Maintain flexiblity for advanced use cases
- Prevent common mistakes when defining optimization problems as early as possible using the type system and error checking.
Examples
Solve a simple unconstrained problem using L-BFGS: minimize (x - 1)^2 + (y -1)^2
use *;
use *;
See the tests for more examples including constrained optimization.
Notes on the custom C API
This crate wraps Ipopt's C++ interface in a custom C API, which is significantly different than Ipopt's own C API. As such, this crate resembles the Ipopt's C++ API closer than its included C API. The motivation for maintaining a custom C API is to allow users to reuse Ipopt instances for multiple solves. For instance, the standard C API prevents users from modifying their problem structure and setting custom warm starts between solves without reconstructing solver instances. The custom C API also reduces performance costs, which can be noticeable when Ipopt is used to solve smaller subproblems.
License
This repository is licensed under the Apache License 2.0 with the exception of the following files:
- IpStdCInterface.cpp
- IpStdCInterface.h
- IpStdFInterface.c
- IpStdInterfaceTNLP.cpp
- IpStdInterfaceTNLP.hpp
which are licensed under the Eclipse Public License(EPL).