SCIP Executable for Pyomo - nonlinear-optimization

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.

Related

How compile m-file without installed Matlab?

What is the simplest way to compile m-file without installed matlab?
And can someone say when will users get possibility for compiling programs with training networks (not only using training networks in compiling)?
MATLAB is not a compiled language, it is interpreted at runtime, so you need to have MATLAB installed to run a m-File (script). You can use the MATLAB compiler software to create a standalone application from an m-File or a function.
To run an m-file without having MATLAB, you can use GNU Octave. Octave is an open-source software which has almost the same syntax and functionality as MATLAB. They are not 100% identical though, so you will have to migrate your script. As mentioned in this question, code which runs in MATLAB will almost always run in Octave too, so it should work quite well.
for very basic scripting you can use this online octave(/matlab) compiler I found http://www.tutorialspoint.com/matlab/try_matlab.php There are some limitations of course, but for basic scripts it works well

Run OpenCL from MATLAB

I've been searching around for some way to easily interface opencl code with MATLAB code, however most of what I've found is several years old and I'm wondering if it's still applicable.
Does anyone know of a way to do this?
Have you tried the OpenCL Toolbox?
Also the MATLAB Parallel Computing Toolbox may be a useful alternative if you have the license for it.
Also see Jacket.
The last two may require you to rewrite your code in the matlab language, if that is an acceptable price.

Using a MATLAB code on Scilab

Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB?
There is a tool to automatically convert Matlab source to Scilab source, it's called M2SCI. A script parses the Matlab source code and replaces Matlab-specific functions by Scilab ones. See the documentation of the mfile2sci function.
Yes you can use MATLAB code on scilab. See these links for more information:
http://help.scilab.org/docs/5.4.0/fr_FR/section_36184e52ee88ad558380be4e92d3de21.html
http://help.scilab.org/docs/5.4.0/en_US/index.html
I would not bet on it. But if your code is simple enough chances are good.
Problems are:
There is encrypted p-code in Matlab that Scilab will not be able to open.
Matlab usually comes with a number of toolboxes that might not be available to you (i think especially Simulink)
last but not least (i don't know about scilab) there usually are minute differences in how functions are implemented.
There are a number of projects out there trying to replicate/replace MATLAB:
Julia language: which has a relatively similar syntax to MATLAB and offers great performance, but still lacks a lot of toolboxes/libraries, as well as not having a GUI like MATLAB. I think this has the brightest future among all MATLAB alternatives.
Python language and its libraries NumPy and matplotlib: which is the most used alternative. I think at this moment the community is a couple of orders of magnitude even bigger than MATLAB. Python is the de facto standard in machine learning and data science at the moment. But still, the syntax and memory concept is a bit far from what people are used to in the MATLAB ecosystem. There are also no equivalent to SIMULINK, although Spyder and Jupyter projects have come a long way in terms of the development environment.
Octave: is basically a clone of MATLAB to a point they consider any incompatibility as a bug. If you have a long MATLAB code that you don't want to touch, this is the safest bet. But again no alternative for SIMULINK.
SciLab and it's fork ScicoLab are the best alternatives in terms of GUI, having a SIMULINK replica xcos / scicos and a graphical user interface development features. However the community is not as big as Octave and the syntax is not completely compatible. Sadly the Scilab development team has gone through a devastating family crisis leading to the software falling behind.
Honorary mention of Modelica language implementations OpenModelica and jModelica for being a superior alternative to SIMULINK-SimScape. You should know that you can load Modelica scrips also in xcos and scicos. If you want to kno wmore about JModelica you may see this post.
you may check the MATLAB's Alternativeto page to see more Free and Open source alternatives.

Levenberg-Marquardt optimization

Anyone knows where I cand find an .m (matlab ) file with the Levenberg-Marquardt moditication to the Newton's method to optimize a function?
Thanks
I always start with a search on file exchange. Found a LMF nonlinear solution. It also seems that there is a lsqnonlin function in The optimization toolbox. Of course that costs a small fortune and limits the portability of your code (one of many reasons I use Python these days).
You can try using the MATLAB MEX version of CMPFIT, if that fits your purpose.
Try it here: http://people.cas.uab.edu/~mosya/cl/MATLABcircle.html
This is a web-page from proffesor Chernov, who published some papers and a book on the matter. There are also c and matlab sources.

Which is a better method? libsvm or svmclassify?

I have been recently trying to use svm for feature classification. While i was doing so, a question came to my mind.
Which would be a better method to use, LIBSVM or svmclassify? What I mean by svmclassify is to use in-built functions in MATLAB such as svmtrain and svmclassify. In that sense, I was interested to know which method would be more accurate and which would be easier to use.
Since MATLAB has already the Bioinformatics toolbox already, why would you use LIBSVM? Aren't the functions like svmtrain and svmclassify already built in.. what additional benefits does LIBSVM bring about?
I would like to hear some of your opinions. Please Pardon me if the question is stupid..
I expect you would get very similar result using each library.
They are both very easy to use. The only big difference is that one comes with the MATLAB Bioinformatics toolbox and the other one you need to obtain from the authors web site and install by hand. If to you this is an issue I would recommend you stick to what is already installed in your computer. If not consider using LIBSVM, as it is a very well tested and well regarded library.
Also, from personal experience on playing with both, libSVM is much faster than MATLAB svm routines for obvious reasons. Last but not the least, libSVM has MATLAB plugins which can be called from MATLAB if you are more comfortable within a MATLAB environment.
I have also the same question, but I think that Libsvm is very useful and very easy in the case of multi-classes classification , but the matlab toolbox is designed for only two classes classification.
In my experience the libsvm performed giving cross validaion results as 45% where matlab code did 90%. So I looked up the explanation of matlab function for svm where they had such options related with perceptrones, I wonder if they are using pure svm or not but will write again in my case matlab was much better. (multiclass svm)