Skip to main content

Crate oat_rust_sdk

Crate oat_rust_sdk 

Source
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
FunctionCall
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
MergeObjectiveStrategy
Strategy for merging objectives
OatError
Errors that can occur when using the OatDB client
PropertyValue
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: filter is passed as a plain JSON value (not wrapped in Arg) — it matches the server’s FilterExpression field 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)>). When default_bound is None the payload omits the field — identical wire-format to the legacy propagate builder.
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