Crates.io | fts-solver |
lib.rs | fts-solver |
version | 0.5.1 |
created_at | 2025-03-21 17:42:13.630268+00 |
updated_at | 2025-07-03 14:58:56.63135+00 |
description | A reference solver for flow trading optimization |
homepage | |
repository | |
max_upload_size | |
id | 1600908 |
size | 578,649 |
This crate is part of a collection of crates that together implement flow trading as proposed by Budish, Cramton, et al, in which trade occurs continuously over time via regularly-scheduled batch auctions.
The different crates in this workspace are as follows:
This package defines a few basic types and a solver interface to operate over these types. Presently, the following solvers are provided:
feature = ["clarabel"]
-- Uses the Clarabel interior point solver for the quadratic programfeature = ["osqp"]
-- Uses the OSQP ADMM solver for the quadratic programAdditional solvers will be developed as needed. The present implementations are intended as "reference" for future work.
There are a few additional features exposed by this crate. If an application intends to (de)serialize the primitive data types directly,
enabling feature = ["serde"]
will provide Serde bindings.
There are three externally-defined types DemandId
, PortfolioId
, and ProductId
, which allow the application host to provide their own implementations. These are black-boxes as far as the solver is concerned -- they just need to implement Clone + Eq + Hash + Ord
.
Note that the solver has no notion of a bidder: all portfolios and demand are treated together. A user of this library is responsible for reassociating the outcomes to the individual bidders.
A portfolio is characterized by two quantities: