I'm currently implementing column generation (variant of multi commodity flow). Note: i disabled presolving because i figured it would be easier for prototyping. In this scenario, the pricing works fine: the correct variables are added, constraints modified accordingly and so on - when no more variables are found during pricing, the primal bound given by SCIP prior to that round is the optimal objective value.
My problem is that the reported dual bound is "---" each iteration and SCIP doesn't recognise the solution as optimal.
I don't quite understand what happens internally, especially since the dual solutions SCIP is giving me during pricing (SCIPgetDualSolLinear()) are correct, one idea is that the objective function degenerates somehow.
The only relevant thing i could figure out is that it has something to do with presolving and marking constraints as modifiable.
If i don't mark constraints as modifiable, SCIP reports a proper dual bound, but pricing doesn't work because SCIPgetDualSolLinear() fails - My guess is that marking the constraint as modifiable kind of 'keeps it available for usage in pricing'? Anyway i wondered why the original constraint should be marked as modifiable, when variables are actually added to the constraints obtained from SCIPgetTransformedCons().
Whether presolving is on or off, not marking constraints as modifiable makes SCIP produce a dual bound but pricing fails as mentioned. The only exception to this: if i run the program with all variables already added and iff presolving is off, SCIPgetDualSolLinear() does not fail, even when the constraints are not marked as modifiable. In this case, a dual bound is also reported. I guess this supports the thought that the modifiable flag has something to do with 'preserving structure'.
I do hope this description was understandable and someone can point me in the right direction, i don't really have an idea on how to proceed.
Thanks
edit: i just tried setting the constraints obtained from SCIPgetTransformedCons() as modifiable, and not the original ones, but the results apparently stay the same.
edit2, additional info: I am reading in .lp files and use SCIPsetConsModifiable() during the call to activatePricerXyz(), but before calling activatePricer().