Is it possible to read a solution file created using highspy in one format or style, and convert it to another format without the need to run the model? #2075
-
Hello. I ran a model and created a solution file using style 1 with the following code a week ago.
I learnt yesterday #2072 that it is also possible to write the solution file in different format using HIGHS. As per the documentation, style 1 refers to HIGHS pretty format, and style 3 refers to Glpsol pretty format. I need the solution file in style 3. The model had taken two days to run. Therefore, I'd like to avoid running the model again if at all possible. 1. Is it possible to read the I have a second sub-question. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
This should work. If the problem is an LP, call run() and HiGHS should just validate that the solution read in is optimal, and then write out in Glpsol format. If it's a MIP, it's less clear. Don't call run(), but hope that it writes out the solution, despite not having the model status set. It would have been sensible to check that this mechanism works before solving such a large problem, but I know life's not like that at times! |
Beta Was this translation helpful? Give feedback.
-
Unfortunately - and I've looked back properly at your earlier questions
So, you'll have to convert the HiGHS "pretty" format file into Glpsol "pretty" format using some text processing package (like perl/awk or some modern equivalent)
Yes, up to 9 digits! In passing, there is at least one bug in the code to write out in Glpsol "pretty" format. I get lines like
I can look into this and probably soon fix it |
Beta Was this translation helpful? Give feedback.
-
The format I created was for Can |
Beta Was this translation helpful? Give feedback.
Yes, I correctly reproduced the glpsol style in the pretty format