[SCIP] Multiple solutions with scipampl

Stefan Vigerske stefan at math.hu-berlin.de
Sat Jan 14 05:31:36 CET 2017


Hi,

there is no build-in option to do that.
But as one can inspect them with the SCIP shell, and the SCIP/AMPL 
interface uses the SCIP shell, too, you can try to use the SCIP shells 
functionality for that.

1. If you have the .nl file of your AMPL instance at hand, then you
    can run the scipampl binary with the -i option:

   Usage: scipampl <nl-file> { [-AMPL] | [<settings-file>] | -i }

     -i starts the SCIP shell after reading settings and .nl file,
        instead of starting the SCIP solve

   When you are in the SCIP shell, say "optimize" so solve the problem
   and then use "display sols" to inspect all recorded solutions.

2. Adding a line
    SCIP_CALL( SCIPaddDialogInputLine(scip, "display sols 2") );
    between the lines for "optimize" and "quit" to 
interfaces/ampl/src/cmain.c and rebuild the scipampl binary may also be 
a viable way.


Hope that helps,
Stefan

On 01/13/2017 05:15 PM, Tiago Montanher wrote:
> Dear all,
>
> I'm running SCIP through its AMPL interface. In some problems the solver
> recognizes several solutions as pointed by the output
>
> "Primal Bound       : -1.76502376274568e+00 (5 solutions)"
>
> So, I would like to display these 5 solutions instead of only one(Even
> though some of these solutions may not be optimal, I would like to check
> them). Is it possible?
> I found that it is possible to get multiple solutions with the function
> SCIPgetNSols from C but I'm could not find anything about getting multiple
> solutions from the ampl interface.
>
> Best Regards,
> Tiago
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>


-- 
http://www.gams.com/~stefan


More information about the Scip mailing list