[Scip] How to get last best result of the simplex algorithm after iterlimit is reached?
Gerald Gamrath
gamrath at zib.de
Wed Nov 20 23:37:08 CET 2013
Dear Norbert,
doing a dive of depth one or using the probing mode also with just one
node at a time is exactly the right thing to do in order to add strong
branching to a constraint handler. I discussed the issue you are
mentioning with Marc Pfetsch a few days ago and fixed the problem in our
master branch so that SCIPgetLPObjval() will return the current LP value
if a limit is reached. This will be included in SCIP 3.1 which is to be
released early next year.
By the way: the new strong branching with propagation which will also be
included in the next release might already do what you are currently
implementing. It performs domain propagation after adding the strong
branching bound, so after setting binvar to 1.0, the propagation of the
indicator constraint handler should fix slackvar to 0.0 and you should
get the same result.
Best,
Gerald
Am 20.11.2013 21:18, schrieb Norbert Fabritius:
> Dear SCIP developers,
>
> I currently try to add strong branching to the indicator constraint handler.
> (in the function enforceIndicators in cons_indicator.c)
> My first attempt is to do a dive of depth one like this:
>
> SCIP_CALL( SCIPstartDive(scip) );
> SCIP_CALL( SCIPchgVarLbDive(scip, binvar, 1.0) );
> SCIP_CALL( SCIPchgVarUbDive(scip, slackvar, 0.0) );
> SCIP_CALL( SCIPsolveDiveLP(scip, 50, &lperror, &cutoff) );
>
> [… handle errors …]
>
> node1objdiff = REALABS( SCIPgetLPObjval(scip) - parentobjval );
> SCIP_CALL( SCIPendDive(scip) );
>
> [… similar code for node 2…]
>
> However, when the iteration limit (50 in this case) is reached, SCIPgetLPObjval will return -SCIPsetInfinity(set). It traced this behavior down to this line:
>
> http://scip.zib.de/doc/html_devel/lp_8c_source.shtml#l13009
> Is there a way to get the last best value of the simplex algorithm instead of -infinity?
> Or is there perhaps a better way to implement strong branching in a constraint handler instead of doing a dive of depth one?
>
> Best regards,
> Norbert Fabritius
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list