[SCIP] creating and checking solution in the original space

HORVÁTH Markó marko.horvath at sztaki.hu
Thu Oct 13 09:31:18 CEST 2022


Hi all,

I'm working on a project, where we need to solve a task assignment-like 
problem. Briefly,
- we have x-variables to assign quantities to operators in a planning 
horizon,
- we have y-variables to aggregate certain x-variables (i.e., y = x + x 
+ ... + x),
- we have surplus/backlog variables to handle stock level (i.e., y(t) + 
s(t-1) + b(t) = s(t) + b(t-1) + demand(t)),
- and we have a lot of knapsack constraints on x-variables which make 
the problem hard.

Because on bigger instances SCIP hardly finds an integer feasible 
solution, I'm about to create a primal heuristic method. That is, I want 
to round down the LP values of the x-variables, and adjust the other 
variables to satisfy the aggregation and balance equations.

I want to work on original variables, because preprocessing may change 
variable bounds, and the created solution would be infeasible (and I 
also should deal with multi-agregated variables, etc.). It is not 
problem for me, if I cannot store the solution in SCIP, but I want to 
check its feasiblity.
1) I created a primal heuristic class from *scip::ObjHeur*.
2) I got the current LP solution via *SCIPlinkLPSol*.
3) I created a new primal solution in the original space via 
*SCIPcreateOrigSol*.
4) Then, for (original) x-variables I do the rounding: *SCIPgetSolVal -> 
SCIPfloor -> SCIPsetSolVal*. (And for all the other variables I also set 
the adjusted value via SCIPsetSolVal).
5) Unfortunately (for the second time), *SCIPcheckSolOrig**raises an 
error*: solution violates original bounds of variable <t_x_47_128_2> 
[-0,0] solution value <15>

But, when I check the solution value of the original/transformed 
variables x_47_128_2/t_x_47_128_2 in the new solution, these are not 15, 
but 0.

So, could you please help me if my approach is good or not, and if yes, 
what can cause this checking error?

Best regards,
Marko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20221013/ee7af0bc/attachment.html>


More information about the Scip mailing list