1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! # GLPK API Client
//!
//! A Rust client SDK for interacting with the GLPK REST API for solving linear programming problems.
//!
//! ## Example
//!
//! ```no_run
//! use glpk_api_sdk::{GlpkClient, SolveRequestBuilder, Variable, SolverDirection};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = GlpkClient::new("http://localhost:9000")?;
//!
//! let request = SolveRequestBuilder::new()
//! .add_variable(Variable::new("x1", 0, 1))
//! .add_variable(Variable::new("x2", 0, 1))
//! .add_variable(Variable::new("x3", 0, 1))
//! .add_constraint(vec![1, 1, 0], vec![0, 1, 0], vec![1, 1, 0], 1)
//! .add_constraint(vec![1, 1, 0], vec![0, 2, 0], vec![1, 1, 0], 1)
//! .add_constraint(vec![1, 1, 0], vec![1, 2, 0], vec![1, 1, 0], 1)
//! .add_objective([("x3", 1.0)].into())
//! .direction(SolverDirection::Maximize)
//! .build()?;
//!
//! let response = client.solve(request).await?;
//! println!("Solutions: {:?}", response.solutions);
//! Ok(())
//! }
//! ```
pub use GlpkClient;
pub use ;
pub use SolveRequestBuilder;
pub use ;