[Scip] Adding Primal Heuristic Solution Value

Stefan Heinz heinz at zib.de
Sun Mar 11 13:40:16 MET 2012


Hi,

you have to do same as the solution reader
http://scip.zib.de/doc/html/reader__sol_8h.html

1) Create a SCIP solution via SCIPcreateSol()
http://scip.zib.de/doc/html/scip_8h.html#a03da404f4153d8f673e87fb28bc7d552

2) Set the values of the solution via SCIPsetSolVal() or SCIPsetSolVals()
http://scip.zib.de/doc/html/scip_8h.html#adbb9f3c0c0b462481fe5eff677463258
http://scip.zib.de/doc/html/scip_8h.html#ab4007453cafad788430c2ad55129479f

3) Pass the solution to SCIP via SCIPaddSol() or SCIPtrySol()
http://scip.zib.de/doc/html/scip_8h.html#a9b51e1c9e28d3f6f9f45f37bfdb77897
http://scip.zib.de/doc/html/scip_8h.html#ae4041777d638e0bcbbb592946b520f15

Best Stefan


On 03/10/2012 11:49 PM, sheetal murkute wrote:
> Hi,
>
> I am solving MIP using SCIP. For that, I want to provide some primal
> heuristic solution values at the start of branch and bound.
> Should I use the routine SCIPsetSolVals for this?
>
> There are 350 continuous and 35 integer variables in my problem. I have
> solution with values of these 385 variables.
> Will setting "nvars=385, SCIP_Real* vals to these solution values, and var
> pointer for  variables" include the primal heuristic solution for my
> problem?
>
> SCIP_RETCODE<http://scip.zib.de/doc/html/type__retcode_8h.html#ac847f5a370187651fbc1b82d0170b480>
>   SCIPsetSolVals<http://scip.zib.de/doc/html/scip_8h.html#ab4007453cafad788430c2ad55129479f>
> (SCIP<http://scip.zib.de/doc/html/type__scip_8h.html#a4792a242d315bf76f05b1f4e0712bc33>
>   * *scip*,SCIP_SOL<http://scip.zib.de/doc/html/type__sol_8h.html#a76b0c06e8d5c166fe241cced9564ce90>
>   * *sol*,int *nvars*,SCIP_VAR<http://scip.zib.de/doc/html/type__var_8h.html#a032edd1f5032513d49e397ebdcc8915b>
>   ** *vars*,SCIP_Real * *vals* )
>
> Please let me know if this is incorrect or if there is any other method for
> this.
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list