Closed Foggalong closed 2 months ago
@jajhall Do you know offhand if it's possible to update the Hessian with addCol
? Been reading the C docs which go through the parameters for updating $c$, $L$, $A$, and $U$ (which are the same in Python), but don't mention $Q$.
If it's not yet possible should still be able to use addCol
to incorporate $z$, then passHessian
to add the extended Hessian to the model. This still removes most the messy extensions and amendment methods currently implemented!
If you call addCol
, then any non-empty Hessian will be extended with zeros so that its dimension is consistent with the vectors of costs and bounds. I added this feature as a consequence of modelling the robust optimization problem.
For non-zero modifications of the Hessian, it has to be re-loaded using passHessian
@jajhall This feature doesn't seem to be in highspy 1.7.1.dev2
. I've got addCol
working, but only if I add the Hessian separately using the extension method. Don't know if it's relevant, but the first line of the highspy terminal output has a different version number:
Running HiGHS 1.7.0 (git hash: 1ddc6c347):
So you need to be using highspy 1.7.1
. Update by running
pip install highspy -U
Damn, I'd missed off the -U
flag when checking this. Thanks :+1:
As became apparent toward the end of #10, the way I've integrated $z$ into the model at the point of construction like
leads to code which is prone to bugs. It should be possible to do this instead by starting with the standard model and straight forwardly adding a variable
or by using
h.addCol
to add a column to the model, similar to howaddRow
is used to incorporate the conic approximations inEither way, the result should be code which is less error prone.