MCPcopy Create free account
hub / github.com/Open-Quant/openquant / fmt

Method fmt

crates/openquant/src/combinatorial_optimization.rs:26–39  ·  view source on GitHub ↗
(&self, f: &mut Formatter<'_>)

Source from the content-addressed store, hash-verified

24//! enough to enumerate.
25//!
26//! Conventions: decisions, trades and inventories are integers (units or lots). Candidates
27//! are visited in lexicographic order starting from the lower bounds, and ties go to the
28//! first candidate found (comparisons are strict). An objective cannot mark a candidate
29//! infeasible: an error, or a non-finite score
30//! ([`CombinatorialOptimizationError::ObjectiveNotFinite`]), aborts the whole search, so
31//! constraints the schema cannot express must be large finite penalties. The search space is
32//! exponential; hitting `max_enumeration` or `max_paths` is the cue for a heuristic, not for a
33//! higher cap. Nothing here runs in parallel.
34//!
35//! ```
36//! use openquant::combinatorial_optimization::{
37//! solve_exact, CombinatorialOptimizationError, DecisionSchema, IntegerObjective,
38//! IntegerVariable, ObjectiveSense,
39//! };
40//!
41//! // Maximise -(x - 3)^2 - (y + 1)^2 with x on the even grid 0..=10 and y in -2..=2.
42//! struct Bowl;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected