I think the ug use scip to solve ILP problems. But I want to solve LP problems with ug and can not find the parameters to configure ug to solve with soplex.
Is it possible to do so, or the LP solver is scalable enough and does not the trouble?
UG is a framework for parallelizing the tree search. While there are some tricks to speed up the root as well (racing stage), it's best suited for MIP instances that require a lot of branch and bound nodes.
If you want to solve an LP in parallel, I suggest you try an interior point, aka barrier solver, as is implemented in CPLEX, Gurobi or Xpress. SoPex is a sequential simplex solver.
Related
I'm solving the VRP with Scip and want to choose the algorithm. In some of my instances, Scip solves the problem without the branch-and-bound tree in the root node; here I think cutting planes are executed. Cplex for example can choose prim Simplex or dual Simplex etc. to solve the Problem in this case.
Is there a possibility in Scip too? I use the parameters lp/initalgorithm=b (barrier) and lp/resolvealgorithm=b to make sure, in the branch-and-bound tree only this algorithm is used. But when Scip solves the problem in the root node, these parameters change nothing.
Thanks for your help!
So if I understand you correctly you want to always use barrier to solve the LP relaxations of your problem?
You need to make sure that the LP solver you are using supports this. If you use SoPlex as the LP solver in SCIP it does not have a barrier algorithm implemented and will fallback to solving with dual Simplex instead.
The LP solvers that support barrier are Cplex, Xpress, Gurobi, Mosek, and CLP
As far as i know Gurobi resumes optimizing where it left after calling Model.Terminate() and then calling Model.Optimize() again. So I can terminate and get the best solution so far and then proceed.Now I want to do the same, but since I want to use parts of the suboptimal solution I need to set some variables to fixed values before I call Model.Optimize() again and optimize the rest of the model. How can i do this so that gurobi does not start all over again?
First, it sounds like you're describing a mixed-integer program (MIP); model modification is different for continuous optimization (linear programming, quadratic programming).
When you modify a MIP model, the tree information is no longer helpful. Instead, you must resolve the continuous (LP) relaxation and create a new branch-and-cut tree. However, the prior solution may still be used as a MIP start, which can reduce the solve time for the second model.
However, your method may be redundant with the RINS algorithm, which is an automatic feature of Gurobi MIP. You can control the behavior of RINS via the parameters RINS, SubMIPNodes and Heuristics.
I know that column generation gives an optimal solution and it can be used with other heuristics. But does that make it an exact algorithm? Thanks in advance.
Traditional CG operates on the relaxed problem. Although it finds the optimal LP solution, this may not translate directly into an optimal MIP solution. For some problems (e.g. 1d cutting stock) there is evidence this gap is small, and we just apply the set of columns found for the relaxed problem to a final MIP knowing this is a good solution but necessarily optimal. So it is a heuristic.
With some effort you can use column generation inside a branch-and-bound algorithm (this is called branch-and-price). This gives proven optimal solutions.
An exact algorithm means that the algorithm can solve the optimization problem globally i.e it has given the global optima.
Column generation technique is conventionally applied to relaxed LP problem and tries to optimize the relaxed LP problem by constantly improving the current solution with the help of dual multipliers. It gives an exact LP solution for the relaxed LP problem. But sometimes in real-world problems, the exact solution of the relaxed Lp problem is not feasible to use, it needs to be translated to an integer solution in order to use it. Now if the problem scale is small, then there are many exact MIP algorithms (such as Branch and Bound) which can solve it exactly and give an integer solution. But if the problem is large-scale, even the exact MIP algorithms can take longer runtimes, hence, we use some special/intelligent heuristics to lower the difficulty of the MIP problem.
Summary: Column generation is an exact technique for solving the relaxed LP problem, not the original IP problem.
First, strictly speaking, all algorithms are heuristic, including Simplex Method.
Second, I think Column generation is a heuristic algorithm, because it solves the LP relaxation of the master problem. It does not guarantee IP optimal. Actually CG does not always converge very well.
In Gurobi, is it possible to see if a group of constraints and variables are feasible without actually optimizing the problem? It seems if the objective is a constant, Gurobi still does a lot of heavy computation to find an optimal solution, which I don't need!
Sorry. Except for very easy infeasibilities that can be detected in the presolver, Gurobi may have to do lots of work to prove whether the model is feasible or infeasible. No silver bullets here.
I am not sure if there is a better way to do this, but you can use either solution limits or time limits to stop the solver once a condition is met.
For example:
model.Params.SolutionLimit = n stops the solver once n solutions have been found.
model.Params.SolutionLimit = n stops the solver once it has run for n seconds too.
You can look at this gurobi parameters page for more info here
I have a large MIP problem, and I use GLPSOL in GLPK to solve it. However, solving the LP relaxation problem takes many iterations, and each iteration the obj and infeas value are all the same. I think it has found the optimal solution, but it won't stop and has continued to run for many hours. Will this happen for every large-scale MIP/LP problem? How can I deal with such cases? Can anyone give me any suggestions about this? Thanks!
The problem of solving MIPs is NP-complete in general, which means that there are instances which can't be solved efficiently. But often our problems have enough structure, so that heuristics can help to solve these models. This allowed huge gains in solving-capabilities in the last decades (overview).
For understanding the basic-approach and understanding what exactly is the problem in your case (no progress in upper-bound, no progress in lower-bound, ...), read Practical Guidelines for Solving Difficult Mixed Integer Linear
Programs.
Keep in mind, that there are huge gaps between commercial solvers like Gurobi / Cplex and non-commercial ones in general (especially in MIP-solving). There is a huge amount of benchmarks here.
There are also a lot of parameters to tune. Gurobi for example has different parameter-templates: one targets fast findings of feasible solution; one targets to proof the bounds.
My personal opinion: compared to cbc (open-source) & scip (open-source but non-free for commercial usage), glpk is quite bad.