From 0a247b273259e47c178f371d2174c1ab0fca2329 Mon Sep 17 00:00:00 2001 From: gchabert Date: Tue, 8 Sep 2020 19:36:11 +0200 Subject: [PATCH] Doc update and removal of a useless previous fix in Newton --- doc/install-cmake.rst | 58 ++++++++++++++--------------- doc/install.rst | 73 ++++++++++++++++++++++++------------- doc/java-install.rst | 55 +++++++++++++++++----------- doc/optim.rst | 2 - doc/solver.rst | 25 +++++++++---- src/numeric/ibex_Newton.cpp | 2 +- 6 files changed, 129 insertions(+), 86 deletions(-) diff --git a/doc/install-cmake.rst b/doc/install-cmake.rst index acc1d5de0..a8b1a6a24 100644 --- a/doc/install-cmake.rst +++ b/doc/install-cmake.rst @@ -35,19 +35,19 @@ If you are on MacOS and use the `MacPorts`_ package manager, you can install Ibe Otherwise, you can install Ibex from source with the following instructions. The installation assumes your system meets some `requirements`_. -Save the archive ``ibex-2.8.7.tar.gz`` in some ``Ibex`` folder and:: - - ~/Ibex$ tar xvfz ibex-2.8.7.tar.gz - ~/Ibex$ cd ibex-2.8.7 - ~/Ibex/ibex-2.8.7$ mkdir build - ~/Ibex/ibex-2.8.7/build$ cd build - ~/Ibex/ibex-2.8.7/build$ cmake .. - ~/Ibex/ibex-2.8.7/build$ make - ~/Ibex/ibex-2.8.7/build$ sudo make install +Save the archive ``ibex-2.8.8.tar.gz`` in some ``Ibex`` folder and:: + + ~/Ibex$ tar xvfz ibex-2.8.8.tar.gz + ~/Ibex$ cd ibex-2.8.8 + ~/Ibex/ibex-2.8.8$ mkdir build + ~/Ibex/ibex-2.8.8/build$ cd build + ~/Ibex/ibex-2.8.8/build$ cmake .. + ~/Ibex/ibex-2.8.8/build$ make + ~/Ibex/ibex-2.8.8/build$ sudo make install If you want to install Ibex in a local folder, use ``-DCMAKE_INSTALL_PREFIX``, ex:: - ~/Ibex/ibex-2.8.7/build$ cmake -DCMAKE_INSTALL_PREFIX=$HOME .. + ~/Ibex/ibex-2.8.8/build$ cmake -DCMAKE_INSTALL_PREFIX=$HOME .. See the :ref:`options `. The folder full path must not contain any **white space** or wierd characters like ``'"\()`*[]``. @@ -133,7 +133,7 @@ LP_LIB Ex: ``-DLP_LIB=soplex`` .. note:: - - The current release of Ibex (>=2.8.7) is compatible with Soplex 4. + - The current release of Ibex (>=2.8.8) is compatible with Soplex 4. - The link with cplex is **experimental**, i.e., support for installation issues may not be guaranteed. @@ -172,12 +172,12 @@ SOPLEX_DIR Ex: ``-DLP_LIB=soplex -DSOPLEX_DIR=$HOME/soplex`` If Ibex is compiled as a shared library, you must also add the libpath of Soplex in ``LD_LIBRARY_PATH``:: - ~/Ibex/ibex-2.8.7/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/ + ~/Ibex/ibex-2.8.8/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/ Under Windows, if you run a program from a command window, the ``PATH`` variable must also be updated:: - > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7 + > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8 > set SOPLEX_PATH=... > set PATH=%PATH%;%IBEX_PATH%\lib;%SOPLEX_PATH%\lib;C:\MinGW\bin @@ -228,11 +228,11 @@ BUILD_SHARED_LIBS Ex: ``-DBUILD_SHARED_LIBS=1``. Under MinGW:: - $ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7/lib + $ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8/lib Under a Windows command window:: - > set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7\lib;C:\MinGW\bin + > set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8\lib;C:\MinGW\bin ====================== ====================================================================================== @@ -266,22 +266,22 @@ To install ``pkg-config`` under MinGW, follow the steps given `here set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7 + > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8 > set PATH=%PATH%;%IBEX_PATH%\lib;C:\MinGW\bin > cd %IBEX_PATH%\examples > foo.exe @@ -294,7 +294,7 @@ Plugins/Packages There are many developments based on ibex which offer additional functionalities, typically algorithms tailored to some class of problems (e.g., parameter estimation, semi-infinite programming, etc.). -Up to release 2.8.6, there were disributed under the form of *plugins* as they were installed and compiled with the core library. Now, with Cmake, they are compiled separately and generate their own libraries. So we call them here *packages*. +If Ibex is compiled with waf, they are rather *plugins* as they are installed and compiled with the core library. With Cmake, they are compiled separately and generate their own libraries. So we call them here *packages*. The same steps must be done to compile a package as for the core library. See the current list of available plugins/packages in the `download page of Ibex `_. @@ -312,14 +312,14 @@ The ``CMAKE_INSTALL_PREFIX`` option allows to install the package locally, ex:: In this case the ``sudo`` before ``make install`` is unecessary. -If Ibex has been installed in a local folder, say ``~/Ibex/ibex-2.8.7`` you need to indicate this +If Ibex has been installed in a local folder, say ``~/Ibex/ibex-2.8.8`` you need to indicate this path using the ``CMAKE_PREFIX_PATH`` option:: - ~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.7 .. + ~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.8 .. Of course, you can combine both:: - ~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.7 -DCMAKE_INSTALL_PREFIX=~/Ibex/ibex-ampl .. + ~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.8 -DCMAKE_INSTALL_PREFIX=~/Ibex/ibex-ampl .. As said above, packages result in separate libraries. To link you own code with a package, you will have to add the following line in the ``CMakeLists.txt`` file of your project:: @@ -333,8 +333,8 @@ You can also run the whole unit tests suite with the installed version of Ibex. To this end, you must install first the `cppunit library `_. Then run:: - ~/Ibex$ cd ibex-2.8.7/build - ~/Ibex/ibex-2.8.7/build$ make check + ~/Ibex$ cd ibex-2.8.8/build + ~/Ibex/ibex-2.8.8/build$ make check ============= Uninstall @@ -348,13 +348,13 @@ Linux/Macos After running ``make install`` you can uninstall by running:: - ~/Ibex$ cd ibex-2.8.7/build - ~/Ibex/ibex-2.8.7/build$ make uninstall + ~/Ibex$ cd ibex-2.8.8/build + ~/Ibex/ibex-2.8.8/build$ make uninstall Then, you can remove the build directory:: - ~/Ibex$ cd ~/Ibex/ibex-2.8.7 + ~/Ibex$ cd ~/Ibex/ibex-2.8.8 ~/Ibex/ibex-2-8-7$ rm -Rf build --------------- diff --git a/doc/install.rst b/doc/install.rst index cdf60781a..d4dd8cae6 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -35,14 +35,25 @@ If you are on MacOS and use the `MacPorts`_ package manager, you can install Ibe Otherwise, you can install Ibex from source with the following instructions. The installation assumes your system meets some `requirements`_. -Save the archive ``ibex-2.8.7.tar.gz`` in some ``Ibex`` folder and:: +Save the archive ``ibex-2.8.8.tar.gz`` in some ``Ibex`` folder and:: - ~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz - ~/Ibex/$ cd ibex-2.8.7 - ~/Ibex/ibex-2.8.7/$ ./waf configure - ~/Ibex/ibex-2.8.7/$ sudo ./waf install + ~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz + ~/Ibex/$ cd ibex-2.8.8 + ~/Ibex/ibex-2.8.8/$ ./waf configure --lp-lib=soplex + ~/Ibex/ibex-2.8.8/$ sudo ./waf install +.. warning:: + + Soplex is a tierce library under `ZIB`_ licence, not LGPL. By configuring + Ibex with Soplex, you implicitely accept the terms of this licence. + + If you don't accept these terms, you can configure Ibex without Soplex:: + + ~/Ibex/ibex-2.8.8/$ ./waf configure + + **however** the performances will be strongly degraded, especially for the global optimizer. + ----------------- Windows ----------------- @@ -72,19 +83,31 @@ Windows We will assume now that this folder is the root folder of ibex. -- Save the archive ``ibex-2.8.7.tar.gz`` in ``C:\MinGW\msys\1.0\home\[user]\Ibex`` +- Save the archive ``ibex-2.8.8.tar.gz`` in ``C:\MinGW\msys\1.0\home\[user]\Ibex`` - Configure Ibex (still in the shell of MinGW):: ~/Ibex/$ export PATH="$PATH:/c/Python27" - ~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz - ~/Ibex/$ cd ibex-2.8.7 - ~/Ibex/ibex-2.8.7/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7 + ~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz + ~/Ibex/$ cd ibex-2.8.8 + ~/Ibex/ibex-2.8.8/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8 --lp-lib=soplex **Note:** the paths must be entered in Linux-style (don't use backslash ("\\") as separator). + + + .. warning:: + + Soplex is a tierce library under `ZIB`_ licence, not LGPL. By configuring + Ibex with Soplex, you implicitely accept the terms of this licence. + + If you don't accept these terms, you can configure Ibex without Soplex:: + + ~/Ibex/ibex-2.8.8/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8 + **however** the performances will be strongly degraded, especially for the global optimizer. + - Install Ibex:: - ~/Ibex/ibex-2.8.7/$ ./waf install + ~/Ibex/ibex-2.8.8/$ ./waf install .. note:: @@ -120,7 +143,7 @@ Configuration options The full list of options supported by ``waf configure`` can be obtained with:: - ~/Ibex/ibex-2.8.7/$ ./waf --help + ~/Ibex/ibex-2.8.8/$ ./waf --help This will display the full list of installed interval/LP libraries and plugins with their specific options, as well as benchmarking features. @@ -140,11 +163,11 @@ In particular, ``waf`` ``configure`` supports the following options: Under MinGW:: - $ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7/lib + $ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8/lib Under a Windows command window:: - > set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7\lib;C:\MinGW\bin + > set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8\lib;C:\MinGW\bin @@ -205,11 +228,11 @@ In particular, ``waf`` ``configure`` supports the following options: If Ibex is compiled as a shared library, you must also add the libpath of Soplex in ``LD_LIBRARY_PATH``:: - ~/Ibex/ibex-2.8.7/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/ + ~/Ibex/ibex-2.8.8/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/ Under Windows, if you run a program from a command window, the ``PATH`` variable must also be updated:: - > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7 + > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8 > set SOPLEX_PATH=... > set PATH=%PATH%;%IBEX_PATH%\lib;%SOPLEX_PATH%\lib;C:\MinGW\bin @@ -266,22 +289,22 @@ To install ``pkg-config`` under MinGW, follow the steps given `here set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7 + > set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8 > set PATH=%PATH%;%IBEX_PATH%\lib;C:\MinGW\bin > cd %IBEX_PATH%\examples > foo.exe @@ -293,15 +316,15 @@ You can also run the whole unit tests suite with the **installed** version of Ib To this end, you must install first the `cppunit library `_. Then run:: - ~/Ibex/ibex-2.8.7/$ ./waf utest + ~/Ibex/ibex-2.8.8/$ ./waf utest Note also the following command:: - ~/Ibex/ibex-2.8.7/$ ./waf check + ~/Ibex/ibex-2.8.8/$ ./waf check as a handy shortcut for:: - ~/Ibex/ibex-2.8.7/$ ./waf build install clean utest + ~/Ibex/ibex-2.8.8/$ ./waf build install clean utest ============= @@ -310,8 +333,8 @@ Uninstall Simply type in the path of IBEX (under the shell of MinGW for Windows):: - ~/Ibex/ibex-2.8.7$ sudo ./waf uninstall - ~/Ibex/ibex-2.8.7$ ./waf distclean + ~/Ibex/ibex-2.8.8$ sudo ./waf uninstall + ~/Ibex/ibex-2.8.8$ ./waf distclean **Note:** sudo is useless under MinGW or if Ibex is installed in a local folder. diff --git a/doc/java-install.rst b/doc/java-install.rst index 979ab1bd3..7d27374a0 100644 --- a/doc/java-install.rst +++ b/doc/java-install.rst @@ -4,7 +4,7 @@ **************************************************** .. _Choco: http://www.emn.fr/z-info/choco-solver - +.. _last release of the ibex-java plugin: https://github.com/ibex-team/ibex-java/releases +-----------------------------+---------------------+------------------------------+ | .. image:: images/ibex.jpg | | .. image:: images/choco.png | @@ -39,54 +39,65 @@ The installation of the plugin will generate, in addition to the Ibex library, t ------------ Linux/MacOS ------------ -Uncompress the archive ibex-2.8.7.tar.gz in some Ibex folder:: +- Uncompress the archive ibex-2.8.8.tar.gz in some Ibex folder:: + + ~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz + +- Download the `last release of the ibex-java plugin`_ (1.0.0) - ~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz +- Uncompress the archive ``ibex-java-1.0.0.tar.gz`` -Set the environment variable ``JAVA_HOME``. Typical paths are ``/Library/Java/Home`` (MacOS) or ``/usr/lib/jvm/java-7-openjdk-i38`` (Linux). Example:: +- Rename the folder ``ibex-java-1.0.0`` to ``ibex-java`` and place this folder under ``~/Ibex/ibex-2.8.8/plugins`` + +- Set the environment variable ``JAVA_HOME``. Typical paths are ``/Library/Java/Home`` (MacOS) or ``/usr/lib/jvm/java-7-openjdk-i38`` (Linux). Example:: ~/Ibex/$ export JAVA_HOME=/Library/Java/Home -Then configure and install Ibex as follows:: +- Then configure and install Ibex as follows:: - ~/Ibex/$ cd ibex-2.8.7 - ~/Ibex/ibex-2.8.7/$ ./waf configure [...] --enable-shared --with-jni --java-package-name=org.chocosolver.solver.constraints.real - ~/Ibex/ibex-2.8.7/$ ./waf install + ~/Ibex/$ cd ibex-2.8.8 + ~/Ibex/ibex-2.8.8/$ ./waf configure [...] --enable-shared --with-jni --java-package-name=org.chocosolver.solver.constraints.real + ~/Ibex/ibex-2.8.8/$ ./waf install -**Note**: the ``--enable-shared`` option is mandatory. + **Note**: the ``--enable-shared`` option is mandatory. ------------ Windows ------------ -Open a MinGW prompt window. +- Open a MinGW prompt window. + +- Uncompress the archive ibex-2.8.8.tar.gz in some Ibex folder:: + + ~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz +- Download the `last release of the ibex-java plugin`_ (1.0.0) -Uncompress the archive ibex-2.8.7.tar.gz in some Ibex folder:: +- Uncompress the archive ``ibex-java-1.0.0.tar.gz`` - ~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz +- Rename the folder ``ibex-java-1.0.0`` to ``ibex-java`` and place this folder under ``~/Ibex/ibex-2.8.8/plugins`` -Set the environment variable ``JAVA_HOME`` to the home directory of the 32 bits JDK. The variable must be set in Linux-style (don't use backslash ("\\") as separator), e.g.:: +- Set the environment variable ``JAVA_HOME`` to the home directory of the 32 bits JDK. The variable must be set in Linux-style (don't use backslash ("\\") as separator), e.g.:: ~/Ibex/$ export JAVA_HOME=/c/Java/jdk1.7.1_17 -Update the path as follows:: +- Update the path as follows:: ~/Ibex/$ set PATH=%PATH%;[prefix]\lib;C:\MinGW\bin -where *[prefix]* is the path specified via ``--prefix`` + where *[prefix]* is the path specified via ``--prefix`` -.. Warning: + .. Warning: - The path must not contain white spaces, like ”/c/Program Files/...”. Create a symbolik link of your Java directory if necessary. + The path must not contain white spaces, like ”/c/Program Files/...”. Create a symbolik link of your Java directory if necessary. -Then configure Ibex as follows:: +- Then configure Ibex as follows:: - ~/Ibex/$ cd ibex-2.8.7 - ~/Ibex/ibex-2.8.7/$ ./waf configure [...] --enable-shared --with-jni --java-package-name=org.chocosolver.solver.constraints.real - ~/Ibex/ibex-2.8.7/$ ./waf install + ~/Ibex/$ cd ibex-2.8.8 + ~/Ibex/ibex-2.8.8/$ ./waf configure [...] --enable-shared --with-jni --java-package-name=org.chocosolver.solver.constraints.real + ~/Ibex/ibex-2.8.8/$ ./waf install -**Note**: the ``--enable-shared`` option is mandatory. + **Note**: the ``--enable-shared`` option is mandatory. ============================ diff --git a/doc/optim.rst b/doc/optim.rst index 6b0c1c630..895d80c74 100644 --- a/doc/optim.rst +++ b/doc/optim.rst @@ -5,8 +5,6 @@ IbexOpt ************************************** -This page describes IbexOpt, the plugin installed with the ``--with-optim`` option. - .. _optim-run-default: ================= diff --git a/doc/solver.rst b/doc/solver.rst index a9c55addc..f4bda3c2f 100644 --- a/doc/solver.rst +++ b/doc/solver.rst @@ -4,9 +4,6 @@ ************************************** IbexSolve ************************************** - -This page describes IbexSolve, the plugin installed with the ``--with-solver`` option. - .. _solver-run-default: ================= @@ -77,13 +74,27 @@ Options | -t<*float*>, --timeout=<*float*> | Timeout (time in seconds). Default value is +oo (none). | | | | +--------------------------------------+------------------------------------------------------------------------------+ -| -i<*filename*>, --input=<*filename*> | Manifold input file. The file contains a (intermediate) description of the | -| | manifold with boxes in the MNF (binary) format. | +| -i<*filename*>, --input=<*filename*> | COV input file. The file contains a (intermediate) description of the | +| | manifold with boxes in the COV (binary) format. | | | | +--------------------------------------+------------------------------------------------------------------------------+ -| -o<*filename*>, --output=<*filename*>| Manifold output file. The file will contain the description of the manifold | -| | with boxes in the MNF (binary) format. | +| -o<*filename*>, --output=<*filename*>| COV output file. The file will contain the description of the manifold | +| | with boxes in the COV (binary) format. | +| | | ++--------------------------------------+------------------------------------------------------------------------------+ +| --simpl=... | Expression simplification level. Possible values are: | +| | | +| | - 0: no simplification at all (fast). | +| | - 1: basic simplifications (fairly fast). | +| | E.g. x+1+1 --> x+2 | +| | - 2: more advanced simplifications without developing (can be slow). | +| | E.g. x*x + x^2 --> 2x^2. | +| | Note that the DAG structure can be lost. | +| | - 3: simplifications with full polynomial developing (can blow up!). | +| | E.g. x*(x-1) + x --> x^2. | +| | Note that the DAG structure can be lost. | | | | +| | Default value is : 1. | +--------------------------------------+------------------------------------------------------------------------------+ | -s, --sols | Display the "solutions" (output boxes) on the standard output. | | | | diff --git a/src/numeric/ibex_Newton.cpp b/src/numeric/ibex_Newton.cpp index 7f5103a16..6d064b06d 100644 --- a/src/numeric/ibex_Newton.cpp +++ b/src/numeric/ibex_Newton.cpp @@ -244,7 +244,7 @@ bool inflating_newton(const Fnc& f, const VarSet* vars, const IntervalVector& fu IntervalVector box2=mid-y; - if (box2.is_interior_subset(box)) { + if (box2.is_subset(box)) { assert(!box2.is_empty());