or-tools: set a timeout for SCIP solver - or-tools

The or-tools Python package does not describe how to set the timeout for a mixed integer programming SCIP solver.
The method for the CP-SAT solver does not exist for SCIP solver.

By looking at source code, the appropriate method is
solver.set_time_limit(10_000)

Related

How seed the SCIP solver of google or-tools?

As far as I know, other solvers which are available in or-tools can set specific random seed, but i couldn't find the way for scip solver.
How can I seed the SCIP solver?
I am not that familiar with or-tools. But the random seed in SCIP is an integer parameter. So any way you would change another parameter is how you change the random seed. To me it seems there is a setParams function in or-tools that should do the trick.

Solver interface needed for MIQP problem Gurobi/MATLAB

I am somewhat new to Gurobi and I had a question regarding which solver interface to use for solving an MIQP problem using MATLAB and Gurobi as a solver. I have already successfully solved some MILP problems using the intlinprog function in MATLAB (and Gurobi as a solver). However, no such simple function for solving MIQP's exist in MATLAB. Which function or interface should I use and how do I go about this?
Quadratic objective and constraints are supported by the Gurobi interface for MATLAB; it is described under model argument subsection of the MATLAB API Details section of the Gurobi Optimizer Reference Manual.

SCIP Executable for Pyomo

I wish to use the SCIP solver with Pyomo to solve a MILP non linear problem as it is one of the fastest solvers out there.
But when I set the solver as "scip" in SolverFactory function of the library, I get an error saying "scip" executable not found.
I understand that to use any solver, we need to have it's executable in the PATH.
I have tried different solvers like Bonmin, Couenne. Their executable were readily available to download from the AMPL webstie itself but I was not able to find the SCIP executable (don't know why is that, since it is opensource)
Following this, I tried researching into making my own SCIP executable and stumbled upon this link: http://www.zverovich.net/2012/08/07/using-scip-with-ampl.html
But the instructions are for linux! So if someone could direct me into the direction of a scip executable or instructions for how to build a scip executable for windows then it would be great!
Thanks in advance!
You can download SCIP executables/installers for different platforms here:
https://scip.zib.de/#download
See section "Executables" for precompiled files including the AMPL interface.
According to the AMPL documentation, SCIP is not officially supported anymore.
A better alternative is to use PySCIPOpt: You should be able to formulate your models in a very similar fashion, including nonlinear constraints, and you avoid having to write out the model to a file and read it back in with the solver.

Speed of CPLEX vs CPLEX using SCIP

I am new to LP and have only briefly used PuLP in Python.
Why is there a speed difference between SCIP 3.2.1 - CPLEX 12.63 and CPLEX 12.6.3? Doesn't SCIP still use CPLEX for solving?
Why will someone use SCIP with CPLEX solver, instead of using CPLEX directly?
What is this difference about
This plot is not showing a LP-benchmark, but a Mixed-integer programming benchmark.
Mixed-integer programming solvers typically use a branch-and-cut-based algorithm (including heuristics and co.), where a lot of relaxations are solved (in sequence; treating binary-/integer-variables as continuous resulting in an LP-problem).
One decision then is to choose how to solve these relaxed subproblems. The most simple decision (there are many more; e.g. tuning the Simplex-algorithm's parameters; it get's even more complex when solving problems with nonlinear-conic objectives) is to choose the LP-solver.
SoPlex is a LP-solver implementation by the SCIP-team. Meaning:
SCIP - SoPlex will use SCIP's algorithm for MIP (handling branching, cut-generation and co.) using SoPlex as solver for the internal LP-subproblems
SCIP - CPLEX will use SCIP's algorithm for MIP using CPLEX as solver for the internal LP-subproblems
Why using SCIP with CPLEX (instead of using a pure CPLEX approach)
The why is not that easy to explain.
Keep in mind, that all MIP-solvers are heuristics-based and on some problems SCIP will be faster than CPLEX (despite the underlying LP-solver selected).
Keywords for some theory: NP-hardness (of MIP) and the No free lunch theorem
Faster could mean: faster due to the MIP-based strategies, not the speed of the underlying LP-solver so that you may even gain an overall speedup using CPLEX on the subproblems!
The two solvers (MIP-solvers) are probably also much different in regards to parameters & accessibility (of internal algorithmic components). It's obvious, that you can tune SCIP in a much more general way than CPLEX (because it's open source)
As mattmilten mentioned in the comments: SCIP and CPLEX are also different in regards to the support of problem-classes which can be solved. One example of this might be the possibility for some special nonlinear-constraints (resulting in a MINLP). Using SCIP for these kind of problems, can still use CPLEX' LP-solver internally (same arguments as above)

Setting multiple cores option with cplex matlab toolbox function cplexmilp

I am using CPLEX for MATLAB toolbox wherein I formulate my MILP as a huge matrix and use the function cplexmilp to call the solver. Since the model I am solving is really huge, I intend to set the option of using multiple processors to speed up the solving of the MILP. I went through the manual but I could not find any specific solution for my case. I'd be grateful if anyone could help me find a solution to this issue.
CPLEX Toolbox Function
Thanks Everyone