proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
wrapper.hpp
Go to the documentation of this file.
1//
2// Copyright (c) 2022 INRIA
3//
8#ifndef PROXSUITE_PROXQP_SPARSE_WRAPPER_HPP
9#define PROXSUITE_PROXQP_SPARSE_WRAPPER_HPP
14
15namespace proxsuite {
16namespace proxqp {
17namespace sparse {
21
89template<typename T, typename I>
90struct QP
91{
103 QP(isize dim, isize n_eq, isize n_in)
104 : results(dim, n_eq, n_in)
105 , settings()
106 , model(dim, n_eq, n_in)
107 , work()
108 , ruiz(dim, n_eq + n_in, 1e-3, 10, preconditioner::Symmetry::UPPER)
109 {
110 work.timer.stop();
111 work.internal.do_symbolic_fact = true;
112 work.internal.is_initialized = false;
113 }
123 const SparseMat<bool, I>& A,
124 const SparseMat<bool, I>& C)
125 : QP(H.rows(), A.rows(), C.rows())
126 {
127 if (settings.compute_timings) {
128 work.timer.stop();
129 work.timer.start();
130 }
131 SparseMat<bool, I> H_triu = H.template triangularView<Eigen::Upper>();
132 SparseMat<bool, I> AT = A.transpose();
133 SparseMat<bool, I> CT = C.transpose();
136 };
139 };
142 };
143 work.setup_symbolic_factorizaton(
144 model, Href.symbolic(), ATref.symbolic(), CTref.symbolic());
145 if (settings.compute_timings) {
146 results.info.setup_time = work.timer.elapsed().user; // in microseconds
147 }
148 }
149
172 bool compute_preconditioner_ = true,
173 optional<T> rho = nullopt,
174 optional<T> mu_eq = nullopt,
175 optional<T> mu_in = nullopt,
176 optional<T> manual_minimal_H_eigenvalue = nullopt)
177 {
178 if (settings.compute_timings) {
179 work.timer.stop();
180 work.timer.start();
181 }
182 if (g != nullopt && g.value().size() != 0) {
184 g.value().size(),
185 model.dim,
186 "the dimension wrt the primal variable x variable for initializing g "
187 "is not valid.");
188 } else {
189 g.reset();
190 }
191 if (b != nullopt && b.value().size() != 0) {
193 b.value().size(),
194 model.n_eq,
195 "the dimension wrt equality constrained variables for initializing b "
196 "is not valid.");
197 } else {
198 b.reset();
199 }
200 if (u != nullopt && u.value().size() != 0) {
202 u.value().size(),
203 model.n_in,
204 "the dimension wrt inequality constrained variables for initializing u "
205 "is not valid.");
206 } else {
207 u.reset();
208 }
209 if (l != nullopt && l.value().size() != 0) {
211 l.value().size(),
212 model.n_in,
213 "the dimension wrt inequality constrained variables for initializing l "
214 "is not valid.");
215 } else {
216 l.reset();
217 }
218 if (H != nullopt && H.value().size() != 0) {
220 H.value().rows(),
221 model.dim,
222 "the row dimension for initializing H is not valid.");
224 H.value().cols(),
225 model.dim,
226 "the column dimension for initializing H is not valid.");
227 } else {
228 H.reset();
229 }
230 if (A != nullopt && A.value().size() != 0) {
232 A.value().rows(),
233 model.n_eq,
234 "the row dimension for initializing A is not valid.");
236 A.value().cols(),
237 model.dim,
238 "the column dimension for initializing A is not valid.");
239 } else {
240 A.reset();
241 }
242 if (C != nullopt && C.value().size() != 0) {
244 C.value().rows(),
245 model.n_in,
246 "the row dimension for initializing C is not valid.");
248 C.value().cols(),
249 model.dim,
250 "the column dimension for initializing C is not valid.");
251 } else {
252 C.reset();
253 }
254 work.internal.proximal_parameter_update = false;
255 PreconditionerStatus preconditioner_status;
256 if (compute_preconditioner_) {
258 } else {
260 }
262 settings, results, work, rho, mu_eq, mu_in);
263
264 if (g != nullopt) {
265 model.g = g.value();
266 } // else qpmodel.g remains initialzed to a matrix with zero elements or
267 // zero shape
268 if (b != nullopt) {
269 model.b = b.value();
270 } // else qpmodel.b remains initialzed to a matrix with zero elements or
271 // zero shape
272 if (u != nullopt) {
273 model.u = u.value();
274 } // else qpmodel.u remains initialzed to a matrix with zero elements or
275 // zero shape
276 if (l != nullopt) {
277 model.l = l.value();
278 } // else qpmodel.l remains initialzed to a matrix with zero elements or
279 // zero shape
280
281 // avoid allocations when H is not nullopt
282 SparseMat<T, I> AT(model.dim, model.n_eq);
283 if (A != nullopt) {
284 AT = (A.value()).transpose();
285 } else {
286 AT.setZero();
287 }
288 SparseMat<T, I> CT(model.dim, model.n_in);
289 if (C != nullopt) {
290 CT = (C.value()).transpose();
291 } else {
292 CT.setZero();
293 }
294 if (H != nullopt) {
295 SparseMat<T, I> H_triu =
296 (H.value()).template triangularView<Eigen::Upper>();
297
306 };
307 qp_setup(qp, results, model, work, settings, ruiz, preconditioner_status);
310 manual_minimal_H_eigenvalue, results, settings);
311 } else {
312 SparseMat<T, I> H_triu(model.dim, model.dim);
313 H_triu.setZero();
314 H_triu = (H.value()).template triangularView<Eigen::Upper>();
323 };
324 qp_setup(qp, results, model, work, settings, ruiz, preconditioner_status);
325 }
326 work.internal.is_initialized = true;
327
328 if (settings.compute_timings) {
329 results.info.setup_time += work.timer.elapsed().user; // in microseconds
330 }
331 };
354 const optional<SparseMat<T, I>> A,
356 const optional<SparseMat<T, I>> C,
359 bool update_preconditioner = false,
360 optional<T> rho = nullopt,
361 optional<T> mu_eq = nullopt,
362 optional<T> mu_in = nullopt,
363 optional<T> manual_minimal_H_eigenvalue = nullopt)
364 {
365 if (!work.internal.is_initialized) {
366 init(H, g, A, b, C, l, u, update_preconditioner, rho, mu_eq, mu_in);
367 return;
368 }
369 if (settings.compute_timings) {
370 work.timer.stop();
371 work.timer.start();
372 }
373 work.internal.dirty = false;
374 work.internal.proximal_parameter_update = false;
375 PreconditionerStatus preconditioner_status;
376 if (update_preconditioner) {
378 } else {
379 preconditioner_status = proxsuite::proxqp::PreconditionerStatus::KEEP;
380 }
381 isize n = model.dim;
382 isize n_eq = model.n_eq;
383 isize n_in = model.n_in;
385 model.kkt_mut_unscaled();
386
387 auto kkt_top_n_rows = detail::top_rows_mut_unchecked(
388 proxsuite::linalg::veg::unsafe, kkt_unscaled, n);
389
391 detail::middle_cols_mut(kkt_top_n_rows, 0, n, model.H_nnz);
392
394 detail::middle_cols_mut(kkt_top_n_rows, n, n_eq, model.A_nnz);
395
397 detail::middle_cols_mut(kkt_top_n_rows, n + n_eq, n_in, model.C_nnz);
398
399 // check the model is valid
400 if (g != nullopt) {
401 PROXSUITE_CHECK_ARGUMENT_SIZE(g.value().size(),
402 model.dim,
403 "the dimension wrt the primal variable x "
404 "variable for updating g is not valid.");
405 }
406 if (b != nullopt) {
407 PROXSUITE_CHECK_ARGUMENT_SIZE(b.value().size(),
408 model.n_eq,
409 "the dimension wrt equality constrained "
410 "variables for updating b is not valid.");
411 }
412 if (u != nullopt) {
413 PROXSUITE_CHECK_ARGUMENT_SIZE(u.value().size(),
414 model.n_in,
415 "the dimension wrt inequality constrained "
416 "variables for updating u is not valid.");
417 }
418 if (l != nullopt) {
419 PROXSUITE_CHECK_ARGUMENT_SIZE(l.value().size(),
420 model.n_in,
421 "the dimension wrt inequality constrained "
422 "variables for updating l is not valid.");
423 }
424 if (H != nullopt) {
426 H.value().rows(),
427 model.dim,
428 "the row dimension for updating H is not valid.");
430 H.value().cols(),
431 model.dim,
432 "the column dimension for updating H is not valid.");
433 }
434 if (A != nullopt) {
436 A.value().rows(),
437 model.n_eq,
438 "the row dimension for updating A is not valid.");
440 A.value().cols(),
441 model.dim,
442 "the column dimension for updating A is not valid.");
443 }
444 if (C != nullopt) {
446 C.value().rows(),
447 model.n_in,
448 "the row dimension for updating C is not valid.");
450 C.value().cols(),
451 model.dim,
452 "the column dimension for updating C is not valid.");
453 }
454
455 // update the model
456
457 if (g != nullopt) {
458 model.g = g.value();
459 }
460 if (b != nullopt) {
461 model.b = b.value();
462 }
463 if (u != nullopt) {
464 model.u = u.value();
465 }
466 if (l != nullopt) {
467 model.l = l.value();
468 }
469 if (H != nullopt) {
470 SparseMat<T, I> H_triu =
471 H.value().template triangularView<Eigen::Upper>();
472 if (A != nullopt) {
473 if (C != nullopt) {
474 bool res =
476 H_unscaled.as_const(),
477 { proxsuite::linalg::sparse::from_eigen, H_triu }) &&
478 have_same_structure(AT_unscaled.as_const(),
479 { proxsuite::linalg::sparse::from_eigen,
480 SparseMat<T, I>(A.value().transpose()) }) &&
481 have_same_structure(CT_unscaled.as_const(),
482 { proxsuite::linalg::sparse::from_eigen,
483 SparseMat<T, I>(C.value().transpose()) });
484 /* TO PUT IN DEBUG MODE
485 std::cout << "have same structure = " << res << std::endl;
486 */
487 if (res) {
488 copy(H_unscaled,
490 H_triu }); // copy rhs into lhs
491 copy(
492 AT_unscaled,
494 SparseMat<T, I>(A.value().transpose()) }); // copy rhs into lhs
495 copy(
496 CT_unscaled,
498 SparseMat<T, I>(C.value().transpose()) }); // copy rhs into lhs
499 }
500 } else {
501 bool res =
503 H_unscaled.as_const(),
504 { proxsuite::linalg::sparse::from_eigen, H_triu }) &&
505 have_same_structure(AT_unscaled.as_const(),
506 { proxsuite::linalg::sparse::from_eigen,
507 SparseMat<T, I>(A.value().transpose()) });
508 /* TO PUT IN DEBUG MODE
509 std::cout << "have same structure = " << res << std::endl;
510 */
511 if (res) {
512 copy(H_unscaled,
514 H_triu }); // copy rhs into lhs
515 copy(
516 AT_unscaled,
518 SparseMat<T, I>(A.value().transpose()) }); // copy rhs into lhs
519 }
520 }
521 } else if (C != nullopt) {
522 bool res =
524 H_unscaled.as_const(),
525 { proxsuite::linalg::sparse::from_eigen, H_triu }) &&
526 have_same_structure(CT_unscaled.as_const(),
527 { proxsuite::linalg::sparse::from_eigen,
528 SparseMat<T, I>(C.value().transpose()) });
529 /* TO PUT IN DEBUG MODE
530 std::cout << "have same structure = " << res << std::endl;
531 */
532 if (res) {
533 copy(H_unscaled,
535 H_triu }); // copy rhs into lhs
536 copy(CT_unscaled,
538 SparseMat<T, I>(C.value().transpose()) }); // copy rhs into lhs
539 }
540 } else {
541
542 bool res = have_same_structure(
543 H_unscaled.as_const(),
544 { proxsuite::linalg::sparse::from_eigen, H_triu });
545 /* TO PUT IN DEBUG MODE
546 std::cout << "have same structure = " << res << std::endl;
547 */
548 if (res) {
549 copy(H_unscaled,
551 H.value() }); // copy rhs into lhs
552 }
553 }
554 } else if (A != nullopt) {
555 if (C != nullopt) {
556 bool res =
557 have_same_structure(AT_unscaled.as_const(),
558 { proxsuite::linalg::sparse::from_eigen,
559 SparseMat<T, I>(A.value().transpose()) }) &&
560 have_same_structure(CT_unscaled.as_const(),
561 { proxsuite::linalg::sparse::from_eigen,
562 SparseMat<T, I>(C.value().transpose()) });
563 /* TO PUT IN DEBUG MODE
564 std::cout << "have same structure = " << res << std::endl;
565 */
566 if (res) {
567 copy(AT_unscaled,
569 SparseMat<T, I>(A.value().transpose()) }); // copy rhs into lhs
570 copy(CT_unscaled,
572 SparseMat<T, I>(C.value().transpose()) }); // copy rhs into lhs
573 }
574 } else {
575 bool res =
576 have_same_structure(AT_unscaled.as_const(),
577 { proxsuite::linalg::sparse::from_eigen,
578 SparseMat<T, I>(A.value().transpose()) });
579 /* TO PUT IN DEBUG MODE
580 std::cout << "have same structure = " << res << std::endl;
581 */
582 if (res) {
583 copy(AT_unscaled,
585 SparseMat<T, I>(A.value().transpose()) }); // copy rhs into lhs
586 }
587 }
588 } else if (C != nullopt) {
589 bool res =
590 have_same_structure(CT_unscaled.as_const(),
591 { proxsuite::linalg::sparse::from_eigen,
592 SparseMat<T, I>(C.value().transpose()) });
593 /* TO PUT IN DEBUG MODE
594 std::cout << "have same structure = " << res << std::endl;
595 */
596 if (res) {
597 copy(CT_unscaled,
599 SparseMat<T, I>(C.value().transpose()) }); // copy rhs into lhs
600 }
601 }
602
603 SparseMat<T, I> H_triu =
604 H_unscaled.to_eigen().template triangularView<Eigen::Upper>();
608 { proxsuite::linalg::sparse::from_eigen, AT_unscaled.to_eigen() },
610 { proxsuite::linalg::sparse::from_eigen, CT_unscaled.to_eigen() },
613 };
615 settings, results, work, rho, mu_eq, mu_in);
616 qp_setup(qp,
617 results,
618 model,
619 work,
620 settings,
621 ruiz,
622 preconditioner_status); // store model value + performs scaling
623 // according to chosen options
624 if (H != nullopt) {
627 manual_minimal_H_eigenvalue, results, settings);
628 }
629 if (settings.compute_timings) {
630 results.info.setup_time = work.timer.elapsed().user; // in microseconds
631 }
632 };
633
637 void solve()
638 {
639 qp_solve( //
640 results,
641 model,
642 settings,
643 work,
644 ruiz);
645 };
655 {
657 qp_solve( //
658 results,
659 model,
660 settings,
661 work,
662 ruiz);
663 };
667 void cleanup() { results.cleanup(settings); }
668};
705template<typename T, typename I>
718 optional<T> eps_abs = nullopt,
719 optional<T> eps_rel = nullopt,
720 optional<T> rho = nullopt,
721 optional<T> mu_eq = nullopt,
722 optional<T> mu_in = nullopt,
723 optional<bool> verbose = nullopt,
724 bool compute_preconditioner = true,
725 bool compute_timings = false,
726 optional<isize> max_iter = nullopt,
729 proxsuite::proxqp::SparseBackend sparse_backend =
731 bool check_duality_gap = false,
732 optional<T> eps_duality_gap_abs = nullopt,
733 optional<T> eps_duality_gap_rel = nullopt,
734 bool primal_infeasibility_solving = false,
735 optional<T> manual_minimal_H_eigenvalue = nullopt)
736{
737
738 isize n(0);
739 isize n_eq(0);
740 isize n_in(0);
741 if (H != nullopt) {
742 n = H.value().rows();
743 }
744 if (A != nullopt) {
745 n_eq = A.value().rows();
746 }
747 if (C != nullopt) {
748 n_in = C.value().rows();
749 }
750
751 proxqp::sparse::QP<T, I> Qp(n, n_eq, n_in);
752 Qp.settings.initial_guess = initial_guess;
753 Qp.settings.check_duality_gap = check_duality_gap;
754
755 if (eps_abs != nullopt) {
756 Qp.settings.eps_abs = eps_abs.value();
757 }
758 if (eps_rel != nullopt) {
759 Qp.settings.eps_rel = eps_rel.value();
760 }
761 if (verbose != nullopt) {
762 Qp.settings.verbose = verbose.value();
763 }
764 if (max_iter != nullopt) {
765 Qp.settings.max_iter = max_iter.value();
766 }
767 if (eps_duality_gap_abs != nullopt) {
768 Qp.settings.eps_duality_gap_abs = eps_duality_gap_abs.value();
769 }
770 if (eps_duality_gap_rel != nullopt) {
771 Qp.settings.eps_duality_gap_rel = eps_duality_gap_rel.value();
772 }
773 Qp.settings.compute_timings = compute_timings;
774 Qp.settings.sparse_backend = sparse_backend;
775 Qp.settings.primal_infeasibility_solving = primal_infeasibility_solving;
776 if (manual_minimal_H_eigenvalue != nullopt) {
777 Qp.init(H,
778 g,
779 A,
780 b,
781 C,
782 l,
783 u,
784 compute_preconditioner,
785 rho,
786 mu_eq,
787 mu_in,
788 manual_minimal_H_eigenvalue.value());
789 } else {
790 Qp.init(
791 H, g, A, b, C, l, u, compute_preconditioner, rho, mu_eq, mu_in, nullopt);
792 }
793 Qp.solve(x, y, z);
794
795 return Qp.results;
796}
797
799template<typename T, typename I>
801{
806 std::vector<QP<T, I>> qp_vector;
807 sparse::isize m_size;
808
809 BatchQP(long unsigned int batchSize)
810 {
811 if (qp_vector.max_size() != batchSize) {
812 qp_vector.clear();
813 qp_vector.reserve(batchSize);
814 }
815 m_size = 0;
816 }
817
821 QP<T, I>& init_qp_in_place(sparse::isize dim,
822 sparse::isize n_eq,
823 sparse::isize n_in)
824 {
825 qp_vector.emplace_back(dim, n_eq, n_in);
826 auto& qp = qp_vector.back();
827 m_size++;
828 return qp;
829 };
830
831 // /*!
832 // * Init a QP in place and return a reference to it
833 // */
834 // QP<T, I>& init_qp_in_place(const sparse::SparseMat<bool, I>& H,
835 // const sparse::SparseMat<bool, I>& A,
836 // const sparse::SparseMat<bool, I>& C)
837 // {
838 // qp_vector.emplace_back(H.rows(), A.rows(), C.rows());
839 // auto& qp = qp_vector.back();
840 // m_size++;
841 // return qp;
842 // };
843
847 void insert(QP<T, I>& qp) { qp_vector.emplace_back(qp); };
848
852 QP<T, I>& get(isize i) { return qp_vector.at(size_t(i)); };
853
857 const QP<T, I>& get(isize i) const { return qp_vector.at(size_t(i)); };
858
862 QP<T, I>& operator[](isize i) { return get(i); };
863
867 const QP<T, I>& operator[](isize i) const { return get(i); };
868
869 sparse::isize size() { return m_size; };
870};
871
872} // namespace sparse
873} // namespace proxqp
874} // namespace proxsuite
875
876#endif /* end of include guard PROXSUITE_PROXQP_SPARSE_WRAPPER_HPP */
#define PROXSUITE_CHECK_ARGUMENT_SIZE(size, expected_size, message)
Definition macros.hpp:28
auto middle_cols_mut(proxsuite::linalg::sparse::MatMut< T, I > mat, isize start, isize ncols, isize nnz) -> proxsuite::linalg::sparse::MatMut< T, I >
Definition utils.hpp:400
auto top_rows_mut_unchecked(proxsuite::linalg::veg::Unsafe, proxsuite::linalg::sparse::MatMut< T, I > mat, isize nrows) -> proxsuite::linalg::sparse::MatMut< T, I >
Definition utils.hpp:440
void warm_start(optional< VecRef< T > > x_wm, optional< VecRef< T > > y_wm, optional< VecRef< T > > z_wm, Results< T > &results, Settings< T > &settings, Model< T, I > &model)
Definition helpers.hpp:219
void update_proximal_parameters(Settings< T > &settings, Results< T > &results, Workspace< T, I > &work, optional< T > rho_new, optional< T > mu_eq_new, optional< T > mu_in_new)
Definition helpers.hpp:183
void qp_solve(Results< T > &results, Model< T, I > &data, const Settings< T > &settings, Workspace< T, I > &work, P &precond)
Definition solver.hpp:344
Eigen::SparseMatrix< T, Eigen::ColMajor, I > SparseMat
Definition fwd.hpp:31
proxqp::Results< T > solve(optional< SparseMat< T, I > > H, optional< VecRef< T > > g, optional< SparseMat< T, I > > A, optional< VecRef< T > > b, optional< SparseMat< T, I > > C, optional< VecRef< T > > l, optional< VecRef< T > > u, optional< VecRef< T > > x=nullopt, optional< VecRef< T > > y=nullopt, optional< VecRef< T > > z=nullopt, optional< T > eps_abs=nullopt, optional< T > eps_rel=nullopt, optional< T > rho=nullopt, optional< T > mu_eq=nullopt, optional< T > mu_in=nullopt, optional< bool > verbose=nullopt, bool compute_preconditioner=true, bool compute_timings=false, optional< isize > max_iter=nullopt, proxsuite::proxqp::InitialGuessStatus initial_guess=proxsuite::proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS, proxsuite::proxqp::SparseBackend sparse_backend=proxsuite::proxqp::SparseBackend::Automatic, bool check_duality_gap=false, optional< T > eps_duality_gap_abs=nullopt, optional< T > eps_duality_gap_rel=nullopt, bool primal_infeasibility_solving=false, optional< T > manual_minimal_H_eigenvalue=nullopt)
Definition wrapper.hpp:707
void copy(proxsuite::linalg::sparse::MatMut< T, I > a, proxsuite::linalg::sparse::MatRef< T, I > b)
Definition helpers.hpp:443
Eigen::Ref< Eigen::Matrix< T, DYN, 1 > const > VecRef
Definition fwd.hpp:34
auto have_same_structure(proxsuite::linalg::sparse::MatRef< T, I > a, proxsuite::linalg::sparse::MatRef< T, I > b) -> bool
Definition helpers.hpp:414
void qp_setup(QpView< T, I > qp, Results< T > &results, Model< T, I > &data, Workspace< T, I > &work, Settings< T > &settings, P &precond, PreconditionerStatus &preconditioner_status)
Definition helpers.hpp:282
void update_default_rho_with_minimal_Hessian_eigen_value(optional< T > manual_minimal_H_eigenvalue, Results< T > &results, Settings< T > &settings)
Definition helpers.hpp:159
constexpr nullopt_t nullopt
Definition optional.hpp:42
This class stores all the results of PROXQP solvers with sparse and dense backends.
Definition results.hpp:68
This class defines the settings of PROXQP solvers with sparse and dense backends.
Definition settings.hpp:89
std::vector< QP< T, I > > qp_vector
Definition wrapper.hpp:806
void insert(QP< T, I > &qp)
Definition wrapper.hpp:847
QP< T, I > & operator[](isize i)
Definition wrapper.hpp:862
QP< T, I > & init_qp_in_place(sparse::isize dim, sparse::isize n_eq, sparse::isize n_in)
Definition wrapper.hpp:821
QP< T, I > & get(isize i)
Definition wrapper.hpp:852
const QP< T, I > & operator[](isize i) const
Definition wrapper.hpp:867
const QP< T, I > & get(isize i) const
Definition wrapper.hpp:857
BatchQP(long unsigned int batchSize)
Definition wrapper.hpp:809
This class stores the model of the QP problem.
Definition model.hpp:23
This class defines the API of PROXQP solver with sparse backend.
Definition wrapper.hpp:91
Workspace< T, I > work
Definition wrapper.hpp:95
QP(const SparseMat< bool, I > &H, const SparseMat< bool, I > &A, const SparseMat< bool, I > &C)
Definition wrapper.hpp:122
void solve(optional< VecRef< T > > x, optional< VecRef< T > > y, optional< VecRef< T > > z)
Definition wrapper.hpp:652
void update(const optional< SparseMat< T, I > > H, optional< VecRef< T > > g, const optional< SparseMat< T, I > > A, optional< VecRef< T > > b, const optional< SparseMat< T, I > > C, optional< VecRef< T > > l, optional< VecRef< T > > u, bool update_preconditioner=false, optional< T > rho=nullopt, optional< T > mu_eq=nullopt, optional< T > mu_in=nullopt, optional< T > manual_minimal_H_eigenvalue=nullopt)
Definition wrapper.hpp:352
void init(optional< SparseMat< T, I > > H, optional< VecRef< T > > g, optional< SparseMat< T, I > > A, optional< VecRef< T > > b, optional< SparseMat< T, I > > C, optional< VecRef< T > > l, optional< VecRef< T > > u, bool compute_preconditioner_=true, optional< T > rho=nullopt, optional< T > mu_eq=nullopt, optional< T > mu_in=nullopt, optional< T > manual_minimal_H_eigenvalue=nullopt)
Definition wrapper.hpp:165
QP(isize dim, isize n_eq, isize n_in)
Definition wrapper.hpp:103
preconditioner::RuizEquilibration< T, I > ruiz
Definition wrapper.hpp:96
This class defines the workspace of the sparse solver.