110 template<
typename MatObj,
typename VecObj,
typename MatConstr,
typename VecConstr,
typename VecVar>
111 bool solve(
const MatrixBase<MatObj> & Q,
112 const MatrixBase<VecObj> & c,
113 const MatrixBase<MatConstr> & A,
114 const MatrixBase<VecConstr> & b,
115 const MatrixBase<VecVar> & xl,
116 const MatrixBase<VecVar> & xu,
118 bool isDecomp =
false,
155 template<
typename MatObj,
typename VecObj,
typename MatConstr,
typename VecConstr,
typename VecVar>
157 const MatrixBase<VecObj> & c,
158 const MatrixBase<MatConstr> & A,
159 const MatrixBase<VecConstr> & b,
160 const MatrixBase<VecVar> & xl,
161 const MatrixBase<VecVar> & xu,
166 assert(A.rows() == b.rows());
167 assert(A.cols() == X_.rows());
168 assert(Q.rows() == Q.cols());
169 assert(Q.cols() == X_.rows());
170 assert(c.rows() == X_.rows());
171 assert(xl.rows() == X_.rows());
172 assert(xu.rows() == X_.rows());
174 int mode = isDecomp ? 0 : 1;
176 int M = int(A.rows());
177 int N = int(X_.rows());
179 int MMAX = std::max(
int(A.stride()), 1);
180 int NMAX = std::max(
int(Q.stride()), 1);
183 int LWAR = int(WAR_.rows());
184 int LIWAR = int(IWAR_.rows());
186 assert(LWAR >= (3. * NMAX * NMAX) / 2. + 10. * NMAX + MMAX + M + 1.
187 &&
"Please call QLD::problem with the correct dimensions.");
188 assert(LIWAR >= N &&
"Please call QLD::problem with the correct dimensions.");
190 fortran_ql(&M, &nreq, &MMAX, &N, &NMAX, &NMN, Q.derived().data(), c.derived().data(), A.derived().data(),
191 b.derived().data(), xl.derived().data(), xu.derived().data(), X_.data(), U_.data(), &eps, &mode, &fdOut_,
192 &fail_, &verbose_, WAR_.data(), &LWAR, IWAR_.data(), &LIWAR);
A lightweight wrapper of the ql algorithm by Professor Schittkowski. It handles the workspace memory ...
Definition: QLDDirect.h:24
EIGEN_QLD_API const VectorXd & result() const
EIGEN_QLD_API const VectorXd & multipliers() const
EIGEN_QLD_API int fdOut() const
EIGEN_QLD_API void problem(int nrvar, int nreq, int nrineq, int ldq=-1, int lda=-1)
EIGEN_QLD_API void fdOut(int fd)
EIGEN_QLD_API QLDDirect()
EIGEN_QLD_API void verbose(bool v)
bool solve(const MatrixBase< MatObj > &Q, const MatrixBase< VecObj > &c, const MatrixBase< MatConstr > &A, const MatrixBase< VecConstr > &b, const MatrixBase< VecVar > &xl, const MatrixBase< VecVar > &xu, int nreq, bool isDecomp=false, double eps=1e-12)
Definition: QLDDirect.h:156
EIGEN_QLD_API QLDDirect(int nrvar, int nreq, int nrineq, int ldq=-1, int lda=-1, bool verbose=false)
EIGEN_QLD_API bool verbose() const
EIGEN_QLD_API int fail() const
#define EIGEN_QLD_API
Definition: eigen_qld_api.h:18