-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input linear program using matrix format #1
Comments
What do you mean adding the coefficients one by one ? Of course you have to add all of the variables, but you don't add all the zero coefficients in your matrix. Can you provide an example and point out where the performance problem is ? |
And what is your problem exactly ? Do you have inequalities, or just Ax=b ? If you just have Ax=b, then you have nothing to optimize, you can just solve the linear system. |
Thank you for your quick reply! In the example you provided, you added a constraint by specifying:
However, in our case, one of the constraints will be one row of A multiplied by x is equal to 0, or, equivalently, Ax = 0. We currently have matrix A as a sparse matrix and x as a vector. Thank you so much for your help! |
Am I mistaken or the solution to the problem you state is trivially x=0 ?
You either implement the |
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:
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.
The text was updated successfully, but these errors were encountered: