[Scip] Set a primal solution

Gregor Hendel hendel at zib.de
Thu Jul 11 13:17:36 MEST 2013


Hi Rotislav,

when you invoke SCIPfreeTransform(), found solutions are retransformed
and thus "lifted" to the original space, so that they survive
the freeing process.

regards,
Gregor

Am 11.07.2013 11:58, schrieb Rostislav Stanek:
> Dear Michael,
> excuse me, that I am writing again, but I have a small additional
> question: If I use the second proposed option (I do not want that the
> heuristic runs more times) and then call "SCIPfreeTransform" and after
> that add some global constraints, do I have to set the solution again
> also if I know that the solution remains feasible? Or do I have to
> check the solution again via "SCIPtrySol()" / "SCIPtrySolFree()"?
> Thank you again in advice.
> Best regards,
> Rostislav Stanek
>
> Dne 10.7.2013 17:30, michael.winkler at zib.de napsal(a):
>> Hi Rostislav,
>>
>> you can write a heuristic plugin setting the timing to
>> SCIP_HEURTIMING_BEFOREPRESOL. This heuristic will then be called only
>> before presolving of the whole problem (might be multiple times when a
>> restart happens).
>> Take a look at the heur_trivial.c for further details.
>>
>> When creating a solution via SCIPcreateSol() the solution vector will
>> contain zero values for all variables implicitly.
>>
>> You then need to use SCIPsetSolVal()/SCIPsetSolVals() to set solution
>> values for the variables.
>>
>> Afterwards please use SCIPtrySol()/SCIPtrySolFree() which will check the
>> correctness of the solution and if so SCIP will store the solution and
>> also update the primalbound and cutoffbound. (So, there is no need to
>> add
>> you extra "bound constraint" anymore, when adding a solution.)
>>
>> Please take a look at:
>> http://scip.zib.de/doc/html/HEUR.shtml
>> http://scip.zib.de/doc/html/scip_8h.shtml#a03da404f4153d8f673e87fb28bc7d552
>>
>> http://scip.zib.de/doc/html/scip_8h.shtml#adbb9f3c0c0b462481fe5eff677463258
>>
>> http://scip.zib.de/doc/html/scip_8h.shtml#ab4007453cafad788430c2ad55129479f
>>
>> http://scip.zib.de/doc/html/scip_8h.shtml#ae4041777d638e0bcbbb592946b520f15
>>
>> http://scip.zib.de/doc/html/scip_8h.shtml#af00de2379f996445b4497db79e7449f0
>>
>>
>> Best, Michael
>>
>>> Dear SCIP community,
>>> I excuse me for this question which should be clear for me, but how
>>> should I correctly set a primal solution before starting the solving
>>> process? I solve an ILP using the SCIP solver and before starting the
>>> process I would like to set a heuristical primal solution which would
>>> also define a bound (this heuristic should not be called during the
>>> solving process more). I set the bound as a global constraint, but I do
>>> not know how to set the solution. Can I use
>>> âEURoeSCIPcreateSolâEUR?? And what
>>> does it mean âEURoecreates a primal solution, initialized to zeroâEUR??
>>> Thank you very much in advance.
>>> Yours faithfully,
>>> Rostislav Stanek
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> http://listserv.zib.de/mailman/listinfo/scip
>>>
>
>
>
> _______________________________________________
> 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/mailman/private/scip/attachments/20130711/1a73ab52/attachment.html


More information about the Scip mailing list