Closed nifroehling closed 1 month ago
One additional bit of information: This happens with an older Xpress version (9.0.2) as well as with the latest version (9.4.2). In the latest version, however, the error does not cause the program to abort- in the older version, it does cause the program to abort. I have not tested versions except for 9.0.2 and 9.4.2.
@nifroehling, thanks for investigating! And I agree with your findings. I have implemented writesol
in #364, and for now let's accept the alternative file format.
Hi Fabian, thank you for the quick response! Best, Nina
Dear pypsa/linopy-Team!
I'm currently in the process of integrating linopy into our pypsa-based project, and stumbled upon following problem: In linopy/linopy/solvers.py, in the run_xpress function the lines
raise the error
The variable m is an object of the xpress.problem class, which, according to the error message and the fico xpress python interface reference manual, does not have an attribute or function "tofile". The xpress.problem class does have a function problem.writesol, which is there to write out the solution to the problem. This may be an acceptable substitution.
If I replace
with
the error is no longer raised. This, however, does not produce a .sol file, but two files, one in an .hdr and one in the .asc format. I was not able to find an xpress function that would write the solution in the .sol format.
I hope this helps!
Best
Nina Fröhling