<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi all,</p>
<p>I'm working on a project, where we need to solve a task
assignment-like problem. Briefly,<br>
- we have x-variables to assign quantities to operators in a
planning horizon,<br>
- we have y-variables to aggregate certain x-variables (i.e., y =
x + x + ... + x),<br>
- 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)),<br>
- and we have a lot of knapsack constraints on x-variables which
make the problem hard.<br>
</p>
<p>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.</p>
<p>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.<br>
1) I created a primal heuristic class from <b><font
face="monospace">scip::ObjHeur</font></b>.<br>
2) I got the current LP solution via <b><font face="monospace">SCIPlinkLPSol</font></b>.<br>
3) I created a new primal solution in the original space via <b><font
face="monospace">SCIPcreateOrigSol</font></b>.<br>
4) Then, for (original) x-variables I do the rounding: <b><font
face="monospace">SCIPgetSolVal -> SCIPfloor ->
SCIPsetSolVal</font></b>. (And for all the other variables I
also set the adjusted value via <font face="monospace">SCIPsetSolVal</font>).<br>
5) Unfortunately (for the second time), <b><font face="monospace">SCIPcheckSolOrig</font></b><b>
raises an error</b>: <font face="monospace">solution violates
original bounds of variable <t_x_47_128_2> [-0,0] solution
value <15></font><br>
</p>
<p>But, when I check the solution value of the original/transformed
variables <font face="monospace">x_47_128_2/</font><font
face="monospace">t_x_47_128_2</font> in the new solution, these
are not 15, but 0.</p>
<p>So, could you please help me if my approach is good or not, and
if yes, what can cause this checking error?</p>
<p>Best regards,<br>
Marko<br>
</p>
<p><br>
</p>
</body>
</html>