How seed the SCIP solver of google or-tools? - 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.

Related

or-tools: set a timeout for SCIP solver

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)

Interior-point linear programing solver in MATLAB, with target barrier parameter option

Is there any linear programing solver, written for MATLAB, that (a) solves with the primal-dual interior point method, (b) the user has the options to set the target barrier parameter (he lowest value of barrier parameter for which the KKT system is solved)?
I currently use IPOPT, which has the target barrier parameter options.
However, at convergence, the product of dual*slack seems to only be approximately satisfied (with an error of say (+-)1e-7 for a target parameter of 1e-5).
I have tried to play around with the tolerances, but to no avail.
For MATLAB use, I recommend using CVX, which includes Gurobi, MOSEK, GLPK, and SDPT3. All of those can solve the linear program very efficiently.
CVX is very easy to use in MATLAB.

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

Optimization of multivariable function In Matlab

I have a function fun(x,y,z), such that say, x=1:10, y=50:60, z=100:105. Which optimization method (and how) I can use to get the minimum of this function, for example, where (x,y,z)=(3,52,101). I am working in Matlab.
Thank you for any help
Algorithms
There are many many algorithms out there that you can use for direct search optimization such as Nelder-Mead, Particle Swarm, Genetic Algorithm, etc.
I believe Nelder-Mead is a simplex optimization method which is used by fminsearch function in MATLAB.
Also, there is Genetic Algorithm which comes with MATLAB Global Optimization toolbox. You may want to give that a try as well.
Particle Swarm Optimization (PSO) is another direct search method that you can use. However, there is no official toolbox for Particle Swarm method built by Mathworks. The good news is there is quite a few PSO toolbox developed by other people. I personally have used this one and am quite happy with the performance. Its syntax is similar to Genetic Algorithm functions that come with Global Optimization Toolbox.
Discrete Optimization
Regarding your question that you are looking for a set of integer values namely x,y, and z corresponding to the minimum objective function value, I would add a part at the beginning of the objective function that rounds the variables to the closest integers and then feeds them to your main function fun(x,y,z). This way you would discretize your function space.
I hope my answer helps.

How to use integer and binary variables with matlab GA toolbox?

I used matlab GA toolbox to solve an integer programming problem. The problem has some binary variables.
I used nonlinear constraints such as x*(1-x) = 0 for binary variables, but matlab outputs real values for these variables.
One another problem is that final solution is not feasible! I used this line of code:
options = gaoptimset(options,'CreationFcn', #gacreationlinearfeasible);
But matlab still generating no feasible solutions.
A friend suggested using inequality constraints instead of equality ones, but that failed.
Then there is two problems. 1) say matlab about binary variables, 2) generating feasible solutions.
How can I use matlab GA for my problem?
I'm not sure it is best solution, but I solved my problem by substitute constraints for penalty coefficients in fitness function.
After all, as a suggestion, anyone who has same problem can try GAlib (C++ genetic library) instead of matlab.