Installation¶
Install the python package
Get the latest package for Linux or Windows from the Python Package Index (PyPI).
pip install flowty
Get the latest package for Linux or Windows from Anaconda Cloud.
conda install -c flowty flowty
Windows¶
Use the 64-bit version of python and get latest c++ redistributable.
Linux¶
On apt-get
compatible distributions do
apt-get update
apt-get install libgfortran5 libtbb2
Third Party Solvers¶
Flowty supports embedding a commercial solver. The solver is used for solving various LP and MIP subproblems in the path MIP algorithm and can also be accessed as a stand alone solver via the Flowty Python API.
FICO Xpress Solver¶
Flowty supports FICO Xpress Solver version 8.10. Enable the solver on your Flowty model as
m.setParam("MIPSolver", "Xpress")
Local Installation¶
To invoke the FICO Xpress Solver the environment variables must be set. Default locations are
set PATH=C:\xpressmp\bin;%PATH%
export XPRESS=/opt/xpressmp/bin
export LD_LIBRARY_PATH=/opt/xpressmp/lib:$LD_LIBRARY_PATH
Python Package Installation¶
It is possible to install Xpress using python.
It is possible to install Xpress via the package on PyPi.
pip install xpress
It is possible to install Xpress via the package on Anaconda Cloud.
conda install -c fico-xpress xpress
Then the environment variables needs to point the right places.
Running
python -c "import xpress"
prints the license license file location in the lines of C:\<path to python environment>\lib\python3.8\site-packages\xpress\license\community-xpauth.xpr
.
For convenience set the XPRESSDIR
variable
set XPRESSDIR=C:\<path to python environment>\lib\python3.8\site-packages\xpress
Add the library location to your PATH
variable
set PATH=%XPRESSDIR%\lib;%PATH%
Copy your license file to the library directory or to use the community license by doing
copy %XPRESSDIR%\license\community-xpauth.xpr %XPRESSDIR%\lib\xpauth.xpr
Running
python -c "import xpress"
prints the license file location in the lines of <path to python environment>/lib/python3.8/site-packages/xpress/license/community-xpauth.xpr
.
For convenience set the XPRESSDIR
variable
export XPRESSDIR=<path to python environment>/lib/python3.8/site-packages/xpress
Make a symbolic link to the shared library
ln -s $XPRESSDIR/lib/libxprs.so.36.01 $XPRESSDIR/lib/libxprs.so
LD_LIBRARY_PATH
.
export LD_LIBRARY_PATH=$XPRESSDIR/lib:$LD_LIBRARY_PATH
Set the XPRESS
variable to point to the location of your license file or to use the community license by doing
ln -s $XPRESSDIR/license/community-xpauth.xpr $XPRESSDIR/license/xpauth.xpr
export XPRESS=$XPRESSDIR/license