Updated rust-lpsolve crate to 1.0.1 #115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.