Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CapacitatedVehicleRouting demo utilization problem #498

Closed
ysu1028 opened this issue Apr 6, 2021 · 4 comments · Fixed by #564
Closed

CapacitatedVehicleRouting demo utilization problem #498

ysu1028 opened this issue Apr 6, 2021 · 4 comments · Fixed by #564
Assignees
Labels
documentation Need or contain documentation usage

Comments

@ysu1028
Copy link

ysu1028 commented Apr 6, 2021

Hello,

I'm implementing the dial-a-ride problem using pricing callbacks to generate a new entering column in the master problem and I'm referring to your work of CapacitatedVehicleRouting demo:https://github.com/atoptima/ColunaDemos.jl/tree/master/src/CapacitatedVehicleRouting

I'm confused about:

  1. how to make the master problem and subproblem being iteratively solved using callback?
  2. should I feed the model.jl with the initial solution?
  3. from model.jl, I can only get the defined cvrp model, x (variables), and decomposed model, how can I use the code to obtain the results? I'm quite confused about the whole process...

If there is a small example for the implementation of the pricing callback that could be very helpful!

the status of my packages:
Gurobi v.0.8.1
JuMP v.0.21.4
MathOptInterface v0.9.20
BlockDecomposition v1.2.5

Thank you in advance!

Best,
Yue

@ysu1028 ysu1028 added the enhancement New feature or request label Apr 6, 2021
@guimarqu
Copy link
Contributor

guimarqu commented Apr 6, 2021

Hi,

You have documentation about the pricing callback here : https://atoptima.github.io/Coluna.jl/latest/user/callbacks/#Pricing-callback . The example should work.

  1. The master problem must be solved using a (MI)LP solver. You can solve pricing problems using a pricing callback. You have to define the callback and use the method specify!.
  2. You don't have to feed the model with an initial solution because the master formulation has artificial variables. So column generation starts with a kind of phase 1.
  3. You can optimize the model and retrieves the value of the variables like you would do with any JuMP model. The solution of the master formulation is automatically projected to the original formulation.

@guimarqu guimarqu added documentation Need or contain documentation usage and removed enhancement New feature or request labels Apr 6, 2021
@ysu1028
Copy link
Author

ysu1028 commented Apr 6, 2021

3. The solution of the master formulation is automatically projected to the original formulation.

Thank you so much for your fast and detailed reply!

I also referred to https://github.com/atoptima/Coluna.jl/issues/404. Now the cvrp demo can run on my computer :)
I use coluna to be the optimizer which is defined as:

coluna = optimizer_with_attributes(
Coluna.Optimizer,
"params" => Coluna.Params(
solver = Coluna.Algorithm.TreeSearchAlgorithm() # default BCP
),
"default_optimizer" => Gurobi.Optimizer # Gurobi for the master & the subproblems
)

two points that are still not clear for me:

  1. Coluna.Algorithm.TreeSearchAlgorithm() is used to solve both the master problem and pricing sub-problem?

  2. by using the method specify! which in this case is:
    specify!(subproblems[1], lower_multiplicity = 0, upper_multiplicity = 20, solver = route_pricing_callback)
    we actually replace the solver = Coluna.Algorithm.TreeSearchAlgorithm() with route_pricing_callback, right? so if question 1 is yes, the master problem will also be solved by route_pricing_callback? Or it will only change the method for solving the subproblem and the master problem will still be solved by Coluna.Algorithm.TreeSearchAlgorithm()?

Thank you very much for your time and efforts! Your reply will definitely help me a lot!

Best,
Yue

@guimarqu
Copy link
Contributor

guimarqu commented Apr 7, 2021

  1. TreeSearchAlgorithm solves the master IP. The subsolver (defined using default_optimizer parameter or by assigning a solver to the master using specify!) solves the master LP and the restricted master IP if you use restricted master heuristic.

specify!(subproblems[1], lower_multiplicity = 0, upper_multiplicity = 20, solver = route_pricing_callback)

the first subproblem will be solved using the pricing callback route_pricing_callback. Other subproblems and the master are solved by the MILP solver defined in default_optimizer.

@ysu1028
Copy link
Author

ysu1028 commented Apr 7, 2021

specify!(subproblems[1], lower_multiplicity = 0, upper_multiplicity = 20, solver = route_pricing_callback)

Thank you very much for the reply!

It cannot be more clear!

Best,
Yue

@guimarqu guimarqu mentioned this issue Jul 20, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Need or contain documentation usage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants