Expand description
§OatDB Rust Client
A Rust client library for interacting with the OatDB (Optimization and Analysis Tooling) database.
This client provides a fluent API for building and executing OatDB queries, similar to the Python client.
Structs§
- Assignment
- Bound
- Represents a bound [lower, upper] for a decision variable
- Coefficient
- Function
Call - A single function call that can be executed by the OatDB server
- OatClient
- Main OatDB client
Enums§
- Arg
- Represents a reference to another function call or a direct value
- Merge
Objective Strategy - Strategy for merging objectives
- OatError
- Errors that can occur when using the OatDB client
- Property
Value - Represents a property value that can be stored on a node
Functions§
- as_id
- Convert an id argument to a simple id reference (useful for chaining)
- count_
ids - Count the number of IDs in a list
- delete_
node - Delete a node
- delete_
sub - Delete sub-DAG
- filter_
assignments - Filter assignments based on bound constraints
- filter_
dag - Filter DAG nodes based on a filter expression
- filter_
many_ assignments - Filter many assignment groups based on bound constraints.
Server:
filter_many_assignments(many_assignments: Arg<ManySolutions>, lower_leq, upper_geq) -> ManySolutions. - filter_
many_ ids - Filter many ID groups based on a filter expression.
Server:
filter_many_ids(many_ids: Arg<ManyIds>, filter: FilterExpression) -> ManyIds. Note:filteris passed as a plain JSON value (not wrapped inArg) — it matches the server’sFilterExpressionfield which has no Arg wrapper. - get_
alias - Get alias from ID
- get_
aliases_ from_ id - Get all aliases for ID
- get_
composite_ ids_ from_ dag - Get composite node IDs from DAG
- get_
id_ from_ alias - Get ID from alias
- get_
ids_ from_ aliases - Get IDs from aliases
- get_
ids_ from_ assignments - Get IDs from assignments
- get_
ids_ from_ dag - Get node IDs from DAG
- get_
ids_ from_ many_ assignments - Get IDs from many assignment groups — one List
per group. Server: get_ids_from_many_assignments(many_assignments: Arg<ManySolutions>) -> ManyIds. - get_
many_ nodes - Get many groups of nodes — one List
per group of IDs. Server: get_many_nodes(many_ids: Arg<ManyIds>) -> ManyNodes. - get_
node - Get node by ID
- get_
node_ children - Get node children
- get_
node_ ids - Get all node IDs
- get_
node_ parents - Get node parents
- get_
nodes - Get multiple nodes
- get_
polyhedron_ from_ dag - Get polyhedron representation from DAG
- get_
primitive_ ids_ from_ dag - Get primitive node IDs from DAG
- get_
property_ values - Get property values
- get_
roots_ from_ dag - Get root node IDs from DAG
- get_
tighten_ dag - Get tightened DAG based on assumptions
- merge_
objectives - Merge two objectives, combining coefficients according to the strategy
- objective_
from_ constant - Create an objective with constant coefficients for all given IDs
- objective_
from_ doubling_ weights - Create an objective with doubling weights (start, start2, start4, …)
- propagate
- Propagate constraints
- propagate_
many - Propagate many assignment sets
- propagate_
many_ with_ default - Propagate many assignment sets with a per-batch fallback bound for
unassigned primitives. Same wire-format convention as
propagate_with_default. - propagate_
with_ default - Propagate assignments with a fallback bound for unassigned primitives.
Server:
propagate(dag, assignments, default_bound: Option<(i32, i32)>). Whendefault_boundisNonethe payload omits the field — identical wire-format to the legacypropagatebuilder. - ranks
- Get topological ranks
- set_and
- Create logical AND constraint
- set_
atleast - Create at-least constraint
- set_
atmost - Create at-most constraint
- set_
equal - Create equal constraint
- set_
equiv - Create equivalence constraint
- set_
gelineq - Create general linear inequality constraint
- set_
imply - Create implication constraint
- set_not
- Create logical NOT constraint
- set_or
- Create logical OR constraint
- set_
primitive - Create a primitive decision variable
- set_
primitives - Create multiple primitive decision variables
- set_
properties - Set multiple properties on a node
- set_
property - Set a property on a node
- set_xor
- Create logical XOR constraint
- solve
- Solve optimization problem
- solve_
many - Solve multiple optimization problems
- sub
- Extract sub-DAG from root
- sub_
many - Extract multiple sub-DAGs
- validate
- Validate DAG
Type Aliases§
- Result
- Type alias for results using OatError