Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Branch callback function - lu values

    Posted Wed June 10, 2009 01:31 AM

    Originally posted by: SystemAdmin


    [hernan said:]

    Hi,

    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

    Any idea?

    Thanks!

    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Branch callback function - lu values

    Posted Wed June 10, 2009 07:38 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    [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
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Branch callback function - lu values

    Posted Mon June 15, 2009 12:54 AM

    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