Originally posted by: SystemAdmin
[hernan said:]
[quote author=prubin link=topic=1195.msg3422#msg3422 date=1244601498]
[quote author=hernan link=topic=1195.msg3421#msg3421 date=1244579440]
I'm setting a callbackfunction for branching using CPXsetbranchcallbackfunc. When I inspect the parameter values in the callback functions seems everything is ok but lu array. I expect 'L', 'U' and 'B' char values, but for some reason I get different values inspecting lu[indices[nodebeg[i]]], i = 0,..., nodecnt
<sigh> Someone (John Gregory, are you reading this?) needs to post a prominent message somewhere warning people not to write left bracket - i - right bracket if they want i to be an index; the forum software interprets it to mean "start using italics". (Even better would be if someone could disabuse the software of thinking that.)
Anyway, switching to round brackets purely to placate the forum software, I don't think you want to use indices in the indexing of lu. If you let j = nodebeg(i), then indices(j) points to the variable being branched on, lu(j) indicates which bound(s) is (are) changed in branch i, and bd(j) provides the value for that bound. If multiple variables are involved in the i-th branch, then you also look at indices(j+1), lu(j+1), bd(j+1) and similarly until j = nodebeg(i+1) - 1.
/Paul
Yes, I've not manipulated the variables correctly. Thanks!
#CPLEXOptimizers#DecisionOptimization