Crates.io | fts-solver |
lib.rs | fts-solver |
version | |
source | src |
created_at | 2025-03-21 17:42:13.630268+00 |
updated_at | 2025-04-21 15:34:51.426002+00 |
description | A reference solver for flow trading optimization |
homepage | |
repository | |
max_upload_size | |
id | 1600908 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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 two externally-defined types ProductId
and AuthId
, 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
.
This crate defines a Submission<AuthId, ProductId>
type, which is intended to encapsulate a single bidder's submission. A submission is a combination of auths and costs: an auth defines a portfolio (a sparse vector over product space) and the minimum and maximum allowable trade of this portfolio. Costs define a linear combination of auths (a group) and a utility function, whose domain additionally constrains the space of feasible outcomes. It is assumed by the solver that auth ids are globally unique; that is, the auth ids should be disjointly partitioned amongst the submissions. (It does not otherwise cause an error, but will likely yield unexpected results.) Refer to the implementations of src/types/auth.rs
and src/types/cost.rs
for more details on these types. Refer to tests/simple_solve.rs
for an example assembling two submissions and solving them.