HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

Add writePresolvedModel

Open jajhall opened this issue 1 year ago • 1 comments

If users want to write out the model after the HiGHS presolve, they must extract it using getPresolvedLp, load it into HiGHS, and then call writeModel. Adding writePresolvedModel isn't difficult...

jajhall avatar Apr 17 '24 13:04 jajhall

Alternative idea would be having write(filename) as a function of Model rather than the Highs class (and maybe read(filename) as a static function of Model producing a Model object). The syntax would then be something like getPresolvedLp().write()

feldmeier avatar Apr 17 '24 15:04 feldmeier

Closed by #1741

jajhall avatar May 02 '24 12:05 jajhall

I know this is closed but I'm not sure my question warrants a new ticket.

Could the executable have

--write_presolve_file arg File for writing out presolved model.

and the options have

presolve_file.

I know it'd be greatly helpful when using non-direct interfaces to HiGHS.

If you think it might warrant opening a new ticket just say the word.

Thell avatar Jul 26 '24 20:07 Thell

I think it's too esoteric to have as a command-line option - the option would have to be set in an options file - but I see that if you're wanting just a file of the presolved model then, at the moment, you can't get it when running HiGHS from the command line.

It's easy to add.

jajhall avatar Jul 26 '24 20:07 jajhall

Closed by #1863

jajhall avatar Jul 30 '24 23:07 jajhall