Quantcast

Specifying branching priority in JuMP/CPLEX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Specifying branching priority in JuMP/CPLEX

Claudio Contardo
Hello,

As of release 0.14 of JuMP, it is still not possible to specify a branching priority for a MIP. I am trying to solve this single-source capacitated facility location problem by B&C using JuMP/CPLEX. In this problem, the location decisions usually have a much larger impact on the bound than the assignment decisions, so branching on those variables first is only natural. In <a href="https://groups.google.com/forum/#!searchin/julia-opt/branching|sort:relevance/julia-opt/XRsNJiZ6_CU/WOdl9hMlCQAJ">this topic someone suggests to use the functions provided in the CPLEX module directly, however I do not know what is the right way to do so. A sketch of my code is something like:

model= Model(solver = CplexSolver())
@variable(model,y[1:m],Bin)
@variable(model, x[1:m,1:n],Bin)

############################
#add a bunch of constraints#
############################

####################################
#specify branching priorities, how?#
####################################

solve
(model)


--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Specifying branching priority in JuMP/CPLEX

Joey Huchette-2

This is still a CPLEX-specific feature (as mentioned in the other thread). You’ll need to work with the CPLEX-level model object (internalmodel(model).solver) and the “linear indices” of the variables (accessible as, e.g. linearindex(y[1])).

-Joey


On Tue, Nov 1, 2016 at 7:26 PM, Claudio Contardo <[hidden email]> wrote:
Hello,

As of release 0.14 of JuMP, it is still not possible to specify a branching priority for a MIP. I am trying to solve this single-source capacitated facility location problem by B&C using JuMP/CPLEX. In this problem, the location decisions usually have a much larger impact on the bound than the assignment decisions, so branching on those variables first is only natural. In this topic someone suggests to use the functions provided in the CPLEX module directly, however I do not know what is the right way to do so. A sketch of my code is something like:

model= Model(solver = CplexSolver())
@variable(model,y[1:m],Bin)
@variable(model, x[1:m,1:n],Bin)

############################
#add a bunch of constraints#
############################

####################################
#specify branching priorities, how?#
####################################

solve
(model)


--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Specifying branching priority in JuMP/CPLEX

Claudio Contardo
Thanks Joey,

I was indeed capable of making it work :-)

Best regards,

Claudio

On Tuesday, November 1, 2016 at 9:01:06 PM UTC-4, Joey Huchette wrote:

This is still a CPLEX-specific feature (as mentioned in the other thread). You’ll need to work with the CPLEX-level model object (internalmodel(model).solver) and the “linear indices” of the variables (accessible as, e.g. linearindex(y[1])).

-Joey


On Tue, Nov 1, 2016 at 7:26 PM, Claudio Contardo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="6D3NNlNRBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ccon...@...> wrote:
Hello,

As of release 0.14 of JuMP, it is still not possible to specify a branching priority for a MIP. I am trying to solve this single-source capacitated facility location problem by B&C using JuMP/CPLEX. In this problem, the location decisions usually have a much larger impact on the bound than the assignment decisions, so branching on those variables first is only natural. In <a href="https://groups.google.com/forum/#!searchin/julia-opt/branching%7Csort:relevance/julia-opt/XRsNJiZ6_CU/WOdl9hMlCQAJ" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/forum/#!searchin/julia-opt/branching%7Csort:relevance/julia-opt/XRsNJiZ6_CU/WOdl9hMlCQAJ&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/forum/#!searchin/julia-opt/branching%7Csort:relevance/julia-opt/XRsNJiZ6_CU/WOdl9hMlCQAJ&#39;;return true;">this topic someone suggests to use the functions provided in the CPLEX module directly, however I do not know what is the right way to do so. A sketch of my code is something like:

model= Model(solver = CplexSolver())
@variable(model,y[1:m],Bin)
@variable(model, x[1:m,1:n],Bin)

############################
#add a bunch of constraints#
############################

####################################
#specify branching priorities, how?#
####################################

solve
(model)


--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="6D3NNlNRBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">julia-opt+...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/julia-opt" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/julia-opt&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/julia-opt&#39;;return true;">https://groups.google.com/group/julia-opt.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Loading...