What is pyIbex


pyIbex is set of python modules for solving non linear problems using Interval Arithmetic tools with high level functionalities such as Contractors programming and Sets manipulation.
Initally based on the core part of Ibex-lib, it aims at combining the flexibility of python with the speed of C++ algorithms.
It is composed of the following submodules:
  • Interval, IntervalVector, IntervalMatrix (partial)
  • Functions evaluation
  • Contractors and Separators programming

Generic placeholder image

Get Started

Quick Install

To install pyibex enter in a terminal :

$ conda install -c benensta pyibex

Or using pip:

$ python -m pip install pyibex

If you don't have Conda installed, instruction for linux/OSX and windows can be found at conda website

See also Installation manual for more details.

Note

To drawn results, we encourage to use VIBes-viewer which provides a simple and fast gui tools for people working with interval.

tititi
To install with conda run :

$ conda install -c benensta vibes vibes-bin

A quick introduction can be found here.

Example : set inversion of a non linear function.


Copy the code on the right into "example.py" and enter in a terminal:

# launch vibes viewer in background
$ Vibes-viewer &
$ python ./example.py

You should get this figure which corresponds to set of all (x,y) such as f(x,y) < 0

from pyibex import *
from vibes import vibes
# define the function (x,y) -> sin(x+y)
f = Function('x', 'y', 'x*cos(x-y)+y')
# build the Forward / backward separator f(x,y) < 0
sep = SepFwdBwd(f, CmpOp.LEQ)
# define the initial domain [-10,10]x[-10,10]
X0 = IntervalVector(2, [-10, 10] )
#initialize vibes display
vibes.beginDrawing()
# run the set inversion algorithm
pySIVIA(X0, sep, 0.1)
vibes.endDrawing()

Next Step

Generic placeholder image

Read the documentation

Examples and tutorials

Generic placeholder image

Learn intervals with IAMOOC

a free MOOC focused on Interval Analysis with application to parameter estimation, robot localization and SLAM