Skip to content

Conversation

@jk2997
Copy link
Contributor

@jk2997 jk2997 commented Nov 11, 2025

I would like to propose updating the rust-lpsolve crate from 0.1 to 1.0.1. The new version contains the methods set_timeout() and get_timeout() for impl Problem, which will allow the implementation of the trait WithTimeLimit for struct LpSolveProblem. In rust-lpsolve 1.0.1, the methods scatter_objective_function(), add_constraint(), and add_sos_constraint() no longer accept Vec and Vec types as arguments and accept &mut [f64] and &mut[i32] types instead, so the as_mut_slice() method was used to solve this issue. Also, scatter_objective_function(), set_integer(), set_bounds(), set_unbounded(), and add_constraint() now return Result<(), LpSolveError> types, so the unwrap() and is_ok() methods were used instead of assert statements for error checking.

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jk2997 !

@lovasoa lovasoa merged commit b53baa0 into rust-or:main Nov 12, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants