Re: [OS] multiple solutions

12 views
Skip to first unread message

Horand Gassmann

unread,
Nov 5, 2012, 2:35:17 PM11/5/12
to Mike Steglich, o...@list.coin-or.org
Mike Steglich <mike.s...@berlin.de> wrote:

> Is it possible to write the incumbents found during an MIP
> optimization into a OSrL file?

Yes. :-)

There are several routes you might want to take. First, you can put
multiple <solution> elements into the file. Each solution must have a
status; you could use "bestSoFar" for the incumbent solutions.

Alternatively you might want to look at <other> elements that somehow
code the incumbent solution appropriately. You'd need to choose your
own name for the <other> elements, and I am not sure off-hand how you
could capture the objective value in the same element. (But you could
always compute that on the fly if needed.)

Or you can simply print out the incumbents in the solver, and capture
the solver output in the <job> option. Our OSrL parser can put any of
those versions into an in-memory OSResult object, although the
interpretation of what the different things mean would be up to you
--- at least at this point. Our current repository has an osol file,
serverOutputCapture.osol, and an osrl file, serverOutputCapture.osrl,
to illustrate.

Hope that helps.

gus

> Thanks,
>
> Mike
> _______________________________________________
> OS mailing list
> O...@list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/os
>
>



-------------------------------------------------------

Horand I. Gassmann, Professor

Kenneth C. Rowe School of Business, Dalhousie University
6100 University Avenue, PO Box 15000
Halifax, Nova Scotia, Canada, B3H 4R2
ph. (902) 494-1844
fax (902) 494-1107

http://myweb.dal.ca/gassmann/

_______________________________________________
OS mailing list
O...@list.coin-or.org
http://list.coin-or.org/mailman/listinfo/os

Horand Gassmann

unread,
Nov 8, 2012, 3:05:21 PM11/8/12
to Mike Steglich, o...@list.coin-or.org
Mike Steglich <mike.s...@berlin.de> wrote:

> Hi Gus,
>
>
> Thank you for your answer. It helps if one uses the OS libs. But is
> there also an opportunity to catch the incumbents by using
> OSSolverService/CBC and to write these solutions in <solution>
> sections? ( I have forgotten to write that I want to use the
> OSSolverService binary in my first email.)

If you use the executable as a black box, then the answer is probably
"No", at least at the moment. The solution file is written *after* Cbc
finishes, so to do what you want would require two things: First,
you'd have to store the incumbents in Cbc memory --- don't know if
this is possible --- and then you (or rather, we :) ) would have to
access that memory when writing the solution file. We certainly do not
do so at the moment, and I have no idea how difficult it might be.

So the only possibility I see is for you to capture the incumbent
solutions in the output capture element. Presumably you would have to
set a Cbc option to print those out, and presumably that will be
possible. You would also have to parse the output file yourself.

If you think it is important to have multiple <solution> elements for
this situation, I would suggest that you fill out a ticket so we have
a record for later.


Hope that helps.

gus
Reply all
Reply to author
Forward
0 new messages