Commit f9821498 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis Committed by GitHub
Browse files

Merge pull request #173 from resibots/improve_doc [ci skip]

Fix for #172
parents 4dec493f 9e767409
......@@ -251,7 +251,7 @@ To call an optimizer (e.g. NLOptGrad):
std::cout <<"Result with LBFGS:\t" << res_lbfgs.transpose()
<< " -> " << my_function(res_lbfgs).first << std::endl;
Not all the algorithms support bounded optimization:
Not all the algorithms support bounded optimization and/or initial point:
+-------------+---------+-------+
......@@ -259,15 +259,17 @@ Not all the algorithms support bounded optimization:
+=============+=========+=======+
|CMA-ES | yes | yes |
+-------------+---------+-------+
| NLOptGrad | ? | ? |
| NLOptGrad | \* | \* |
+-------------+---------+-------+
| NLOptNoGrad | ? | ? |
| NLOptNoGrad | \* | \* |
+-------------+---------+-------+
|Rprop | no | ? |
|Rprop | no | yes |
+-------------+---------+-------+
|RandomPoint | yes | no |
+-------------+---------+-------+
\* All NLOpt's global optimizers must have bounds. Check `NLOpt's reference <http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms>`_ to see which algorithms support initial point.
Available optimizers
^^^^^^^^^^^^^^^^^^
......
.. _basic-example:
Basic Example
=================================================
......
......@@ -23,18 +23,29 @@ For OSX with brew:
brew install eigen3
brew install boost
We highly recommend that you install NLOpt. Infortunately, the Ubuntu packages are missing the C++. You can get NLOpt here: http://ab-initio.mit.edu/wiki/index.php/NLopt
We highly recommend that you install NLOpt. Unfortunately, the Ubuntu packages do not provide NLOpt's C++ bindings. You can get NLOpt here: http://ab-initio.mit.edu/wiki/index.php/NLopt [mirror: http://members.loria.fr/JBMouret/mirrors/nlopt-2.4.2.tar.gz]
For Ubuntu / Debian:
::
wget http://ab-initio.mit.edu/wiki/index.php/NLopt/TODO
tar zxvf TODO
cd TODO
./configure --with-cxx --enable-shared --without-python --without-matlab --without-octave
sudo make install
sudo apt-get -qq update
sudo apt-get -qq --yes --force-yes install autoconf automake
wget http://members.loria.fr/JBMouret/mirrors/nlopt-2.4.2.tar.gz
tar -zxvf nlopt-2.4.2.tar.gz && cd nlopt-2.4.2
./configure -with-cxx --enable-shared --without-python --without-matlab --without-octave
sudo make install
sudo ldconfig
For OSX:
::
wget http://members.loria.fr/JBMouret/mirrors/nlopt-2.4.2.tar.gz
tar -zxvf nlopt-2.4.2.tar.gz && cd nlopt-2.4.2
./configure -with-cxx --enable-shared --without-python --without-matlab --without-octave
sudo make install
For more options and troubleshootings, see the :ref:`Compilation tutorial <compilation-tutorial>`.
For more options and troubleshooting, see the :ref:`Compilation tutorial <compilation-tutorial>`.
Compile Limbo
-----------------
......@@ -44,6 +55,9 @@ Compile Limbo
./waf configure
./waf build
For more options and troubleshooting, see the :ref:`Compilation tutorial <compilation-tutorial>`.
Create a new experiment
---------------------------
......@@ -60,6 +74,22 @@ Edit the "Eval" function to define the function that you want to optimized
$EDITOR exp/test/test.cpp
The part to edit is between line 56 and line 63:
.. code-block:: c++
Eigen::VectorXd operator()(const Eigen::VectorXd& x) const
{
double y = 0;
// YOUR CODE HERE
// ...
// return a 1-dimensional vector
return tools::make_vector(y);
}
For more information, see the :ref:`Basic example <basic-example>`.
Build your experiment
-----------------------
......@@ -75,3 +105,5 @@ Run your experiment
Analyze the results
--------------------
The results are in yourcomputer-date-hour-pid. For instance: ``wallepro-perso.loria.fr_2016-09-15_19_43_50_74198``.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment