[Scip] Problem with SCIPsetSolVal/Heuristic

michael.winkler@zib.de michael.winkler at zib.de
Wed Aug 7 00:58:52 MEST 2013


Hi Daniel,

in addition to Timos answer, SCIP already presolved your problem and
multi-aggregated your variable y. After this creating a solution (in
transformed space) must not contain any value for y, because this variable
is not active anymore. Also, y needs to be bigger or equal to 2, which
means that, what Timo said, "Setting the x_i such that they sum up to at
least two".

So, a solution in original space will only be accepted (if valid) for
sure, if you provide it before presolving. Later, due to presolving
reductions, even globally valid solution might be dismissed.

Best, Michael


> 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
>>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list