lp-solvers
lp-solvers copied to clipboard
Input linear program using matrix format
Hi,
I'm trying to find some solver to solver some large optimization problems. I have my constraints formatted as Ax=b. However, in the example you provided, variables and constraints are added one by one like below:
variables: vec![
Variable {
name: "x".to_string(),
is_integer: true,
lower_bound: -10.,
upper_bound: -1.,
},
Variable {
name: "y".to_string(),
is_integer: true,
lower_bound: 4.,
upper_bound: 7.,
},
],
which does not seem very efficient for problems with thousands of variables. Do you know how to format an optimization problem using sparse matrices and vectors without having to add the coefficients one by one?
Thank you for your help.