Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

write solution (and possibly logging) into file #17

Open
pchtsp opened this issue Mar 30, 2018 · 4 comments
Open

write solution (and possibly logging) into file #17

pchtsp opened this issue Mar 30, 2018 · 4 comments

Comments

@pchtsp
Copy link

pchtsp commented Mar 30, 2018

It would be interesting to have the option to write the solution into a file instead of only showing it in the screen. This could be configured by a new command line option like the following:

-o <file_path>

Also, although less important, would be to have the log output (progress) written into, yet another, file.

That way, we could at the same time show the output in screen and write it into a file and not mix the solution logging with the solution itself.

Thanks!

Franco

@cprudhom
Copy link
Member

cprudhom commented Apr 3, 2018

If you are referring to MPS, the last (optimal) solution is the only one to print, right ?
Or you are also interested in having intermediate solutions.
In that case, I would suggest to give an output directory and that each solution is prefixed with "solution_".

If I can share options among all formats, that's better.

@pchtsp
Copy link
Author

pchtsp commented Apr 3, 2018

For the mps I'm only interested in the last (best) solution found.

It's true that it could be better to have common arguments for all the different interfaces. Maybe -o <file_path> could mean "write the last solution found in the following file" while another argument (-s <dir_path>?) could mean "write all the solutions found in the following directory".

@cprudhom
Copy link
Member

cprudhom commented Apr 3, 2018

What about something like:
-o sol.txt : output the last solution to sol.txt
-sas (or --save-all-solutions): save all solutions (false by default), post-fixed sol.txt with the number of the solutions
?

@pchtsp
Copy link
Author

pchtsp commented Apr 4, 2018

Yes, that could work. The only thing would be enforcing that if -sas is active, -o sol.txt needs to be active too. That way it is possible to use the given name for all the solution files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants