-
Notifications
You must be signed in to change notification settings - Fork 120
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
The possibility to handle huge matrix equation? #147
Comments
Hi @Joviisaus thanks for opening the issue. Do you have a minimum working example for us to reproduce the issue? |
Thank you for your reply. int Vertex_num = 3499;
int k = 5;
Eigen::VectorXd z_crowd(Vertex_num,1); //Value is given in another function.
Eigen::VectorXd b_crowd(k,1);//Value is given in another function.
Eigen::SparseMatrix<double> W_N; //This is a sparse matrix in the size of 3499*3499, whose value is given in another function.
OsqpEigen::Solver solver;
solver.data()->setNumberOfVariables(Vertex_num);
solver.data()->setNumberOfConstraints(k);
if (!solver.data()->setHessianMatrix(W_N))
{
std::cout<<"error in QPsolver"<<endl;
return vOmega;
}
if (!solver.data()->setGradient(z_crowd))
{
std::cout<<"error in QPsolver"<<endl;
return vOmega;
}
if (!solver.data()->setLinearConstraintsMatrix(a))
{
std::cout<<"error in QPsolver"<<endl;
return vOmega;
}
if (!solver.data()->setLowerBound(b_crowd))
{
std::cout<<"error in QPsolver"<<endl;
return vOmega;
}
if (!solver.data()->setUpperBound(b_crowd))
{
std::cout<<"error in QPsolver"<<endl;
return vOmega;
}
Eigen::VectorXd QPSolution = solver.getSolution(); The error was thrown while running |
Thanks for the further info. Still, we would not be able to reproduce the problem with only the code you provided. Memory-wise, a matrix of 4000x4000 should not be so problematic to store considering that it should be in the order of 128MB. Even its inversion should not explode in memory. At most, it could just take some time. The error seems to indicate that some of the inputs are not properly allocated. I would suggest to double check that all the inputs are well formed. |
Thank you for your suggestion.I would further check my input. |
I'm trying to solve the problem that contains the huge matrix.the Hessian Matrix could be around 4000 *4000.The solver terminated because of EXC_BAD_ACCESS.I wonder if it is my coding error or the limitation of this lib.
The text was updated successfully, but these errors were encountered: