Hessian oracle#3153
Conversation
…ntries, index, value, void*
…ance of incoming data
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #3153 +/- ##
==========================================
- Coverage 73.19% 73.18% -0.02%
==========================================
Files 430 432 +2
Lines 104154 105459 +1305
Branches 16738 16982 +244
==========================================
+ Hits 76239 77180 +941
- Misses 27639 28003 +364
Partials 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…iminating the need for a special method for HighsCHessianFunctionType
| pdlp_cupdlpc_restart_method(0), | ||
| pdlp_step_size_strategy(0), | ||
| pdlp_optimality_tolerance(0.0), | ||
| test_qp_oracle(false), |
There was a problem hiding this comment.
Is this options supposed to be here? Or is it just for development?
There was a problem hiding this comment.
In the unit tests I wanted to have it on and off, but I'll change it to a const bool internally. Thanks
| HighsCHessianFunctionType oracleCall, | ||
| void* oracle_data) { | ||
| auto status = | ||
| static_cast<Highs*>(highs)->passHessian(dim, oracleCall, oracle_data); |
There was a problem hiding this comment.
Here you are passing the HighsCHessianFunctionType as second argument to passHessian (hence casting to HighsHessianFunctionType), while there is an unused fourth argument which takes exactly HighsCHessianFunctionType.
There was a problem hiding this comment.
BTW, I think std::function can be constructed from a C-style function pointer if the signatures are exactly the same, so this may be totally fine and the fourth argument of passHessian may actually not be needed at all.
There was a problem hiding this comment.
Thanks, I just followed what was done for the call-backs, but then the C-style function pointer had to be retrofitted.
There was a problem hiding this comment.
Oh I see, then it's fine if it's consistent with the rest of the callbacks.
| void clear(); | ||
| bool isValid() const { return hasProductCall(); } | ||
| bool hasProductCall() const; | ||
| void formFromOracle(); |
There was a problem hiding this comment.
formFromOracle is unused, as you are doing it as part of HighsHessian and not HessianOracle
|
Looks great, apart from minor things and documentation to be added later. |
This allows the QP active set solve (QpAsm) and HiPO to operate using an oracle for the Hessian$$Q$$ .
This oracle must be able to compute$$Qx$$ , but there is greater efficiency if it can supply a column of the Hessian.
Also incorporates a method for users to check that their Hessian oracle is correct
C API methods have been written, and tested in
check/testCAPI.cReview of QpAsm identified the dense Cholesky code in
highs/qpsolver/feasibility_bounded.hppas being wholly incorrect, requiring a complete re-write.Documentation is in C API header file, and
check/TestQpOracle.cpp. Formal documentation will follow