m.write("out.sol") doesnt write a file

995 views
Skip to first unread message

Niko Bartel

unread,
Oct 4, 2010, 6:05:53 AM10/4/10
to gur...@googlegroups.com
Hi,

gurobi 3.01 solved my problem fast and nice. But i cant get to the values of the variables.

I use gurobi 3.01 simply on the input shell and last time i just write all values with m.write("solution.sol") in on file, which i processed further for some nice grafical solution.

This time m.write("out.sol") gives me no error, but neither i can find the written file.

Has anyone a suggestion?

Thx
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl

Greg Glockner

unread,
Oct 4, 2010, 2:49:19 PM10/4/10
to gur...@googlegroups.com
I'd guess that one of two things is happening:

1) Your model didn't solve successfully. For example, it could have been infeasible. Check the status code and/or the logfile.

2) The solution file was produced, but it's in a different directory than what you expected. Search your computer for the file.

Incidentally, note that you can also produce a solution file via the ResultFile parameter.

Niko Bartel

unread,
Oct 5, 2010, 10:28:34 AM10/5/10
to gur...@googlegroups.com
Well, thats what i thought too. But i do search my computer a few
times and it only return my old .sol files. And writing the .sol file
should take a least a few seconds, but here the shell respond immediately.

The status of the model is 2. I suspect this means optimal, like it says
in the display.

But i didnt find the log file either. So can you please give me a hint
where gurobi normaly produces the log file and other output files?

Thank you

Niko

Greg Glockner

unread,
Oct 5, 2010, 4:53:14 PM10/5/10
to gur...@googlegroups.com
While investigating this question, we discovered a bug when writing a solution file. If Gurobi is unable to write the solution file, it does not give an error. This will be fixed in the next update. In the meantime, ensure that you have privileges to write the solution file.

Niko Bartel

unread,
Oct 6, 2010, 2:22:22 AM10/6/10
to gur...@googlegroups.com
Am 05.10.2010 22:53, schrieb Greg Glockner:
> While investigating this question, we discovered a bug when writing a solution file. If Gurobi is unable to write the solution file, it does not give an error. This will be fixed in the next update. In the meantime, ensure that you have privileges to write the solution file.
>
>
The problem is solved on my side, gurobi just dont write a solution file
to c:/ , but when you ask gurobi to write an .sol file to a
subdirectory, say c:/LP/ no problem ocurr.

By the way: in which directory gurobi write the log-files ?

Thanks a lot for this fast solver....

Niko

Reply all
Reply to author
Forward
0 new messages