Closed luli-git closed 3 years ago
Hello and thanks for getting in touch ! Are you sure what you are looking for is a modeler ?
If you don't have meaningful names for your variables and functions to apply to them, then using good_lp is kind of an useless overhead for you. You can still use it if you want (just create n variables and add the constraint A[i] * var_i == 5
for each one), but you would probably be better off just using the underlying solvers that good_lp uses directly.
The goal of an lp modeler is to create this matrix for you without you having to worry about anything but the variables that make sense in your problem and the relationship between them. If you already have the matrix, you can skip the modeler altogether, and use a solver (such as highs or cbc) directly.
If you don't want a modeler, but still want an abstraction over multiple solvers, you can have a look at https://github.com/rust-or/lp-solvers
Hi,
I was trying to input a linear program using matrix format, i.e., with constraints in the form of Ax = b. I constructed a COO matrix A but cannot multiply it with the variable x. I get the following error "cannot multiply
numopt::matrix::coo::CooMat<f64>
bygood_lp::Variable
". Do you have any more complicated examples where the input is a matrix? Below is my code.Thank you for your help!