QP Solver: Initializing the problem with data inputs from file - compilation issues
For QPLIB benchmark problems, the matrices are quite large to hard code in QP problem defition. It is attempted to read the matrices from static files. However, issues are found at compile time and the program doesn't compile. A sample of the problem initialization is given below.
template <typename _Scalar=double>
class _QP0018 : public QP<50, 51, _Scalar>
{
public:
_QP0018()
{
Eigen::MatrixXd P = load_csv<Eigen::MatrixXd>("qplib/QP0018/P.csv");
Eigen::MatrixXd q = load_csv<Eigen::MatrixXd>("qplib/QP0018/P.csv");
Eigen::MatrixXd A = load_csv<Eigen::MatrixXd>("qplib/QP0018/q.csv");
Eigen::MatrixXd l = load_csv<Eigen::MatrixXd>("qplib/QP0018/A.csv");
Eigen::MatrixXd u = load_csv<Eigen::MatrixXd>("qplib/QP0018/l.csv");
this->P = P;
this->q = q;
this->A = A;
this->l = l;
this->u = u;
}
};