[Scip] Problem with SCIPsetSolVal/Heuristic

Timo Berthold berthold at zib.de
Tue Aug 6 15:12:48 MEST 2013


Hi Daniel,

> What would be the right way to set the variables?
First of all: Setting the x_i such that they sum up to at least two. ;-)

Note that a solution that is created by
SCIP_CALL( SCIPcreateSol(scip, &newsol, heur) );
will be initialized to zero ( no matter what the bounds of the variables are.
Then, do you set the last three SCIP_Bool check... to TRUE when trying the
solution?
SCIP_CALL( SCIPtrySol(scip, newsol, FALSE, TRUE, TRUE, TRUE, &success) );
Also: might it be that your algorithm partially operates on original
variables when it should work on the transformed?

Finally: Did you compile SCIP in debug-mode?

Cheers,
Timo

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I'm having a problem with a primal heuristic plugin. In my ILP
> problem, I have an aggregated variable
>
> y = x_1 + x_2 + ... + x_k,
> y >= 2,
>
> which is also present in the objective function. I want to provide a
> primal solution via a heuristic. When I use
>
> SCIPsetSolVal(scip, *sol, y, val)
>
> SCIP aborts with
>
> [src/scip/sol.c:969] ERROR: cannot set solution value for multiple
> aggregated variable
>
> If I set the value for y indirectly by only calling SCIPsetSolVal on
> the x_i, then y is 0 in the solution and I also get
>
> solution violates original bounds of variable <y> [2,1e+20] solution
> value <0>
> best solution is not feasible in original problem
>
> What would be the right way to set the variables?
>
>
> Best regards,
>
>   Daniel
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSAODXAAoJELCekmNumMR6XyEH/iu0dA4ViHMUgwbHTcJNi5BT
> orW6BOixyI1+ZJBdztY2GR7vJtuqUWaYI2jGuKNZkQSoUaiEG0ALIN0SzpMfZaOM
> 8gf3O0C/wiJ24CgJLMDOgw77yxVWYX6pjSPkfbqC1ju7yHhkRVNl8G59B8FJv1Je
> 3clwCUKor+VoZa6/CbcV5wG/H5hUIzJ0W1hBlKE5IML8goYnMlALwAT99DOkMD/i
> 7HNBN+NRcYyj72+DEpUKLpZN607FqlQnaVCRpsGGYbYMsoHbaR7qANdWzohArz0q
> L5SvkSN8zz1A7BlvvzoG/0eujP8Bxm6dIkvWrYijaf64dfNOtmSfQVFIPxs0Ql4=
> =xJme
> -----END PGP SIGNATURE-----
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list