[Scip] How to change the behavior of "display solution"?

Gerald Gamrath gamrath at zib.de
Wed May 27 14:54:13 CEST 2015


Dear He Xingqiu,

if you want to print the vardata together with the nonzero valued 
variables, you will have to do the loop over the variables yourself.
You can get the best solution with SCIPgetBestSol() and then iterate 
over all variables, asking for the solution value in this solution via 
SCIPgetSolVal(). If this is not zero (within tolerance), you can just 
print whatever is stored in your vardata.

Now how can you call this? If you want to use the interactive shell, 
there are (at least) two ways to call the printing:
1) You add this printing to some EXIT callback (e.g., of your pricer) 
and print the solution automatically when freeing the problem, i.e., 
when quitting SCIP or reading in a new problem.
2) You extend the default dialog handler of SCIP (dialog_default) by a 
new command or modify the old command SCIPdialogExecDisplaySolution such 
that your updated writing method is called.

Best,
Gerald


On 19.05.2015 18:52, 贺行遒 wrote:
> Hello all,
>
> In the default settings, when using command "display solution", only 
> objective value and nonzero variables are printed out.
> What should I do if I want to also print the vardata with those 
> nonzero variable values?
>
> Best Regards,
> He Xingqiu
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20150527/b8b146eb/attachment.html>


More information about the Scip mailing list