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

How to obtain LP feasible solution? And how to set time limit? #1134

Closed
juyoungwang opened this issue Sep 5, 2024 · 3 comments
Closed

How to obtain LP feasible solution? And how to set time limit? #1134

juyoungwang opened this issue Sep 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@juyoungwang
Copy link

Is your feature request related to a problem? Please describe.
Hi,
Thanks for providing such an amazing package!

I have two questions:

  1. I was wondering if there is any chance to obtain linear programming solution, instead of integer programming solution of branch-and-price algorithm.

The model I am solving is so huge, that the algorithm was not finding any primal feasible solution, though the gap between DB and mlp was very small.

Is there any way to retrieve this mlp solution from the solver? (so I can use some heuristics to use this solution for my problem.)

  1. To set the timelimit, I was using the following coluna parameters (stop algorithm after running time_limit_sec)
coluna = optimizer_with_attributes(
                                        Coluna.Optimizer,
                                        "params" => Coluna.Params(
                                            solver = Coluna.Algorithm.TreeSearchAlgorithm(
                                                conqueralg = Coluna.Algorithm.ColCutGenConquer(
                                                    colgen = Coluna.Algorithm.ColumnGeneration(
                                                        restr_master_solve_alg = Coluna.Algorithm.SolveLpForm(
                                                        get_ip_primal_sol = true, 
                                                        get_dual_sol = true
                                                        ),
                                                    ),
                                                ),
                                                timelimit = time_limit_sec,                                   
                                                opt_rtol = 10
                                            ),
                                        ),
                                        "default_optimizer" => Gurobi.Optimizer # Some solver for the master & the subproblems
                                    )

Unfortunately, the algorithm did not stop despite the timelimit parameter I provided. Do you have any suggestion here?

Thanks a lot, and have a great day!!

@juyoungwang juyoungwang added the enhancement New feature or request label Sep 5, 2024
@rrsadykov
Copy link
Collaborator

rrsadykov commented Sep 16, 2024

Dear @juyoungwang,

Sorry for a delay with the reply.

  1. For the moment, obtaining LP solution for a MIP problem is not possible, unless you define a cut separation callback. I believe, this is a standard behaviour for mathematical programming solvers. However, you can define your problem as an LP (all variables should be continuous, and not integer), and then you will get the LP solution. The LP solution is projected to the space of original (JuMP) variables. If you want to obtain the original non-projected solution (i.e., a value of every column in the solution), you should use the BlockDecomposition.getsolutions() function.
  2. Unfortunately, for the moment, the time limit is taken into account only in the branch-and-bound algorithm, and not inside the column generation algorithm. Thus if solving the LP relaxation by the column generation takes more time than the time limit, the algorithm will not stop until the column generation termination. But you can define a limit on the number of column generation iterations to "approximate" the time limit.

@juyoungwang
Copy link
Author

Dear @rrsadykov

Thanks a lot for your great support!

I think I now got deeper understanding about the package, and understood how to proceed.

Again, thanks for the answer, and have a great weekend!

@juyoungwang
Copy link
Author

I am closing this issue, as my questions were answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants